@commercetools-frontend/application-shell 0.0.0-FEC-157-preview-releases-20241126230331
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/LICENSE +21 -0
- package/README.md +7 -0
- package/dist/application-entry-point-547561a2.cjs.dev.js +109 -0
- package/dist/application-entry-point-54a9664f.esm.js +94 -0
- package/dist/application-entry-point-654951a6.cjs.prod.js +90 -0
- package/dist/box-09bf50e1.cjs.prod.js +30 -0
- package/dist/box-4857aa65.cjs.dev.js +30 -0
- package/dist/box-9cf180c1.esm.js +17 -0
- package/dist/cart-645074db.cjs.prod.js +30 -0
- package/dist/cart-b0044279.cjs.dev.js +30 -0
- package/dist/cart-bb491ca1.esm.js +17 -0
- package/dist/commercetools-frontend-application-shell.cjs.d.ts +2 -0
- package/dist/commercetools-frontend-application-shell.cjs.d.ts.map +1 -0
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +215 -0
- package/dist/commercetools-frontend-application-shell.cjs.js +7 -0
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +215 -0
- package/dist/commercetools-frontend-application-shell.esm.js +81 -0
- package/dist/connected-square-2d046cb8.cjs.prod.js +30 -0
- package/dist/connected-square-a2fea344.cjs.dev.js +30 -0
- package/dist/connected-square-fe6a790f.esm.js +17 -0
- package/dist/custom-view-dev-host-076c2a9f.cjs.prod.js +197 -0
- package/dist/custom-view-dev-host-5eebbfcd.esm.js +188 -0
- package/dist/custom-view-dev-host-7e7d8572.cjs.dev.js +200 -0
- package/dist/declarations/src/components/app-bar/app-bar.d.ts +10 -0
- package/dist/declarations/src/components/app-bar/index.d.ts +1 -0
- package/dist/declarations/src/components/application-entry-point/application-entry-point.d.ts +10 -0
- package/dist/declarations/src/components/application-entry-point/index.d.ts +1 -0
- package/dist/declarations/src/components/application-loader/application-loader.d.ts +8 -0
- package/dist/declarations/src/components/application-loader/index.d.ts +1 -0
- package/dist/declarations/src/components/application-page-title/application-page-title.d.ts +25 -0
- package/dist/declarations/src/components/application-page-title/index.d.ts +1 -0
- package/dist/declarations/src/components/application-shell/application-shell.d.ts +45 -0
- package/dist/declarations/src/components/application-shell/global-styles.d.ts +3 -0
- package/dist/declarations/src/components/application-shell/index.d.ts +1 -0
- package/dist/declarations/src/components/application-shell-authenticated/application-shell-authenticated.d.ts +25 -0
- package/dist/declarations/src/components/application-shell-provider/application-shell-provider.d.ts +17 -0
- package/dist/declarations/src/components/application-shell-provider/index.d.ts +1 -0
- package/dist/declarations/src/components/application-shell-provider/use-coerced-environment-values.d.ts +6 -0
- package/dist/declarations/src/components/application-shell-provider/utils.d.ts +3 -0
- package/dist/declarations/src/components/authenticated/am-i-logged-in.d.ts +13 -0
- package/dist/declarations/src/components/authenticated/authenticated.d.ts +16 -0
- package/dist/declarations/src/components/authenticated/has-cached-authentication-state.d.ts +2 -0
- package/dist/declarations/src/components/authenticated/index.d.ts +1 -0
- package/dist/declarations/src/components/authenticated/oidc-callback-error-page.d.ts +12 -0
- package/dist/declarations/src/components/authenticated/oidc-callback.async.d.ts +6 -0
- package/dist/declarations/src/components/authenticated/oidc-callback.d.ts +11 -0
- package/dist/declarations/src/components/authenticated/types.d.ts +6 -0
- package/dist/declarations/src/components/back-to-project/back-to-project.d.ts +8 -0
- package/dist/declarations/src/components/back-to-project/index.d.ts +1 -0
- package/dist/declarations/src/components/back-to-project/messages.d.ts +7 -0
- package/dist/declarations/src/components/configure-intl-provider/configure-intl-provider.d.ts +12 -0
- package/dist/declarations/src/components/configure-intl-provider/index.d.ts +1 -0
- package/dist/declarations/src/components/custom-view-dev-host/custom-view-dev-host.d.ts +11 -0
- package/dist/declarations/src/components/custom-view-dev-host/index.d.ts +6 -0
- package/dist/declarations/src/components/custom-view-flop-flip-provider/custom-view-flop-flip-provider.d.ts +10 -0
- package/dist/declarations/src/components/custom-view-flop-flip-provider/index.d.ts +1 -0
- package/dist/declarations/src/components/custom-view-shell/custom-view-shell.d.ts +12 -0
- package/dist/declarations/src/components/custom-view-shell/custom-view-shell.styles.d.ts +9 -0
- package/dist/declarations/src/components/custom-view-shell/index.d.ts +1 -0
- package/dist/declarations/src/components/custom-view-shell-authenticated/custom-view-shell-authenticated.d.ts +15 -0
- package/dist/declarations/src/components/custom-view-shell-authenticated/index.d.ts +1 -0
- package/dist/declarations/src/components/error-apologizer/error-apologizer.d.ts +5 -0
- package/dist/declarations/src/components/error-apologizer/index.d.ts +6 -0
- package/dist/declarations/src/components/error-apologizer/messages.d.ts +11 -0
- package/dist/declarations/src/components/error-boundary/error-boundary.d.ts +20 -0
- package/dist/declarations/src/components/error-boundary/index.d.ts +1 -0
- package/dist/declarations/src/components/fetch-project/fetch-project.d.ts +18 -0
- package/dist/declarations/src/components/fetch-project/index.d.ts +1 -0
- package/dist/declarations/src/components/fetch-user/fetch-user.d.ts +16 -0
- package/dist/declarations/src/components/fetch-user/index.d.ts +1 -0
- package/dist/declarations/src/components/inject-reducers/index.d.ts +1 -0
- package/dist/declarations/src/components/inject-reducers/inject-reducers.d.ts +14 -0
- package/dist/declarations/src/components/loading-placeholder/index.d.ts +1 -0
- package/dist/declarations/src/components/loading-placeholder/loading-placeholder.d.ts +10 -0
- package/dist/declarations/src/components/locale-switcher/index.d.ts +1 -0
- package/dist/declarations/src/components/locale-switcher/locale-switcher.d.ts +12 -0
- package/dist/declarations/src/components/locale-switcher/messages.d.ts +18 -0
- package/dist/declarations/src/components/navbar/index.d.ts +6 -0
- package/dist/declarations/src/components/navbar/legacy-icons/box.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/cart.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/connected-square.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/gear.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/heart.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/list-with-search.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/paperclip.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/plugin.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/rocket.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/speedometer.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/star.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/tag-multi.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/tree-structure.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/user-filled.d.ts +2 -0
- package/dist/declarations/src/components/navbar/legacy-icons/world.d.ts +2 -0
- package/dist/declarations/src/components/navbar/main-navbar.styles.d.ts +51 -0
- package/dist/declarations/src/components/navbar/menu-items.d.ts +107 -0
- package/dist/declarations/src/components/navbar/menu-items.styles.d.ts +52 -0
- package/dist/declarations/src/components/navbar/messages.d.ts +7 -0
- package/dist/declarations/src/components/navbar/navbar-skeleton.d.ts +6 -0
- package/dist/declarations/src/components/navbar/navbar-skeleton.styles.d.ts +43 -0
- package/dist/declarations/src/components/navbar/navbar.d.ts +51 -0
- package/dist/declarations/src/components/navbar/non-nullable.d.ts +1 -0
- package/dist/declarations/src/components/navbar/shared.styles.d.ts +18 -0
- package/dist/declarations/src/components/navbar/use-navbar-state-manager.d.ts +25 -0
- package/dist/declarations/src/components/project-container/index.d.ts +61 -0
- package/dist/declarations/src/components/project-container/messages.d.ts +7 -0
- package/dist/declarations/src/components/project-container/project-container.d.ts +17 -0
- package/dist/declarations/src/components/project-data-locale/index.d.ts +1 -0
- package/dist/declarations/src/components/project-data-locale/project-data-locale.d.ts +14 -0
- package/dist/declarations/src/components/project-expired/index.d.ts +6 -0
- package/dist/declarations/src/components/project-expired/messages.d.ts +11 -0
- package/dist/declarations/src/components/project-expired/project-expired.d.ts +5 -0
- package/dist/declarations/src/components/project-not-found/index.d.ts +6 -0
- package/dist/declarations/src/components/project-not-found/messages.d.ts +15 -0
- package/dist/declarations/src/components/project-not-found/project-not-found.d.ts +5 -0
- package/dist/declarations/src/components/project-not-initialized/index.d.ts +6 -0
- package/dist/declarations/src/components/project-not-initialized/messages.d.ts +11 -0
- package/dist/declarations/src/components/project-not-initialized/project-not-initialized.d.ts +5 -0
- package/dist/declarations/src/components/project-suspended/index.d.ts +8 -0
- package/dist/declarations/src/components/project-suspended/messages.d.ts +15 -0
- package/dist/declarations/src/components/project-suspended/project-suspended.d.ts +8 -0
- package/dist/declarations/src/components/project-switcher/index.d.ts +1 -0
- package/dist/declarations/src/components/project-switcher/messages.d.ts +28 -0
- package/dist/declarations/src/components/project-switcher/project-switcher.d.ts +11 -0
- package/dist/declarations/src/components/quick-access/butler/butler.d.ts +14 -0
- package/dist/declarations/src/components/quick-access/butler/index.d.ts +1 -0
- package/dist/declarations/src/components/quick-access/butler-command/butler-command.d.ts +13 -0
- package/dist/declarations/src/components/quick-access/butler-command/index.d.ts +1 -0
- package/dist/declarations/src/components/quick-access/butler-container/butler-container.d.ts +6 -0
- package/dist/declarations/src/components/quick-access/butler-container/index.d.ts +1 -0
- package/dist/declarations/src/components/quick-access/constants.d.ts +24 -0
- package/dist/declarations/src/components/quick-access/create-commands.d.ts +13 -0
- package/dist/declarations/src/components/quick-access/history-entries.d.ts +3 -0
- package/dist/declarations/src/components/quick-access/index.d.ts +8 -0
- package/dist/declarations/src/components/quick-access/messages.d.ts +247 -0
- package/dist/declarations/src/components/quick-access/pim-indexer-states.d.ts +6 -0
- package/dist/declarations/src/components/quick-access/quick-access.d.ts +12 -0
- package/dist/declarations/src/components/quick-access/sub-commands.d.ts +17 -0
- package/dist/declarations/src/components/quick-access/types.d.ts +31 -0
- package/dist/declarations/src/components/quick-access/utils.d.ts +5 -0
- package/dist/declarations/src/components/redirect-to-login/index.d.ts +6 -0
- package/dist/declarations/src/components/redirect-to-login/redirect-to-login.d.ts +5 -0
- package/dist/declarations/src/components/redirect-to-logout/index.d.ts +5 -0
- package/dist/declarations/src/components/redirect-to-logout/redirect-to-logout.d.ts +6 -0
- package/dist/declarations/src/components/redirect-to-project-create/index.d.ts +6 -0
- package/dist/declarations/src/components/redirect-to-project-create/redirect-to-project-create.d.ts +5 -0
- package/dist/declarations/src/components/redirector/index.d.ts +1 -0
- package/dist/declarations/src/components/redirector/redirector.d.ts +23 -0
- package/dist/declarations/src/components/requests-in-flight-loader/constants.d.ts +1 -0
- package/dist/declarations/src/components/requests-in-flight-loader/index.d.ts +7 -0
- package/dist/declarations/src/components/requests-in-flight-loader/messages.d.ts +8 -0
- package/dist/declarations/src/components/requests-in-flight-loader/reducer.d.ts +4 -0
- package/dist/declarations/src/components/requests-in-flight-loader/requests-in-flight-loader.d.ts +6 -0
- package/dist/declarations/src/components/requests-in-flight-loader/types.d.ts +9 -0
- package/dist/declarations/src/components/route-catch-all/index.d.ts +3 -0
- package/dist/declarations/src/components/route-catch-all/route-catch-all.d.ts +2 -0
- package/dist/declarations/src/components/service-page-project-switcher/index.d.ts +1 -0
- package/dist/declarations/src/components/service-page-project-switcher/service-page-project-switcher.d.ts +5 -0
- package/dist/declarations/src/components/setup-flop-flip-provider/index.d.ts +1 -0
- package/dist/declarations/src/components/setup-flop-flip-provider/setup-flop-flip-provider.d.ts +17 -0
- package/dist/declarations/src/components/suspended-route/index.d.ts +1 -0
- package/dist/declarations/src/components/suspended-route/suspended-route.d.ts +6 -0
- package/dist/declarations/src/components/theme-switcher/index.d.ts +1 -0
- package/dist/declarations/src/components/theme-switcher/theme-switcher.d.ts +2 -0
- package/dist/declarations/src/components/user-settings-menu/index.d.ts +12 -0
- package/dist/declarations/src/components/user-settings-menu/messages.d.ts +33 -0
- package/dist/declarations/src/components/user-settings-menu/user-settings-menu.d.ts +20 -0
- package/dist/declarations/src/configure-store.d.ts +22 -0
- package/dist/declarations/src/constants.d.ts +42 -0
- package/dist/declarations/src/export-types.d.ts +8 -0
- package/dist/declarations/src/hooks/use-applications-menu/index.d.ts +1 -0
- package/dist/declarations/src/hooks/use-applications-menu/use-applications-menu.d.ts +13 -0
- package/dist/declarations/src/hooks/use-is-served-by-proxy/index.d.ts +1 -0
- package/dist/declarations/src/hooks/use-is-served-by-proxy/use-is-served-by-proxy.d.ts +2 -0
- package/dist/declarations/src/hooks/use-routes-creator/index.d.ts +1 -0
- package/dist/declarations/src/hooks/use-routes-creator/use-routes-creator.d.ts +22 -0
- package/dist/declarations/src/index.d.ts +33 -0
- package/dist/declarations/src/middleware/hide-notifications.d.ts +3 -0
- package/dist/declarations/src/middleware/logger.d.ts +3 -0
- package/dist/declarations/src/ssr/index.d.ts +2 -0
- package/dist/declarations/src/test-utils/custom-views-utils.d.ts +21 -0
- package/dist/declarations/src/test-utils/index.d.ts +2 -0
- package/dist/declarations/src/test-utils/test-utils.d.ts +83 -0
- package/dist/declarations/src/types/generated/ctp.d.ts +14279 -0
- package/dist/declarations/src/types/generated/mc.d.ts +742 -0
- package/dist/declarations/src/types/generated/proxy.d.ts +154 -0
- package/dist/declarations/src/types/generated/settings.d.ts +2116 -0
- package/dist/declarations/src/utils/get-mc-api-url/get-mc-api-url.d.ts +3 -0
- package/dist/declarations/src/utils/get-mc-api-url/index.d.ts +1 -0
- package/dist/declarations/src/utils/get-mc-origin/get-mc-origin.d.ts +18 -0
- package/dist/declarations/src/utils/get-mc-origin/index.d.ts +1 -0
- package/dist/declarations/src/utils/get-previous-project-key/get-previous-project-key.d.ts +2 -0
- package/dist/declarations/src/utils/get-previous-project-key/index.d.ts +1 -0
- package/dist/declarations/src/utils/index.d.ts +3 -0
- package/dist/declarations/src/utils/location/index.d.ts +1 -0
- package/dist/declarations/src/utils/location/location.d.ts +5 -0
- package/dist/declarations/src/utils/oidc.d.ts +10 -0
- package/dist/declarations/src/utils/select-project-key-from-local-storage/index.d.ts +1 -0
- package/dist/declarations/src/utils/select-project-key-from-local-storage/select-project-key-from-local-storage.d.ts +1 -0
- package/dist/declarations/src/utils/setup-global-error-listener/index.d.ts +1 -0
- package/dist/declarations/src/utils/setup-global-error-listener/setup-global-error-listener.d.ts +1 -0
- package/dist/declarations/src/version.d.ts +2 -0
- package/dist/error-apologizer-76f087f4.esm.js +39 -0
- package/dist/error-apologizer-84dc825c.cjs.prod.js +53 -0
- package/dist/error-apologizer-f6793491.cjs.dev.js +53 -0
- package/dist/gear-4f7cde98.cjs.prod.js +30 -0
- package/dist/gear-ee90ba83.esm.js +17 -0
- package/dist/gear-f2668579.cjs.dev.js +30 -0
- package/dist/get-mc-origin-8f7a578c.cjs.prod.js +51 -0
- package/dist/get-mc-origin-a86dff20.cjs.dev.js +51 -0
- package/dist/get-mc-origin-fecfee07.esm.js +44 -0
- package/dist/heart-01f01038.cjs.prod.js +30 -0
- package/dist/heart-86f780f3.esm.js +17 -0
- package/dist/heart-e49dd92a.cjs.dev.js +30 -0
- package/dist/index-76b6a9ad.cjs.dev.js +2215 -0
- package/dist/index-91985d64.cjs.prod.js +232 -0
- package/dist/index-b1476d46.cjs.dev.js +232 -0
- package/dist/index-b2fb611e.esm.js +2150 -0
- package/dist/index-b6081c20.esm.js +206 -0
- package/dist/index-ff82019b.cjs.prod.js +2058 -0
- package/dist/list-with-search-027ab8eb.cjs.dev.js +30 -0
- package/dist/list-with-search-6462447e.cjs.prod.js +30 -0
- package/dist/list-with-search-d2901e34.esm.js +17 -0
- package/dist/location-537e0660.cjs.prod.js +32 -0
- package/dist/location-c835b8df.cjs.dev.js +32 -0
- package/dist/location-f21dbc25.esm.js +30 -0
- package/dist/navbar-1465f182.cjs.prod.js +1189 -0
- package/dist/navbar-62d10e1c.cjs.dev.js +1426 -0
- package/dist/navbar-7b53adec.esm.js +1394 -0
- package/dist/oidc-8827f9fe.cjs.dev.js +98 -0
- package/dist/oidc-b2520905.esm.js +84 -0
- package/dist/oidc-callback-17a812d6.esm.js +234 -0
- package/dist/oidc-callback-76814954.cjs.prod.js +243 -0
- package/dist/oidc-callback-adb8385b.cjs.dev.js +249 -0
- package/dist/oidc-d74e6aa2.cjs.prod.js +98 -0
- package/dist/paperclip-005ec544.cjs.dev.js +30 -0
- package/dist/paperclip-a820ee87.esm.js +17 -0
- package/dist/paperclip-fe72a70d.cjs.prod.js +30 -0
- package/dist/plugin-81ae1044.cjs.prod.js +30 -0
- package/dist/plugin-c7bf9e53.esm.js +17 -0
- package/dist/plugin-feb22442.cjs.dev.js +30 -0
- package/dist/project-container-091b168d.cjs.dev.js +390 -0
- package/dist/project-container-55778868.cjs.prod.js +381 -0
- package/dist/project-container-b5401554.esm.js +368 -0
- package/dist/project-expired-47196b04.cjs.dev.js +136 -0
- package/dist/project-expired-5d8570a3.cjs.prod.js +136 -0
- package/dist/project-expired-9efda620.esm.js +122 -0
- package/dist/project-not-found-6346d0bc.cjs.prod.js +129 -0
- package/dist/project-not-found-f069a112.esm.js +115 -0
- package/dist/project-not-found-fef5d1f1.cjs.dev.js +129 -0
- package/dist/project-not-initialized-cad5df83.esm.js +122 -0
- package/dist/project-not-initialized-d05d529a.cjs.prod.js +136 -0
- package/dist/project-not-initialized-e1b3ec3f.cjs.dev.js +136 -0
- package/dist/project-suspended-36f6576b.cjs.prod.js +134 -0
- package/dist/project-suspended-a29d0f56.cjs.dev.js +134 -0
- package/dist/project-suspended-b488c3fe.esm.js +120 -0
- package/dist/quick-access-5ffe0e5c.cjs.prod.js +1877 -0
- package/dist/quick-access-638c9699.esm.js +1888 -0
- package/dist/quick-access-ee38025a.cjs.dev.js +1917 -0
- package/dist/redirect-to-login-321190b7.cjs.dev.js +118 -0
- package/dist/redirect-to-login-8c7575fb.cjs.prod.js +118 -0
- package/dist/redirect-to-login-d9c20203.esm.js +116 -0
- package/dist/redirect-to-logout-03e7fdb7.cjs.dev.js +125 -0
- package/dist/redirect-to-logout-263d0e66.cjs.prod.js +125 -0
- package/dist/redirect-to-logout-3a4109b6.esm.js +112 -0
- package/dist/redirect-to-project-create-9249e554.esm.js +60 -0
- package/dist/redirect-to-project-create-e4ff7797.cjs.prod.js +68 -0
- package/dist/redirect-to-project-create-f4f01842.cjs.dev.js +68 -0
- package/dist/redirector-01f35da8.cjs.prod.js +75 -0
- package/dist/redirector-76670a54.esm.js +59 -0
- package/dist/redirector-98dfc5f0.cjs.dev.js +75 -0
- package/dist/requests-in-flight-loader-7f677421.cjs.prod.js +121 -0
- package/dist/requests-in-flight-loader-aafcb3cd.cjs.dev.js +121 -0
- package/dist/requests-in-flight-loader-e2d591ca.esm.js +106 -0
- package/dist/rocket-3372731a.cjs.dev.js +30 -0
- package/dist/rocket-bacf24be.esm.js +17 -0
- package/dist/rocket-cb99be06.cjs.prod.js +30 -0
- package/dist/route-catch-all-7803b1fd.esm.js +42 -0
- package/dist/route-catch-all-8e71a93c.cjs.prod.js +44 -0
- package/dist/route-catch-all-b979e1fd.cjs.dev.js +44 -0
- package/dist/service-page-project-switcher-05b50df7.cjs.prod.js +37 -0
- package/dist/service-page-project-switcher-0ee3a898.esm.js +40 -0
- package/dist/service-page-project-switcher-e7998e11.cjs.dev.js +46 -0
- package/dist/speedometer-26f52e73.cjs.prod.js +30 -0
- package/dist/speedometer-4c8e0b9c.esm.js +17 -0
- package/dist/speedometer-c1ec5a1d.cjs.dev.js +30 -0
- package/dist/star-6b9a91d2.cjs.dev.js +30 -0
- package/dist/star-af90a9c6.esm.js +17 -0
- package/dist/star-e4902bbb.cjs.prod.js +30 -0
- package/dist/tag-multi-1c065f61.cjs.prod.js +30 -0
- package/dist/tag-multi-4c2742de.esm.js +17 -0
- package/dist/tag-multi-abef3e15.cjs.dev.js +30 -0
- package/dist/tree-structure-3ec98cce.cjs.prod.js +30 -0
- package/dist/tree-structure-96ab0b7e.cjs.dev.js +30 -0
- package/dist/tree-structure-ca0498a0.esm.js +17 -0
- package/dist/use-applications-menu-222b9106.cjs.prod.js +173 -0
- package/dist/use-applications-menu-302a0ac8.cjs.dev.js +173 -0
- package/dist/use-applications-menu-b583e9c3.esm.js +158 -0
- package/dist/use-is-served-by-proxy-28f19a6f.cjs.dev.js +10 -0
- package/dist/use-is-served-by-proxy-480e8de8.cjs.prod.js +10 -0
- package/dist/use-is-served-by-proxy-a383da4b.esm.js +8 -0
- package/dist/user-filled-26f333b2.cjs.prod.js +30 -0
- package/dist/user-filled-34aeebcc.cjs.dev.js +30 -0
- package/dist/user-filled-61d8a81b.esm.js +17 -0
- package/dist/user-settings-menu-a0813186.cjs.dev.js +359 -0
- package/dist/user-settings-menu-dc94ceb2.esm.js +333 -0
- package/dist/user-settings-menu-ead5fed2.cjs.prod.js +335 -0
- package/dist/world-22189397.cjs.prod.js +30 -0
- package/dist/world-500baeb2.cjs.dev.js +30 -0
- package/dist/world-523efd61.esm.js +17 -0
- package/package.json +146 -0
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.d.ts +2 -0
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.d.ts.map +1 -0
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.dev.js +20 -0
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.js +7 -0
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.prod.js +20 -0
- package/ssr/dist/commercetools-frontend-application-shell-ssr.esm.js +4 -0
- package/ssr/package.json +4 -0
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.d.ts +2 -0
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.d.ts.map +1 -0
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.dev.js +556 -0
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.js +7 -0
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +547 -0
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +503 -0
- package/test-utils/package.json +4 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
4
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
5
|
+
|
|
6
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
7
|
+
|
|
8
|
+
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
9
|
+
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
10
|
+
|
|
11
|
+
const DIMENSIONS = {
|
|
12
|
+
header: '56px'
|
|
13
|
+
};
|
|
14
|
+
const NAVBAR = {
|
|
15
|
+
expanderHeight: '50px',
|
|
16
|
+
expanderSize: '40px',
|
|
17
|
+
iconSize: '24px',
|
|
18
|
+
iconSizeHover: '28px',
|
|
19
|
+
itemSize: '48px',
|
|
20
|
+
itemHeight: '56px',
|
|
21
|
+
sublistIndentationWhenCollapsed: '72px',
|
|
22
|
+
sublistIndentationWhenExpanded: '248px',
|
|
23
|
+
sublistItemMinHeight: '50px',
|
|
24
|
+
sublistWidth: '272px',
|
|
25
|
+
leftNavigationTransition: 'all 150ms cubic-bezier(1, 0, 0.58, 1)',
|
|
26
|
+
widthLeftNavigation: '80px',
|
|
27
|
+
widthLeftNavigationWhenExpanded: '256px'
|
|
28
|
+
};
|
|
29
|
+
const WINDOW_SIZES = {
|
|
30
|
+
STANDARD: 1024,
|
|
31
|
+
WIDE: 1200
|
|
32
|
+
};
|
|
33
|
+
const CONTAINERS = {
|
|
34
|
+
LOCALE_SWITCHER: 'locale-switcher-container',
|
|
35
|
+
LEFT_OF_PROFILE: 'left-of-profile'
|
|
36
|
+
};
|
|
37
|
+
const SUSPENSION_REASONS = {
|
|
38
|
+
TEMPORARY_MAINTENANCE: 'TemporaryMaintenance',
|
|
39
|
+
PAYMENT: 'Payment',
|
|
40
|
+
OTHER: 'Other'
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
// OIDC params
|
|
44
|
+
const OIDC_RESPONSE_TYPES = {
|
|
45
|
+
ID_TOKEN: 'id_token'
|
|
46
|
+
};
|
|
47
|
+
const OIDC_CLAIMS = {
|
|
48
|
+
OPEN_ID: 'openid',
|
|
49
|
+
PROJECT_KEY: 'project_key',
|
|
50
|
+
TEAM_ID: 'team_id',
|
|
51
|
+
APPLICATION_ID: 'application_id',
|
|
52
|
+
VIEW: 'view',
|
|
53
|
+
MANAGE: 'manage'
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const buildOidcScope = options => {
|
|
57
|
+
var _context, _context2;
|
|
58
|
+
const claims = [];
|
|
59
|
+
|
|
60
|
+
// Set the projectKey
|
|
61
|
+
if (options.projectKey) {
|
|
62
|
+
claims.push(`${OIDC_CLAIMS.PROJECT_KEY}:${options.projectKey}`);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Set the OAuth Scopes
|
|
66
|
+
claims.push(..._mapInstanceProperty__default["default"](_context = options.oAuthScopes?.view ?? []).call(_context, scope => `${OIDC_CLAIMS.VIEW}:${scope}`));
|
|
67
|
+
claims.push(..._mapInstanceProperty__default["default"](_context2 = options.oAuthScopes?.manage ?? []).call(_context2, scope => `${OIDC_CLAIMS.MANAGE}:${scope}`));
|
|
68
|
+
// Set additional OAuth scopes
|
|
69
|
+
if (options?.additionalOAuthScopes) {
|
|
70
|
+
var _context3;
|
|
71
|
+
_forEachInstanceProperty__default["default"](_context3 = options.additionalOAuthScopes).call(_context3, additionalOAuthScope => {
|
|
72
|
+
var _context4, _context5;
|
|
73
|
+
claims.push(..._mapInstanceProperty__default["default"](_context4 = additionalOAuthScope.view ?? []).call(_context4, viewOAuthScope => `view/${additionalOAuthScope.name}:${viewOAuthScope}`), ..._mapInstanceProperty__default["default"](_context5 = additionalOAuthScope.manage ?? []).call(_context5, manageOAuthScope => `manage/${additionalOAuthScope.name}:${manageOAuthScope}`));
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Set the teamId and applicationId
|
|
78
|
+
if (options.teamId) {
|
|
79
|
+
claims.push(`${OIDC_CLAIMS.TEAM_ID}:${options.teamId}`);
|
|
80
|
+
if (options.applicationId) {
|
|
81
|
+
claims.push(`${OIDC_CLAIMS.APPLICATION_ID}:${options.applicationId}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return [
|
|
85
|
+
// This is required as per OIDC spec.
|
|
86
|
+
OIDC_CLAIMS.OPEN_ID,
|
|
87
|
+
// Custom claims
|
|
88
|
+
...claims].join(' ');
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
exports.CONTAINERS = CONTAINERS;
|
|
92
|
+
exports.DIMENSIONS = DIMENSIONS;
|
|
93
|
+
exports.NAVBAR = NAVBAR;
|
|
94
|
+
exports.OIDC_CLAIMS = OIDC_CLAIMS;
|
|
95
|
+
exports.OIDC_RESPONSE_TYPES = OIDC_RESPONSE_TYPES;
|
|
96
|
+
exports.SUSPENSION_REASONS = SUSPENSION_REASONS;
|
|
97
|
+
exports.WINDOW_SIZES = WINDOW_SIZES;
|
|
98
|
+
exports.buildOidcScope = buildOidcScope;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
2
|
+
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
3
|
+
|
|
4
|
+
const DIMENSIONS = {
|
|
5
|
+
header: '56px'
|
|
6
|
+
};
|
|
7
|
+
const NAVBAR = {
|
|
8
|
+
expanderHeight: '50px',
|
|
9
|
+
expanderSize: '40px',
|
|
10
|
+
iconSize: '24px',
|
|
11
|
+
iconSizeHover: '28px',
|
|
12
|
+
itemSize: '48px',
|
|
13
|
+
itemHeight: '56px',
|
|
14
|
+
sublistIndentationWhenCollapsed: '72px',
|
|
15
|
+
sublistIndentationWhenExpanded: '248px',
|
|
16
|
+
sublistItemMinHeight: '50px',
|
|
17
|
+
sublistWidth: '272px',
|
|
18
|
+
leftNavigationTransition: 'all 150ms cubic-bezier(1, 0, 0.58, 1)',
|
|
19
|
+
widthLeftNavigation: '80px',
|
|
20
|
+
widthLeftNavigationWhenExpanded: '256px'
|
|
21
|
+
};
|
|
22
|
+
const WINDOW_SIZES = {
|
|
23
|
+
STANDARD: 1024,
|
|
24
|
+
WIDE: 1200
|
|
25
|
+
};
|
|
26
|
+
const CONTAINERS = {
|
|
27
|
+
LOCALE_SWITCHER: 'locale-switcher-container',
|
|
28
|
+
LEFT_OF_PROFILE: 'left-of-profile'
|
|
29
|
+
};
|
|
30
|
+
const SUSPENSION_REASONS = {
|
|
31
|
+
TEMPORARY_MAINTENANCE: 'TemporaryMaintenance',
|
|
32
|
+
PAYMENT: 'Payment',
|
|
33
|
+
OTHER: 'Other'
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// OIDC params
|
|
37
|
+
const OIDC_RESPONSE_TYPES = {
|
|
38
|
+
ID_TOKEN: 'id_token'
|
|
39
|
+
};
|
|
40
|
+
const OIDC_CLAIMS = {
|
|
41
|
+
OPEN_ID: 'openid',
|
|
42
|
+
PROJECT_KEY: 'project_key',
|
|
43
|
+
TEAM_ID: 'team_id',
|
|
44
|
+
APPLICATION_ID: 'application_id',
|
|
45
|
+
VIEW: 'view',
|
|
46
|
+
MANAGE: 'manage'
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const buildOidcScope = options => {
|
|
50
|
+
var _context, _context2;
|
|
51
|
+
const claims = [];
|
|
52
|
+
|
|
53
|
+
// Set the projectKey
|
|
54
|
+
if (options.projectKey) {
|
|
55
|
+
claims.push(`${OIDC_CLAIMS.PROJECT_KEY}:${options.projectKey}`);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Set the OAuth Scopes
|
|
59
|
+
claims.push(..._mapInstanceProperty(_context = options.oAuthScopes?.view ?? []).call(_context, scope => `${OIDC_CLAIMS.VIEW}:${scope}`));
|
|
60
|
+
claims.push(..._mapInstanceProperty(_context2 = options.oAuthScopes?.manage ?? []).call(_context2, scope => `${OIDC_CLAIMS.MANAGE}:${scope}`));
|
|
61
|
+
// Set additional OAuth scopes
|
|
62
|
+
if (options?.additionalOAuthScopes) {
|
|
63
|
+
var _context3;
|
|
64
|
+
_forEachInstanceProperty(_context3 = options.additionalOAuthScopes).call(_context3, additionalOAuthScope => {
|
|
65
|
+
var _context4, _context5;
|
|
66
|
+
claims.push(..._mapInstanceProperty(_context4 = additionalOAuthScope.view ?? []).call(_context4, viewOAuthScope => `view/${additionalOAuthScope.name}:${viewOAuthScope}`), ..._mapInstanceProperty(_context5 = additionalOAuthScope.manage ?? []).call(_context5, manageOAuthScope => `manage/${additionalOAuthScope.name}:${manageOAuthScope}`));
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Set the teamId and applicationId
|
|
71
|
+
if (options.teamId) {
|
|
72
|
+
claims.push(`${OIDC_CLAIMS.TEAM_ID}:${options.teamId}`);
|
|
73
|
+
if (options.applicationId) {
|
|
74
|
+
claims.push(`${OIDC_CLAIMS.APPLICATION_ID}:${options.applicationId}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return [
|
|
78
|
+
// This is required as per OIDC spec.
|
|
79
|
+
OIDC_CLAIMS.OPEN_ID,
|
|
80
|
+
// Custom claims
|
|
81
|
+
...claims].join(' ');
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export { CONTAINERS as C, DIMENSIONS as D, NAVBAR as N, OIDC_CLAIMS as O, SUSPENSION_REASONS as S, WINDOW_SIZES as W, OIDC_RESPONSE_TYPES as a, buildOidcScope as b };
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
2
|
+
import _pt from 'prop-types';
|
|
3
|
+
import _URL from '@babel/runtime-corejs3/core-js-stable/url';
|
|
4
|
+
import { useState, useEffect } from 'react';
|
|
5
|
+
import jwtDecode from 'jwt-decode';
|
|
6
|
+
import { decode } from 'qss';
|
|
7
|
+
import { useHistory, useLocation } from 'react-router-dom';
|
|
8
|
+
import { oidcStorage } from '@commercetools-frontend/application-shell-connectors';
|
|
9
|
+
import { u as useRedirector } from './redirector-76670a54.esm.js';
|
|
10
|
+
import _styled from '@emotion/styled/base';
|
|
11
|
+
import { themesOverrides, PublicPageLayout } from '@commercetools-frontend/application-components';
|
|
12
|
+
import FailedAuthenticationSVG from '@commercetools-frontend/assets/images/doors-closed.svg';
|
|
13
|
+
import { AsyncLocaleData } from '@commercetools-frontend/i18n';
|
|
14
|
+
import Card from '@commercetools-uikit/card';
|
|
15
|
+
import Constraints from '@commercetools-uikit/constraints';
|
|
16
|
+
import { customProperties, ThemeProvider } from '@commercetools-uikit/design-system';
|
|
17
|
+
import FlatButton from '@commercetools-uikit/flat-button';
|
|
18
|
+
import { AngleLeftIcon } from '@commercetools-uikit/icons';
|
|
19
|
+
import { ContentNotification } from '@commercetools-uikit/notifications';
|
|
20
|
+
import Spacings from '@commercetools-uikit/spacings';
|
|
21
|
+
import Text from '@commercetools-uikit/text';
|
|
22
|
+
import { C as ConfigureIntlProvider } from './index-b2fb611e.esm.js';
|
|
23
|
+
import { jsx, jsxs } from '@emotion/react/jsx-runtime';
|
|
24
|
+
import '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
25
|
+
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
26
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
27
|
+
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
28
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
29
|
+
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
|
|
30
|
+
import '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
31
|
+
import '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
32
|
+
import '@babel/runtime-corejs3/helpers/defineProperty';
|
|
33
|
+
import './location-f21dbc25.esm.js';
|
|
34
|
+
import './index-b6081c20.esm.js';
|
|
35
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
36
|
+
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
37
|
+
import '@babel/runtime-corejs3/core-js-stable/reflect/has';
|
|
38
|
+
import '@reduxjs/toolkit';
|
|
39
|
+
import 'lodash/mapValues';
|
|
40
|
+
import 'omit-empty-es';
|
|
41
|
+
import 'redux-thunk';
|
|
42
|
+
import '@commercetools-frontend/constants';
|
|
43
|
+
import '@commercetools-frontend/notifications';
|
|
44
|
+
import '@commercetools-frontend/sdk';
|
|
45
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/index-of';
|
|
46
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/slice';
|
|
47
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
48
|
+
import '@commercetools-frontend/sentry';
|
|
49
|
+
import '@commercetools-frontend/react-notifications';
|
|
50
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
|
|
51
|
+
import 'redux-logger';
|
|
52
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
53
|
+
import '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
54
|
+
import '@emotion/react';
|
|
55
|
+
import './oidc-b2520905.esm.js';
|
|
56
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
57
|
+
import 'react-intl';
|
|
58
|
+
import '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
59
|
+
import 'memoize-one';
|
|
60
|
+
import 'react-select';
|
|
61
|
+
import '@commercetools-uikit/accessible-hidden';
|
|
62
|
+
import '@commercetools-uikit/select-input';
|
|
63
|
+
import '@commercetools-frontend/assets/images/ct-logo.svg';
|
|
64
|
+
import '@commercetools-uikit/loading-spinner';
|
|
65
|
+
import '@commercetools-frontend/browser-history';
|
|
66
|
+
import '@commercetools-frontend/l10n';
|
|
67
|
+
import '@babel/runtime-corejs3/core-js-stable/reflect/construct';
|
|
68
|
+
import '@babel/runtime-corejs3/helpers/classCallCheck';
|
|
69
|
+
import '@babel/runtime-corejs3/helpers/createClass';
|
|
70
|
+
import '@babel/runtime-corejs3/helpers/inherits';
|
|
71
|
+
import '@babel/runtime-corejs3/helpers/possibleConstructorReturn';
|
|
72
|
+
import '@babel/runtime-corejs3/helpers/getPrototypeOf';
|
|
73
|
+
import '@babel/runtime-corejs3/core-js-stable/object/from-entries';
|
|
74
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/flags';
|
|
75
|
+
import '@apollo/client/react';
|
|
76
|
+
import '@flopflip/combine-adapters';
|
|
77
|
+
import '@flopflip/http-adapter';
|
|
78
|
+
import '@flopflip/launchdarkly-adapter';
|
|
79
|
+
import '@flopflip/react-broadcast';
|
|
80
|
+
import '@flopflip/types';
|
|
81
|
+
import 'react-redux';
|
|
82
|
+
import '@commercetools-uikit/design-system/materials/resets.css';
|
|
83
|
+
import '@commercetools-frontend/application-config/ssr';
|
|
84
|
+
import '@commercetools-frontend/permissions';
|
|
85
|
+
import '@flopflip/memory-adapter';
|
|
86
|
+
import '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
87
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/some';
|
|
88
|
+
import '@commercetools-frontend/actions-global';
|
|
89
|
+
|
|
90
|
+
const Divider = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
91
|
+
target: "e57nw7s0"
|
|
92
|
+
} : {
|
|
93
|
+
target: "e57nw7s0",
|
|
94
|
+
label: "Divider"
|
|
95
|
+
})("box-sizing:border-box;width:100%;margin:0;border:0;border-style:solid;border-top-width:1px;border-top-color:", customProperties.colorNeutral, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9pZGMtY2FsbGJhY2stZXJyb3ItcGFnZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBOEIwQiIsImZpbGUiOiJvaWRjLWNhbGxiYWNrLWVycm9yLXBhZ2UudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgdXNlSGlzdG9yeSB9IGZyb20gJ3JlYWN0LXJvdXRlci1kb20nO1xuaW1wb3J0IHtcbiAgUHVibGljUGFnZUxheW91dCxcbiAgdGhlbWVzT3ZlcnJpZGVzLFxufSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9hcHBsaWNhdGlvbi1jb21wb25lbnRzJztcbmltcG9ydCBGYWlsZWRBdXRoZW50aWNhdGlvblNWRyBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9hc3NldHMvaW1hZ2VzL2Rvb3JzLWNsb3NlZC5zdmcnO1xuaW1wb3J0IHR5cGUgeyBUQXN5bmNMb2NhbGVEYXRhUHJvcHMgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9pMThuJztcblxuaW1wb3J0IHsgQXN5bmNMb2NhbGVEYXRhIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvaTE4bic7XG5pbXBvcnQgQ2FyZCBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9jYXJkJztcbmltcG9ydCBDb25zdHJhaW50cyBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9jb25zdHJhaW50cyc7XG5pbXBvcnQge1xuICBUaGVtZVByb3ZpZGVyLFxuICBjdXN0b21Qcm9wZXJ0aWVzLFxufSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9kZXNpZ24tc3lzdGVtJztcbmltcG9ydCBGbGF0QnV0dG9uIGZyb20gJ0Bjb21tZXJjZXRvb2xzLXVpa2l0L2ZsYXQtYnV0dG9uJztcbmltcG9ydCB7IEFuZ2xlTGVmdEljb24gfSBmcm9tICdAY29tbWVyY2V0b29scy11aWtpdC9pY29ucyc7XG5pbXBvcnQgeyBDb250ZW50Tm90aWZpY2F0aW9uIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtdWlraXQvbm90aWZpY2F0aW9ucyc7XG5pbXBvcnQgU3BhY2luZ3MgZnJvbSAnQGNvbW1lcmNldG9vbHMtdWlraXQvc3BhY2luZ3MnO1xuaW1wb3J0IFRleHQgZnJvbSAnQGNvbW1lcmNldG9vbHMtdWlraXQvdGV4dCc7XG5pbXBvcnQgQ29uZmlndXJlSW50bFByb3ZpZGVyIGZyb20gJy4uL2NvbmZpZ3VyZS1pbnRsLXByb3ZpZGVyJztcblxudHlwZSBUUHJvcHMgPSB7XG4gIG1lc3NhZ2U6IHN0cmluZztcbiAgbG9jYWxlOiBzdHJpbmc7XG4gIGFwcGxpY2F0aW9uTWVzc2FnZXM6IFRBc3luY0xvY2FsZURhdGFQcm9wc1snYXBwbGljYXRpb25NZXNzYWdlcyddO1xuICBjaGlsZHJlbj86IG5ldmVyO1xufTtcblxuY29uc3QgRGl2aWRlciA9IHN0eWxlZC5kaXZgXG4gIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gIHdpZHRoOiAxMDAlO1xuICBtYXJnaW46IDA7XG4gIGJvcmRlcjogMDtcbiAgYm9yZGVyLXN0eWxlOiBzb2xpZDtcbiAgYm9yZGVyLXRvcC13aWR0aDogMXB4O1xuICBib3JkZXItdG9wLWNvbG9yOiAke2N1c3RvbVByb3BlcnRpZXMuY29sb3JOZXV0cmFsfTtcbmA7XG5cbmNvbnN0IEF1dGhDYWxsYmFja0Vycm9yUGFnZSA9IChwcm9wczogVFByb3BzKSA9PiB7XG4gIGNvbnN0IGhpc3RvcnkgPSB1c2VIaXN0b3J5KCk7XG4gIHJldHVybiAoXG4gICAgPEFzeW5jTG9jYWxlRGF0YVxuICAgICAgbG9jYWxlPXtwcm9wcy5sb2NhbGV9XG4gICAgICBhcHBsaWNhdGlvbk1lc3NhZ2VzPXtwcm9wcy5hcHBsaWNhdGlvbk1lc3NhZ2VzfVxuICAgID5cbiAgICAgIHsoeyBsb2NhbGUsIG1lc3NhZ2VzIH0pID0+IChcbiAgICAgICAgPENvbmZpZ3VyZUludGxQcm92aWRlciBsb2NhbGU9e2xvY2FsZX0gbWVzc2FnZXM9e21lc3NhZ2VzfT5cbiAgICAgICAgICA8VGhlbWVQcm92aWRlclxuICAgICAgICAgICAgdGhlbWU9XCJkZWZhdWx0XCJcbiAgICAgICAgICAgIHRoZW1lT3ZlcnJpZGVzPXt0aGVtZXNPdmVycmlkZXMuZGVmYXVsdH1cbiAgICAgICAgICAvPlxuICAgICAgICAgIDxQdWJsaWNQYWdlTGF5b3V0IGNvbnRlbnRTY2FsZT1cIndpZGVcIj5cbiAgICAgICAgICAgIDxTcGFjaW5ncy5JbmxpbmUganVzdGlmeUNvbnRlbnQ9XCJjZW50ZXJcIj5cbiAgICAgICAgICAgICAgPENvbnN0cmFpbnRzLkhvcml6b250YWwgbWF4PXsxMX0+XG4gICAgICAgICAgICAgICAgPENhcmQgaW5zZXRTY2FsZT1cInhsXCI+XG4gICAgICAgICAgICAgICAgICA8U3BhY2luZ3MuU3RhY2sgc2NhbGU9XCJsXCI+XG4gICAgICAgICAgICAgICAgICAgIDxTcGFjaW5ncy5JbmxpbmUganVzdGlmeUNvbnRlbnQ9XCJjZW50ZXJcIj5cbiAgICAgICAgICAgICAgICAgICAgICA8aW1nXG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aD1cIjEwMCVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgc3JjPXtGYWlsZWRBdXRoZW50aWNhdGlvblNWR31cbiAgICAgICAgICAgICAgICAgICAgICAgIGFsdD1cIkZhaWxlZCBhdXRoZW50aWNhdGlvblwiXG4gICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgPC9TcGFjaW5ncy5JbmxpbmU+XG4gICAgICAgICAgICAgICAgICAgIDxUZXh0LkhlYWRsaW5lIGFzPVwiaDJcIj5cbiAgICAgICAgICAgICAgICAgICAgICB7J0F1dGhlbnRpY2F0aW9uIGVycm9yJ31cbiAgICAgICAgICAgICAgICAgICAgPC9UZXh0LkhlYWRsaW5lPlxuICAgICAgICAgICAgICAgICAgICA8Q29udGVudE5vdGlmaWNhdGlvbiB0eXBlPVwiZXJyb3JcIj5cbiAgICAgICAgICAgICAgICAgICAgICA8U3BhY2luZ3MuU3RhY2sgc2NhbGU9XCJtXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8VGV4dC5Cb2R5Pntwcm9wcy5tZXNzYWdlfTwvVGV4dC5Cb2R5PlxuICAgICAgICAgICAgICAgICAgICAgIDwvU3BhY2luZ3MuU3RhY2s+XG4gICAgICAgICAgICAgICAgICAgIDwvQ29udGVudE5vdGlmaWNhdGlvbj5cbiAgICAgICAgICAgICAgICAgICAgPFNwYWNpbmdzLlN0YWNrIHNjYWxlPVwibVwiPlxuICAgICAgICAgICAgICAgICAgICAgIDxEaXZpZGVyIC8+XG4gICAgICAgICAgICAgICAgICAgICAgPEZsYXRCdXR0b25cbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsPVwiVHJ5IGxvZyBpbiBhZ2FpblwiXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uPXs8QW5nbGVMZWZ0SWNvbiAvPn1cbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgaGlzdG9yeS5wdXNoKCcvJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgIDwvU3BhY2luZ3MuU3RhY2s+XG4gICAgICAgICAgICAgICAgICA8L1NwYWNpbmdzLlN0YWNrPlxuICAgICAgICAgICAgICAgIDwvQ2FyZD5cbiAgICAgICAgICAgICAgPC9Db25zdHJhaW50cy5Ib3Jpem9udGFsPlxuICAgICAgICAgICAgPC9TcGFjaW5ncy5JbmxpbmU+XG4gICAgICAgICAgPC9QdWJsaWNQYWdlTGF5b3V0PlxuICAgICAgICA8L0NvbmZpZ3VyZUludGxQcm92aWRlcj5cbiAgICAgICl9XG4gICAgPC9Bc3luY0xvY2FsZURhdGE+XG4gICk7XG59O1xuQXV0aENhbGxiYWNrRXJyb3JQYWdlLmRpc3BsYXlOYW1lID0gJ0F1dGhDYWxsYmFja0Vycm9yUGFnZSc7XG5cbmV4cG9ydCBkZWZhdWx0IEF1dGhDYWxsYmFja0Vycm9yUGFnZTtcbiJdfQ== */"));
|
|
96
|
+
const AuthCallbackErrorPage = props => {
|
|
97
|
+
const history = useHistory();
|
|
98
|
+
return jsx(AsyncLocaleData, {
|
|
99
|
+
locale: props.locale,
|
|
100
|
+
applicationMessages: props.applicationMessages,
|
|
101
|
+
children: _ref => {
|
|
102
|
+
let locale = _ref.locale,
|
|
103
|
+
messages = _ref.messages;
|
|
104
|
+
return jsxs(ConfigureIntlProvider, {
|
|
105
|
+
locale: locale,
|
|
106
|
+
messages: messages,
|
|
107
|
+
children: [jsx(ThemeProvider, {
|
|
108
|
+
theme: "default",
|
|
109
|
+
themeOverrides: themesOverrides.default
|
|
110
|
+
}), jsx(PublicPageLayout, {
|
|
111
|
+
contentScale: "wide",
|
|
112
|
+
children: jsx(Spacings.Inline, {
|
|
113
|
+
justifyContent: "center",
|
|
114
|
+
children: jsx(Constraints.Horizontal, {
|
|
115
|
+
max: 11,
|
|
116
|
+
children: jsx(Card, {
|
|
117
|
+
insetScale: "xl",
|
|
118
|
+
children: jsxs(Spacings.Stack, {
|
|
119
|
+
scale: "l",
|
|
120
|
+
children: [jsx(Spacings.Inline, {
|
|
121
|
+
justifyContent: "center",
|
|
122
|
+
children: jsx("img", {
|
|
123
|
+
width: "100%",
|
|
124
|
+
src: FailedAuthenticationSVG,
|
|
125
|
+
alt: "Failed authentication"
|
|
126
|
+
})
|
|
127
|
+
}), jsx(Text.Headline, {
|
|
128
|
+
as: "h2",
|
|
129
|
+
children: 'Authentication error'
|
|
130
|
+
}), jsx(ContentNotification, {
|
|
131
|
+
type: "error",
|
|
132
|
+
children: jsx(Spacings.Stack, {
|
|
133
|
+
scale: "m",
|
|
134
|
+
children: jsx(Text.Body, {
|
|
135
|
+
children: props.message
|
|
136
|
+
})
|
|
137
|
+
})
|
|
138
|
+
}), jsxs(Spacings.Stack, {
|
|
139
|
+
scale: "m",
|
|
140
|
+
children: [jsx(Divider, {}), jsx(FlatButton, {
|
|
141
|
+
label: "Try log in again",
|
|
142
|
+
icon: jsx(AngleLeftIcon, {}),
|
|
143
|
+
onClick: () => {
|
|
144
|
+
history.push('/');
|
|
145
|
+
}
|
|
146
|
+
})]
|
|
147
|
+
})]
|
|
148
|
+
})
|
|
149
|
+
})
|
|
150
|
+
})
|
|
151
|
+
})
|
|
152
|
+
})]
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
AuthCallbackErrorPage.displayName = 'AuthCallbackErrorPage';
|
|
158
|
+
|
|
159
|
+
const OidcCallback = props => {
|
|
160
|
+
const location = useLocation();
|
|
161
|
+
const redirector = useRedirector();
|
|
162
|
+
const _useState = useState(),
|
|
163
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
164
|
+
message = _useState2[0],
|
|
165
|
+
setMessage = _useState2[1];
|
|
166
|
+
const fragments = decode(location.hash.substring(1));
|
|
167
|
+
const sessionToken = fragments.sessionToken;
|
|
168
|
+
useEffect(() => {
|
|
169
|
+
// Validate the nonce (coming as a `state` parameter)
|
|
170
|
+
// By trying to load the related session state, we can implicitly check if the nonce is correct or not.
|
|
171
|
+
const sessionState = oidcStorage.getSessionState(fragments.state);
|
|
172
|
+
let errorMessage;
|
|
173
|
+
let decodedSessionToken;
|
|
174
|
+
try {
|
|
175
|
+
if (sessionToken) {
|
|
176
|
+
decodedSessionToken = jwtDecode(sessionToken);
|
|
177
|
+
} else {
|
|
178
|
+
errorMessage = 'Invalid client session (missing sessionToken)';
|
|
179
|
+
}
|
|
180
|
+
} catch (err) {
|
|
181
|
+
if (err instanceof Error) {
|
|
182
|
+
errorMessage = err.message;
|
|
183
|
+
} else {
|
|
184
|
+
errorMessage = 'Unknown error';
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (!errorMessage) {
|
|
188
|
+
const hasValidSessionId = decodedSessionToken?.nonce === fragments.state;
|
|
189
|
+
const hasValidApplicationId = window.app.applicationId === sessionState?.applicationId;
|
|
190
|
+
if (!sessionState || !hasValidSessionId || !hasValidApplicationId) {
|
|
191
|
+
errorMessage = 'Invalid client session';
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (errorMessage) {
|
|
195
|
+
setMessage(errorMessage);
|
|
196
|
+
} else {
|
|
197
|
+
oidcStorage.setActiveSession(sessionToken);
|
|
198
|
+
oidcStorage.removeSessionState(fragments.state);
|
|
199
|
+
if (sessionState?.query.redirectTo) {
|
|
200
|
+
try {
|
|
201
|
+
const redirectToUrl = new _URL(sessionState.query.redirectTo);
|
|
202
|
+
redirector({
|
|
203
|
+
to: redirectToUrl.pathname
|
|
204
|
+
});
|
|
205
|
+
return;
|
|
206
|
+
} catch (error) {
|
|
207
|
+
console.warn(`Invalid "redirectTo" URL`, sessionState.query.redirectTo);
|
|
208
|
+
// ignore
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
redirector({
|
|
212
|
+
to: location.pathname.replace('/oidc/callback', '')
|
|
213
|
+
});
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Only execute once!
|
|
218
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
219
|
+
}, []);
|
|
220
|
+
if (message) {
|
|
221
|
+
return jsx(AuthCallbackErrorPage, {
|
|
222
|
+
message: message,
|
|
223
|
+
locale: props.locale,
|
|
224
|
+
applicationMessages: props.applicationMessages
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
return null;
|
|
228
|
+
};
|
|
229
|
+
OidcCallback.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
230
|
+
locale: _pt.string.isRequired
|
|
231
|
+
} : {};
|
|
232
|
+
OidcCallback.displayName = 'OidcCallback';
|
|
233
|
+
|
|
234
|
+
export { OidcCallback as default };
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
4
|
+
require('prop-types');
|
|
5
|
+
var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
|
|
6
|
+
var react = require('react');
|
|
7
|
+
var jwtDecode = require('jwt-decode');
|
|
8
|
+
var qss = require('qss');
|
|
9
|
+
var reactRouterDom = require('react-router-dom');
|
|
10
|
+
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
11
|
+
var redirector = require('./redirector-01f35da8.cjs.prod.js');
|
|
12
|
+
var _styled = require('@emotion/styled/base');
|
|
13
|
+
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
14
|
+
var FailedAuthenticationSVG = require('@commercetools-frontend/assets/images/doors-closed.svg');
|
|
15
|
+
var i18n = require('@commercetools-frontend/i18n');
|
|
16
|
+
var Card = require('@commercetools-uikit/card');
|
|
17
|
+
var Constraints = require('@commercetools-uikit/constraints');
|
|
18
|
+
var designSystem = require('@commercetools-uikit/design-system');
|
|
19
|
+
var FlatButton = require('@commercetools-uikit/flat-button');
|
|
20
|
+
var icons = require('@commercetools-uikit/icons');
|
|
21
|
+
var notifications = require('@commercetools-uikit/notifications');
|
|
22
|
+
var Spacings = require('@commercetools-uikit/spacings');
|
|
23
|
+
var Text = require('@commercetools-uikit/text');
|
|
24
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-ff82019b.cjs.prod.js');
|
|
25
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
26
|
+
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
27
|
+
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
28
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
29
|
+
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
30
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
31
|
+
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
32
|
+
require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
33
|
+
require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
34
|
+
require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
35
|
+
require('./location-537e0660.cjs.prod.js');
|
|
36
|
+
require('./index-91985d64.cjs.prod.js');
|
|
37
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
38
|
+
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
39
|
+
require('@babel/runtime-corejs3/core-js-stable/reflect/has');
|
|
40
|
+
require('@reduxjs/toolkit');
|
|
41
|
+
require('lodash/mapValues');
|
|
42
|
+
require('omit-empty-es');
|
|
43
|
+
require('redux-thunk');
|
|
44
|
+
require('@commercetools-frontend/constants');
|
|
45
|
+
require('@commercetools-frontend/notifications');
|
|
46
|
+
require('@commercetools-frontend/sdk');
|
|
47
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
|
|
48
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
49
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
50
|
+
require('@commercetools-frontend/sentry');
|
|
51
|
+
require('@commercetools-frontend/react-notifications');
|
|
52
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
53
|
+
require('redux-logger');
|
|
54
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
55
|
+
require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
56
|
+
require('@emotion/react');
|
|
57
|
+
require('./oidc-d74e6aa2.cjs.prod.js');
|
|
58
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
59
|
+
require('react-intl');
|
|
60
|
+
require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
61
|
+
require('memoize-one');
|
|
62
|
+
require('react-select');
|
|
63
|
+
require('@commercetools-uikit/accessible-hidden');
|
|
64
|
+
require('@commercetools-uikit/select-input');
|
|
65
|
+
require('@commercetools-frontend/assets/images/ct-logo.svg');
|
|
66
|
+
require('@commercetools-uikit/loading-spinner');
|
|
67
|
+
require('@commercetools-frontend/browser-history');
|
|
68
|
+
require('@commercetools-frontend/l10n');
|
|
69
|
+
require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
70
|
+
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
71
|
+
require('@babel/runtime-corejs3/helpers/createClass');
|
|
72
|
+
require('@babel/runtime-corejs3/helpers/inherits');
|
|
73
|
+
require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
74
|
+
require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
75
|
+
require('@babel/runtime-corejs3/core-js-stable/object/from-entries');
|
|
76
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/flags');
|
|
77
|
+
require('@apollo/client/react');
|
|
78
|
+
require('@flopflip/combine-adapters');
|
|
79
|
+
require('@flopflip/http-adapter');
|
|
80
|
+
require('@flopflip/launchdarkly-adapter');
|
|
81
|
+
require('@flopflip/react-broadcast');
|
|
82
|
+
require('@flopflip/types');
|
|
83
|
+
require('react-redux');
|
|
84
|
+
require('@commercetools-uikit/design-system/materials/resets.css');
|
|
85
|
+
require('@commercetools-frontend/application-config/ssr');
|
|
86
|
+
require('@commercetools-frontend/permissions');
|
|
87
|
+
require('@flopflip/memory-adapter');
|
|
88
|
+
require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
89
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
90
|
+
require('@commercetools-frontend/actions-global');
|
|
91
|
+
|
|
92
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
93
|
+
|
|
94
|
+
var _URL__default = /*#__PURE__*/_interopDefault(_URL);
|
|
95
|
+
var jwtDecode__default = /*#__PURE__*/_interopDefault(jwtDecode);
|
|
96
|
+
var _styled__default = /*#__PURE__*/_interopDefault(_styled);
|
|
97
|
+
var FailedAuthenticationSVG__default = /*#__PURE__*/_interopDefault(FailedAuthenticationSVG);
|
|
98
|
+
var Card__default = /*#__PURE__*/_interopDefault(Card);
|
|
99
|
+
var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
100
|
+
var FlatButton__default = /*#__PURE__*/_interopDefault(FlatButton);
|
|
101
|
+
var Spacings__default = /*#__PURE__*/_interopDefault(Spacings);
|
|
102
|
+
var Text__default = /*#__PURE__*/_interopDefault(Text);
|
|
103
|
+
|
|
104
|
+
const Divider = /*#__PURE__*/_styled__default["default"]("div", {
|
|
105
|
+
target: "e57nw7s0"
|
|
106
|
+
} )("box-sizing:border-box;width:100%;margin:0;border:0;border-style:solid;border-top-width:1px;border-top-color:", designSystem.customProperties.colorNeutral, ";" + ("" ));
|
|
107
|
+
const AuthCallbackErrorPage = props => {
|
|
108
|
+
const history = reactRouterDom.useHistory();
|
|
109
|
+
return jsxRuntime.jsx(i18n.AsyncLocaleData, {
|
|
110
|
+
locale: props.locale,
|
|
111
|
+
applicationMessages: props.applicationMessages,
|
|
112
|
+
children: _ref => {
|
|
113
|
+
let locale = _ref.locale,
|
|
114
|
+
messages = _ref.messages;
|
|
115
|
+
return jsxRuntime.jsxs(dist_commercetoolsFrontendApplicationShell.ConfigureIntlProvider, {
|
|
116
|
+
locale: locale,
|
|
117
|
+
messages: messages,
|
|
118
|
+
children: [jsxRuntime.jsx(designSystem.ThemeProvider, {
|
|
119
|
+
theme: "default",
|
|
120
|
+
themeOverrides: applicationComponents.themesOverrides.default
|
|
121
|
+
}), jsxRuntime.jsx(applicationComponents.PublicPageLayout, {
|
|
122
|
+
contentScale: "wide",
|
|
123
|
+
children: jsxRuntime.jsx(Spacings__default["default"].Inline, {
|
|
124
|
+
justifyContent: "center",
|
|
125
|
+
children: jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
126
|
+
max: 11,
|
|
127
|
+
children: jsxRuntime.jsx(Card__default["default"], {
|
|
128
|
+
insetScale: "xl",
|
|
129
|
+
children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
130
|
+
scale: "l",
|
|
131
|
+
children: [jsxRuntime.jsx(Spacings__default["default"].Inline, {
|
|
132
|
+
justifyContent: "center",
|
|
133
|
+
children: jsxRuntime.jsx("img", {
|
|
134
|
+
width: "100%",
|
|
135
|
+
src: FailedAuthenticationSVG__default["default"],
|
|
136
|
+
alt: "Failed authentication"
|
|
137
|
+
})
|
|
138
|
+
}), jsxRuntime.jsx(Text__default["default"].Headline, {
|
|
139
|
+
as: "h2",
|
|
140
|
+
children: 'Authentication error'
|
|
141
|
+
}), jsxRuntime.jsx(notifications.ContentNotification, {
|
|
142
|
+
type: "error",
|
|
143
|
+
children: jsxRuntime.jsx(Spacings__default["default"].Stack, {
|
|
144
|
+
scale: "m",
|
|
145
|
+
children: jsxRuntime.jsx(Text__default["default"].Body, {
|
|
146
|
+
children: props.message
|
|
147
|
+
})
|
|
148
|
+
})
|
|
149
|
+
}), jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
150
|
+
scale: "m",
|
|
151
|
+
children: [jsxRuntime.jsx(Divider, {}), jsxRuntime.jsx(FlatButton__default["default"], {
|
|
152
|
+
label: "Try log in again",
|
|
153
|
+
icon: jsxRuntime.jsx(icons.AngleLeftIcon, {}),
|
|
154
|
+
onClick: () => {
|
|
155
|
+
history.push('/');
|
|
156
|
+
}
|
|
157
|
+
})]
|
|
158
|
+
})]
|
|
159
|
+
})
|
|
160
|
+
})
|
|
161
|
+
})
|
|
162
|
+
})
|
|
163
|
+
})]
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
AuthCallbackErrorPage.displayName = 'AuthCallbackErrorPage';
|
|
169
|
+
|
|
170
|
+
const OidcCallback = props => {
|
|
171
|
+
const location = reactRouterDom.useLocation();
|
|
172
|
+
const redirector$1 = redirector.useRedirector();
|
|
173
|
+
const _useState = react.useState(),
|
|
174
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
175
|
+
message = _useState2[0],
|
|
176
|
+
setMessage = _useState2[1];
|
|
177
|
+
const fragments = qss.decode(location.hash.substring(1));
|
|
178
|
+
const sessionToken = fragments.sessionToken;
|
|
179
|
+
react.useEffect(() => {
|
|
180
|
+
// Validate the nonce (coming as a `state` parameter)
|
|
181
|
+
// By trying to load the related session state, we can implicitly check if the nonce is correct or not.
|
|
182
|
+
const sessionState = applicationShellConnectors.oidcStorage.getSessionState(fragments.state);
|
|
183
|
+
let errorMessage;
|
|
184
|
+
let decodedSessionToken;
|
|
185
|
+
try {
|
|
186
|
+
if (sessionToken) {
|
|
187
|
+
decodedSessionToken = jwtDecode__default["default"](sessionToken);
|
|
188
|
+
} else {
|
|
189
|
+
errorMessage = 'Invalid client session (missing sessionToken)';
|
|
190
|
+
}
|
|
191
|
+
} catch (err) {
|
|
192
|
+
if (err instanceof Error) {
|
|
193
|
+
errorMessage = err.message;
|
|
194
|
+
} else {
|
|
195
|
+
errorMessage = 'Unknown error';
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (!errorMessage) {
|
|
199
|
+
const hasValidSessionId = decodedSessionToken?.nonce === fragments.state;
|
|
200
|
+
const hasValidApplicationId = window.app.applicationId === sessionState?.applicationId;
|
|
201
|
+
if (!sessionState || !hasValidSessionId || !hasValidApplicationId) {
|
|
202
|
+
errorMessage = 'Invalid client session';
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (errorMessage) {
|
|
206
|
+
setMessage(errorMessage);
|
|
207
|
+
} else {
|
|
208
|
+
applicationShellConnectors.oidcStorage.setActiveSession(sessionToken);
|
|
209
|
+
applicationShellConnectors.oidcStorage.removeSessionState(fragments.state);
|
|
210
|
+
if (sessionState?.query.redirectTo) {
|
|
211
|
+
try {
|
|
212
|
+
const redirectToUrl = new _URL__default["default"](sessionState.query.redirectTo);
|
|
213
|
+
redirector$1({
|
|
214
|
+
to: redirectToUrl.pathname
|
|
215
|
+
});
|
|
216
|
+
return;
|
|
217
|
+
} catch (error) {
|
|
218
|
+
console.warn(`Invalid "redirectTo" URL`, sessionState.query.redirectTo);
|
|
219
|
+
// ignore
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
redirector$1({
|
|
223
|
+
to: location.pathname.replace('/oidc/callback', '')
|
|
224
|
+
});
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Only execute once!
|
|
229
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
230
|
+
}, []);
|
|
231
|
+
if (message) {
|
|
232
|
+
return jsxRuntime.jsx(AuthCallbackErrorPage, {
|
|
233
|
+
message: message,
|
|
234
|
+
locale: props.locale,
|
|
235
|
+
applicationMessages: props.applicationMessages
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
return null;
|
|
239
|
+
};
|
|
240
|
+
OidcCallback.propTypes = {};
|
|
241
|
+
OidcCallback.displayName = 'OidcCallback';
|
|
242
|
+
|
|
243
|
+
exports["default"] = OidcCallback;
|