@commercetools-frontend/application-shell 22.2.1 → 22.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{application-entry-point-ac068fc0.cjs.prod.js → application-entry-point-157014e2.cjs.prod.js} +10 -19
- package/dist/{application-entry-point-32a3b092.cjs.dev.js → application-entry-point-d7bdf367.cjs.dev.js} +10 -19
- package/dist/{application-entry-point-07dbf99c.esm.js → application-entry-point-e65e8ca0.esm.js} +10 -19
- package/dist/{box-8850277f.cjs.prod.js → box-686bc950.cjs.dev.js} +0 -2
- package/dist/{box-4395623b.esm.js → box-6ce924c9.esm.js} +0 -2
- package/dist/{box-6b5be9a9.cjs.dev.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-3daef70c.cjs.dev.js → configure-apollo-5a4d9cd7.cjs.dev.js} +64 -183
- package/dist/{configure-apollo-4ea370b4.esm.js → configure-apollo-972ea75d.esm.js} +64 -183
- package/dist/{configure-apollo-b2a0d497.cjs.prod.js → configure-apollo-af4ea1c4.cjs.prod.js} +64 -181
- 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-940f343f.esm.js → constants-16199962.esm.js} +3 -3
- package/dist/{constants-a3c2194a.cjs.prod.js → constants-539514a6.cjs.prod.js} +3 -3
- package/dist/{constants-b201d328.cjs.dev.js → constants-e1225230.cjs.dev.js} +3 -3
- 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/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/constants.d.ts +0 -1
- package/dist/declarations/src/feature-toggles.d.ts +1 -4
- package/dist/declarations/src/types/generated/settings.d.ts +89 -1151
- package/dist/{error-apologizer-57a2fb57.cjs.prod.js → error-apologizer-b3872f4d.cjs.prod.js} +3 -6
- package/dist/{error-apologizer-d20ca326.cjs.dev.js → error-apologizer-c3210e30.cjs.dev.js} +3 -6
- package/dist/{error-apologizer-d0409fcb.esm.js → error-apologizer-e5c28e4c.esm.js} +2 -5
- 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-4e8fd5e2.cjs.prod.js → index-5e1db8be.cjs.prod.js} +240 -488
- package/dist/{index-3239484c.esm.js → index-5eea3772.esm.js} +259 -511
- package/dist/{index-894f4596.cjs.dev.js → index-857b1320.cjs.dev.js} +258 -510
- 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-614b1cce.esm.js → navbar-0ad08a56.esm.js} +53 -110
- package/dist/{navbar-af81c703.cjs.dev.js → navbar-f7706903.cjs.dev.js} +53 -110
- package/dist/{navbar-de19b951.cjs.prod.js → navbar-ffea6503.cjs.prod.js} +53 -110
- package/dist/{oidc-6c79100b.cjs.prod.js → oidc-73f8d7c7.cjs.prod.js} +13 -20
- package/dist/{oidc-15d3a4c1.cjs.dev.js → oidc-7b43f6c0.cjs.dev.js} +13 -20
- package/dist/{oidc-callback-ab054f67.cjs.prod.js → oidc-callback-0e62e010.cjs.prod.js} +19 -24
- package/dist/{oidc-callback-ec94dbba.esm.js → oidc-callback-796ee4fa.esm.js} +22 -27
- package/dist/{oidc-callback-ca559a40.cjs.dev.js → oidc-callback-b3343f35.cjs.dev.js} +20 -25
- package/dist/{oidc-77115492.esm.js → oidc-cd2edc3c.esm.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-26b61532.esm.js +335 -0
- package/dist/{project-container-805662a2.cjs.prod.js → project-container-2ed314f8.cjs.prod.js} +21 -49
- package/dist/project-container-881d8b44.cjs.dev.js +354 -0
- package/dist/{project-expired-d020ec6f.cjs.dev.js → project-expired-24128077.cjs.dev.js} +6 -11
- package/dist/{project-expired-fe211a3d.esm.js → project-expired-6c22fecb.esm.js} +6 -11
- package/dist/{project-expired-f660e923.cjs.prod.js → project-expired-bab18d07.cjs.prod.js} +6 -11
- package/dist/{project-not-found-179f39e9.cjs.dev.js → project-not-found-4f87bee6.cjs.prod.js} +9 -12
- package/dist/{project-not-found-b5502e08.esm.js → project-not-found-ba59f27d.esm.js} +8 -11
- package/dist/{project-not-found-46f1cd62.cjs.prod.js → project-not-found-ccb94dd0.cjs.dev.js} +9 -12
- package/dist/{project-not-initialized-e9905ca9.cjs.dev.js → project-not-initialized-269d3e73.cjs.dev.js} +6 -11
- package/dist/{project-not-initialized-0a4c847b.cjs.prod.js → project-not-initialized-8be60e0d.cjs.prod.js} +6 -11
- package/dist/{project-not-initialized-f14ed881.esm.js → project-not-initialized-b0767967.esm.js} +6 -11
- package/dist/{project-suspended-8e50fb5d.esm.js → project-suspended-0d0a4ac6.esm.js} +7 -11
- package/dist/{project-suspended-994f5d16.cjs.prod.js → project-suspended-66d01226.cjs.prod.js} +7 -11
- package/dist/{project-suspended-a1a46abb.cjs.dev.js → project-suspended-facb24cd.cjs.dev.js} +7 -11
- package/dist/{quick-access-e7d9ec95.cjs.prod.js → quick-access-2ed3fd12.cjs.prod.js} +123 -191
- package/dist/{quick-access-4f55c2a1.cjs.dev.js → quick-access-62053676.cjs.dev.js} +124 -194
- package/dist/{quick-access-9742ff95.esm.js → quick-access-891af546.esm.js} +124 -194
- package/dist/{redirect-to-login-d893ba27.cjs.prod.js → redirect-to-login-b5d8de15.cjs.prod.js} +14 -18
- package/dist/{redirect-to-login-7c89cdfd.cjs.dev.js → redirect-to-login-e33aa893.cjs.dev.js} +14 -18
- package/dist/{redirect-to-login-58e4614d.esm.js → redirect-to-login-ff44dcb2.esm.js} +14 -18
- package/dist/{redirect-to-logout-2967472e.esm.js → redirect-to-logout-0f2161c2.esm.js} +7 -12
- package/dist/{redirect-to-logout-7fa846f5.cjs.prod.js → redirect-to-logout-81526f74.cjs.prod.js} +7 -12
- package/dist/{redirect-to-logout-429bb215.cjs.dev.js → redirect-to-logout-fc0ae5de.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-06e4f458.cjs.prod.js → requests-in-flight-loader-13d9681f.cjs.prod.js} +5 -9
- package/dist/{requests-in-flight-loader-2d2db11b.cjs.dev.js → requests-in-flight-loader-ac7b2a0f.cjs.dev.js} +5 -9
- package/dist/{requests-in-flight-loader-30deef32.esm.js → requests-in-flight-loader-f468445d.esm.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-b1384fa6.cjs.prod.js → service-page-project-switcher-11aecc87.cjs.prod.js} +3 -3
- package/dist/{service-page-project-switcher-ef6a88ea.esm.js → service-page-project-switcher-13eb36e5.esm.js} +3 -4
- package/dist/{service-page-project-switcher-52105f71.cjs.dev.js → service-page-project-switcher-83de5bb7.cjs.dev.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-824f1519.esm.js → use-applications-menu-02a22697.esm.js} +30 -40
- package/dist/{use-applications-menu-a5568a7d.cjs.prod.js → use-applications-menu-0910ece6.cjs.dev.js} +30 -40
- package/dist/{use-applications-menu-3e85b058.cjs.dev.js → use-applications-menu-8655a71c.cjs.prod.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-65b62e28.cjs.dev.js +430 -0
- package/dist/user-settings-menu-9c793af8.esm.js +404 -0
- package/dist/{user-settings-menu-92a5cb53.cjs.prod.js → user-settings-menu-ca99a56d.cjs.prod.js} +37 -121
- package/dist/{version-tracker-73a18ff9.cjs.prod.js → version-tracker-9b501e9f.cjs.prod.js} +5 -5
- package/dist/{version-tracker-5f6c37e6.cjs.dev.js → version-tracker-a0c89744.cjs.dev.js} +5 -5
- package/dist/{version-tracker-3e5d5525.esm.js → version-tracker-f32b1176.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
- package/dist/declarations/src/components/theme-switcher/messages.d.ts +0 -11
- package/dist/declarations/src/components/theme-switcher/new-design-release-info-dialog.d.ts +0 -5
- package/dist/new-design-release-info-dialog-629191c2.cjs.dev.js +0 -71
- package/dist/new-design-release-info-dialog-6e19106c.esm.js +0 -55
- package/dist/new-design-release-info-dialog-879a4af8.cjs.prod.js +0 -71
- package/dist/project-container-493422d8.esm.js +0 -364
- package/dist/project-container-8ca21a5f.cjs.dev.js +0 -383
- package/dist/user-settings-menu-1e5736ab.esm.js +0 -491
- package/dist/user-settings-menu-615d91e4.cjs.dev.js +0 -517
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var configureApollo = require('./configure-apollo-
|
|
3
|
+
var configureApollo = require('./configure-apollo-af4ea1c4.cjs.prod.js');
|
|
4
4
|
var _pt = require('prop-types');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var reactRouterDom = require('react-router-dom');
|
|
@@ -24,7 +24,7 @@ var constants$1 = require('@commercetools-frontend/constants');
|
|
|
24
24
|
var i18n = require('@commercetools-frontend/i18n');
|
|
25
25
|
var reactNotifications = require('@commercetools-frontend/react-notifications');
|
|
26
26
|
var sentry = require('@commercetools-frontend/sentry');
|
|
27
|
-
var constants = require('./constants-
|
|
27
|
+
var constants = require('./constants-539514a6.cjs.prod.js');
|
|
28
28
|
require('uuid');
|
|
29
29
|
require('@babel/runtime-corejs3/core-js-stable/url');
|
|
30
30
|
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
@@ -34,7 +34,7 @@ var Spacings = require('@commercetools-uikit/spacings');
|
|
|
34
34
|
var reactIntl = require('react-intl');
|
|
35
35
|
var FlatButton = require('@commercetools-uikit/flat-button');
|
|
36
36
|
var icons = require('@commercetools-uikit/icons');
|
|
37
|
-
var useIsServedByProxy = require('./use-is-served-by-proxy-
|
|
37
|
+
var useIsServedByProxy = require('./use-is-served-by-proxy-845cace5.cjs.prod.js');
|
|
38
38
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
39
39
|
var _taggedTemplateLiteral = require('@babel/runtime-corejs3/helpers/taggedTemplateLiteral');
|
|
40
40
|
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
@@ -45,6 +45,7 @@ var SelectInput = require('@commercetools-uikit/select-input');
|
|
|
45
45
|
var react$2 = require('@apollo/client/react');
|
|
46
46
|
var CTLogoSVG = require('@commercetools-frontend/assets/images/ct-logo.svg');
|
|
47
47
|
var LoadingSpinner = require('@commercetools-uikit/loading-spinner');
|
|
48
|
+
var history = require('@commercetools-frontend/browser-history');
|
|
48
49
|
var l10n = require('@commercetools-frontend/l10n');
|
|
49
50
|
var _Array$from = require('@babel/runtime-corejs3/core-js-stable/array/from');
|
|
50
51
|
var _everyInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/every');
|
|
@@ -71,9 +72,8 @@ var httpAdapter = require('@flopflip/http-adapter');
|
|
|
71
72
|
var ldAdapter = require('@flopflip/launchdarkly-adapter');
|
|
72
73
|
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
73
74
|
var reactRedux = require('react-redux');
|
|
74
|
-
var history = require('@commercetools-frontend/browser-history');
|
|
75
75
|
var upperFirst = require('lodash/upperFirst');
|
|
76
|
-
var oidc = require('./oidc-
|
|
76
|
+
var oidc = require('./oidc-73f8d7c7.cjs.prod.js');
|
|
77
77
|
require('@commercetools-uikit/design-system/materials/resets.css');
|
|
78
78
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
79
79
|
var _someInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
@@ -105,6 +105,7 @@ var AccessibleHidden__default = /*#__PURE__*/_interopDefault(AccessibleHidden);
|
|
|
105
105
|
var SelectInput__default = /*#__PURE__*/_interopDefault(SelectInput);
|
|
106
106
|
var CTLogoSVG__default = /*#__PURE__*/_interopDefault(CTLogoSVG);
|
|
107
107
|
var LoadingSpinner__default = /*#__PURE__*/_interopDefault(LoadingSpinner);
|
|
108
|
+
var history__default = /*#__PURE__*/_interopDefault(history);
|
|
108
109
|
var _Array$from__default = /*#__PURE__*/_interopDefault(_Array$from);
|
|
109
110
|
var _everyInstanceProperty__default = /*#__PURE__*/_interopDefault(_everyInstanceProperty);
|
|
110
111
|
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
@@ -120,15 +121,13 @@ var combineAdapters__default = /*#__PURE__*/_interopDefault(combineAdapters);
|
|
|
120
121
|
var httpAdapter__default = /*#__PURE__*/_interopDefault(httpAdapter);
|
|
121
122
|
var ldAdapter__default = /*#__PURE__*/_interopDefault(ldAdapter);
|
|
122
123
|
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
123
|
-
var history__default = /*#__PURE__*/_interopDefault(history);
|
|
124
124
|
var upperFirst__default = /*#__PURE__*/_interopDefault(upperFirst);
|
|
125
125
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
126
126
|
var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
|
|
127
127
|
|
|
128
|
-
const RequestsInFlightLoader = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./requests-in-flight-loader-
|
|
129
|
-
/* webpackChunkName: "requests-in-flight-loader" */
|
|
130
|
-
); }));
|
|
128
|
+
const RequestsInFlightLoader = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./requests-in-flight-loader-13d9681f.cjs.prod.js' /* webpackChunkName: "requests-in-flight-loader" */); }));
|
|
131
129
|
|
|
130
|
+
// Attempt to load the `projectKey` from localStorage
|
|
132
131
|
function selectProjectKeyFromLocalStorage() {
|
|
133
132
|
return window.localStorage.getItem(constants.STORAGE_KEYS.ACTIVE_PROJECT_KEY);
|
|
134
133
|
}
|
|
@@ -161,7 +160,6 @@ var messages$1 = reactIntl.defineMessages({
|
|
|
161
160
|
* As a result the project and user queries need refetching.
|
|
162
161
|
*/
|
|
163
162
|
const redirectToProject = key => useIsServedByProxy.location.replace("/".concat(key));
|
|
164
|
-
|
|
165
163
|
const BackToProject = props => {
|
|
166
164
|
const intl = reactIntl.useIntl();
|
|
167
165
|
return jsxRuntime.jsx(FlatButton__default["default"], {
|
|
@@ -174,108 +172,83 @@ BackToProject.displayName = 'BackToProject';
|
|
|
174
172
|
|
|
175
173
|
var _templateObject;
|
|
176
174
|
const animationPulse = react$1.keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n background-color: ", ";\n }\n 100% {\n background-color: ", ";\n }\n"])), designSystem.customProperties.colorNeutral, designSystem.customProperties.colorNeutral95);
|
|
177
|
-
|
|
178
175
|
const getWidthBySize = props => {
|
|
179
176
|
switch (props.shape) {
|
|
180
177
|
case 'dot':
|
|
181
178
|
switch (props.size) {
|
|
182
179
|
case 's':
|
|
183
180
|
return designSystem.customProperties.spacingS;
|
|
184
|
-
|
|
185
181
|
case 'm':
|
|
186
182
|
return designSystem.customProperties.spacingM;
|
|
187
|
-
|
|
188
183
|
case 'l':
|
|
189
184
|
return designSystem.customProperties.spacingL;
|
|
190
|
-
|
|
191
185
|
case 'xl':
|
|
192
186
|
return designSystem.customProperties.spacingXl;
|
|
193
|
-
|
|
194
187
|
default:
|
|
195
188
|
return 'auto';
|
|
196
189
|
}
|
|
197
|
-
|
|
198
190
|
case 'rect':
|
|
199
191
|
switch (props.size) {
|
|
200
192
|
case 's':
|
|
201
193
|
return '150px';
|
|
202
|
-
|
|
203
194
|
case 'm':
|
|
204
195
|
return '300px';
|
|
205
|
-
|
|
206
196
|
case 'l':
|
|
207
197
|
return '450px';
|
|
208
|
-
|
|
209
198
|
case 'xl':
|
|
210
199
|
return '600px';
|
|
211
|
-
|
|
212
200
|
default:
|
|
213
201
|
return 'auto';
|
|
214
202
|
}
|
|
215
|
-
|
|
216
203
|
default:
|
|
217
204
|
return 'auto';
|
|
218
205
|
}
|
|
219
206
|
};
|
|
220
|
-
|
|
221
207
|
const getHeightBySize = props => {
|
|
222
208
|
switch (props.shape) {
|
|
223
209
|
case 'dot':
|
|
224
210
|
return getWidthBySize(props);
|
|
225
|
-
|
|
226
211
|
case 'rect':
|
|
227
212
|
return '32px';
|
|
228
|
-
|
|
229
213
|
default:
|
|
230
214
|
return 'auto';
|
|
231
215
|
}
|
|
232
216
|
};
|
|
233
|
-
|
|
234
217
|
const getRadiusBySize = props => {
|
|
235
218
|
switch (props.shape) {
|
|
236
219
|
case 'dot':
|
|
237
220
|
switch (props.size) {
|
|
238
221
|
case 's':
|
|
239
222
|
return designSystem.customProperties.borderRadius4;
|
|
240
|
-
|
|
241
223
|
case 'm':
|
|
242
224
|
return '8px';
|
|
243
|
-
|
|
244
225
|
case 'l':
|
|
245
226
|
return '12px';
|
|
246
|
-
|
|
247
227
|
case 'xl':
|
|
248
228
|
return '16px';
|
|
249
|
-
|
|
250
229
|
default:
|
|
251
230
|
return 'none';
|
|
252
231
|
}
|
|
253
|
-
|
|
254
232
|
case 'rect':
|
|
255
233
|
return designSystem.customProperties.borderRadius4;
|
|
256
|
-
|
|
257
234
|
default:
|
|
258
235
|
return 'none';
|
|
259
236
|
}
|
|
260
237
|
};
|
|
261
|
-
|
|
262
238
|
const LoadingPlaceholder = /*#__PURE__*/_styled__default["default"]("div", {
|
|
263
239
|
target: "e4c5pm00"
|
|
264
240
|
} )("background-color:", designSystem.customProperties.colorNeutral, ";animation-name:", animationPulse, ";animation-duration:1s;animation-timing-function:ease-out;animation-delay:0;animation-direction:alternate;animation-iteration-count:infinite;width:", getWidthBySize, ";height:", getHeightBySize, ";border-radius:", getRadiusBySize, ";" + ("" ));
|
|
265
|
-
|
|
266
241
|
LoadingPlaceholder.displayName = 'LoadingPlaceholder';
|
|
267
242
|
|
|
268
243
|
function useMcQuery(query, options) {
|
|
269
244
|
return react$2.useQuery(query, options);
|
|
270
245
|
}
|
|
271
|
-
|
|
272
246
|
function useMcLazyQuery(query, options) {
|
|
273
247
|
return react$2.useLazyQuery(query, options);
|
|
274
248
|
}
|
|
275
|
-
|
|
276
249
|
function useMcMutation(mutation, options) {
|
|
277
250
|
return react$2.useMutation(mutation, options);
|
|
278
|
-
}
|
|
251
|
+
}
|
|
279
252
|
|
|
280
253
|
var messages = reactIntl.defineMessages({
|
|
281
254
|
projectsLabel: {
|
|
@@ -306,30 +279,21 @@ var messages = reactIntl.defineMessages({
|
|
|
306
279
|
});
|
|
307
280
|
|
|
308
281
|
const _excluded$1 = ["projectCount"];
|
|
309
|
-
|
|
310
282
|
function ownKeys$8(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
311
|
-
|
|
312
283
|
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$8(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$8(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
313
284
|
var ProjectsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchUserProjects" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "user" }, name: { kind: "Name", value: "me" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "projects" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "suspension" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "expiry" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 218, source: { body: "query FetchUserProjects {\n user: me {\n id\n projects {\n results {\n name\n key\n suspension {\n isActive\n }\n expiry {\n isActive\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
314
285
|
const PROJECT_SWITCHER_LABEL_ID = 'project-switcher-label';
|
|
315
|
-
|
|
316
286
|
var _ref3$1 = {
|
|
317
287
|
name: "82a6rk",
|
|
318
288
|
styles: "flex:1"
|
|
319
289
|
} ;
|
|
320
|
-
|
|
321
290
|
var _ref4$1 = {
|
|
322
291
|
name: "zol16h",
|
|
323
292
|
styles: "display:flex;flex:1;align-items:center"
|
|
324
293
|
} ;
|
|
325
|
-
|
|
326
294
|
const ProjectSwitcherValueContainer = _ref5 => {
|
|
327
295
|
let projectCount = _ref5.projectCount,
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
const _useTheme = designSystem.useTheme(),
|
|
331
|
-
themedValue = _useTheme.themedValue;
|
|
332
|
-
|
|
296
|
+
restProps = _objectWithoutProperties(_ref5, _excluded$1);
|
|
333
297
|
return jsxRuntime.jsxs("div", {
|
|
334
298
|
css: _ref4$1,
|
|
335
299
|
children: [jsxRuntime.jsx("div", {
|
|
@@ -338,22 +302,19 @@ const ProjectSwitcherValueContainer = _ref5 => {
|
|
|
338
302
|
children: restProps.children
|
|
339
303
|
}))
|
|
340
304
|
}), jsxRuntime.jsx("span", {
|
|
341
|
-
css: /*#__PURE__*/react$1.css("width:
|
|
305
|
+
css: /*#__PURE__*/react$1.css("width:26px;height:26px;border-radius:100%;background:", designSystem.designTokens.colorNeutral, ";color:", designSystem.designTokens.colorSurface, ";font-size:", designSystem.designTokens.fontSize30, ";display:flex;justify-content:center;align-items:center;" + ("" ), "" ),
|
|
342
306
|
children: projectCount
|
|
343
307
|
})]
|
|
344
308
|
});
|
|
345
309
|
};
|
|
346
|
-
|
|
347
310
|
var _ref$2 = {
|
|
348
311
|
name: "16lqnjx",
|
|
349
312
|
styles: "font-size:1.5rem;display:flex"
|
|
350
313
|
} ;
|
|
351
|
-
|
|
352
314
|
var _ref2$2 = {
|
|
353
315
|
name: "10s3lzp",
|
|
354
316
|
styles: "word-wrap:break-word"
|
|
355
317
|
} ;
|
|
356
|
-
|
|
357
318
|
const ProjectSwitcherOption = props => {
|
|
358
319
|
const project = props.data;
|
|
359
320
|
return jsxRuntime.jsx(SelectInput__default["default"].Option, _objectSpread$8(_objectSpread$8({}, props), {}, {
|
|
@@ -388,21 +349,17 @@ const mapProjectsToOptions = memoize__default["default"](projects => _mapInstanc
|
|
|
388
349
|
suspension: project.suspension,
|
|
389
350
|
expiry: project.expiry
|
|
390
351
|
})));
|
|
391
|
-
|
|
392
352
|
const redirectTo = targetUrl => useIsServedByProxy.location.replace(targetUrl);
|
|
393
|
-
|
|
394
353
|
const ProjectSwitcher = props => {
|
|
395
354
|
const intl = reactIntl.useIntl();
|
|
396
|
-
|
|
397
355
|
const _useMcQuery = useMcQuery(ProjectsQuery, {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
356
|
+
onError: sentry.reportErrorToSentry,
|
|
357
|
+
context: {
|
|
358
|
+
target: constants$1.GRAPHQL_TARGETS.MERCHANT_CENTER_BACKEND
|
|
359
|
+
}
|
|
360
|
+
}),
|
|
361
|
+
loading = _useMcQuery.loading,
|
|
362
|
+
data = _useMcQuery.data;
|
|
406
363
|
if (loading) return null;
|
|
407
364
|
return jsxRuntime.jsxs("div", {
|
|
408
365
|
css: /*#__PURE__*/react$1.css("width:", designSystem.designTokens.constraint6, ";" + ("" ), "" ),
|
|
@@ -417,17 +374,15 @@ const ProjectSwitcher = props => {
|
|
|
417
374
|
"aria-labelledby": PROJECT_SWITCHER_LABEL_ID,
|
|
418
375
|
onChange: event => {
|
|
419
376
|
const selectedProjectKey = event.target.value;
|
|
420
|
-
|
|
421
377
|
if (selectedProjectKey !== props.projectKey) {
|
|
422
378
|
var _window$app$__DEVELOP, _window$app$__DEVELOP2;
|
|
423
|
-
|
|
424
379
|
if ((_window$app$__DEVELOP = window.app.__DEVELOPMENT__) !== null && _window$app$__DEVELOP !== void 0 && (_window$app$__DEVELOP2 = _window$app$__DEVELOP.oidc) !== null && _window$app$__DEVELOP2 !== void 0 && _window$app$__DEVELOP2.authorizeUrl) {
|
|
425
380
|
configureApollo.setActiveProjectKey(selectedProjectKey);
|
|
426
|
-
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
// We simply redirect to a "new" browser page, instead of using the
|
|
427
384
|
// history router. This will simplify a lot of things and avoid possible
|
|
428
385
|
// problems like e.g. resetting the store/state.
|
|
429
|
-
|
|
430
|
-
|
|
431
386
|
redirectTo("/".concat(selectedProjectKey));
|
|
432
387
|
}
|
|
433
388
|
},
|
|
@@ -449,29 +404,23 @@ const ProjectSwitcher = props => {
|
|
|
449
404
|
})]
|
|
450
405
|
});
|
|
451
406
|
};
|
|
452
|
-
|
|
453
407
|
ProjectSwitcher.displayName = 'ProjectSwitcher';
|
|
454
408
|
|
|
455
409
|
// eslint-disable-next-line import/prefer-default-export
|
|
456
410
|
const REQUESTS_IN_FLIGHT_LOADER_DOM_ID = 'loader-for-requests-in-flight';
|
|
457
411
|
|
|
458
|
-
const UserSettingsMenu = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./user-settings-menu-
|
|
459
|
-
/* webpackChunkName: "user-settings-menu" */
|
|
460
|
-
); }));
|
|
412
|
+
const UserSettingsMenu = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./user-settings-menu-ca99a56d.cjs.prod.js' /* webpackChunkName: "user-settings-menu" */); }));
|
|
461
413
|
|
|
462
414
|
var _ref$1 = {
|
|
463
415
|
name: "36bnqj",
|
|
464
416
|
styles: "display:flex;flex:1"
|
|
465
417
|
} ;
|
|
466
|
-
|
|
467
418
|
var _ref2$1 = {
|
|
468
419
|
name: "hlihg7",
|
|
469
420
|
styles: "display:block;float:left;width:28px;height:32px;margin-left:20px"
|
|
470
421
|
} ;
|
|
471
|
-
|
|
472
422
|
const AppBar = props => {
|
|
473
423
|
var _props$user$defaultPr, _props$user;
|
|
474
|
-
|
|
475
424
|
const previousProjectKey = getPreviousProjectKey((_props$user$defaultPr = (_props$user = props.user) === null || _props$user === void 0 ? void 0 : _props$user.defaultProjectKey) !== null && _props$user$defaultPr !== void 0 ? _props$user$defaultPr : undefined);
|
|
476
425
|
return jsxRuntime.jsxs("div", {
|
|
477
426
|
css: /*#__PURE__*/react$1.css("background-color:", designSystem.designTokens.colorSurface, ";box-shadow:", applicationComponents.designTokens.shadowForAppbar, ";min-height:", constants.DIMENSIONS.header, ";position:relative;width:100%;z-index:20000;display:flex;align-items:center;justify-content:space-between;" + ("" ), "" ),
|
|
@@ -511,11 +460,11 @@ const AppBar = props => {
|
|
|
511
460
|
shape: "rect",
|
|
512
461
|
size: "s"
|
|
513
462
|
});
|
|
514
|
-
}
|
|
463
|
+
}
|
|
464
|
+
// The `<ProjectSwitcher>` should be rendered only if the
|
|
515
465
|
// user is fetched and the user has projects while the app runs in an project context.
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
if (props.user.projects.total > 0 && props.projectKeyFromUrl) return jsxRuntime.jsx(ProjectSwitcher // In this case it's not necessary to check if the `projectKey` param
|
|
466
|
+
if (props.user.projects.total > 0 && props.projectKeyFromUrl) return jsxRuntime.jsx(ProjectSwitcher
|
|
467
|
+
// In this case it's not necessary to check if the `projectKey` param
|
|
519
468
|
// is included in the list of projects. In such case
|
|
520
469
|
// the dropdown will still be rendered but no project will be selected.
|
|
521
470
|
// This is fine becase the user has still the possibility to "switch"
|
|
@@ -544,7 +493,6 @@ const AppBar = props => {
|
|
|
544
493
|
})]
|
|
545
494
|
});
|
|
546
495
|
};
|
|
547
|
-
|
|
548
496
|
AppBar.displayName = 'AppBar';
|
|
549
497
|
|
|
550
498
|
const ApplicationLoader = props => jsxRuntime.jsxs("div", {
|
|
@@ -555,9 +503,9 @@ const ApplicationLoader = props => jsxRuntime.jsxs("div", {
|
|
|
555
503
|
src: CTLogoSVG__default["default"]
|
|
556
504
|
}) : null]
|
|
557
505
|
});
|
|
558
|
-
|
|
559
506
|
ApplicationLoader.displayName = 'ApplicationLoader';
|
|
560
507
|
|
|
508
|
+
const getBrowserHistory = () => history__default["default"];
|
|
561
509
|
const getBrowserLocale = win => {
|
|
562
510
|
const browserLocale = win && win.navigator && win.navigator.language;
|
|
563
511
|
return l10n.getSupportedLocale(browserLocale);
|
|
@@ -578,49 +526,41 @@ const hideAppLoader = () => {
|
|
|
578
526
|
*/
|
|
579
527
|
if (window.onAppLoaded) window.onAppLoaded();
|
|
580
528
|
};
|
|
581
|
-
|
|
582
529
|
const ConfigureIntlProvider = props => {
|
|
583
530
|
react.useEffect(() => {
|
|
584
531
|
if (props.locale) {
|
|
585
532
|
hideAppLoader();
|
|
586
533
|
}
|
|
587
534
|
}, [props.locale]);
|
|
588
|
-
|
|
589
535
|
if (!props.locale) {
|
|
590
536
|
return null;
|
|
591
537
|
}
|
|
592
|
-
|
|
593
538
|
return jsxRuntime.jsx(reactIntl.IntlProvider, {
|
|
594
539
|
locale: props.locale,
|
|
595
540
|
messages: props.messages,
|
|
596
541
|
children: props.children
|
|
597
542
|
});
|
|
598
543
|
};
|
|
599
|
-
|
|
600
544
|
ConfigureIntlProvider.propTypes = {};
|
|
601
545
|
ConfigureIntlProvider.displayName = 'ConfigureIntlProvider';
|
|
602
546
|
|
|
603
|
-
const ErrorApologizer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./error-apologizer-
|
|
604
|
-
/* webpackChunkName: "error-apologizer" */
|
|
605
|
-
); }));
|
|
547
|
+
const ErrorApologizer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./error-apologizer-b3872f4d.cjs.prod.js' /* webpackChunkName: "error-apologizer" */); }));
|
|
606
548
|
|
|
607
549
|
var ProjectQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProject" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "projectKey" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "project" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "key" }, value: { kind: "Variable", name: { kind: "Name", value: "projectKey" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "countries" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "currencies" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "languages" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "initialized" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "expiry" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "daysLeft" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "suspension" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "reason" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedPermissions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedActionRights" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedDataFences" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "StoreDataFence" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "__typename" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "allPermissionsForAllApplications" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "allAppliedPermissions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedActionRights" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedMenuVisibilities" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "allAppliedDataFences" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "StoreDataFence" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "group" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "__typename" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "owner" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 997, source: { body: "query FetchProject($projectKey: String) {\n project(key: $projectKey) {\n key\n version\n name\n countries\n currencies\n languages\n initialized\n expiry {\n isActive\n daysLeft\n }\n suspension {\n isActive\n reason\n }\n allAppliedPermissions {\n name\n value\n }\n allAppliedActionRights {\n group\n name\n value\n }\n allAppliedDataFences {\n ... on StoreDataFence {\n type\n name\n value\n group\n __typename\n }\n }\n allPermissionsForAllApplications {\n allAppliedPermissions {\n name\n value\n }\n allAppliedActionRights {\n group\n name\n value\n }\n allAppliedMenuVisibilities {\n name\n value\n }\n allAppliedDataFences {\n ... on StoreDataFence {\n type\n name\n value\n group\n __typename\n }\n }\n }\n owner {\n id\n name\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
608
|
-
|
|
609
550
|
const FetchProject = props => {
|
|
610
551
|
const _useMcQuery = useMcQuery(ProjectQuery, {
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
552
|
+
onError: sentry.reportErrorToSentry,
|
|
553
|
+
variables: {
|
|
554
|
+
projectKey: props.projectKey
|
|
555
|
+
},
|
|
556
|
+
context: {
|
|
557
|
+
target: constants$1.GRAPHQL_TARGETS.MERCHANT_CENTER_BACKEND
|
|
558
|
+
},
|
|
559
|
+
skip: props.skip === true
|
|
560
|
+
}),
|
|
561
|
+
loading = _useMcQuery.loading,
|
|
562
|
+
data = _useMcQuery.data,
|
|
563
|
+
error = _useMcQuery.error;
|
|
624
564
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
625
565
|
children: props.children({
|
|
626
566
|
isLoading: loading,
|
|
@@ -629,7 +569,6 @@ const FetchProject = props => {
|
|
|
629
569
|
})
|
|
630
570
|
});
|
|
631
571
|
};
|
|
632
|
-
|
|
633
572
|
FetchProject.propTypes = {
|
|
634
573
|
projectKey: _pt__default["default"].string,
|
|
635
574
|
skip: _pt__default["default"].bool,
|
|
@@ -638,18 +577,16 @@ FetchProject.propTypes = {
|
|
|
638
577
|
FetchProject.displayName = 'FetchProject';
|
|
639
578
|
|
|
640
579
|
var LoggedInUserQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchLoggedInUser" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "user" }, name: { kind: "Name", value: "me" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "email" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gravatarHash" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "firstName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "language" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "numberFormat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "timeZone" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingGroup" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingSubgroup" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingTeam" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "launchdarklyTrackingTenant" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "defaultProjectKey" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "businessRole" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "projects" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "suspension" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "expiry" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "isActive" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "idTokenUserInfo" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "iss" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "sub" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "aud" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "exp" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "iat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "email" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "additionalClaims" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 654, source: { body: "query FetchLoggedInUser {\n user: me {\n id\n email\n createdAt\n gravatarHash\n firstName\n lastName\n language\n numberFormat\n timeZone\n launchdarklyTrackingId\n launchdarklyTrackingGroup\n launchdarklyTrackingSubgroup\n launchdarklyTrackingTeam\n launchdarklyTrackingTenant\n defaultProjectKey\n businessRole\n projects {\n total\n results {\n name\n key\n suspension {\n isActive\n }\n expiry {\n isActive\n }\n }\n }\n idTokenUserInfo {\n iss\n sub\n aud\n exp\n iat\n email\n name\n additionalClaims\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
641
|
-
|
|
642
580
|
const FetchUser = props => {
|
|
643
581
|
const _useMcQuery = useMcQuery(LoggedInUserQuery, {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
582
|
+
onError: sentry.reportErrorToSentry,
|
|
583
|
+
context: {
|
|
584
|
+
target: constants$1.GRAPHQL_TARGETS.MERCHANT_CENTER_BACKEND
|
|
585
|
+
}
|
|
586
|
+
}),
|
|
587
|
+
loading = _useMcQuery.loading,
|
|
588
|
+
data = _useMcQuery.data,
|
|
589
|
+
error = _useMcQuery.error;
|
|
653
590
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
654
591
|
children: props.children({
|
|
655
592
|
isLoading: loading,
|
|
@@ -658,20 +595,15 @@ const FetchUser = props => {
|
|
|
658
595
|
})
|
|
659
596
|
});
|
|
660
597
|
};
|
|
661
|
-
|
|
662
598
|
FetchUser.propTypes = {
|
|
663
599
|
children: _pt__default["default"].func.isRequired
|
|
664
600
|
};
|
|
665
601
|
FetchUser.displayName = 'FetchUser';
|
|
666
602
|
|
|
667
|
-
const Navbar = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./navbar-
|
|
668
|
-
/* webpackChunkName: "navbar" */
|
|
669
|
-
); }));
|
|
603
|
+
const Navbar = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./navbar-ffea6503.cjs.prod.js' /* webpackChunkName: "navbar" */); }));
|
|
670
604
|
|
|
671
605
|
const _excluded = ["icon"];
|
|
672
|
-
|
|
673
606
|
function ownKeys$7(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
674
|
-
|
|
675
607
|
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$7(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$7(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
676
608
|
const compiledStyles$1 = {
|
|
677
609
|
"global": ":root {\n\n /* Left navigation */\n}\n\n/* Left Nav */\n\n.navbar-mod__left-navigation___n7yUt {\n display: flex;\n flex-grow: 1;\n width: 64px;\n z-index: 19999;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar);\n}\n\n.navbar-mod__list___RCV3J {\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1 1 0;\n}\n\n.body__menu-open .navbar-mod__scrollable-menu___64pxJ {\n flex: 1 1 0;\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.navbar-mod__list-item___MjK6t {\n width: 64px;\n min-height: 56px;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar);\n margin: 0;\n list-style: none;\n cursor: pointer;\n}\n\n.navbar-mod__item-link___X2Ina {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n padding: var(--spacing-m);\n width: 100%;\n position: relative;\n display: block;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__item-icon-text___a-8JY {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon___bLsep {\n width: 24px;\n height: 24px;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon___bLsep > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon__active___asorg > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon-when-active);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj {\n flex: 1;\n font-weight: 500;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n display: none;\n opacity: 0;\n transition: all 0.25s ease-in-out;\n text-align: left;\n text-decoration: none;\n}\n\n.navbar-mod__expander___jyAUi {\n border-top: 1px solid var(--color-neutral-40);\n height: 50px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: transparent;\n}\n\n.navbar-mod__expander___jyAUi:hover {\n background: transparent !important;\n}\n\n.navbar-mod__expand-icon___BtmRa {\n align-items: center;\n border-radius: 32px;\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n transform: translateX(0) rotateZ(0deg);\n width: 24px;\n}\n\n.navbar-mod__item--bottom___eW7nh {\n position: absolute;\n bottom: 50px;\n}\n\n.navbar-mod__list-item___MjK6t:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar-when-hovered);\n}\n\n.navbar-mod__item__active___lo1sr .navbar-mod__title___eRWUj {\n opacity: 1;\n display: block;\n transition: all 0.2s ease;\n}\n\n.navbar-mod__item_menu-open___zk0zh {\n height: auto !important;\n}\n\n/* NO SUBMENU */\n\n.navbar-mod__item_menu-collapsed___cluyY .navbar-mod__item-link___X2Ina {\n text-align: center;\n}\n\n.navbar-mod__item__no-submenu___0lmiH .navbar-mod__title___eRWUj {\n border-bottom: 0;\n}\n\n.navbar-mod__item__no-submenu___0lmiH .navbar-mod__sublist___os1s7 {\n padding-top: 40px;\n}\n\n/* left-nav open */\n\n.body__menu-open .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n font-weight: 500;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n}\n\n.body__menu-open .navbar-mod__left-navigation___n7yUt {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n box-shadow: var(--shadow-for-navbar);\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t {\n height: auto;\n min-height: 56px;\n transition: max-height 0.15s ease-out;\n overflow: hidden;\n}\n\n.body__menu-open .navbar-mod__left-navigation___n7yUt,\n.body__menu-open .navbar-mod__list-item___MjK6t {\n width: 245px;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj {\n display: block;\n opacity: 1;\n margin-left: var(--spacing-m);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n}\n\n.navbar-mod__list-item___MjK6t:not(.navbar-mod__item__active___lo1sr):hover .navbar-mod__icon___bLsep > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon-when-active);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n}\n\n.navbar-mod__list-item___MjK6t:not(.navbar-mod__item__active___lo1sr):hover .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n}\n\n.body__menu-open .navbar-mod__expand-icon___BtmRa {\n transform: translateX(0) rotateZ(180deg);\n}\n\n.body__menu-open .navbar-mod__item__active___lo1sr {\n max-height: 500px;\n transition: max-height 0.25s ease-in;\n}\n\n.body__menu-open .navbar-mod__sublist___os1s7 {\n position: relative;\n z-index: 1;\n left: 0;\n margin: 0 0 0 calc(\n 24px + var(--spacing-m) + 4px + 4px\n );\n padding: var(--spacing-m) 0 0;\n background-color: transparent;\n}\n\n.body__menu-open .navbar-mod__sublist___os1s7.navbar-mod__sublist-no-children___Dy-h- {\n border: 0;\n}\n\n.body__menu-open .navbar-mod__title-copy___o2y1q {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n text-decoration: none;\n transition: all 0.15s ease;\n}\n\n.body__menu-open .navbar-mod__title-copy___o2y1q:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n.body__menu-open .navbar-mod__expander___jyAUi {\n min-height: 50px;\n justify-content: flex-end;\n padding: var(--spacing-m);\n}\n\n/* Second level menu */\n\n.navbar-mod__sublist___os1s7 {\n padding: 75px var(--spacing-l) var(--spacing-m);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n position: absolute;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar);\n top: 0;\n left: 64px;\n z-index: -1;\n list-style: none;\n opacity: 0.01;\n visibility: hidden;\n}\n\n.navbar-mod__sublist__inactive___kJvf- {\n /* empty block */\n}\n\n.navbar-mod__sublist-item___gafkS {\n padding: var(--spacing-s) 0 0;\n}\n\n.navbar-mod__sublist-item___gafkS:first-of-type {\n padding: 0;\n}\n\n.navbar-mod__sublist-item___gafkS:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n.navbar-mod__text___ccHEu {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n}\n\n.navbar-mod__text-link___dhtj6 {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n text-decoration: none;\n transition: all 0.15s ease;\n}\n\n.navbar-mod__text-link___dhtj6:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n/* Item active */\n\n.navbar-mod__item__active___lo1sr,\n.navbar-mod__item_menu__active___5xFRw {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar-when-active);\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n width: calc(\n 205px + 64px -\n var(--spacing-m) * 2\n );\n justify-content: flex-start;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon-container___w3FtA {\n width: calc(24px + 4px * 2);\n display: flex;\n justify-content: center;\n align-self: flex-start;\n}\n\n.navbar-mod__fixed-menu___42tD9 .navbar-mod__list-item___MjK6t .navbar-mod__item-icon-text___a-8JY {\n justify-content: flex-start;\n display: flex;\n width: 100%;\n}\n\n.navbar-mod__fixed-menu___42tD9 .navbar-mod__list-item___MjK6t .navbar-mod__icon-container___w3FtA {\n /* empty block */\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n position: relative;\n width: auto;\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n margin-left: 40px;\n}\n\n.navbar-mod__item_menu-collapsed___cluyY.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n max-height: 44px;\n overflow: hidden;\n /* stylelint-disable-next-line value-no-vendor-prefix */\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n margin-left: var(--spacing-m);\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n margin-left: 0;\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__sublist___os1s7 {\n width: 205px;\n min-height: 100%;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__sublist___os1s7 {\n width: calc(100% - calc(\n 24px + var(--spacing-m) + 4px + 4px\n ));\n}\n\n.navbar-mod__sublist-expanded__active___240JK,\n.navbar-mod__sublist-collapsed__active___-9vYh {\n opacity: 1;\n visibility: visible;\n text-align: left;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar-when-active);\n}\n\n.navbar-mod__highlighted___oJWkA,\n.navbar-mod__highlighted___oJWkA .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-active) !important;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-active);\n}\n\n.navbar-mod__hidden___TQLSs {\n display: none;\n}\n\n.navbar-mod__divider___TpVzu {\n border-top: 1px solid var(--color-neutral-40);\n}\n\n.navbar-mod__loading-dot-container___G2LVb {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.navbar-mod__scrollable-menu___64pxJ {\n flex: 1 1 0;\n padding-bottom: 32px;\n /* \n FIXME: Make the navbar scrollable in collapsed state.\n NOTE: do not use `overflow-x: hidden; overflow-y: auto;` as this prevents submenus from showing up on hover \n */\n}\n\n.navbar-mod__fixed-menu___42tD9 {\n flex: 0 0 0;\n position: relative;\n}\n",
|
|
@@ -711,7 +643,6 @@ const compiledStyles$1 = {
|
|
|
711
643
|
}
|
|
712
644
|
};
|
|
713
645
|
const styles$2 = compiledStyles$1.jsonMap;
|
|
714
|
-
|
|
715
646
|
/*
|
|
716
647
|
<DataMenu data={[]}>
|
|
717
648
|
<MenuGroup>
|
|
@@ -725,87 +656,71 @@ const styles$2 = compiledStyles$1.jsonMap;
|
|
|
725
656
|
<MenuExpander/>
|
|
726
657
|
</DataMenu>
|
|
727
658
|
*/
|
|
728
|
-
const HeartIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./heart-000a023d.cjs.prod.js'); }));
|
|
729
|
-
const PaperclipIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./paperclip-23d1e69c.cjs.prod.js'); }));
|
|
730
|
-
const PluginIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./plugin-7e57f237.cjs.prod.js'); }));
|
|
731
|
-
const RocketIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./rocket-3e3f0a98.cjs.prod.js'); }));
|
|
732
|
-
const StarIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./star-f8502efb.cjs.prod.js'); }));
|
|
733
|
-
const ConnectedSquareIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./connected-square-b2e25621.cjs.prod.js'); }));
|
|
734
|
-
const WorldIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./world-e1f9dbf8.cjs.prod.js'); }));
|
|
735
|
-
const TreeStructureIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./tree-structure-f24ee3f6.cjs.prod.js'); }));
|
|
736
|
-
const UserFilledIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./user-filled-815b49a0.cjs.prod.js'); }));
|
|
737
|
-
const SpeedometerIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./speedometer-2881cef6.cjs.prod.js'); }));
|
|
738
|
-
const TagMultiIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./tag-multi-f9acb1c2.cjs.prod.js'); }));
|
|
739
|
-
const CartIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./cart-0698b97d.cjs.prod.js'); }));
|
|
740
|
-
const BoxIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./box-8850277f.cjs.prod.js'); }));
|
|
741
|
-
const GearIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./gear-2890f7fb.cjs.prod.js'); }));
|
|
742
|
-
const ListWithSearchIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./list-with-search-a5b72b33.cjs.prod.js'); }));
|
|
743
659
|
|
|
660
|
+
const HeartIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./heart-ebfab4cd.cjs.prod.js'); }));
|
|
661
|
+
const PaperclipIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./paperclip-6f0b6ae5.cjs.prod.js'); }));
|
|
662
|
+
const PluginIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./plugin-f199ed20.cjs.prod.js'); }));
|
|
663
|
+
const RocketIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./rocket-f0bfae34.cjs.prod.js'); }));
|
|
664
|
+
const StarIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./star-c11b0683.cjs.prod.js'); }));
|
|
665
|
+
const ConnectedSquareIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./connected-square-960e046b.cjs.prod.js'); }));
|
|
666
|
+
const WorldIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./world-f921d80c.cjs.prod.js'); }));
|
|
667
|
+
const TreeStructureIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./tree-structure-690366f9.cjs.prod.js'); }));
|
|
668
|
+
const UserFilledIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./user-filled-58af1ae4.cjs.prod.js'); }));
|
|
669
|
+
const SpeedometerIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./speedometer-0de260cf.cjs.prod.js'); }));
|
|
670
|
+
const TagMultiIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./tag-multi-f8d9c9e6.cjs.prod.js'); }));
|
|
671
|
+
const CartIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./cart-f2fc1baf.cjs.prod.js'); }));
|
|
672
|
+
const BoxIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./box-e17daf6c.cjs.prod.js'); }));
|
|
673
|
+
const GearIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./gear-9b394c43.cjs.prod.js'); }));
|
|
674
|
+
const ListWithSearchIcon = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./list-with-search-e3ccba98.cjs.prod.js'); }));
|
|
744
675
|
// The icon is expected to be the `svg` document as a string.
|
|
745
676
|
// For backwards compatibility purposes, we still support the legacy "icon name",
|
|
746
677
|
// which we then map to one of the pre-defined icons.
|
|
747
678
|
// Eventually, we want to get rid of this "switch" logic.
|
|
748
679
|
const IconSwitcher = _ref => {
|
|
749
680
|
let icon = _ref.icon,
|
|
750
|
-
|
|
751
|
-
|
|
681
|
+
iconProps = _objectWithoutProperties(_ref, _excluded);
|
|
752
682
|
if (_includesInstanceProperty__default["default"](icon).call(icon, '<svg')) {
|
|
753
683
|
return jsxRuntime.jsx(InlineSvg__default["default"], _objectSpread$7({
|
|
754
684
|
data: icon
|
|
755
685
|
}, iconProps));
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
|
|
686
|
+
}
|
|
687
|
+
// Backwards compatibility for apps using the "icon name".
|
|
759
688
|
switch (icon) {
|
|
760
689
|
// Legacy application icons
|
|
761
690
|
// TODO: To be removed once MC applications icons updates are published
|
|
762
691
|
case 'TreeStructureIcon':
|
|
763
692
|
return jsxRuntime.jsx(TreeStructureIcon, _objectSpread$7({}, iconProps));
|
|
764
|
-
|
|
765
693
|
case 'UserFilledIcon':
|
|
766
694
|
return jsxRuntime.jsx(UserFilledIcon, _objectSpread$7({}, iconProps));
|
|
767
|
-
|
|
768
695
|
case 'SpeedometerIcon':
|
|
769
696
|
return jsxRuntime.jsx(SpeedometerIcon, _objectSpread$7({}, iconProps));
|
|
770
|
-
|
|
771
697
|
case 'TagMultiIcon':
|
|
772
698
|
return jsxRuntime.jsx(TagMultiIcon, _objectSpread$7({}, iconProps));
|
|
773
|
-
|
|
774
699
|
case 'CartIcon':
|
|
775
700
|
return jsxRuntime.jsx(CartIcon, _objectSpread$7({}, iconProps));
|
|
776
|
-
|
|
777
701
|
case 'BoxIcon':
|
|
778
702
|
return jsxRuntime.jsx(BoxIcon, _objectSpread$7({}, iconProps));
|
|
779
|
-
|
|
780
703
|
case 'GearIcon':
|
|
781
704
|
return jsxRuntime.jsx(GearIcon, _objectSpread$7({}, iconProps));
|
|
782
|
-
|
|
783
705
|
case 'ListWithSearchIcon':
|
|
784
706
|
return jsxRuntime.jsx(ListWithSearchIcon, _objectSpread$7({}, iconProps));
|
|
785
|
-
// Custom application icons set
|
|
786
707
|
|
|
708
|
+
// Custom application icons set
|
|
787
709
|
case 'HeartIcon':
|
|
788
710
|
return jsxRuntime.jsx(HeartIcon, _objectSpread$7({}, iconProps));
|
|
789
|
-
|
|
790
711
|
case 'PaperclipIcon':
|
|
791
712
|
return jsxRuntime.jsx(PaperclipIcon, _objectSpread$7({}, iconProps));
|
|
792
|
-
|
|
793
713
|
case 'PluginIcon':
|
|
794
714
|
return jsxRuntime.jsx(PluginIcon, _objectSpread$7({}, iconProps));
|
|
795
|
-
|
|
796
715
|
case 'RocketIcon':
|
|
797
716
|
return jsxRuntime.jsx(RocketIcon, _objectSpread$7({}, iconProps));
|
|
798
|
-
|
|
799
717
|
case 'StarIcon':
|
|
800
718
|
return jsxRuntime.jsx(StarIcon, _objectSpread$7({}, iconProps));
|
|
801
|
-
|
|
802
719
|
case 'ConnectedSquareIcon':
|
|
803
720
|
return jsxRuntime.jsx(ConnectedSquareIcon, _objectSpread$7({}, iconProps));
|
|
804
721
|
// For backwards compatibility
|
|
805
|
-
|
|
806
722
|
case 'WorldIcon':
|
|
807
723
|
return jsxRuntime.jsx(WorldIcon, _objectSpread$7({}, iconProps));
|
|
808
|
-
|
|
809
724
|
default:
|
|
810
725
|
return jsxRuntime.jsx("img", {
|
|
811
726
|
src: MissingImageSvg__default["default"],
|
|
@@ -813,10 +728,8 @@ const IconSwitcher = _ref => {
|
|
|
813
728
|
});
|
|
814
729
|
}
|
|
815
730
|
};
|
|
816
|
-
|
|
817
731
|
IconSwitcher.propTypes = {};
|
|
818
732
|
IconSwitcher.displayName = 'IconSwitcher';
|
|
819
|
-
|
|
820
733
|
const MenuExpander = props => {
|
|
821
734
|
return jsxRuntime.jsx("li", {
|
|
822
735
|
className: classnames__default["default"](styles$2['list-item'], styles$2.expander, {
|
|
@@ -833,19 +746,15 @@ const MenuExpander = props => {
|
|
|
833
746
|
})
|
|
834
747
|
}, "expander");
|
|
835
748
|
};
|
|
836
|
-
|
|
837
749
|
MenuExpander.propTypes = {};
|
|
838
750
|
MenuExpander.displayName = 'MenuExpander';
|
|
839
|
-
|
|
840
751
|
const Faded = /*#__PURE__*/_styled__default["default"]("div", {
|
|
841
752
|
target: "ekdrmmp0"
|
|
842
753
|
} )("position:absolute;top:-32px;height:32px;width:100%;background:linear-gradient(\n 0deg,\n ", applicationComponents.designTokens.backgroundColorForNavbar, " 0%,\n rgba(0, 0, 0, 0) 100%\n );z-index:1;" + ("" ));
|
|
843
|
-
|
|
844
754
|
const MenuGroup = props => {
|
|
845
755
|
if (props.isExpanded && (props.level === 2 && !props.hasSubmenu || props.level === 2 && !props.isActive)) {
|
|
846
756
|
return null;
|
|
847
757
|
}
|
|
848
|
-
|
|
849
758
|
const isSublistActiveWhileIsMenuExpanded = props.level === 2 && props.isActive && props.isExpanded;
|
|
850
759
|
const isSublistActiveWhileIsMenuCollapsed = props.level === 2 && props.isActive && !props.isExpanded;
|
|
851
760
|
return jsxRuntime.jsx("ul", {
|
|
@@ -869,13 +778,10 @@ const MenuGroup = props => {
|
|
|
869
778
|
children: props.children
|
|
870
779
|
});
|
|
871
780
|
};
|
|
872
|
-
|
|
873
781
|
MenuGroup.propTypes = {};
|
|
874
782
|
MenuGroup.displayName = 'MenuGroup';
|
|
875
|
-
|
|
876
783
|
const MenuItem = props => {
|
|
877
784
|
var _props$isMainMenuRout;
|
|
878
|
-
|
|
879
785
|
return jsxRuntime.jsx("li", {
|
|
880
786
|
role: "menuitem",
|
|
881
787
|
className: classnames__default["default"](styles$2['list-item'], {
|
|
@@ -893,16 +799,13 @@ const MenuItem = props => {
|
|
|
893
799
|
})
|
|
894
800
|
});
|
|
895
801
|
};
|
|
896
|
-
|
|
897
802
|
MenuItem.propTypes = {};
|
|
898
803
|
MenuItem.displayName = 'MenuItem';
|
|
899
804
|
const menuItemLinkDefaultProps = {
|
|
900
805
|
exactMatch: false
|
|
901
806
|
};
|
|
902
|
-
|
|
903
807
|
const MenuItemLink = props => {
|
|
904
808
|
const redirectTo = targetUrl => useIsServedByProxy.location.replace(targetUrl);
|
|
905
|
-
|
|
906
809
|
if (props.linkTo) {
|
|
907
810
|
return jsxRuntime.jsx(reactRouterDom.NavLink, {
|
|
908
811
|
to: props.linkTo,
|
|
@@ -921,32 +824,24 @@ const MenuItemLink = props => {
|
|
|
921
824
|
children: props.children
|
|
922
825
|
});
|
|
923
826
|
}
|
|
924
|
-
|
|
925
827
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
926
828
|
children: props.children
|
|
927
829
|
});
|
|
928
830
|
};
|
|
929
|
-
|
|
930
831
|
MenuItemLink.propTypes = {};
|
|
931
832
|
MenuItemLink.displayName = 'MenuItemLink';
|
|
932
833
|
MenuItemLink.defaultProps = menuItemLinkDefaultProps;
|
|
933
|
-
|
|
934
834
|
const MenuItemDivider = () => jsxRuntime.jsx("div", {
|
|
935
835
|
className: styles$2.divider
|
|
936
836
|
});
|
|
937
|
-
|
|
938
837
|
MenuItemDivider.displayName = 'MenuItemDivider';
|
|
939
|
-
|
|
940
838
|
const isEveryMenuVisibilitySetToHidden = (menuVisibilities, namesOfMenuVisibilities) => _Array$isArray__default["default"](namesOfMenuVisibilities) && namesOfMenuVisibilities.length > 0 && _everyInstanceProperty__default["default"](namesOfMenuVisibilities).call(namesOfMenuVisibilities, nameOfMenuVisibility => menuVisibilities && menuVisibilities[nameOfMenuVisibility] === true);
|
|
941
|
-
|
|
942
839
|
const restrictedMenuItemDefaultProps = {
|
|
943
840
|
permissions: []
|
|
944
841
|
};
|
|
945
|
-
|
|
946
842
|
function isLongLivedFlag(flag) {
|
|
947
843
|
return typeof (flag === null || flag === void 0 ? void 0 : flag.value) === 'boolean';
|
|
948
844
|
}
|
|
949
|
-
|
|
950
845
|
const RestrictedMenuItem = props => {
|
|
951
846
|
// NOTE: Custom application are activated/deactivated while their
|
|
952
847
|
// visibility is not controlled via a visibiility overwrite.
|
|
@@ -960,11 +855,11 @@ const RestrictedMenuItem = props => {
|
|
|
960
855
|
switch (demandedDataFence.type) {
|
|
961
856
|
case 'store':
|
|
962
857
|
return demandedDataFence.actualDataFenceValues;
|
|
963
|
-
|
|
964
858
|
default:
|
|
965
859
|
return null;
|
|
966
860
|
}
|
|
967
|
-
}
|
|
861
|
+
}
|
|
862
|
+
// Always check that some of the given permissions match.
|
|
968
863
|
,
|
|
969
864
|
shouldMatchSomePermissions: true,
|
|
970
865
|
projectPermissions: props.projectPermissions,
|
|
@@ -972,31 +867,24 @@ const RestrictedMenuItem = props => {
|
|
|
972
867
|
}) : jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
973
868
|
children: props.children
|
|
974
869
|
});
|
|
975
|
-
|
|
976
870
|
if (props.featureToggle) {
|
|
977
871
|
// A regular short-lived feature toggle
|
|
978
|
-
if (flagVariation === true) return permissionsWrapper;
|
|
979
|
-
|
|
872
|
+
if (flagVariation === true) return permissionsWrapper;
|
|
873
|
+
// A long-lived feature toggle with `{ value: boolean, string: reason }`
|
|
980
874
|
if (isLongLivedFlag(flagVariation) && flagVariation.value === true) return permissionsWrapper;
|
|
981
875
|
return null;
|
|
982
876
|
}
|
|
983
|
-
|
|
984
877
|
return permissionsWrapper;
|
|
985
878
|
};
|
|
986
|
-
|
|
987
879
|
RestrictedMenuItem.propTypes = {};
|
|
988
880
|
RestrictedMenuItem.displayName = 'RestrictedMenuItem';
|
|
989
881
|
RestrictedMenuItem.defaultProps = restrictedMenuItemDefaultProps;
|
|
990
|
-
|
|
991
882
|
const MenuLabel = props => {
|
|
992
883
|
var _context;
|
|
993
|
-
|
|
994
884
|
const localizedLabel = _findInstanceProperty__default["default"](_context = props.labelAllLocales).call(_context, loc => {
|
|
995
885
|
var _context2;
|
|
996
|
-
|
|
997
886
|
return _startsWithInstanceProperty__default["default"](_context2 = props.applicationLocale).call(_context2, loc.locale);
|
|
998
887
|
});
|
|
999
|
-
|
|
1000
888
|
if (localizedLabel) return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1001
889
|
children: localizedLabel.value
|
|
1002
890
|
});
|
|
@@ -1007,7 +895,6 @@ const MenuLabel = props => {
|
|
|
1007
895
|
children: constants$1.NO_VALUE_FALLBACK
|
|
1008
896
|
});
|
|
1009
897
|
};
|
|
1010
|
-
|
|
1011
898
|
MenuLabel.propTypes = {
|
|
1012
899
|
labelAllLocales: _pt__default["default"].arrayOf(_pt__default["default"].any).isRequired,
|
|
1013
900
|
defaultLabel: _pt__default["default"].string,
|
|
@@ -1035,6 +922,7 @@ const useLoadingMenuLayoutEffect = () => {
|
|
|
1035
922
|
}, [isForcedMenuOpen]);
|
|
1036
923
|
};
|
|
1037
924
|
|
|
925
|
+
// https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros
|
|
1038
926
|
const compiledStyles = {
|
|
1039
927
|
"global": ":root {\n\n /* Left navigation */\n}\n\n/* Left Nav */\n\n.navbar-mod__left-navigation___n7yUt {\n display: flex;\n flex-grow: 1;\n width: 64px;\n z-index: 19999;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar);\n}\n\n.navbar-mod__list___RCV3J {\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n min-height: 0;\n flex: 1 1 0;\n}\n\n.body__menu-open .navbar-mod__scrollable-menu___64pxJ {\n flex: 1 1 0;\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.navbar-mod__list-item___MjK6t {\n width: 64px;\n min-height: 56px;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar);\n margin: 0;\n list-style: none;\n cursor: pointer;\n}\n\n.navbar-mod__item-link___X2Ina {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n padding: var(--spacing-m);\n width: 100%;\n position: relative;\n display: block;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__item-icon-text___a-8JY {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon___bLsep {\n width: 24px;\n height: 24px;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon___bLsep > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon__active___asorg > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon-when-active);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj {\n flex: 1;\n font-weight: 500;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n display: none;\n opacity: 0;\n transition: all 0.25s ease-in-out;\n text-align: left;\n text-decoration: none;\n}\n\n.navbar-mod__expander___jyAUi {\n border-top: 1px solid var(--color-neutral-40);\n height: 50px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: transparent;\n}\n\n.navbar-mod__expander___jyAUi:hover {\n background: transparent !important;\n}\n\n.navbar-mod__expand-icon___BtmRa {\n align-items: center;\n border-radius: 32px;\n cursor: pointer;\n display: flex;\n height: 24px;\n justify-content: center;\n transform: translateX(0) rotateZ(0deg);\n width: 24px;\n}\n\n.navbar-mod__item--bottom___eW7nh {\n position: absolute;\n bottom: 50px;\n}\n\n.navbar-mod__list-item___MjK6t:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar-when-hovered);\n}\n\n.navbar-mod__item__active___lo1sr .navbar-mod__title___eRWUj {\n opacity: 1;\n display: block;\n transition: all 0.2s ease;\n}\n\n.navbar-mod__item_menu-open___zk0zh {\n height: auto !important;\n}\n\n/* NO SUBMENU */\n\n.navbar-mod__item_menu-collapsed___cluyY .navbar-mod__item-link___X2Ina {\n text-align: center;\n}\n\n.navbar-mod__item__no-submenu___0lmiH .navbar-mod__title___eRWUj {\n border-bottom: 0;\n}\n\n.navbar-mod__item__no-submenu___0lmiH .navbar-mod__sublist___os1s7 {\n padding-top: 40px;\n}\n\n/* left-nav open */\n\n.body__menu-open .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n font-weight: 500;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n}\n\n.body__menu-open .navbar-mod__left-navigation___n7yUt {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n box-shadow: var(--shadow-for-navbar);\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t {\n height: auto;\n min-height: 56px;\n transition: max-height 0.15s ease-out;\n overflow: hidden;\n}\n\n.body__menu-open .navbar-mod__left-navigation___n7yUt,\n.body__menu-open .navbar-mod__list-item___MjK6t {\n width: 245px;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj {\n display: block;\n opacity: 1;\n margin-left: var(--spacing-m);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n}\n\n.navbar-mod__list-item___MjK6t:not(.navbar-mod__item__active___lo1sr):hover .navbar-mod__icon___bLsep > svg *:not([fill='none']) {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n fill: var(--color-for-navbar-icon-when-active);\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__title___eRWUj:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n}\n\n.navbar-mod__list-item___MjK6t:not(.navbar-mod__item__active___lo1sr):hover .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n}\n\n.body__menu-open .navbar-mod__expand-icon___BtmRa {\n transform: translateX(0) rotateZ(180deg);\n}\n\n.body__menu-open .navbar-mod__item__active___lo1sr {\n max-height: 500px;\n transition: max-height 0.25s ease-in;\n}\n\n.body__menu-open .navbar-mod__sublist___os1s7 {\n position: relative;\n z-index: 1;\n left: 0;\n margin: 0 0 0 calc(\n 24px + var(--spacing-m) + 4px + 4px\n );\n padding: var(--spacing-m) 0 0;\n background-color: transparent;\n}\n\n.body__menu-open .navbar-mod__sublist___os1s7.navbar-mod__sublist-no-children___Dy-h- {\n border: 0;\n}\n\n.body__menu-open .navbar-mod__title-copy___o2y1q {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n text-decoration: none;\n transition: all 0.15s ease;\n}\n\n.body__menu-open .navbar-mod__title-copy___o2y1q:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n.body__menu-open .navbar-mod__expander___jyAUi {\n min-height: 50px;\n justify-content: flex-end;\n padding: var(--spacing-m);\n}\n\n/* Second level menu */\n\n.navbar-mod__sublist___os1s7 {\n padding: 75px var(--spacing-l) var(--spacing-m);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n position: absolute;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar);\n top: 0;\n left: 64px;\n z-index: -1;\n list-style: none;\n opacity: 0.01;\n visibility: hidden;\n}\n\n.navbar-mod__sublist__inactive___kJvf- {\n /* empty block */\n}\n\n.navbar-mod__sublist-item___gafkS {\n padding: var(--spacing-s) 0 0;\n}\n\n.navbar-mod__sublist-item___gafkS:first-of-type {\n padding: 0;\n}\n\n.navbar-mod__sublist-item___gafkS:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n.navbar-mod__text___ccHEu {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-size: var(--font-size-for-navbar-link);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n line-height: var(--line-height-for-navbar-link);\n}\n\n.navbar-mod__text-link___dhtj6 {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link);\n text-decoration: none;\n transition: all 0.15s ease;\n}\n\n.navbar-mod__text-link___dhtj6:hover {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-hovered);\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-hovered);\n}\n\n/* Item active */\n\n.navbar-mod__item__active___lo1sr,\n.navbar-mod__item_menu__active___5xFRw {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background: var(--background-color-for-navbar-when-active);\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n width: calc(\n 205px + 64px -\n var(--spacing-m) * 2\n );\n justify-content: flex-start;\n}\n\n.navbar-mod__list-item___MjK6t .navbar-mod__icon-container___w3FtA {\n width: calc(24px + 4px * 2);\n display: flex;\n justify-content: center;\n align-self: flex-start;\n}\n\n.navbar-mod__fixed-menu___42tD9 .navbar-mod__list-item___MjK6t .navbar-mod__item-icon-text___a-8JY {\n justify-content: flex-start;\n display: flex;\n width: 100%;\n}\n\n.navbar-mod__fixed-menu___42tD9 .navbar-mod__list-item___MjK6t .navbar-mod__icon-container___w3FtA {\n /* empty block */\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n position: relative;\n width: auto;\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n margin-left: 40px;\n}\n\n.navbar-mod__item_menu-collapsed___cluyY.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n max-height: 44px;\n overflow: hidden;\n /* stylelint-disable-next-line value-no-vendor-prefix */\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY .navbar-mod__title___eRWUj {\n margin-left: var(--spacing-m);\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__item-icon-text___a-8JY {\n margin-left: 0;\n}\n\n.navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__sublist___os1s7 {\n width: 205px;\n min-height: 100%;\n}\n\n.body__menu-open .navbar-mod__list-item___MjK6t.navbar-mod__item__active___lo1sr .navbar-mod__sublist___os1s7 {\n width: calc(100% - calc(\n 24px + var(--spacing-m) + 4px + 4px\n ));\n}\n\n.navbar-mod__sublist-expanded__active___240JK,\n.navbar-mod__sublist-collapsed__active___-9vYh {\n opacity: 1;\n visibility: visible;\n text-align: left;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n background-color: var(--background-color-for-navbar-when-active);\n}\n\n.navbar-mod__highlighted___oJWkA,\n.navbar-mod__highlighted___oJWkA .navbar-mod__title___eRWUj {\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n color: var(--color-for-navbar-link-when-active) !important;\n /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */\n font-weight: var(--font-weight-for-navbar-link-when-active);\n}\n\n.navbar-mod__hidden___TQLSs {\n display: none;\n}\n\n.navbar-mod__divider___TpVzu {\n border-top: 1px solid var(--color-neutral-40);\n}\n\n.navbar-mod__loading-dot-container___G2LVb {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.navbar-mod__scrollable-menu___64pxJ {\n flex: 1 1 0;\n padding-bottom: 32px;\n /* \n FIXME: Make the navbar scrollable in collapsed state.\n NOTE: do not use `overflow-x: hidden; overflow-y: auto;` as this prevents submenus from showing up on hover \n */\n}\n\n.navbar-mod__fixed-menu___42tD9 {\n flex: 0 0 0;\n position: relative;\n}\n",
|
|
1040
928
|
"jsonMap": {
|
|
@@ -1073,10 +961,8 @@ const compiledStyles = {
|
|
|
1073
961
|
}
|
|
1074
962
|
};
|
|
1075
963
|
const styles$1 = compiledStyles.jsonMap;
|
|
1076
|
-
|
|
1077
964
|
const LoadingNavBar = () => {
|
|
1078
965
|
var _context;
|
|
1079
|
-
|
|
1080
966
|
const ref = react.useRef(null);
|
|
1081
967
|
useLoadingMenuLayoutEffect();
|
|
1082
968
|
return jsxRuntime.jsx(NavBarLayout, {
|
|
@@ -1103,35 +989,29 @@ const LoadingNavBar = () => {
|
|
|
1103
989
|
})
|
|
1104
990
|
});
|
|
1105
991
|
};
|
|
1106
|
-
|
|
1107
992
|
LoadingNavBar.displayName = 'LoadingNavBar';
|
|
1108
993
|
|
|
1109
|
-
const ProjectContainer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./project-container-
|
|
1110
|
-
/* webpackChunkName: "project-container" */
|
|
1111
|
-
); }));
|
|
994
|
+
const ProjectContainer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./project-container-2ed314f8.cjs.prod.js' /* webpackChunkName: "project-container" */); }));
|
|
1112
995
|
|
|
1113
996
|
const getSelectedDataLocaleForProject = projectLocales => {
|
|
1114
|
-
const cachedDataLocale = window.localStorage.getItem(constants.STORAGE_KEYS.SELECTED_DATA_LOCALE);
|
|
1115
|
-
|
|
997
|
+
const cachedDataLocale = window.localStorage.getItem(constants.STORAGE_KEYS.SELECTED_DATA_LOCALE);
|
|
998
|
+
// Make sure the cached locale is listed in the selected project
|
|
1116
999
|
const isCachedDataLocaleIncludedInProjectLanguages = _includesInstanceProperty__default["default"](projectLocales).call(projectLocales, cachedDataLocale || '');
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1000
|
+
if (cachedDataLocale && isCachedDataLocaleIncludedInProjectLanguages) return cachedDataLocale;
|
|
1001
|
+
// Pick the first locale from the list
|
|
1002
|
+
const defaultDataLocaleForProject = projectLocales[0];
|
|
1003
|
+
// Cache it
|
|
1122
1004
|
window.localStorage.setItem(constants.STORAGE_KEYS.SELECTED_DATA_LOCALE, defaultDataLocaleForProject);
|
|
1123
1005
|
return defaultDataLocaleForProject;
|
|
1124
1006
|
};
|
|
1125
|
-
|
|
1126
1007
|
const ProjectDataLocale = props => {
|
|
1127
1008
|
const _useState = react.useState(getSelectedDataLocaleForProject(props.locales)),
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1009
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1010
|
+
locale = _useState2[0],
|
|
1011
|
+
setLocale = _useState2[1];
|
|
1132
1012
|
const handleSetProjectDataLocale = react.useCallback(locale => {
|
|
1133
|
-
setLocale(locale);
|
|
1134
|
-
|
|
1013
|
+
setLocale(locale);
|
|
1014
|
+
// Cache it
|
|
1135
1015
|
window.localStorage.setItem(constants.STORAGE_KEYS.SELECTED_DATA_LOCALE, locale);
|
|
1136
1016
|
}, []);
|
|
1137
1017
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
@@ -1141,7 +1021,6 @@ const ProjectDataLocale = props => {
|
|
|
1141
1021
|
})
|
|
1142
1022
|
});
|
|
1143
1023
|
};
|
|
1144
|
-
|
|
1145
1024
|
ProjectDataLocale.propTypes = {
|
|
1146
1025
|
locales: _pt__default["default"].arrayOf(_pt__default["default"].string).isRequired,
|
|
1147
1026
|
children: _pt__default["default"].func.isRequired
|
|
@@ -1149,30 +1028,22 @@ ProjectDataLocale.propTypes = {
|
|
|
1149
1028
|
ProjectDataLocale.displayName = 'ProjectDataLocale';
|
|
1150
1029
|
|
|
1151
1030
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
1152
|
-
|
|
1153
1031
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
1154
|
-
|
|
1155
1032
|
let ErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
1156
1033
|
_inherits(ErrorBoundary, _Component);
|
|
1157
|
-
|
|
1158
1034
|
var _super = _createSuper(ErrorBoundary);
|
|
1159
|
-
|
|
1160
1035
|
function ErrorBoundary() {
|
|
1161
1036
|
var _this;
|
|
1162
|
-
|
|
1163
1037
|
_classCallCheck(this, ErrorBoundary);
|
|
1164
|
-
|
|
1165
1038
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1166
1039
|
args[_key] = arguments[_key];
|
|
1167
1040
|
}
|
|
1168
|
-
|
|
1169
1041
|
_this = _super.call(this, ...args);
|
|
1170
1042
|
_this.state = {
|
|
1171
1043
|
hasError: false
|
|
1172
1044
|
};
|
|
1173
1045
|
return _this;
|
|
1174
1046
|
}
|
|
1175
|
-
|
|
1176
1047
|
_createClass(ErrorBoundary, [{
|
|
1177
1048
|
key: "componentDidUpdate",
|
|
1178
1049
|
value: function componentDidUpdate(prevProps) {
|
|
@@ -1198,26 +1069,22 @@ let ErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
|
1198
1069
|
if (this.state.hasError) {
|
|
1199
1070
|
return jsxRuntime.jsx(ErrorApologizer, {});
|
|
1200
1071
|
}
|
|
1201
|
-
|
|
1202
1072
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1203
1073
|
children: this.props.children
|
|
1204
1074
|
});
|
|
1205
1075
|
}
|
|
1206
1076
|
}], [{
|
|
1207
1077
|
key: "getDerivedStateFromError",
|
|
1208
|
-
value: function
|
|
1209
|
-
|
|
1210
|
-
getDerivedStateFromError() {
|
|
1078
|
+
value: function getDerivedStateFromError( /* error */
|
|
1079
|
+
) {
|
|
1211
1080
|
// Update state so the next render will show the fallback UI.
|
|
1212
1081
|
return {
|
|
1213
1082
|
hasError: true
|
|
1214
1083
|
};
|
|
1215
1084
|
}
|
|
1216
1085
|
}]);
|
|
1217
|
-
|
|
1218
1086
|
return ErrorBoundary;
|
|
1219
1087
|
}(react.Component);
|
|
1220
|
-
|
|
1221
1088
|
ErrorBoundary.propTypes = {};
|
|
1222
1089
|
|
|
1223
1090
|
const ButlerContainer = /*#__PURE__*/_styled__default["default"]("div", {
|
|
@@ -1236,22 +1103,20 @@ var pimIndexerStates = {
|
|
|
1236
1103
|
NOT_INDEXED: 'NOT_INDEXED'
|
|
1237
1104
|
};
|
|
1238
1105
|
|
|
1239
|
-
const QuickAccess = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./quick-access-
|
|
1240
|
-
/* webpackChunkName: "quick-access" */
|
|
1241
|
-
); }));
|
|
1106
|
+
const QuickAccess = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./quick-access-2ed3fd12.cjs.prod.js' /* webpackChunkName: "quick-access" */); }));
|
|
1242
1107
|
|
|
1243
1108
|
const QuickAccessTrigger = props => {
|
|
1244
1109
|
const _useState = react.useState(false),
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1110
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1111
|
+
isVisible = _useState2[0],
|
|
1112
|
+
setIsVisible = _useState2[1];
|
|
1249
1113
|
const open = react.useCallback(() => {
|
|
1250
1114
|
setIsVisible(true);
|
|
1251
1115
|
}, []);
|
|
1252
1116
|
const close = react.useCallback(() => {
|
|
1253
1117
|
setIsVisible(false);
|
|
1254
|
-
}, []);
|
|
1118
|
+
}, []);
|
|
1119
|
+
// We store the information of whether a project is indexed by pim-indexer,
|
|
1255
1120
|
// to avoid having to refetch that information every time Quick Access is
|
|
1256
1121
|
// opened. We can't move the information to the quick-access.js component
|
|
1257
1122
|
// as that component unmounts and would lose its state.
|
|
@@ -1261,46 +1126,44 @@ const QuickAccessTrigger = props => {
|
|
|
1261
1126
|
//
|
|
1262
1127
|
// We don't need to update this information when the project key changes,
|
|
1263
1128
|
// as changing a project always results in a full page reload anyways.
|
|
1264
|
-
|
|
1265
1129
|
const _useState3 = react.useState(pimIndexerStates.UNCHECKED),
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1130
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
1131
|
+
pimIndexerState = _useState4[0],
|
|
1132
|
+
setPimIndexerState = _useState4[1];
|
|
1270
1133
|
const handlePimIndexerStateChange = react.useCallback(nextPimIndexerState => {
|
|
1271
1134
|
setPimIndexerState(nextPimIndexerState);
|
|
1272
1135
|
}, []);
|
|
1273
1136
|
const keyHandler = react.useCallback(event => {
|
|
1274
|
-
const hotKey = 'f';
|
|
1275
|
-
|
|
1276
|
-
if (event.ctrlKey || event.altKey || event.shiftKey || event.metaKey) return;
|
|
1137
|
+
const hotKey = 'f';
|
|
1138
|
+
// avoid interfering with any key combinations using modifier keys
|
|
1139
|
+
if (event.ctrlKey || event.altKey || event.shiftKey || event.metaKey) return;
|
|
1277
1140
|
|
|
1141
|
+
// Let users close QuickAccess by pressing Escape
|
|
1278
1142
|
if (event.key === 'Escape' && event.target.id === 'quick-access-search-input') {
|
|
1279
1143
|
close();
|
|
1280
1144
|
return;
|
|
1281
|
-
}
|
|
1282
|
-
// open the QuickAccess when nothing was focused, so target is document.body
|
|
1283
|
-
|
|
1145
|
+
}
|
|
1284
1146
|
|
|
1285
|
-
|
|
1147
|
+
// Avoid interfering with any other elements. We only
|
|
1148
|
+
// open the QuickAccess when nothing was focused, so target is document.body
|
|
1149
|
+
if (event.target !== document.body &&
|
|
1150
|
+
// tabIndex="-1" has a special meaning
|
|
1286
1151
|
// It will make the element focusable, while hiding it from the
|
|
1287
1152
|
// navigation. It is typically used for modals and overlays.
|
|
1288
1153
|
// react-modal uses it for example. We want to treat those elements
|
|
1289
1154
|
// similar to document.body.
|
|
1290
1155
|
// See https://stackoverflow.com/a/32912224
|
|
1291
|
-
event.target.getAttribute('tabindex') !== '-1' &&
|
|
1156
|
+
event.target.getAttribute('tabindex') !== '-1' &&
|
|
1157
|
+
// Do not prevent Quick Access from opening when a link has focus
|
|
1292
1158
|
event.target.nodeName !== 'A') return;
|
|
1293
|
-
|
|
1294
1159
|
if (event.key === hotKey) {
|
|
1295
1160
|
if (!isVisible) {
|
|
1296
1161
|
// prevent the letter from appearing in the search input when
|
|
1297
1162
|
// it is the key press that lead to opening Quick Access
|
|
1298
1163
|
event.preventDefault();
|
|
1299
1164
|
}
|
|
1300
|
-
|
|
1301
1165
|
open();
|
|
1302
1166
|
}
|
|
1303
|
-
|
|
1304
1167
|
return;
|
|
1305
1168
|
}, [close, isVisible, open]);
|
|
1306
1169
|
react.useEffect(() => {
|
|
@@ -1324,17 +1187,12 @@ const QuickAccessTrigger = props => {
|
|
|
1324
1187
|
})
|
|
1325
1188
|
});
|
|
1326
1189
|
};
|
|
1327
|
-
|
|
1328
1190
|
QuickAccessTrigger.propTypes = {};
|
|
1329
1191
|
QuickAccessTrigger.displayName = 'QuickAccessTrigger';
|
|
1330
1192
|
|
|
1331
|
-
const RedirectToLogout = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-logout-
|
|
1332
|
-
/* webpackChunkName: "redirect-to-logout" */
|
|
1333
|
-
); }));
|
|
1193
|
+
const RedirectToLogout = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-logout-81526f74.cjs.prod.js' /* webpackChunkName: "redirect-to-logout" */); }));
|
|
1334
1194
|
|
|
1335
|
-
const RedirectToProjectCreate = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-project-create-
|
|
1336
|
-
/* webpackChunkName: "redirect-to-project-create" */
|
|
1337
|
-
); }));
|
|
1195
|
+
const RedirectToProjectCreate = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-project-create-2266c427.cjs.prod.js' /* webpackChunkName: "redirect-to-project-create" */); }));
|
|
1338
1196
|
|
|
1339
1197
|
/*
|
|
1340
1198
|
* This file contains a list of all feature toggles used within
|
|
@@ -1354,38 +1212,31 @@ const RedirectToProjectCreate = /*#__PURE__*/react.lazy(() => Promise.resolve().
|
|
|
1354
1212
|
* fetched from LaunchDarkly (without default values flopflip will default
|
|
1355
1213
|
* them to off until fetched).
|
|
1356
1214
|
*/
|
|
1357
|
-
const UI_REDESIGN = 'uiRedesign';
|
|
1358
|
-
const FLAGS = {
|
|
1359
|
-
[UI_REDESIGN]: false
|
|
1360
|
-
};
|
|
1361
1215
|
|
|
1362
|
-
|
|
1216
|
+
const FLAGS = {};
|
|
1363
1217
|
|
|
1218
|
+
function ownKeys$6(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1364
1219
|
function _objectSpread$6(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$6(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$6(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1365
1220
|
var FetchAllMenuFeatureToggles = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchAllMenuFeatureToggles" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "allFeatureToggles" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 57, source: { body: "query FetchAllMenuFeatureToggles {\n allFeatureToggles\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
1366
1221
|
const defaultApiUrl = window.location.origin;
|
|
1367
|
-
|
|
1368
1222
|
const getDefaultedFeatureToggles = allFeatureToggles => _reduceInstanceProperty__default["default"](allFeatureToggles).call(allFeatureToggles, (previouslyDefaultedFeatureToggles, nextFeatureToggle) => _objectSpread$6(_objectSpread$6({}, previouslyDefaultedFeatureToggles), {}, {
|
|
1369
1223
|
[nextFeatureToggle]: false
|
|
1370
1224
|
}), {});
|
|
1371
|
-
|
|
1372
1225
|
const useAllMenuFeatureToggles = () => {
|
|
1373
1226
|
const servedByProxy = useIsServedByProxy.useIsServedByProxy();
|
|
1374
1227
|
const mcProxyApiUrl = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.environment.mcProxyApiUrl);
|
|
1375
|
-
|
|
1376
1228
|
const _useMcQuery = useMcQuery(FetchAllMenuFeatureToggles, {
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1229
|
+
fetchPolicy: 'cache-and-network',
|
|
1230
|
+
skip: !servedByProxy,
|
|
1231
|
+
onError: sentry.reportErrorToSentry,
|
|
1232
|
+
context: {
|
|
1233
|
+
uri: "".concat(mcProxyApiUrl || defaultApiUrl, "/api/graphql"),
|
|
1234
|
+
skipGraphQlTargetCheck: true
|
|
1235
|
+
}
|
|
1236
|
+
}),
|
|
1237
|
+
data = _useMcQuery.data,
|
|
1238
|
+
refetch = _useMcQuery.refetch,
|
|
1239
|
+
loading = _useMcQuery.loading;
|
|
1389
1240
|
return {
|
|
1390
1241
|
isLoading: loading,
|
|
1391
1242
|
refetch,
|
|
@@ -1394,17 +1245,14 @@ const useAllMenuFeatureToggles = () => {
|
|
|
1394
1245
|
};
|
|
1395
1246
|
|
|
1396
1247
|
function ownKeys$5(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1397
|
-
|
|
1398
1248
|
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$5(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$5(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1399
1249
|
var AllFeaturesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "AllFeatures" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "allFeatures" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "reason" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 72, source: { body: "query AllFeatures {\n allFeatures {\n name\n value\n reason\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
1400
1250
|
// This value is hard-coded here because we want to make sure that the
|
|
1401
1251
|
// app uses our account of LD. The value is meant to be public, so there
|
|
1402
1252
|
// is no need to be concerned about security.
|
|
1403
1253
|
const ldClientSideIdProduction = '5979d95f6040390cd07b5e01';
|
|
1404
|
-
|
|
1405
1254
|
function getUserCustomFieldsForLaunchDarklyAdapter(user, projectKey) {
|
|
1406
1255
|
var _user$launchdarklyTra, _user$launchdarklyTra2, _user$launchdarklyTra3, _user$launchdarklyTra4, _user$launchdarklyTra5;
|
|
1407
|
-
|
|
1408
1256
|
return {
|
|
1409
1257
|
project: projectKey !== null && projectKey !== void 0 ? projectKey : '',
|
|
1410
1258
|
id: (_user$launchdarklyTra = user === null || user === void 0 ? void 0 : user.launchdarklyTrackingId) !== null && _user$launchdarklyTra !== void 0 ? _user$launchdarklyTra : '',
|
|
@@ -1414,16 +1262,13 @@ function getUserCustomFieldsForLaunchDarklyAdapter(user, projectKey) {
|
|
|
1414
1262
|
tenant: (_user$launchdarklyTra5 = user === null || user === void 0 ? void 0 : user.launchdarklyTrackingTenant) !== null && _user$launchdarklyTra5 !== void 0 ? _user$launchdarklyTra5 : ''
|
|
1415
1263
|
};
|
|
1416
1264
|
}
|
|
1417
|
-
|
|
1418
1265
|
const parseFlags = fetchedFlags => {
|
|
1419
1266
|
var _context;
|
|
1420
|
-
|
|
1421
1267
|
return _Object$fromEntries__default["default"](_mapInstanceProperty__default["default"](_context = fetchedFlags.allFeatures).call(_context, fetchedFlag => [fetchedFlag.name, {
|
|
1422
1268
|
value: fetchedFlag.value,
|
|
1423
1269
|
reason: fetchedFlag.reason
|
|
1424
1270
|
}]));
|
|
1425
1271
|
};
|
|
1426
|
-
|
|
1427
1272
|
const SetupFlopFlipProvider = props => {
|
|
1428
1273
|
const apolloClient = react$2.useApolloClient();
|
|
1429
1274
|
const enableLongLivedFeatureFlags = applicationShellConnectors.useApplicationContext(context => context.environment.enableLongLivedFeatureFlags);
|
|
@@ -1439,7 +1284,6 @@ const SetupFlopFlipProvider = props => {
|
|
|
1439
1284
|
const defaultFlags = react.useMemo(() => _objectSpread$5(_objectSpread$5(_objectSpread$5({}, FLAGS), allMenuFeatureToggles.allFeatureToggles), props.defaultFlags), [allMenuFeatureToggles.allFeatureToggles, props.defaultFlags]);
|
|
1440
1285
|
const adapterArgs = react.useMemo(() => {
|
|
1441
1286
|
var _props$user, _props$ldClientSideId, _props$user2, _props$user3;
|
|
1442
|
-
|
|
1443
1287
|
return {
|
|
1444
1288
|
user: {
|
|
1445
1289
|
key: (_props$user = props.user) === null || _props$user === void 0 ? void 0 : _props$user.id
|
|
@@ -1474,7 +1318,6 @@ const SetupFlopFlipProvider = props => {
|
|
|
1474
1318
|
}
|
|
1475
1319
|
};
|
|
1476
1320
|
}, [apolloClient, flags, props.ldClientSideId, props.projectKey, props.user]);
|
|
1477
|
-
|
|
1478
1321
|
return jsxRuntime.jsx(reactBroadcast.ConfigureFlopFlip, {
|
|
1479
1322
|
adapter: combineAdapters__default["default"],
|
|
1480
1323
|
adapterArgs: adapterArgs,
|
|
@@ -1486,93 +1329,63 @@ const SetupFlopFlipProvider = props => {
|
|
|
1486
1329
|
SetupFlopFlipProvider.propTypes = {};
|
|
1487
1330
|
SetupFlopFlipProvider.displayName = 'SetupFlopFlipProvider';
|
|
1488
1331
|
|
|
1489
|
-
const NewDesignReleaseInfoDialog = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./new-design-release-info-dialog-879a4af8.cjs.prod.js'); }));
|
|
1490
|
-
|
|
1491
|
-
function useDisableRedesignAnnouncement() {
|
|
1492
|
-
const disableRedesignAnnouncement = applicationShellConnectors.useApplicationContext(context => context.environment.disableRedesignAnnouncement);
|
|
1493
|
-
return Boolean(disableRedesignAnnouncement);
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
1332
|
const ThemeSwitcher = () => {
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
const theme =
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
1503
|
-
hasUserSeenNewDesignReleaseNotificationDialog = _useState2[0],
|
|
1504
|
-
setHasUserSeenNewDesignReleaseNotificationDialog = _useState2[1];
|
|
1505
|
-
|
|
1506
|
-
const handleCloseDialog = () => {
|
|
1507
|
-
window.localStorage.setItem(constants.STORAGE_KEYS.IS_NEW_DESIGN_RELEASE_NOTIFICATION_CLOSED, 'true');
|
|
1508
|
-
setHasUserSeenNewDesignReleaseNotificationDialog(true);
|
|
1509
|
-
};
|
|
1510
|
-
|
|
1511
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1512
|
-
children: [jsxRuntime.jsx(designSystem.ThemeProvider, {
|
|
1333
|
+
// This helps decoupling app-kit update from ui-kit update
|
|
1334
|
+
// TODO: Remove after ui-kit redesign cleanup has been done
|
|
1335
|
+
const theme = 'test';
|
|
1336
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1337
|
+
children: jsxRuntime.jsx(designSystem.ThemeProvider, {
|
|
1513
1338
|
theme: theme,
|
|
1514
|
-
themeOverrides: applicationComponents.themesOverrides
|
|
1515
|
-
})
|
|
1516
|
-
onClose: handleCloseDialog
|
|
1517
|
-
}) : null]
|
|
1339
|
+
themeOverrides: applicationComponents.themesOverrides.default
|
|
1340
|
+
})
|
|
1518
1341
|
});
|
|
1519
1342
|
};
|
|
1520
1343
|
|
|
1521
|
-
const VersionTracker = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./version-tracker-
|
|
1522
|
-
/* webpackChunkName: "version-tracker" */
|
|
1523
|
-
); }));
|
|
1344
|
+
const VersionTracker = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./version-tracker-9b501e9f.cjs.prod.js' /* webpackChunkName: "version-tracker" */); }));
|
|
1524
1345
|
|
|
1525
1346
|
function ownKeys$4(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1526
|
-
|
|
1527
1347
|
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$4(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1528
|
-
|
|
1529
1348
|
const getHasUnauthorizedError = graphQLErrors => _findInstanceProperty__default["default"](graphQLErrors).call(graphQLErrors, gqlError => gqlError.extensions && gqlError.extensions.code && gqlError.extensions.code === 'UNAUTHENTICATED');
|
|
1530
|
-
|
|
1531
1349
|
const getHasUserBeenDeletedError = graphQLErrors => _findInstanceProperty__default["default"](graphQLErrors).call(graphQLErrors, gqlError => {
|
|
1532
1350
|
var _context;
|
|
1533
|
-
|
|
1534
|
-
|
|
1351
|
+
return gqlError.message &&
|
|
1352
|
+
// NOTE: The CTP API does not provide an error code in this case.
|
|
1535
1353
|
_includesInstanceProperty__default["default"](_context = gqlError.message).call(_context, 'was not found.');
|
|
1536
1354
|
});
|
|
1537
|
-
|
|
1538
1355
|
const MainContainer = /*#__PURE__*/_styled__default["default"]("main", {
|
|
1539
1356
|
target: "esrtekc0"
|
|
1540
1357
|
} )({
|
|
1541
1358
|
name: "1rdshd",
|
|
1542
1359
|
styles: "grid-column:2;grid-row:3;min-width:0;overflow-x:hidden;overflow-y:scroll;display:flex;flex-direction:column;position:relative"
|
|
1543
1360
|
} );
|
|
1361
|
+
|
|
1544
1362
|
/**
|
|
1545
1363
|
* This component is rendered whenever the user is considered "authenticated"
|
|
1546
1364
|
* and contains the "restricted" application part.
|
|
1547
1365
|
*/
|
|
1548
|
-
|
|
1549
1366
|
var _ref = {
|
|
1550
1367
|
name: "tlwzvn",
|
|
1551
1368
|
styles: "flex-grow:1;display:flex;flex-direction:column;position:relative;>*:not(:first-of-type){flex-grow:1;display:flex;flex-direction:column;}"
|
|
1552
1369
|
} ;
|
|
1553
|
-
|
|
1554
1370
|
var _ref2 = {
|
|
1555
1371
|
name: "14w5yo3",
|
|
1556
1372
|
styles: "position:relative;grid-row:3;display:flex;flex-direction:column"
|
|
1557
1373
|
} ;
|
|
1558
|
-
|
|
1559
1374
|
var _ref3 = {
|
|
1560
1375
|
name: "fqjitq",
|
|
1561
1376
|
styles: "grid-row:2;grid-column:1/3"
|
|
1562
1377
|
} ;
|
|
1563
|
-
|
|
1564
1378
|
var _ref4 = {
|
|
1565
1379
|
name: "8bdwu0",
|
|
1566
1380
|
styles: "grid-row:1;grid-column:1/3"
|
|
1567
1381
|
} ;
|
|
1568
|
-
|
|
1569
1382
|
const ApplicationShellAuthenticated = props => {
|
|
1570
|
-
const applicationEnvironment = applicationShellConnectors.useApplicationContext(context => context.environment);
|
|
1383
|
+
const applicationEnvironment = applicationShellConnectors.useApplicationContext(context => context.environment);
|
|
1384
|
+
// TODO: using this hook will subscribe the component to route updates.
|
|
1571
1385
|
// This is currently useful for detecting a change in the project key
|
|
1572
1386
|
// from URL ("/" --> "/:projectKey").
|
|
1573
1387
|
// However, every route change will trigger a re-render. This is probably
|
|
1574
1388
|
// ok-ish but we might want to look into a more performant solution.
|
|
1575
|
-
|
|
1576
1389
|
const location = reactRouterDom.useLocation();
|
|
1577
1390
|
const notificationsGlobalRef = react.useRef(null);
|
|
1578
1391
|
const notificationsPageRef = react.useRef(null);
|
|
@@ -1583,15 +1396,13 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1583
1396
|
return jsxRuntime.jsx(FetchUser, {
|
|
1584
1397
|
children: _ref5 => {
|
|
1585
1398
|
let isLoadingUser = _ref5.isLoading,
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1399
|
+
user = _ref5.user,
|
|
1400
|
+
error = _ref5.error;
|
|
1589
1401
|
if (error) {
|
|
1590
1402
|
// In case there is an unauthorized error, we redirect to the login page
|
|
1591
1403
|
if (error.graphQLErrors && _Array$isArray__default["default"](error.graphQLErrors)) {
|
|
1592
1404
|
const hasUnauthorizedError = getHasUnauthorizedError(error.graphQLErrors);
|
|
1593
1405
|
const hasUserBeenDeletedError = getHasUserBeenDeletedError(error.graphQLErrors);
|
|
1594
|
-
|
|
1595
1406
|
if (hasUnauthorizedError || hasUserBeenDeletedError) {
|
|
1596
1407
|
let logoutReason;
|
|
1597
1408
|
if (hasUnauthorizedError) logoutReason = constants$1.LOGOUT_REASONS.UNAUTHORIZED;else if (hasUserBeenDeletedError) logoutReason = constants$1.LOGOUT_REASONS.DELETED;
|
|
@@ -1599,17 +1410,16 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1599
1410
|
reason: logoutReason
|
|
1600
1411
|
});
|
|
1601
1412
|
}
|
|
1602
|
-
}
|
|
1413
|
+
}
|
|
1414
|
+
// Since we do not know the locale of the user, we pick it from the
|
|
1603
1415
|
// user's browser to attempt to match the language for the correct translations.
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
1416
|
const userLocale = getBrowserLocale(window);
|
|
1607
1417
|
return jsxRuntime.jsx(i18n.AsyncLocaleData, {
|
|
1608
1418
|
locale: userLocale,
|
|
1609
1419
|
applicationMessages: props.applicationMessages,
|
|
1610
1420
|
children: _ref6 => {
|
|
1611
1421
|
let locale = _ref6.locale,
|
|
1612
|
-
|
|
1422
|
+
messages = _ref6.messages;
|
|
1613
1423
|
sentry.reportErrorToSentry(error, {});
|
|
1614
1424
|
return jsxRuntime.jsx(ConfigureIntlProvider, {
|
|
1615
1425
|
locale: locale,
|
|
@@ -1619,7 +1429,6 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1619
1429
|
}
|
|
1620
1430
|
});
|
|
1621
1431
|
}
|
|
1622
|
-
|
|
1623
1432
|
const projectKeyFromUrl = configureApollo.selectProjectKeyFromUrl(location.pathname);
|
|
1624
1433
|
return jsxRuntime.jsx(applicationShellConnectors.ApplicationContextProvider, {
|
|
1625
1434
|
user: user,
|
|
@@ -1629,9 +1438,10 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1629
1438
|
applicationMessages: props.applicationMessages,
|
|
1630
1439
|
children: _ref7 => {
|
|
1631
1440
|
let isLoadingLocaleData = _ref7.isLoading,
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
return jsxRuntime.jsx(ConfigureIntlProvider
|
|
1441
|
+
locale = _ref7.locale,
|
|
1442
|
+
messages = _ref7.messages;
|
|
1443
|
+
return jsxRuntime.jsx(ConfigureIntlProvider
|
|
1444
|
+
// We do not want to pass the language as long as the locale data
|
|
1635
1445
|
// is not loaded.
|
|
1636
1446
|
, _objectSpread$4(_objectSpread$4({}, isLoadingLocaleData ? {} : {
|
|
1637
1447
|
locale,
|
|
@@ -1665,17 +1475,18 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1665
1475
|
projectKey: projectKeyFromUrl,
|
|
1666
1476
|
children: _ref8 => {
|
|
1667
1477
|
let isProjectLoading = _ref8.isLoading,
|
|
1668
|
-
|
|
1669
|
-
if (isProjectLoading || !project) return null;
|
|
1670
|
-
// or when the project is expired or supsended
|
|
1478
|
+
project = _ref8.project;
|
|
1479
|
+
if (isProjectLoading || !project) return null;
|
|
1671
1480
|
|
|
1481
|
+
// when used outside of a project context,
|
|
1482
|
+
// or when the project is expired or supsended
|
|
1672
1483
|
const shouldUseProjectContext = !(project.suspension && project.suspension.isActive || project.expiry && project.expiry.isActive);
|
|
1673
1484
|
if (!shouldUseProjectContext) return jsxRuntime.jsx(QuickAccessTrigger, {});
|
|
1674
1485
|
return jsxRuntime.jsx(ProjectDataLocale, {
|
|
1675
1486
|
locales: project.languages,
|
|
1676
1487
|
children: _ref9 => {
|
|
1677
1488
|
let dataLocale = _ref9.locale,
|
|
1678
|
-
|
|
1489
|
+
setProjectDataLocale = _ref9.setProjectDataLocale;
|
|
1679
1490
|
return jsxRuntime.jsx(applicationShellConnectors.ApplicationContextProvider, {
|
|
1680
1491
|
user: user,
|
|
1681
1492
|
project: project,
|
|
@@ -1714,13 +1525,14 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1714
1525
|
projectKey: projectKeyFromUrl,
|
|
1715
1526
|
children: _ref10 => {
|
|
1716
1527
|
let isLoadingProject = _ref10.isLoading,
|
|
1717
|
-
|
|
1528
|
+
project = _ref10.project;
|
|
1718
1529
|
// Render the loading navbar as long as all the data
|
|
1719
1530
|
// hasn't been loaded, or if the project does not exist.
|
|
1720
1531
|
if (isLoadingUser || isLoadingLocaleData || isLoadingProject || !locale || !project) return jsxRuntime.jsx(LoadingNavBar, {});
|
|
1721
1532
|
return jsxRuntime.jsx(applicationShellConnectors.ApplicationContextProvider, {
|
|
1722
1533
|
user: user,
|
|
1723
|
-
environment: applicationEnvironment
|
|
1534
|
+
environment: applicationEnvironment
|
|
1535
|
+
// NOTE: do not pass the `project` into the application context.
|
|
1724
1536
|
// The permissions for the Navbar are resolved separately, within
|
|
1725
1537
|
// a different React context.
|
|
1726
1538
|
,
|
|
@@ -1749,7 +1561,8 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1749
1561
|
domain: constants$1.DOMAINS.SIDE
|
|
1750
1562
|
}), jsxRuntime.jsxs("div", {
|
|
1751
1563
|
css: _ref,
|
|
1752
|
-
children: [jsxRuntime.jsx(applicationComponents.PortalsContainer
|
|
1564
|
+
children: [jsxRuntime.jsx(applicationComponents.PortalsContainer
|
|
1565
|
+
// @ts-ignore
|
|
1753
1566
|
, {
|
|
1754
1567
|
ref: layoutRefs,
|
|
1755
1568
|
offsetTop: constants.DIMENSIONS.header,
|
|
@@ -1779,8 +1592,8 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1779
1592
|
path: "/",
|
|
1780
1593
|
children: (() => {
|
|
1781
1594
|
var _user$defaultProjectK;
|
|
1782
|
-
|
|
1783
1595
|
const previousProjectKey = getPreviousProjectKey((_user$defaultProjectK = user === null || user === void 0 ? void 0 : user.defaultProjectKey) !== null && _user$defaultProjectK !== void 0 ? _user$defaultProjectK : undefined);
|
|
1596
|
+
|
|
1784
1597
|
/**
|
|
1785
1598
|
* NOTE:
|
|
1786
1599
|
* Given the user has not been loaded a loading spinner is shown.
|
|
@@ -1789,7 +1602,6 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1789
1602
|
* Given the user was working on a project previously or has a default
|
|
1790
1603
|
* project, the application will redirect to that project.
|
|
1791
1604
|
*/
|
|
1792
|
-
|
|
1793
1605
|
if (!user) return jsxRuntime.jsx(ApplicationLoader, {});
|
|
1794
1606
|
if (!previousProjectKey) return jsxRuntime.jsx(RedirectToProjectCreate, {});
|
|
1795
1607
|
return jsxRuntime.jsx(reactRouterDom.Redirect, {
|
|
@@ -1802,7 +1614,8 @@ const ApplicationShellAuthenticated = props => {
|
|
|
1802
1614
|
children: jsxRuntime.jsx(ProjectContainer, {
|
|
1803
1615
|
user: user,
|
|
1804
1616
|
environment: applicationEnvironment,
|
|
1805
|
-
disableRoutePermissionCheck: props.disableRoutePermissionCheck
|
|
1617
|
+
disableRoutePermissionCheck: props.disableRoutePermissionCheck
|
|
1618
|
+
// This effectively renders the
|
|
1806
1619
|
// children, which is the application
|
|
1807
1620
|
// specific part
|
|
1808
1621
|
,
|
|
@@ -1831,28 +1644,22 @@ const staticPaths = ['account', 'login'];
|
|
|
1831
1644
|
const defaultProps$1 = {
|
|
1832
1645
|
additionalParts: []
|
|
1833
1646
|
};
|
|
1834
|
-
|
|
1835
1647
|
const getPageTitle = (pathname, additionalParts) => {
|
|
1836
1648
|
const _pathname$split = pathname.split('/'),
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1649
|
+
_pathname$split2 = _slicedToArray(_pathname$split, 3),
|
|
1650
|
+
projectKeyOrStaticPath = _pathname$split2[1],
|
|
1651
|
+
entryPointUriPath = _pathname$split2[2];
|
|
1841
1652
|
const customTitleParts = _mapInstanceProperty__default["default"](additionalParts).call(additionalParts, titlePart => {
|
|
1842
1653
|
if (titlePart.length <= maxTitleCharLength) {
|
|
1843
1654
|
return titlePart;
|
|
1844
1655
|
}
|
|
1845
|
-
|
|
1846
1656
|
return [_sliceInstanceProperty__default["default"](titlePart).call(titlePart, 0, maxTitleCharLength / 2), _sliceInstanceProperty__default["default"](titlePart).call(titlePart, titlePart.length - maxTitleCharLength / 2)].join('...');
|
|
1847
1657
|
});
|
|
1848
|
-
|
|
1849
1658
|
if (_includesInstanceProperty__default["default"](staticPaths).call(staticPaths, projectKeyOrStaticPath)) {
|
|
1850
1659
|
return [...(customTitleParts || []), upperFirst__default["default"](projectKeyOrStaticPath), 'Merchant Center'].join(' - ');
|
|
1851
1660
|
}
|
|
1852
|
-
|
|
1853
1661
|
return [...(customTitleParts || []), upperFirst__default["default"](entryPointUriPath), projectKeyOrStaticPath, 'Merchant Center'].join(' - ');
|
|
1854
1662
|
};
|
|
1855
|
-
|
|
1856
1663
|
const ApplicationPageTitle = props => {
|
|
1857
1664
|
const location = reactRouterDom.useLocation();
|
|
1858
1665
|
react.useLayoutEffect(() => {
|
|
@@ -1861,7 +1668,6 @@ const ApplicationPageTitle = props => {
|
|
|
1861
1668
|
}, [location.pathname, props.additionalParts]);
|
|
1862
1669
|
return null;
|
|
1863
1670
|
};
|
|
1864
|
-
|
|
1865
1671
|
ApplicationPageTitle.propTypes = {
|
|
1866
1672
|
additionalParts: _pt__default["default"].arrayOf(_pt__default["default"].string).isRequired
|
|
1867
1673
|
};
|
|
@@ -1869,66 +1675,61 @@ ApplicationPageTitle.displayName = 'ApplicationPageTitle';
|
|
|
1869
1675
|
ApplicationPageTitle.defaultProps = defaultProps$1;
|
|
1870
1676
|
|
|
1871
1677
|
function ownKeys$3(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1872
|
-
|
|
1873
1678
|
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$3(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1874
|
-
|
|
1875
1679
|
const SuspendedRoute = props => jsxRuntime.jsx(reactRouterDom.Route, _objectSpread$3(_objectSpread$3({}, props), {}, {
|
|
1876
1680
|
children: jsxRuntime.jsx(react.Suspense, {
|
|
1877
1681
|
fallback: jsxRuntime.jsx(LoadingSpinner__default["default"], {}),
|
|
1878
1682
|
children: props.children
|
|
1879
1683
|
})
|
|
1880
1684
|
}));
|
|
1881
|
-
|
|
1882
1685
|
SuspendedRoute.displayName = 'SuspendedRoute';
|
|
1883
1686
|
|
|
1884
1687
|
var AmILoggedInQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "AmILoggedIn" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "amILoggedIn" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 36, source: { body: "query AmILoggedIn {\n amILoggedIn\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
1885
|
-
|
|
1886
1688
|
const AmILoggedIn = props => {
|
|
1887
1689
|
// ...otherwise, we ping a "secured" endpoint in the MC API to see if there is
|
|
1888
1690
|
// a valid access token. If we get an error, we assume that the user is not
|
|
1889
1691
|
// authenticated. If we don't get any error, the access token sent with the cookie
|
|
1890
1692
|
// is valid. We return null while the query is loading.
|
|
1891
1693
|
const _useMcQuery = useMcQuery(AmILoggedInQuery, {
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1694
|
+
context: {
|
|
1695
|
+
target: constants$1.GRAPHQL_TARGETS.MERCHANT_CENTER_BACKEND,
|
|
1696
|
+
skipTokenRetry: true
|
|
1697
|
+
},
|
|
1698
|
+
// NOTE: With `no-cache` the `useQuery` will not trigger a
|
|
1699
|
+
// re-render of the `AmILoggedIn` component. Relying on a default
|
|
1700
|
+
// fetch policy results in rendering the component without refetching the data
|
|
1701
|
+
// which as a result unmounts child components (such as an application).
|
|
1702
|
+
//
|
|
1703
|
+
// For example:
|
|
1704
|
+
// Given the user not authenticated
|
|
1705
|
+
// Then the first pass of useQuery returns an exptected error
|
|
1706
|
+
// Given the query is triggered again (through `useQuery`)
|
|
1707
|
+
// Then the component will re-render
|
|
1708
|
+
// Resulting in inconsistent data with the error not being defined
|
|
1709
|
+
fetchPolicy: 'no-cache',
|
|
1710
|
+
onCompleted: data => {
|
|
1711
|
+
if (!data) {
|
|
1712
|
+
// In case the request is 200 but there is no data, we assume
|
|
1713
|
+
// there are some errors.
|
|
1714
|
+
window.localStorage.removeItem(constants.STORAGE_KEYS.IS_AUTHENTICATED);
|
|
1715
|
+
} else {
|
|
1716
|
+
// Even though the login page might set this flag, we just make sure that
|
|
1717
|
+
// we do it here as well. This will help in the future when we eventually
|
|
1718
|
+
// move the auth service to itw own domain, in which case the local storage
|
|
1719
|
+
// is not shared anymore.
|
|
1720
|
+
window.localStorage.setItem(constants.STORAGE_KEYS.IS_AUTHENTICATED, String(true));
|
|
1721
|
+
}
|
|
1722
|
+
},
|
|
1723
|
+
onError: () => {
|
|
1724
|
+
// The query fails without the `mcAccessToken`. In this case the caching
|
|
1725
|
+
// needs to be unset as otherwise the application will end up in a infinte
|
|
1726
|
+
// redirect loop.
|
|
1912
1727
|
window.localStorage.removeItem(constants.STORAGE_KEYS.IS_AUTHENTICATED);
|
|
1913
|
-
} else {
|
|
1914
|
-
// Even though the login page might set this flag, we just make sure that
|
|
1915
|
-
// we do it here as well. This will help in the future when we eventually
|
|
1916
|
-
// move the auth service to itw own domain, in which case the local storage
|
|
1917
|
-
// is not shared anymore.
|
|
1918
|
-
window.localStorage.setItem(constants.STORAGE_KEYS.IS_AUTHENTICATED, String(true));
|
|
1919
1728
|
}
|
|
1920
|
-
},
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
// redirect loop.
|
|
1925
|
-
window.localStorage.removeItem(constants.STORAGE_KEYS.IS_AUTHENTICATED);
|
|
1926
|
-
}
|
|
1927
|
-
}),
|
|
1928
|
-
data = _useMcQuery.data,
|
|
1929
|
-
loading = _useMcQuery.loading,
|
|
1930
|
-
error = _useMcQuery.error;
|
|
1931
|
-
|
|
1729
|
+
}),
|
|
1730
|
+
data = _useMcQuery.data,
|
|
1731
|
+
loading = _useMcQuery.loading,
|
|
1732
|
+
error = _useMcQuery.error;
|
|
1932
1733
|
if (error) {
|
|
1933
1734
|
// No matter what error, we consider it as a failed authentication
|
|
1934
1735
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
@@ -1937,7 +1738,6 @@ const AmILoggedIn = props => {
|
|
|
1937
1738
|
})
|
|
1938
1739
|
});
|
|
1939
1740
|
}
|
|
1940
|
-
|
|
1941
1741
|
if (!loading && data && data.amILoggedIn) {
|
|
1942
1742
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1943
1743
|
children: props.render({
|
|
@@ -1945,30 +1745,22 @@ const AmILoggedIn = props => {
|
|
|
1945
1745
|
})
|
|
1946
1746
|
});
|
|
1947
1747
|
}
|
|
1948
|
-
|
|
1949
1748
|
return null;
|
|
1950
1749
|
};
|
|
1951
|
-
|
|
1952
1750
|
AmILoggedIn.displayName = 'AmILoggedIn';
|
|
1953
1751
|
|
|
1954
1752
|
const withoutProjectKeyClaim = scope => {
|
|
1955
1753
|
var _context;
|
|
1956
|
-
|
|
1957
1754
|
return _filterInstanceProperty__default["default"](_context = scope.split(' ')).call(_context, claim => !_startsWithInstanceProperty__default["default"](claim).call(claim, constants.OIDC_CLAIMS.PROJECT_KEY)).join(' ');
|
|
1958
1755
|
};
|
|
1959
|
-
|
|
1960
1756
|
const hasCachedAuthenticationState = () => {
|
|
1961
1757
|
var _window$app$__DEVELOP, _window$app$__DEVELOP2;
|
|
1962
|
-
|
|
1963
1758
|
if ((_window$app$__DEVELOP = window.app.__DEVELOPMENT__) !== null && _window$app$__DEVELOP !== void 0 && (_window$app$__DEVELOP2 = _window$app$__DEVELOP.oidc) !== null && _window$app$__DEVELOP2 !== void 0 && _window$app$__DEVELOP2.authorizeUrl) {
|
|
1964
1759
|
try {
|
|
1965
1760
|
var _window$app$__DEVELOP9, _window$app$__DEVELOP10, _window$app$__DEVELOP11, _window$app$__DEVELOP12, _window$app$__DEVELOP13, _window$app$__DEVELOP14;
|
|
1966
|
-
|
|
1967
1761
|
const activeProjectKey = configureApollo.getActiveProjectKey();
|
|
1968
|
-
|
|
1969
1762
|
if (activeProjectKey) {
|
|
1970
1763
|
var _window$app$__DEVELOP3, _window$app$__DEVELOP4;
|
|
1971
|
-
|
|
1972
1764
|
// GIVEN The application is not requesting a project key,
|
|
1973
1765
|
// THEN we assume that the application does not need a project context.
|
|
1974
1766
|
// GIVEN The application is not requesting a project key,
|
|
@@ -1979,90 +1771,77 @@ const hasCachedAuthenticationState = () => {
|
|
|
1979
1771
|
}
|
|
1980
1772
|
} else {
|
|
1981
1773
|
var _window$app$__DEVELOP5, _window$app$__DEVELOP6;
|
|
1982
|
-
|
|
1983
1774
|
if ((_window$app$__DEVELOP5 = window.app.__DEVELOPMENT__) !== null && _window$app$__DEVELOP5 !== void 0 && (_window$app$__DEVELOP6 = _window$app$__DEVELOP5.oidc) !== null && _window$app$__DEVELOP6 !== void 0 && _window$app$__DEVELOP6.initialProjectKey) {
|
|
1984
1775
|
var _window$app$__DEVELOP7, _window$app$__DEVELOP8;
|
|
1985
|
-
|
|
1986
1776
|
// Here we store the initial project key in local storage,
|
|
1987
1777
|
// so that it gets picked up when we initiate the login flow.
|
|
1988
1778
|
configureApollo.setActiveProjectKey((_window$app$__DEVELOP7 = window.app.__DEVELOPMENT__) === null || _window$app$__DEVELOP7 === void 0 ? void 0 : (_window$app$__DEVELOP8 = _window$app$__DEVELOP7.oidc) === null || _window$app$__DEVELOP8 === void 0 ? void 0 : _window$app$__DEVELOP8.initialProjectKey);
|
|
1989
1779
|
}
|
|
1990
|
-
}
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
// cachedScope is assumed to be the exact cached version of the `requestedScope`
|
|
1991
1783
|
// if they don't match, then we know that one of the claims within the scope has changed
|
|
1992
1784
|
// given a change, we need to force the user to log in, so that new values on respective claim
|
|
1993
1785
|
// will apply for the given custom application
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
const cachedScope = configureApollo.getSessionScope(); // Force the user to log in again
|
|
1997
|
-
|
|
1786
|
+
const cachedScope = configureApollo.getSessionScope();
|
|
1787
|
+
// Force the user to log in again
|
|
1998
1788
|
if (!cachedScope) {
|
|
1999
1789
|
return false;
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
|
|
1790
|
+
}
|
|
1791
|
+
// Rebuild the requested OIDC scope to verify that it didn't change.
|
|
2003
1792
|
const requestedScope = oidc.buildOidcScope({
|
|
2004
1793
|
projectKey: activeProjectKey !== null && activeProjectKey !== void 0 ? activeProjectKey : undefined,
|
|
2005
1794
|
oAuthScopes: (_window$app$__DEVELOP9 = window.app.__DEVELOPMENT__) === null || _window$app$__DEVELOP9 === void 0 ? void 0 : (_window$app$__DEVELOP10 = _window$app$__DEVELOP9.oidc) === null || _window$app$__DEVELOP10 === void 0 ? void 0 : _window$app$__DEVELOP10.oAuthScopes,
|
|
2006
1795
|
additionalOAuthScopes: (_window$app$__DEVELOP11 = window.app.__DEVELOPMENT__) === null || _window$app$__DEVELOP11 === void 0 ? void 0 : (_window$app$__DEVELOP12 = _window$app$__DEVELOP11.oidc) === null || _window$app$__DEVELOP12 === void 0 ? void 0 : _window$app$__DEVELOP12.additionalOAuthScopes,
|
|
2007
1796
|
teamId: (_window$app$__DEVELOP13 = window.app.__DEVELOPMENT__) === null || _window$app$__DEVELOP13 === void 0 ? void 0 : (_window$app$__DEVELOP14 = _window$app$__DEVELOP13.oidc) === null || _window$app$__DEVELOP14 === void 0 ? void 0 : _window$app$__DEVELOP14.teamId
|
|
2008
|
-
});
|
|
1797
|
+
});
|
|
1798
|
+
// Omit the project key from the check. This allows to switch projects
|
|
2009
1799
|
// without having to log in again.
|
|
2010
|
-
|
|
2011
1800
|
const cachedScopeWithoutProjectKey = withoutProjectKeyClaim(cachedScope);
|
|
2012
|
-
const requestedScopeWithoutProjectKey = withoutProjectKeyClaim(requestedScope);
|
|
2013
|
-
|
|
1801
|
+
const requestedScopeWithoutProjectKey = withoutProjectKeyClaim(requestedScope);
|
|
1802
|
+
// Check that the session scope didn't change.
|
|
2014
1803
|
if (cachedScopeWithoutProjectKey === requestedScopeWithoutProjectKey) {
|
|
2015
1804
|
return true;
|
|
2016
1805
|
}
|
|
2017
|
-
|
|
2018
1806
|
return false;
|
|
2019
1807
|
} catch (err) {
|
|
2020
1808
|
return false;
|
|
2021
1809
|
}
|
|
2022
1810
|
}
|
|
2023
|
-
|
|
2024
1811
|
return window.localStorage.getItem(constants.STORAGE_KEYS.IS_AUTHENTICATED) === 'true';
|
|
2025
1812
|
};
|
|
2026
1813
|
|
|
2027
|
-
const OidcCallback = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./oidc-callback-
|
|
2028
|
-
/* webpackChunkName: "oidc-callback" */
|
|
2029
|
-
); }));
|
|
1814
|
+
const OidcCallback = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./oidc-callback-0e62e010.cjs.prod.js' /* webpackChunkName: "oidc-callback" */); }));
|
|
2030
1815
|
|
|
2031
1816
|
function ownKeys$2(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2032
|
-
|
|
2033
1817
|
function _objectSpread$2(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$2(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$2(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2034
|
-
|
|
2035
1818
|
const Authenticated = props => {
|
|
2036
1819
|
var _window$app$__DEVELOP, _window$app$__DEVELOP2;
|
|
2037
|
-
|
|
2038
1820
|
// We attempt to see if the user was already authenticated by looking
|
|
2039
1821
|
// at the "cached" flag in local storage.
|
|
2040
1822
|
const cachedAuthenticationState = hasCachedAuthenticationState();
|
|
2041
|
-
|
|
2042
1823
|
if (cachedAuthenticationState) {
|
|
2043
1824
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
2044
1825
|
children: props.render({
|
|
2045
1826
|
isAuthenticated: true
|
|
2046
1827
|
})
|
|
2047
1828
|
});
|
|
2048
|
-
}
|
|
2049
|
-
// the redirect to the login page.
|
|
2050
|
-
|
|
1829
|
+
}
|
|
2051
1830
|
|
|
1831
|
+
// When using the OIDC workflow, we always return false, to trigger
|
|
1832
|
+
// the redirect to the login page.
|
|
2052
1833
|
if ((_window$app$__DEVELOP = window.app.__DEVELOPMENT__) !== null && _window$app$__DEVELOP !== void 0 && (_window$app$__DEVELOP2 = _window$app$__DEVELOP.oidc) !== null && _window$app$__DEVELOP2 !== void 0 && _window$app$__DEVELOP2.authorizeUrl) {
|
|
2053
1834
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
2054
1835
|
children: props.render({
|
|
2055
1836
|
isAuthenticated: false
|
|
2056
1837
|
})
|
|
2057
1838
|
});
|
|
2058
|
-
}
|
|
2059
|
-
|
|
1839
|
+
}
|
|
2060
1840
|
|
|
1841
|
+
// Fall back to check for cookie-based authentication.
|
|
2061
1842
|
return jsxRuntime.jsx(AmILoggedIn, _objectSpread$2({}, props));
|
|
2062
1843
|
};
|
|
2063
|
-
|
|
2064
1844
|
Authenticated.displayName = 'Authenticated';
|
|
2065
|
-
|
|
2066
1845
|
const AuthenticationRoutes = props => jsxRuntime.jsxs(reactRouterDom.Switch, {
|
|
2067
1846
|
children: [jsxRuntime.jsx(SuspendedRoute, {
|
|
2068
1847
|
path: "/account/oidc/callback",
|
|
@@ -2080,13 +1859,10 @@ const AuthenticationRoutes = props => jsxRuntime.jsxs(reactRouterDom.Switch, {
|
|
|
2080
1859
|
children: jsxRuntime.jsx(Authenticated, _objectSpread$2({}, props))
|
|
2081
1860
|
})]
|
|
2082
1861
|
});
|
|
2083
|
-
|
|
2084
1862
|
AuthenticationRoutes.displayName = 'AuthenticationRoutes';
|
|
2085
1863
|
|
|
2086
1864
|
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2087
|
-
|
|
2088
1865
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2089
|
-
|
|
2090
1866
|
/**
|
|
2091
1867
|
* NOTE:
|
|
2092
1868
|
* This function try-catches around a `JSON.parse` and return
|
|
@@ -2102,11 +1878,11 @@ const getCoerceEnvironmentValue = environmentValueAsString => {
|
|
|
2102
1878
|
// Return the value as-is if it's not a string.
|
|
2103
1879
|
if (typeof environmentValueAsString !== 'string') {
|
|
2104
1880
|
return environmentValueAsString;
|
|
2105
|
-
}
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
// In case the value is a string, we try to parse it to attempt to extract
|
|
2106
1884
|
// the primitive value, if the original value is indeed supposed to be a primitive.
|
|
2107
1885
|
// For example, `'1'` is converted to a number, `'true'` is converted to a boolean, etc.
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
1886
|
try {
|
|
2111
1887
|
// Strip out escaped quotes. This is mostly important to coerce an array of string
|
|
2112
1888
|
// with escaped quotes.
|
|
@@ -2115,10 +1891,8 @@ const getCoerceEnvironmentValue = environmentValueAsString => {
|
|
|
2115
1891
|
return environmentValueAsString;
|
|
2116
1892
|
}
|
|
2117
1893
|
};
|
|
2118
|
-
|
|
2119
1894
|
const shallowlyCoerceValues = uncoercedEnvironmentValues => {
|
|
2120
1895
|
var _context;
|
|
2121
|
-
|
|
2122
1896
|
return _reduceInstanceProperty__default["default"](_context = _Object$keys__default["default"](uncoercedEnvironmentValues)).call(_context, (coercedEnvironmentValues, key) => {
|
|
2123
1897
|
const uncoercedEnvironmentValue = uncoercedEnvironmentValues[key];
|
|
2124
1898
|
return _objectSpread$1(_objectSpread$1({}, coercedEnvironmentValues), {}, {
|
|
@@ -2126,7 +1900,6 @@ const shallowlyCoerceValues = uncoercedEnvironmentValues => {
|
|
|
2126
1900
|
});
|
|
2127
1901
|
}, {});
|
|
2128
1902
|
};
|
|
2129
|
-
|
|
2130
1903
|
const useCoercedEnvironmentValues = environment => {
|
|
2131
1904
|
const coercedEnvironmentValues = react.useMemo(() => shallowlyCoerceValues(environment), [environment]);
|
|
2132
1905
|
return coercedEnvironmentValues;
|
|
@@ -2135,7 +1908,6 @@ const useCoercedEnvironmentValues = environment => {
|
|
|
2135
1908
|
const ApplicationShellProvider = props => {
|
|
2136
1909
|
const apolloClient = react.useMemo(() => {
|
|
2137
1910
|
var _props$apolloClient;
|
|
2138
|
-
|
|
2139
1911
|
return (_props$apolloClient = props.apolloClient) !== null && _props$apolloClient !== void 0 ? _props$apolloClient : configureApollo.createApolloClient();
|
|
2140
1912
|
}, [props.apolloClient]);
|
|
2141
1913
|
react.useEffect(() => {
|
|
@@ -2153,7 +1925,7 @@ const ApplicationShellProvider = props => {
|
|
|
2153
1925
|
children: jsxRuntime.jsx(react$2.ApolloProvider, {
|
|
2154
1926
|
client: apolloClient,
|
|
2155
1927
|
children: jsxRuntime.jsxs(reactRouterDom.Router, {
|
|
2156
|
-
history:
|
|
1928
|
+
history: getBrowserHistory(),
|
|
2157
1929
|
children: [jsxRuntime.jsx(ApplicationPageTitle, {}), jsxRuntime.jsx(AuthenticationRoutes, {
|
|
2158
1930
|
locale: browserLocale,
|
|
2159
1931
|
applicationMessages: props.applicationMessages,
|
|
@@ -2167,7 +1939,7 @@ const ApplicationShellProvider = props => {
|
|
|
2167
1939
|
applicationMessages: props.applicationMessages,
|
|
2168
1940
|
children: _ref2 => {
|
|
2169
1941
|
let locale = _ref2.locale,
|
|
2170
|
-
|
|
1942
|
+
messages = _ref2.messages;
|
|
2171
1943
|
return jsxRuntime.jsx(ConfigureIntlProvider, {
|
|
2172
1944
|
locale: locale,
|
|
2173
1945
|
messages: messages,
|
|
@@ -2186,21 +1958,15 @@ const ApplicationShellProvider = props => {
|
|
|
2186
1958
|
})
|
|
2187
1959
|
});
|
|
2188
1960
|
};
|
|
2189
|
-
|
|
2190
1961
|
ApplicationShellProvider.propTypes = {};
|
|
2191
|
-
ApplicationShellProvider.displayName = 'ApplicationShellProvider';
|
|
1962
|
+
ApplicationShellProvider.displayName = 'ApplicationShellProvider';
|
|
2192
1963
|
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
const RedirectToLogin = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-login-d893ba27.cjs.prod.js'
|
|
2196
|
-
/* webpackChunkName: "redirect-to-login" */
|
|
2197
|
-
); }));
|
|
1964
|
+
const RedirectToLogin = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-login-b5d8de15.cjs.prod.js' /* webpackChunkName: "redirect-to-login" */); }));
|
|
2198
1965
|
|
|
2199
1966
|
const styles = {
|
|
2200
1967
|
name: "1prreal",
|
|
2201
1968
|
styles: "html,body{font-size:var(--font-size-for-body);height:100vh;}#app{height:100%;}"
|
|
2202
1969
|
} ;
|
|
2203
|
-
|
|
2204
1970
|
const GlobalStyles = () => jsxRuntime.jsx(react$1.Global, {
|
|
2205
1971
|
styles: styles
|
|
2206
1972
|
});
|
|
@@ -2208,10 +1974,10 @@ const GlobalStyles = () => jsxRuntime.jsx(react$1.Global, {
|
|
|
2208
1974
|
const ApplicationShell = props => {
|
|
2209
1975
|
react.useEffect(() => {
|
|
2210
1976
|
var _props$onRegisterErro;
|
|
2211
|
-
|
|
2212
1977
|
(_props$onRegisterErro = props.onRegisterErrorListeners) === null || _props$onRegisterErro === void 0 ? void 0 : _props$onRegisterErro.call(props, {
|
|
2213
1978
|
dispatch: configureApollo.internalReduxStore.dispatch
|
|
2214
|
-
});
|
|
1979
|
+
});
|
|
1980
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2215
1981
|
}, []); // <-- run only once, when component mounts
|
|
2216
1982
|
|
|
2217
1983
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -2221,7 +1987,6 @@ const ApplicationShell = props => {
|
|
|
2221
1987
|
applicationMessages: props.applicationMessages,
|
|
2222
1988
|
children: _ref => {
|
|
2223
1989
|
let isAuthenticated = _ref.isAuthenticated;
|
|
2224
|
-
|
|
2225
1990
|
if (isAuthenticated) {
|
|
2226
1991
|
return jsxRuntime.jsxs(reactRouterDom.Switch, {
|
|
2227
1992
|
children: [jsxRuntime.jsx(SuspendedRoute, {
|
|
@@ -2240,13 +2005,11 @@ const ApplicationShell = props => {
|
|
|
2240
2005
|
})]
|
|
2241
2006
|
});
|
|
2242
2007
|
}
|
|
2243
|
-
|
|
2244
2008
|
return jsxRuntime.jsx(RedirectToLogin, {});
|
|
2245
2009
|
}
|
|
2246
2010
|
})]
|
|
2247
2011
|
});
|
|
2248
2012
|
};
|
|
2249
|
-
|
|
2250
2013
|
ApplicationShell.propTypes = {};
|
|
2251
2014
|
ApplicationShell.displayName = 'ApplicationShell';
|
|
2252
2015
|
ApplicationShell.version = configureApollo.applicationShellVersion;
|
|
@@ -2254,13 +2017,11 @@ ApplicationShell.version = configureApollo.applicationShellVersion;
|
|
|
2254
2017
|
const defaultProps = {
|
|
2255
2018
|
shouldCleanUpOnUnmount: true
|
|
2256
2019
|
};
|
|
2257
|
-
|
|
2258
2020
|
const InjectReducers = props => {
|
|
2259
2021
|
const _useState = react.useState(false),
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2022
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2023
|
+
areReducersInjected = _useState2[0],
|
|
2024
|
+
setAreReducersInjected = _useState2[1];
|
|
2264
2025
|
const store = reactRedux.useStore();
|
|
2265
2026
|
react.useEffect(() => {
|
|
2266
2027
|
store.injectReducers({
|
|
@@ -2275,14 +2036,14 @@ const InjectReducers = props => {
|
|
|
2275
2036
|
});
|
|
2276
2037
|
}
|
|
2277
2038
|
};
|
|
2278
|
-
}, [props.id, props.reducers, props.shouldCleanUpOnUnmount, store]);
|
|
2039
|
+
}, [props.id, props.reducers, props.shouldCleanUpOnUnmount, store]);
|
|
2279
2040
|
|
|
2041
|
+
// Render children only when the plugin reducers have been injected
|
|
2280
2042
|
if (areReducersInjected) return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
2281
2043
|
children: props.children
|
|
2282
2044
|
});
|
|
2283
2045
|
return null;
|
|
2284
2046
|
};
|
|
2285
|
-
|
|
2286
2047
|
InjectReducers.propTypes = {
|
|
2287
2048
|
id: _pt__default["default"].string.isRequired,
|
|
2288
2049
|
reducers: _pt__default["default"].any.isRequired,
|
|
@@ -2292,28 +2053,25 @@ InjectReducers.propTypes = {
|
|
|
2292
2053
|
InjectReducers.displayName = 'InjectReducers';
|
|
2293
2054
|
InjectReducers.defaultProps = defaultProps;
|
|
2294
2055
|
|
|
2295
|
-
const errorMessageIgnoreList = [/ResizeObserver loop limit exceeded/i];
|
|
2296
|
-
// of catching possible errors.
|
|
2056
|
+
const errorMessageIgnoreList = [/ResizeObserver loop limit exceeded/i];
|
|
2297
2057
|
|
|
2058
|
+
// Ensure to initialize Sentry as soon as possible, so that we have the chance
|
|
2059
|
+
// of catching possible errors.
|
|
2298
2060
|
sentry.boot();
|
|
2299
|
-
|
|
2300
2061
|
const makeErrorToCapture = error => {
|
|
2301
2062
|
if (error instanceof Error) return error;
|
|
2302
2063
|
if (error instanceof ErrorEvent) return new Error(error.message);
|
|
2303
2064
|
return new Error(_JSON$stringify__default["default"](error.reason || 'Unhandled rejection without a reason'));
|
|
2304
2065
|
};
|
|
2305
|
-
|
|
2306
2066
|
const getErrorMessage = error => {
|
|
2307
2067
|
if (typeof error === 'string') return error;
|
|
2308
2068
|
const errorToCapture = makeErrorToCapture(error);
|
|
2309
2069
|
return errorToCapture.message || errorToCapture.name;
|
|
2310
2070
|
};
|
|
2311
|
-
|
|
2312
2071
|
const shouldErrorBeTracked = error => {
|
|
2313
2072
|
const errorMessage = getErrorMessage(error);
|
|
2314
2073
|
return !_someInstanceProperty__default["default"](errorMessageIgnoreList).call(errorMessageIgnoreList, match => match.test(errorMessage));
|
|
2315
2074
|
};
|
|
2316
|
-
|
|
2317
2075
|
function setupGlobalErrorListener() {
|
|
2318
2076
|
// Capture unhandled errors generated from rejected Promises.
|
|
2319
2077
|
//
|
|
@@ -2323,15 +2081,15 @@ function setupGlobalErrorListener() {
|
|
|
2323
2081
|
// Note: this currently works only in Chrome, and it might not be needed.
|
|
2324
2082
|
// We just keep it here as a nice-to-have thing.
|
|
2325
2083
|
window.addEventListener('unhandledrejection', event => {
|
|
2326
|
-
|
|
2327
2084
|
if (shouldErrorBeTracked(event)) {
|
|
2328
2085
|
const errorId = sentry.reportErrorToSentry(event);
|
|
2329
2086
|
configureApollo.internalReduxStore.dispatch(actionsGlobal.showUnexpectedErrorNotification({
|
|
2330
2087
|
errorId
|
|
2331
2088
|
}));
|
|
2332
2089
|
}
|
|
2333
|
-
});
|
|
2090
|
+
});
|
|
2334
2091
|
|
|
2092
|
+
// Capture normal global errors coming from non Promise code.
|
|
2335
2093
|
window.addEventListener('error', errorEvent => {
|
|
2336
2094
|
if (shouldErrorBeTracked(errorEvent)) {
|
|
2337
2095
|
const errorId = sentry.reportErrorToSentry(errorEvent);
|
|
@@ -2343,47 +2101,41 @@ function setupGlobalErrorListener() {
|
|
|
2343
2101
|
}
|
|
2344
2102
|
|
|
2345
2103
|
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; }
|
|
2346
|
-
|
|
2347
2104
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2348
2105
|
|
|
2106
|
+
/**
|
|
2107
|
+
* The route path to match. Usually it starts with `/:projectKey/my-entry-point`.
|
|
2108
|
+
*/
|
|
2109
|
+
|
|
2349
2110
|
const makeRoute = (routePath, routeOptions) => {
|
|
2350
2111
|
const getUrl = (nextParams, nextQueryParams) => {
|
|
2351
2112
|
const baseUrl = reactRouterDom.generatePath(routePath, _objectSpread(_objectSpread({}, routeOptions.params), nextParams));
|
|
2352
|
-
|
|
2353
2113
|
if (nextQueryParams) {
|
|
2354
2114
|
var _context;
|
|
2355
|
-
|
|
2356
2115
|
return _concatInstanceProperty__default["default"](_context = "".concat(baseUrl, "?")).call(_context, nextQueryParams.toString());
|
|
2357
2116
|
}
|
|
2358
|
-
|
|
2359
2117
|
return baseUrl;
|
|
2360
2118
|
};
|
|
2361
|
-
|
|
2362
2119
|
const go = (nextParams, nextQueryParams) => {
|
|
2363
2120
|
routeOptions.goTo(getUrl(nextParams, nextQueryParams));
|
|
2364
2121
|
};
|
|
2365
|
-
|
|
2366
2122
|
return {
|
|
2367
2123
|
path: routePath,
|
|
2368
2124
|
getUrl,
|
|
2369
2125
|
go
|
|
2370
2126
|
};
|
|
2371
2127
|
};
|
|
2372
|
-
|
|
2373
2128
|
function useRoutesCreator() {
|
|
2374
2129
|
const _useRouteMatch = reactRouterDom.useRouteMatch(),
|
|
2375
|
-
|
|
2376
|
-
|
|
2130
|
+
params = _useRouteMatch.params;
|
|
2377
2131
|
const _useHistory = reactRouterDom.useHistory(),
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2132
|
+
goTo = _useHistory.push,
|
|
2133
|
+
location = _useHistory.location;
|
|
2381
2134
|
const createRoute = routePath => makeRoute(routePath, {
|
|
2382
2135
|
goTo,
|
|
2383
2136
|
params,
|
|
2384
2137
|
location
|
|
2385
2138
|
});
|
|
2386
|
-
|
|
2387
2139
|
return {
|
|
2388
2140
|
createRoute
|
|
2389
2141
|
};
|