@commercetools-frontend/application-shell 0.0.0-CRAFT-1791-20251006162610
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-10a5e1a5.esm.js +82 -0
- package/dist/application-entry-point-8c4b8e53.cjs.prod.js +86 -0
- package/dist/application-entry-point-c87294b0.cjs.dev.js +96 -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.dev.js +214 -0
- package/dist/commercetools-frontend-application-shell.cjs.js +7 -0
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +214 -0
- package/dist/commercetools-frontend-application-shell.esm.js +82 -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-864a12e2.cjs.dev.js +197 -0
- package/dist/custom-view-dev-host-8e2f6aa7.cjs.prod.js +197 -0
- package/dist/custom-view-dev-host-d9c410aa.esm.js +186 -0
- package/dist/declarations/src/components/application-page-title/application-page-title.d.ts +24 -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/index.d.ts +1 -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/utils.d.ts +3 -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-shell/custom-view-shell.d.ts +12 -0
- package/dist/declarations/src/components/custom-view-shell/index.d.ts +1 -0
- package/dist/declarations/src/components/error-apologizer/index.d.ts +5 -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 +13 -0
- package/dist/declarations/src/components/redirect-to-login/index.d.ts +5 -0
- package/dist/declarations/src/components/redirect-to-logout/index.d.ts +4 -0
- package/dist/declarations/src/components/route-catch-all/index.d.ts +2 -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 +3 -0
- package/dist/declarations/src/components/suspended-route/protected-route.d.ts +7 -0
- package/dist/declarations/src/components/suspended-route/suspended-protected-route.d.ts +7 -0
- package/dist/declarations/src/components/suspended-route/suspended-route.d.ts +10 -0
- package/dist/declarations/src/configure-store.d.ts +22 -0
- package/dist/declarations/src/export-types.d.ts +8 -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/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 +87 -0
- package/dist/declarations/src/types/generated/mc.d.ts +742 -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/oidc.d.ts +10 -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/declarations-connectors/dist/commercetools-frontend-application-shell-connectors.cjs.d.ts +2 -0
- package/dist/declarations-connectors/src/components/application-context/application-context.d.ts +109 -0
- package/dist/declarations-connectors/src/components/application-context/index.d.ts +10 -0
- package/dist/declarations-connectors/src/components/application-context/normalizers.d.ts +48 -0
- package/dist/declarations-connectors/src/components/custom-view-context/custom-view-context.d.ts +19 -0
- package/dist/declarations-connectors/src/components/custom-view-context/index.d.ts +4 -0
- package/dist/declarations-connectors/src/components/project-extension-image-regex/index.d.ts +3 -0
- package/dist/declarations-connectors/src/components/project-extension-image-regex/project-extension-image-regex.d.ts +37 -0
- package/dist/declarations-connectors/src/configure-apollo.d.ts +7 -0
- package/dist/declarations-connectors/src/export-types.d.ts +21 -0
- package/dist/declarations-connectors/src/hooks/apollo-hooks/apollo-hooks.d.ts +12 -0
- package/dist/declarations-connectors/src/hooks/apollo-hooks/index.d.ts +1 -0
- package/dist/declarations-connectors/src/hooks/custom-views/use-custom-view-parent-data-refresher.d.ts +5 -0
- package/dist/declarations-connectors/src/index.d.ts +12 -0
- package/dist/declarations-connectors/src/types/generated/mc.d.ts +742 -0
- package/dist/declarations-connectors/src/types/generated/settings.d.ts +2116 -0
- package/dist/declarations-connectors/src/utils/apollo-client-runtime-cache.d.ts +4 -0
- package/dist/declarations-connectors/src/utils/apollo-context.d.ts +16 -0
- package/dist/declarations-connectors/src/utils/get-correlation-id/get-correlation-id.d.ts +3 -0
- package/dist/declarations-connectors/src/utils/get-correlation-id/index.d.ts +1 -0
- package/dist/declarations-connectors/src/utils/get-mc-api-url/get-mc-api-url.d.ts +3 -0
- package/dist/declarations-connectors/src/utils/get-mc-api-url/index.d.ts +1 -0
- package/dist/declarations-connectors/src/utils/http-client.d.ts +107 -0
- package/dist/declarations-connectors/src/utils/index.d.ts +7 -0
- package/dist/declarations-connectors/src/utils/logger.d.ts +10 -0
- package/dist/declarations-connectors/src/utils/oidc-storage.d.ts +12 -0
- package/dist/declarations-connectors/src/utils/select-project-key-from-url/index.d.ts +1 -0
- package/dist/declarations-connectors/src/utils/select-project-key-from-url/select-project-key-from-url.d.ts +1 -0
- package/dist/declarations-connectors/src/utils/select-team-id-from-storage/index.d.ts +1 -0
- package/dist/declarations-connectors/src/utils/select-team-id-from-storage/select-team-id-from-storage.d.ts +1 -0
- package/dist/declarations-connectors/src/utils/select-user-id/index.d.ts +1 -0
- package/dist/declarations-connectors/src/utils/select-user-id/select-user-id.d.ts +1 -0
- package/dist/declarations-connectors/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-245e2980.cjs.prod.js +237 -0
- package/dist/index-60cd194b.cjs.prod.js +2053 -0
- package/dist/index-614accc4.cjs.dev.js +237 -0
- package/dist/index-86039df7.esm.js +211 -0
- package/dist/index-8637a317.esm.js +2072 -0
- package/dist/index-f0f4fbcd.cjs.dev.js +2134 -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-022383bd.cjs.dev.js +1364 -0
- package/dist/navbar-844d350d.esm.js +1332 -0
- package/dist/navbar-acc2cd1b.cjs.prod.js +1225 -0
- package/dist/oidc-8827f9fe.cjs.dev.js +98 -0
- package/dist/oidc-b2520905.esm.js +84 -0
- package/dist/oidc-callback-2800b1f0.cjs.prod.js +243 -0
- package/dist/oidc-callback-5213e755.cjs.dev.js +246 -0
- package/dist/oidc-callback-619f18d9.esm.js +232 -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-22619059.cjs.prod.js +378 -0
- package/dist/project-container-96f2d671.cjs.dev.js +378 -0
- package/dist/project-container-ef2dfb60.esm.js +357 -0
- package/dist/project-expired-8c4cd8a0.cjs.dev.js +137 -0
- package/dist/project-expired-9994ed78.cjs.prod.js +137 -0
- package/dist/project-expired-dc881501.esm.js +123 -0
- package/dist/project-not-found-3933434f.cjs.prod.js +130 -0
- package/dist/project-not-found-3a76e8d7.cjs.dev.js +130 -0
- package/dist/project-not-found-57a3a216.esm.js +116 -0
- package/dist/project-not-initialized-2eebb2c7.esm.js +123 -0
- package/dist/project-not-initialized-3cfd0aed.cjs.dev.js +137 -0
- package/dist/project-not-initialized-91af2604.cjs.prod.js +137 -0
- package/dist/project-suspended-0c98a90e.cjs.dev.js +135 -0
- package/dist/project-suspended-dddbda8b.cjs.prod.js +135 -0
- package/dist/project-suspended-eeb5f62e.esm.js +121 -0
- package/dist/quick-access-1475bad4.cjs.dev.js +1893 -0
- package/dist/quick-access-ba70983f.cjs.prod.js +1875 -0
- package/dist/quick-access-d2f9b458.esm.js +1865 -0
- package/dist/redirect-to-login-12f467b8.cjs.prod.js +117 -0
- package/dist/redirect-to-login-2944c890.esm.js +115 -0
- package/dist/redirect-to-login-3bee13ba.cjs.dev.js +117 -0
- package/dist/redirect-to-logout-4587f4ed.cjs.dev.js +126 -0
- package/dist/redirect-to-logout-7bb3eb45.esm.js +113 -0
- package/dist/redirect-to-logout-a96985ce.cjs.prod.js +126 -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-0c72d0a4.cjs.prod.js +61 -0
- package/dist/redirector-72ccfbc2.cjs.dev.js +61 -0
- package/dist/redirector-d856975f.esm.js +46 -0
- package/dist/requests-in-flight-loader-0594117d.cjs.dev.js +122 -0
- package/dist/requests-in-flight-loader-59e8fb86.esm.js +107 -0
- package/dist/requests-in-flight-loader-a8288906.cjs.prod.js +122 -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-37faf2fb.cjs.prod.js +37 -0
- package/dist/service-page-project-switcher-47296fb1.esm.js +39 -0
- package/dist/service-page-project-switcher-6cdff717.cjs.dev.js +45 -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-14a5a1f4.cjs.prod.js +172 -0
- package/dist/use-applications-menu-1514af11.esm.js +157 -0
- package/dist/use-applications-menu-823a2492.cjs.dev.js +172 -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-6113cdd3.cjs.dev.js +338 -0
- package/dist/user-settings-menu-d75f4958.cjs.prod.js +326 -0
- package/dist/user-settings-menu-f98bea89.esm.js +313 -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 +144 -0
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.d.ts +2 -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.dev.js +554 -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 +554 -0
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +502 -0
- package/test-utils/package.json +4 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
4
|
+
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var reactRouterDom = require('react-router-dom');
|
|
7
|
+
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
8
|
+
var history = require('@commercetools-frontend/browser-history');
|
|
9
|
+
var Constraints = require('@commercetools-uikit/constraints');
|
|
10
|
+
var PrimaryButton = require('@commercetools-uikit/primary-button');
|
|
11
|
+
var Spacings = require('@commercetools-uikit/spacings');
|
|
12
|
+
var Text = require('@commercetools-uikit/text');
|
|
13
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-f0f4fbcd.cjs.dev.js');
|
|
14
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
15
|
+
require('./index-614accc4.cjs.dev.js');
|
|
16
|
+
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
17
|
+
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
18
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
19
|
+
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
20
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
21
|
+
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
22
|
+
require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
23
|
+
require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
24
|
+
require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
25
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
26
|
+
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
27
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
28
|
+
require('@babel/runtime-corejs3/core-js-stable/reflect/has');
|
|
29
|
+
require('@reduxjs/toolkit');
|
|
30
|
+
require('lodash/mapValues');
|
|
31
|
+
require('omit-empty-es');
|
|
32
|
+
require('redux');
|
|
33
|
+
require('redux-thunk');
|
|
34
|
+
require('@commercetools-frontend/application-shell-connectors');
|
|
35
|
+
require('@commercetools-frontend/constants');
|
|
36
|
+
require('@commercetools-frontend/notifications');
|
|
37
|
+
require('@commercetools-frontend/sdk');
|
|
38
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
|
|
39
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
40
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
41
|
+
require('@commercetools-frontend/sentry');
|
|
42
|
+
require('@commercetools-frontend/react-notifications');
|
|
43
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
44
|
+
require('redux-logger');
|
|
45
|
+
require('@emotion/styled/base');
|
|
46
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
47
|
+
require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
48
|
+
require('@emotion/react');
|
|
49
|
+
require('@commercetools-frontend/i18n');
|
|
50
|
+
require('./oidc-8827f9fe.cjs.dev.js');
|
|
51
|
+
require('@babel/runtime-corejs3/core-js-stable/url');
|
|
52
|
+
require('@commercetools-uikit/design-system');
|
|
53
|
+
require('react-intl');
|
|
54
|
+
require('@commercetools-uikit/flat-button');
|
|
55
|
+
require('@commercetools-uikit/icons');
|
|
56
|
+
require('./location-c835b8df.cjs.dev.js');
|
|
57
|
+
require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
58
|
+
require('memoize-one');
|
|
59
|
+
require('react-select');
|
|
60
|
+
require('@commercetools-uikit/accessible-hidden');
|
|
61
|
+
require('@commercetools-uikit/select-input');
|
|
62
|
+
require('@commercetools-frontend/assets/images/ct-logo.svg');
|
|
63
|
+
require('@commercetools-uikit/loading-spinner');
|
|
64
|
+
require('@commercetools-frontend/l10n');
|
|
65
|
+
require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
66
|
+
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
67
|
+
require('@babel/runtime-corejs3/helpers/createClass');
|
|
68
|
+
require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
69
|
+
require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
70
|
+
require('@babel/runtime-corejs3/helpers/inherits');
|
|
71
|
+
require('@babel/runtime-corejs3/core-js-stable/object/from-entries');
|
|
72
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/flags');
|
|
73
|
+
require('@apollo/client/react');
|
|
74
|
+
require('@flopflip/combine-adapters');
|
|
75
|
+
require('@flopflip/http-adapter');
|
|
76
|
+
require('@flopflip/launchdarkly-adapter');
|
|
77
|
+
require('@flopflip/react-broadcast');
|
|
78
|
+
require('@flopflip/types');
|
|
79
|
+
require('react-redux');
|
|
80
|
+
require('@commercetools-uikit/design-system/materials/resets.css');
|
|
81
|
+
require('@commercetools-frontend/application-config/ssr');
|
|
82
|
+
require('@commercetools-frontend/permissions');
|
|
83
|
+
require('@flopflip/memory-adapter');
|
|
84
|
+
require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
85
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
86
|
+
require('@commercetools-frontend/actions-global');
|
|
87
|
+
|
|
88
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
89
|
+
|
|
90
|
+
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
91
|
+
var history__default = /*#__PURE__*/_interopDefault(history);
|
|
92
|
+
var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
93
|
+
var PrimaryButton__default = /*#__PURE__*/_interopDefault(PrimaryButton);
|
|
94
|
+
var Spacings__default = /*#__PURE__*/_interopDefault(Spacings);
|
|
95
|
+
var Text__default = /*#__PURE__*/_interopDefault(Text);
|
|
96
|
+
|
|
97
|
+
const LocalCustomViewLauncher = props => {
|
|
98
|
+
var _context;
|
|
99
|
+
const _useState = react.useState(false),
|
|
100
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
101
|
+
shouldRenderCustomView = _useState2[0],
|
|
102
|
+
setShouldRenderCustomView = _useState2[1];
|
|
103
|
+
// We expect this in development to be defined.
|
|
104
|
+
const customViewConfig = props.environment.__DEVELOPMENT__?.customViewConfig;
|
|
105
|
+
return jsxRuntime.jsx("main", {
|
|
106
|
+
children: jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
107
|
+
max: "scale",
|
|
108
|
+
children: jsxRuntime.jsxs(Spacings__default["default"].Inset, {
|
|
109
|
+
scale: "xl",
|
|
110
|
+
children: [jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
111
|
+
scale: "xl",
|
|
112
|
+
children: [jsxRuntime.jsx(Text__default["default"].Headline, {
|
|
113
|
+
as: "h1",
|
|
114
|
+
children: "Custom View loader"
|
|
115
|
+
}), jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
116
|
+
scale: "l",
|
|
117
|
+
children: [jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
118
|
+
scale: "m",
|
|
119
|
+
children: [jsxRuntime.jsxs(Text__default["default"].Body, {
|
|
120
|
+
children: ["This page simulates the rendering of your Custom View as if it was within a page in the Merchant Center:", jsxRuntime.jsx("br", {}), "Based on your ", jsxRuntime.jsx("i", {
|
|
121
|
+
children: "custom-view-config"
|
|
122
|
+
}), " file, these are the settings that will be used:"]
|
|
123
|
+
}), jsxRuntime.jsx("ul", {
|
|
124
|
+
children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
125
|
+
scale: "s",
|
|
126
|
+
children: [jsxRuntime.jsxs("li", {
|
|
127
|
+
children: ["Custom View ID: ", jsxRuntime.jsx("b", {
|
|
128
|
+
children: customViewConfig.id
|
|
129
|
+
})]
|
|
130
|
+
}), jsxRuntime.jsxs("li", {
|
|
131
|
+
children: ["Custom View permissions:", ' ', jsxRuntime.jsx("b", {
|
|
132
|
+
children: _mapInstanceProperty__default["default"](_context = customViewConfig.permissions).call(_context, permission => `(${permission.name}: ${permission.oAuthScopes.join(', ')})`).join(', ')
|
|
133
|
+
})]
|
|
134
|
+
}), jsxRuntime.jsxs("li", {
|
|
135
|
+
children: ["Custom View locators:", ' ', jsxRuntime.jsx("b", {
|
|
136
|
+
children: customViewConfig.locators.join(', ')
|
|
137
|
+
})]
|
|
138
|
+
}), jsxRuntime.jsxs("li", {
|
|
139
|
+
children: ["Custom View type: ", jsxRuntime.jsx("b", {
|
|
140
|
+
children: customViewConfig.type
|
|
141
|
+
})]
|
|
142
|
+
}), jsxRuntime.jsxs("li", {
|
|
143
|
+
children: ["Custom View size:", ' ', jsxRuntime.jsx("b", {
|
|
144
|
+
children: customViewConfig.typeSettings?.size
|
|
145
|
+
})]
|
|
146
|
+
})]
|
|
147
|
+
})
|
|
148
|
+
})]
|
|
149
|
+
}), jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
150
|
+
max: 10,
|
|
151
|
+
children: jsxRuntime.jsx(PrimaryButton__default["default"], {
|
|
152
|
+
label: "Open the Custom View",
|
|
153
|
+
onClick: () => setShouldRenderCustomView(true)
|
|
154
|
+
})
|
|
155
|
+
})]
|
|
156
|
+
})]
|
|
157
|
+
}), shouldRenderCustomView && jsxRuntime.jsx(applicationComponents.CustomViewLoader, {
|
|
158
|
+
customView: customViewConfig,
|
|
159
|
+
hostUrl: props.environment.__DEVELOPMENT__?.customViewHostUrl,
|
|
160
|
+
onClose: () => setShouldRenderCustomView(false)
|
|
161
|
+
})]
|
|
162
|
+
})
|
|
163
|
+
})
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
const SimulatedIframeRoute = props => {
|
|
167
|
+
const routeMatch = reactRouterDom.useRouteMatch();
|
|
168
|
+
console.info(`ℹ️ Rendering a Custom View as it would be rendered within an iframe`, routeMatch.url);
|
|
169
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
170
|
+
children: props.children
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
const CustomViewDevHost = props => {
|
|
174
|
+
return jsxRuntime.jsx(reactRouterDom.Router, {
|
|
175
|
+
history: history__default["default"],
|
|
176
|
+
children: jsxRuntime.jsxs(reactRouterDom.Switch, {
|
|
177
|
+
children: [jsxRuntime.jsx(reactRouterDom.Route, {
|
|
178
|
+
path: "/custom-views/:customViewId/projects/:projectKey",
|
|
179
|
+
children: jsxRuntime.jsx(SimulatedIframeRoute, {
|
|
180
|
+
children: props.children
|
|
181
|
+
})
|
|
182
|
+
}), jsxRuntime.jsx(reactRouterDom.Route, {
|
|
183
|
+
children: jsxRuntime.jsx(dist_commercetoolsFrontendApplicationShell.ApplicationShell, {
|
|
184
|
+
environment: window.app,
|
|
185
|
+
applicationMessages: props.applicationMessages,
|
|
186
|
+
disableRoutePermissionCheck: true,
|
|
187
|
+
children: jsxRuntime.jsx(LocalCustomViewLauncher, {
|
|
188
|
+
environment: window.app
|
|
189
|
+
})
|
|
190
|
+
})
|
|
191
|
+
})]
|
|
192
|
+
})
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
CustomViewDevHost.displayName = 'CustomViewDevHost';
|
|
196
|
+
|
|
197
|
+
exports["default"] = CustomViewDevHost;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
4
|
+
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var reactRouterDom = require('react-router-dom');
|
|
7
|
+
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
8
|
+
var history = require('@commercetools-frontend/browser-history');
|
|
9
|
+
var Constraints = require('@commercetools-uikit/constraints');
|
|
10
|
+
var PrimaryButton = require('@commercetools-uikit/primary-button');
|
|
11
|
+
var Spacings = require('@commercetools-uikit/spacings');
|
|
12
|
+
var Text = require('@commercetools-uikit/text');
|
|
13
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-60cd194b.cjs.prod.js');
|
|
14
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
15
|
+
require('./index-245e2980.cjs.prod.js');
|
|
16
|
+
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
17
|
+
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
18
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
19
|
+
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
20
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
21
|
+
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
22
|
+
require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
23
|
+
require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
24
|
+
require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
25
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
26
|
+
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
27
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
28
|
+
require('@babel/runtime-corejs3/core-js-stable/reflect/has');
|
|
29
|
+
require('@reduxjs/toolkit');
|
|
30
|
+
require('lodash/mapValues');
|
|
31
|
+
require('omit-empty-es');
|
|
32
|
+
require('redux');
|
|
33
|
+
require('redux-thunk');
|
|
34
|
+
require('@commercetools-frontend/application-shell-connectors');
|
|
35
|
+
require('@commercetools-frontend/constants');
|
|
36
|
+
require('@commercetools-frontend/notifications');
|
|
37
|
+
require('@commercetools-frontend/sdk');
|
|
38
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
|
|
39
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
40
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
41
|
+
require('@commercetools-frontend/sentry');
|
|
42
|
+
require('@commercetools-frontend/react-notifications');
|
|
43
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
44
|
+
require('redux-logger');
|
|
45
|
+
require('@emotion/styled/base');
|
|
46
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
47
|
+
require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
48
|
+
require('@emotion/react');
|
|
49
|
+
require('@commercetools-frontend/i18n');
|
|
50
|
+
require('./oidc-d74e6aa2.cjs.prod.js');
|
|
51
|
+
require('@babel/runtime-corejs3/core-js-stable/url');
|
|
52
|
+
require('@commercetools-uikit/design-system');
|
|
53
|
+
require('react-intl');
|
|
54
|
+
require('@commercetools-uikit/flat-button');
|
|
55
|
+
require('@commercetools-uikit/icons');
|
|
56
|
+
require('./location-537e0660.cjs.prod.js');
|
|
57
|
+
require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
58
|
+
require('memoize-one');
|
|
59
|
+
require('react-select');
|
|
60
|
+
require('@commercetools-uikit/accessible-hidden');
|
|
61
|
+
require('@commercetools-uikit/select-input');
|
|
62
|
+
require('@commercetools-frontend/assets/images/ct-logo.svg');
|
|
63
|
+
require('@commercetools-uikit/loading-spinner');
|
|
64
|
+
require('@commercetools-frontend/l10n');
|
|
65
|
+
require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
66
|
+
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
67
|
+
require('@babel/runtime-corejs3/helpers/createClass');
|
|
68
|
+
require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
69
|
+
require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
70
|
+
require('@babel/runtime-corejs3/helpers/inherits');
|
|
71
|
+
require('@babel/runtime-corejs3/core-js-stable/object/from-entries');
|
|
72
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/flags');
|
|
73
|
+
require('@apollo/client/react');
|
|
74
|
+
require('@flopflip/combine-adapters');
|
|
75
|
+
require('@flopflip/http-adapter');
|
|
76
|
+
require('@flopflip/launchdarkly-adapter');
|
|
77
|
+
require('@flopflip/react-broadcast');
|
|
78
|
+
require('@flopflip/types');
|
|
79
|
+
require('react-redux');
|
|
80
|
+
require('@commercetools-uikit/design-system/materials/resets.css');
|
|
81
|
+
require('@commercetools-frontend/application-config/ssr');
|
|
82
|
+
require('@commercetools-frontend/permissions');
|
|
83
|
+
require('@flopflip/memory-adapter');
|
|
84
|
+
require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
85
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
86
|
+
require('@commercetools-frontend/actions-global');
|
|
87
|
+
|
|
88
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
89
|
+
|
|
90
|
+
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
91
|
+
var history__default = /*#__PURE__*/_interopDefault(history);
|
|
92
|
+
var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
93
|
+
var PrimaryButton__default = /*#__PURE__*/_interopDefault(PrimaryButton);
|
|
94
|
+
var Spacings__default = /*#__PURE__*/_interopDefault(Spacings);
|
|
95
|
+
var Text__default = /*#__PURE__*/_interopDefault(Text);
|
|
96
|
+
|
|
97
|
+
const LocalCustomViewLauncher = props => {
|
|
98
|
+
var _context;
|
|
99
|
+
const _useState = react.useState(false),
|
|
100
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
101
|
+
shouldRenderCustomView = _useState2[0],
|
|
102
|
+
setShouldRenderCustomView = _useState2[1];
|
|
103
|
+
// We expect this in development to be defined.
|
|
104
|
+
const customViewConfig = props.environment.__DEVELOPMENT__?.customViewConfig;
|
|
105
|
+
return jsxRuntime.jsx("main", {
|
|
106
|
+
children: jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
107
|
+
max: "scale",
|
|
108
|
+
children: jsxRuntime.jsxs(Spacings__default["default"].Inset, {
|
|
109
|
+
scale: "xl",
|
|
110
|
+
children: [jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
111
|
+
scale: "xl",
|
|
112
|
+
children: [jsxRuntime.jsx(Text__default["default"].Headline, {
|
|
113
|
+
as: "h1",
|
|
114
|
+
children: "Custom View loader"
|
|
115
|
+
}), jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
116
|
+
scale: "l",
|
|
117
|
+
children: [jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
118
|
+
scale: "m",
|
|
119
|
+
children: [jsxRuntime.jsxs(Text__default["default"].Body, {
|
|
120
|
+
children: ["This page simulates the rendering of your Custom View as if it was within a page in the Merchant Center:", jsxRuntime.jsx("br", {}), "Based on your ", jsxRuntime.jsx("i", {
|
|
121
|
+
children: "custom-view-config"
|
|
122
|
+
}), " file, these are the settings that will be used:"]
|
|
123
|
+
}), jsxRuntime.jsx("ul", {
|
|
124
|
+
children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
125
|
+
scale: "s",
|
|
126
|
+
children: [jsxRuntime.jsxs("li", {
|
|
127
|
+
children: ["Custom View ID: ", jsxRuntime.jsx("b", {
|
|
128
|
+
children: customViewConfig.id
|
|
129
|
+
})]
|
|
130
|
+
}), jsxRuntime.jsxs("li", {
|
|
131
|
+
children: ["Custom View permissions:", ' ', jsxRuntime.jsx("b", {
|
|
132
|
+
children: _mapInstanceProperty__default["default"](_context = customViewConfig.permissions).call(_context, permission => `(${permission.name}: ${permission.oAuthScopes.join(', ')})`).join(', ')
|
|
133
|
+
})]
|
|
134
|
+
}), jsxRuntime.jsxs("li", {
|
|
135
|
+
children: ["Custom View locators:", ' ', jsxRuntime.jsx("b", {
|
|
136
|
+
children: customViewConfig.locators.join(', ')
|
|
137
|
+
})]
|
|
138
|
+
}), jsxRuntime.jsxs("li", {
|
|
139
|
+
children: ["Custom View type: ", jsxRuntime.jsx("b", {
|
|
140
|
+
children: customViewConfig.type
|
|
141
|
+
})]
|
|
142
|
+
}), jsxRuntime.jsxs("li", {
|
|
143
|
+
children: ["Custom View size:", ' ', jsxRuntime.jsx("b", {
|
|
144
|
+
children: customViewConfig.typeSettings?.size
|
|
145
|
+
})]
|
|
146
|
+
})]
|
|
147
|
+
})
|
|
148
|
+
})]
|
|
149
|
+
}), jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
150
|
+
max: 10,
|
|
151
|
+
children: jsxRuntime.jsx(PrimaryButton__default["default"], {
|
|
152
|
+
label: "Open the Custom View",
|
|
153
|
+
onClick: () => setShouldRenderCustomView(true)
|
|
154
|
+
})
|
|
155
|
+
})]
|
|
156
|
+
})]
|
|
157
|
+
}), shouldRenderCustomView && jsxRuntime.jsx(applicationComponents.CustomViewLoader, {
|
|
158
|
+
customView: customViewConfig,
|
|
159
|
+
hostUrl: props.environment.__DEVELOPMENT__?.customViewHostUrl,
|
|
160
|
+
onClose: () => setShouldRenderCustomView(false)
|
|
161
|
+
})]
|
|
162
|
+
})
|
|
163
|
+
})
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
const SimulatedIframeRoute = props => {
|
|
167
|
+
const routeMatch = reactRouterDom.useRouteMatch();
|
|
168
|
+
console.info(`ℹ️ Rendering a Custom View as it would be rendered within an iframe`, routeMatch.url);
|
|
169
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
170
|
+
children: props.children
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
const CustomViewDevHost = props => {
|
|
174
|
+
return jsxRuntime.jsx(reactRouterDom.Router, {
|
|
175
|
+
history: history__default["default"],
|
|
176
|
+
children: jsxRuntime.jsxs(reactRouterDom.Switch, {
|
|
177
|
+
children: [jsxRuntime.jsx(reactRouterDom.Route, {
|
|
178
|
+
path: "/custom-views/:customViewId/projects/:projectKey",
|
|
179
|
+
children: jsxRuntime.jsx(SimulatedIframeRoute, {
|
|
180
|
+
children: props.children
|
|
181
|
+
})
|
|
182
|
+
}), jsxRuntime.jsx(reactRouterDom.Route, {
|
|
183
|
+
children: jsxRuntime.jsx(dist_commercetoolsFrontendApplicationShell.ApplicationShell, {
|
|
184
|
+
environment: window.app,
|
|
185
|
+
applicationMessages: props.applicationMessages,
|
|
186
|
+
disableRoutePermissionCheck: true,
|
|
187
|
+
children: jsxRuntime.jsx(LocalCustomViewLauncher, {
|
|
188
|
+
environment: window.app
|
|
189
|
+
})
|
|
190
|
+
})
|
|
191
|
+
})]
|
|
192
|
+
})
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
CustomViewDevHost.displayName = 'CustomViewDevHost';
|
|
196
|
+
|
|
197
|
+
exports["default"] = CustomViewDevHost;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
2
|
+
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Router, Switch, Route, useRouteMatch } from 'react-router-dom';
|
|
5
|
+
import { CustomViewLoader } from '@commercetools-frontend/application-components';
|
|
6
|
+
import history from '@commercetools-frontend/browser-history';
|
|
7
|
+
import Constraints from '@commercetools-uikit/constraints';
|
|
8
|
+
import PrimaryButton from '@commercetools-uikit/primary-button';
|
|
9
|
+
import Spacings from '@commercetools-uikit/spacings';
|
|
10
|
+
import Text from '@commercetools-uikit/text';
|
|
11
|
+
import { A as ApplicationShell } from './index-8637a317.esm.js';
|
|
12
|
+
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
13
|
+
import './index-86039df7.esm.js';
|
|
14
|
+
import '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
15
|
+
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
16
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
17
|
+
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
18
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
19
|
+
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
|
|
20
|
+
import '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
21
|
+
import '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
22
|
+
import '@babel/runtime-corejs3/helpers/defineProperty';
|
|
23
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
24
|
+
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
25
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
26
|
+
import '@babel/runtime-corejs3/core-js-stable/reflect/has';
|
|
27
|
+
import '@reduxjs/toolkit';
|
|
28
|
+
import 'lodash/mapValues';
|
|
29
|
+
import 'omit-empty-es';
|
|
30
|
+
import 'redux';
|
|
31
|
+
import 'redux-thunk';
|
|
32
|
+
import '@commercetools-frontend/application-shell-connectors';
|
|
33
|
+
import '@commercetools-frontend/constants';
|
|
34
|
+
import '@commercetools-frontend/notifications';
|
|
35
|
+
import '@commercetools-frontend/sdk';
|
|
36
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/index-of';
|
|
37
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/slice';
|
|
38
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
39
|
+
import '@commercetools-frontend/sentry';
|
|
40
|
+
import '@commercetools-frontend/react-notifications';
|
|
41
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
|
|
42
|
+
import 'redux-logger';
|
|
43
|
+
import '@emotion/styled/base';
|
|
44
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
45
|
+
import '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
46
|
+
import '@emotion/react';
|
|
47
|
+
import '@commercetools-frontend/i18n';
|
|
48
|
+
import './oidc-b2520905.esm.js';
|
|
49
|
+
import '@babel/runtime-corejs3/core-js-stable/url';
|
|
50
|
+
import '@commercetools-uikit/design-system';
|
|
51
|
+
import 'react-intl';
|
|
52
|
+
import '@commercetools-uikit/flat-button';
|
|
53
|
+
import '@commercetools-uikit/icons';
|
|
54
|
+
import './location-f21dbc25.esm.js';
|
|
55
|
+
import '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
56
|
+
import 'memoize-one';
|
|
57
|
+
import 'react-select';
|
|
58
|
+
import '@commercetools-uikit/accessible-hidden';
|
|
59
|
+
import '@commercetools-uikit/select-input';
|
|
60
|
+
import '@commercetools-frontend/assets/images/ct-logo.svg';
|
|
61
|
+
import '@commercetools-uikit/loading-spinner';
|
|
62
|
+
import '@commercetools-frontend/l10n';
|
|
63
|
+
import '@babel/runtime-corejs3/core-js-stable/reflect/construct';
|
|
64
|
+
import '@babel/runtime-corejs3/helpers/classCallCheck';
|
|
65
|
+
import '@babel/runtime-corejs3/helpers/createClass';
|
|
66
|
+
import '@babel/runtime-corejs3/helpers/possibleConstructorReturn';
|
|
67
|
+
import '@babel/runtime-corejs3/helpers/getPrototypeOf';
|
|
68
|
+
import '@babel/runtime-corejs3/helpers/inherits';
|
|
69
|
+
import '@babel/runtime-corejs3/core-js-stable/object/from-entries';
|
|
70
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/flags';
|
|
71
|
+
import '@apollo/client/react';
|
|
72
|
+
import '@flopflip/combine-adapters';
|
|
73
|
+
import '@flopflip/http-adapter';
|
|
74
|
+
import '@flopflip/launchdarkly-adapter';
|
|
75
|
+
import '@flopflip/react-broadcast';
|
|
76
|
+
import '@flopflip/types';
|
|
77
|
+
import 'react-redux';
|
|
78
|
+
import '@commercetools-uikit/design-system/materials/resets.css';
|
|
79
|
+
import '@commercetools-frontend/application-config/ssr';
|
|
80
|
+
import '@commercetools-frontend/permissions';
|
|
81
|
+
import '@flopflip/memory-adapter';
|
|
82
|
+
import '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
83
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/some';
|
|
84
|
+
import '@commercetools-frontend/actions-global';
|
|
85
|
+
|
|
86
|
+
const LocalCustomViewLauncher = props => {
|
|
87
|
+
var _context;
|
|
88
|
+
const _useState = useState(false),
|
|
89
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
90
|
+
shouldRenderCustomView = _useState2[0],
|
|
91
|
+
setShouldRenderCustomView = _useState2[1];
|
|
92
|
+
// We expect this in development to be defined.
|
|
93
|
+
const customViewConfig = props.environment.__DEVELOPMENT__?.customViewConfig;
|
|
94
|
+
return jsx("main", {
|
|
95
|
+
children: jsx(Constraints.Horizontal, {
|
|
96
|
+
max: "scale",
|
|
97
|
+
children: jsxs(Spacings.Inset, {
|
|
98
|
+
scale: "xl",
|
|
99
|
+
children: [jsxs(Spacings.Stack, {
|
|
100
|
+
scale: "xl",
|
|
101
|
+
children: [jsx(Text.Headline, {
|
|
102
|
+
as: "h1",
|
|
103
|
+
children: "Custom View loader"
|
|
104
|
+
}), jsxs(Spacings.Stack, {
|
|
105
|
+
scale: "l",
|
|
106
|
+
children: [jsxs(Spacings.Stack, {
|
|
107
|
+
scale: "m",
|
|
108
|
+
children: [jsxs(Text.Body, {
|
|
109
|
+
children: ["This page simulates the rendering of your Custom View as if it was within a page in the Merchant Center:", jsx("br", {}), "Based on your ", jsx("i", {
|
|
110
|
+
children: "custom-view-config"
|
|
111
|
+
}), " file, these are the settings that will be used:"]
|
|
112
|
+
}), jsx("ul", {
|
|
113
|
+
children: jsxs(Spacings.Stack, {
|
|
114
|
+
scale: "s",
|
|
115
|
+
children: [jsxs("li", {
|
|
116
|
+
children: ["Custom View ID: ", jsx("b", {
|
|
117
|
+
children: customViewConfig.id
|
|
118
|
+
})]
|
|
119
|
+
}), jsxs("li", {
|
|
120
|
+
children: ["Custom View permissions:", ' ', jsx("b", {
|
|
121
|
+
children: _mapInstanceProperty(_context = customViewConfig.permissions).call(_context, permission => `(${permission.name}: ${permission.oAuthScopes.join(', ')})`).join(', ')
|
|
122
|
+
})]
|
|
123
|
+
}), jsxs("li", {
|
|
124
|
+
children: ["Custom View locators:", ' ', jsx("b", {
|
|
125
|
+
children: customViewConfig.locators.join(', ')
|
|
126
|
+
})]
|
|
127
|
+
}), jsxs("li", {
|
|
128
|
+
children: ["Custom View type: ", jsx("b", {
|
|
129
|
+
children: customViewConfig.type
|
|
130
|
+
})]
|
|
131
|
+
}), jsxs("li", {
|
|
132
|
+
children: ["Custom View size:", ' ', jsx("b", {
|
|
133
|
+
children: customViewConfig.typeSettings?.size
|
|
134
|
+
})]
|
|
135
|
+
})]
|
|
136
|
+
})
|
|
137
|
+
})]
|
|
138
|
+
}), jsx(Constraints.Horizontal, {
|
|
139
|
+
max: 10,
|
|
140
|
+
children: jsx(PrimaryButton, {
|
|
141
|
+
label: "Open the Custom View",
|
|
142
|
+
onClick: () => setShouldRenderCustomView(true)
|
|
143
|
+
})
|
|
144
|
+
})]
|
|
145
|
+
})]
|
|
146
|
+
}), shouldRenderCustomView && jsx(CustomViewLoader, {
|
|
147
|
+
customView: customViewConfig,
|
|
148
|
+
hostUrl: props.environment.__DEVELOPMENT__?.customViewHostUrl,
|
|
149
|
+
onClose: () => setShouldRenderCustomView(false)
|
|
150
|
+
})]
|
|
151
|
+
})
|
|
152
|
+
})
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
const SimulatedIframeRoute = props => {
|
|
156
|
+
const routeMatch = useRouteMatch();
|
|
157
|
+
console.info(`ℹ️ Rendering a Custom View as it would be rendered within an iframe`, routeMatch.url);
|
|
158
|
+
return jsx(Fragment, {
|
|
159
|
+
children: props.children
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
const CustomViewDevHost = props => {
|
|
163
|
+
return jsx(Router, {
|
|
164
|
+
history: history,
|
|
165
|
+
children: jsxs(Switch, {
|
|
166
|
+
children: [jsx(Route, {
|
|
167
|
+
path: "/custom-views/:customViewId/projects/:projectKey",
|
|
168
|
+
children: jsx(SimulatedIframeRoute, {
|
|
169
|
+
children: props.children
|
|
170
|
+
})
|
|
171
|
+
}), jsx(Route, {
|
|
172
|
+
children: jsx(ApplicationShell, {
|
|
173
|
+
environment: window.app,
|
|
174
|
+
applicationMessages: props.applicationMessages,
|
|
175
|
+
disableRoutePermissionCheck: true,
|
|
176
|
+
children: jsx(LocalCustomViewLauncher, {
|
|
177
|
+
environment: window.app
|
|
178
|
+
})
|
|
179
|
+
})
|
|
180
|
+
})]
|
|
181
|
+
})
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
CustomViewDevHost.displayName = 'CustomViewDevHost';
|
|
185
|
+
|
|
186
|
+
export { CustomViewDevHost as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type TApplicationPageTitleProps = {
|
|
2
|
+
/**
|
|
3
|
+
* Prepend additional title parts to the default page title.
|
|
4
|
+
* The parts are concatenated with a `-` separator and might be truncated
|
|
5
|
+
* in the middle if each one exceeds 24 characters length.
|
|
6
|
+
*
|
|
7
|
+
* The default page title has always the format:
|
|
8
|
+
* <application_identifier> - <project_key> - Merchant Center
|
|
9
|
+
*
|
|
10
|
+
* Overwriting the default page title is recommended in detail pages
|
|
11
|
+
* where there is a human-readable resource identifier, for example a product name.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
*
|
|
15
|
+
* <ApplicationPageTitle additionalParts={['T-Shirt red']} />
|
|
16
|
+
* // T-Shirt red - Products - my-shop - Merchant Center
|
|
17
|
+
*/
|
|
18
|
+
additionalParts?: string[];
|
|
19
|
+
};
|
|
20
|
+
declare const ApplicationPageTitle: {
|
|
21
|
+
({ additionalParts, }: TApplicationPageTitleProps): null;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
export default ApplicationPageTitle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./application-page-title.js";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type ReactNode, type SyntheticEvent, JSX } from 'react';
|
|
2
|
+
import type { NormalizedCacheObject } from '@apollo/client';
|
|
3
|
+
import { ApolloClient } from '@apollo/client';
|
|
4
|
+
import type { TFlags } from '@flopflip/types';
|
|
5
|
+
import type { Dispatch } from 'redux';
|
|
6
|
+
import type { TApplicationContext } from "../../../../application-shell-connectors/dist/commercetools-frontend-application-shell-connectors.cjs.js";
|
|
7
|
+
import type { TAsyncLocaleDataProps } from '@commercetools-frontend/i18n';
|
|
8
|
+
type TApplicationShellProps = {
|
|
9
|
+
apolloClient?: ApolloClient<NormalizedCacheObject>;
|
|
10
|
+
/**
|
|
11
|
+
* NOTE: the environment value passed here is usually `window.app`.
|
|
12
|
+
* This object usually contains values as string and will be "transformed"
|
|
13
|
+
* to a real object with proper scalar values in the ApplicationShell.
|
|
14
|
+
* To keep the types simple, we assign here the already coerced type object.
|
|
15
|
+
* This should be fine, as consumers of the application can use the
|
|
16
|
+
* `ApplicationWindow` type from the `@commercetools-frontend/constants` package
|
|
17
|
+
* to type cast it:
|
|
18
|
+
*
|
|
19
|
+
* ```tsx
|
|
20
|
+
* import { ApplicationWindow } from '@commercetools-frontend/constants';
|
|
21
|
+
*
|
|
22
|
+
* declare let window: ApplicationWindow;
|
|
23
|
+
*
|
|
24
|
+
* <ApplicationShell environment={window.app} />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
environment: TApplicationContext<{}>['environment'];
|
|
28
|
+
featureFlags?: TFlags;
|
|
29
|
+
defaultFeatureFlags?: TFlags;
|
|
30
|
+
applicationMessages: TAsyncLocaleDataProps['applicationMessages'];
|
|
31
|
+
onRegisterErrorListeners?: (args: {
|
|
32
|
+
dispatch: Dispatch;
|
|
33
|
+
}) => void;
|
|
34
|
+
onMenuItemClick?: (event: SyntheticEvent<HTMLAnchorElement>) => void;
|
|
35
|
+
disableRoutePermissionCheck?: boolean;
|
|
36
|
+
enableReactStrictMode?: boolean;
|
|
37
|
+
render?: () => JSX.Element;
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
};
|
|
40
|
+
declare const ApplicationShell: {
|
|
41
|
+
(props: TApplicationShellProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
version: string;
|
|
44
|
+
};
|
|
45
|
+
export default ApplicationShell;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./application-shell.js";
|