@commercetools-frontend/application-shell 22.14.2 → 22.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-application-shell.esm.js +1 -1
- package/dist/{custom-view-dev-host-263f2c1a.cjs.dev.js → custom-view-dev-host-52595f60.cjs.dev.js} +1 -1
- package/dist/{custom-view-dev-host-c295f899.esm.js → custom-view-dev-host-945f058b.esm.js} +1 -1
- package/dist/custom-view-dev-host-98e7ce7d.cjs.prod.js +203 -0
- package/dist/{index-ae1eae7e.cjs.dev.js → index-0d0e6d8b.cjs.dev.js} +61 -52
- package/dist/{index-315660b0.esm.js → index-35f9f7c2.esm.js} +61 -52
- package/dist/{index-a7493b61.cjs.prod.js → index-c29f8aa0.cjs.prod.js} +77 -50
- package/dist/{oidc-callback-b397bd00.cjs.prod.js → oidc-callback-25005367.cjs.prod.js} +1 -1
- package/dist/{oidc-callback-77adc650.cjs.dev.js → oidc-callback-6aa0b446.cjs.dev.js} +1 -1
- package/dist/{oidc-callback-f120d63c.esm.js → oidc-callback-860db268.esm.js} +1 -1
- package/dist/{project-container-9cfe3aa6.cjs.prod.js → project-container-0b7034a5.cjs.prod.js} +5 -5
- package/dist/{project-container-c014c0c5.cjs.dev.js → project-container-22dd3ee8.cjs.dev.js} +5 -5
- package/dist/{project-container-68403e75.esm.js → project-container-8a000259.esm.js} +5 -5
- package/dist/{project-expired-2f27ca0a.esm.js → project-expired-175f09e7.esm.js} +2 -2
- package/dist/{project-expired-be7a7c1e.cjs.dev.js → project-expired-7e9f4a37.cjs.dev.js} +2 -2
- package/dist/{project-expired-9b37e7be.cjs.prod.js → project-expired-abde10a9.cjs.prod.js} +2 -2
- package/dist/{project-not-found-43dadcef.esm.js → project-not-found-89cc6d97.esm.js} +2 -2
- package/dist/{project-not-found-a2e74c89.cjs.prod.js → project-not-found-aeb6b4e5.cjs.prod.js} +2 -2
- package/dist/{project-not-found-96cdb368.cjs.dev.js → project-not-found-fcb9f62d.cjs.dev.js} +2 -2
- package/dist/{project-not-initialized-8e84d5c7.esm.js → project-not-initialized-1e4f45dc.esm.js} +2 -2
- package/dist/{project-not-initialized-362155ca.cjs.dev.js → project-not-initialized-718a18d0.cjs.dev.js} +2 -2
- package/dist/{project-not-initialized-ffaffeb0.cjs.prod.js → project-not-initialized-e8c5fae6.cjs.prod.js} +2 -2
- package/dist/{project-suspended-c03a9e61.esm.js → project-suspended-0d49681f.esm.js} +2 -2
- package/dist/{project-suspended-37db98bf.cjs.prod.js → project-suspended-1f94c722.cjs.prod.js} +2 -2
- package/dist/{project-suspended-61e02b61.cjs.dev.js → project-suspended-d028eced.cjs.dev.js} +2 -2
- package/dist/{quick-access-68c00be3.cjs.dev.js → quick-access-08a2f835.cjs.dev.js} +1 -1
- package/dist/{quick-access-6226709e.esm.js → quick-access-11418f11.esm.js} +1 -1
- package/dist/{quick-access-cffc290d.cjs.prod.js → quick-access-ecbaedf9.cjs.prod.js} +1 -1
- package/dist/{redirect-to-logout-22708e37.cjs.prod.js → redirect-to-logout-2418d058.cjs.prod.js} +1 -1
- package/dist/{redirect-to-logout-aa665ef1.esm.js → redirect-to-logout-7fb8c085.esm.js} +1 -1
- package/dist/{redirect-to-logout-fa06e640.cjs.dev.js → redirect-to-logout-8cbbf5b3.cjs.dev.js} +1 -1
- package/dist/{requests-in-flight-loader-df11d5fc.cjs.dev.js → requests-in-flight-loader-41d05ebb.cjs.dev.js} +1 -1
- package/dist/{requests-in-flight-loader-2f004196.cjs.prod.js → requests-in-flight-loader-7580242c.cjs.prod.js} +1 -1
- package/dist/{requests-in-flight-loader-c30b0762.esm.js → requests-in-flight-loader-9400ad17.esm.js} +1 -1
- package/dist/{service-page-project-switcher-4818f8e5.cjs.prod.js → service-page-project-switcher-3343ea60.cjs.prod.js} +1 -1
- package/dist/{service-page-project-switcher-ae6d1775.cjs.dev.js → service-page-project-switcher-c2446f31.cjs.dev.js} +1 -1
- package/dist/{service-page-project-switcher-65c553fa.esm.js → service-page-project-switcher-f7058ef7.esm.js} +1 -1
- package/dist/{version-tracker-e5b7b2ae.cjs.dev.js → version-tracker-0c067072.cjs.dev.js} +1 -1
- package/dist/{version-tracker-a3a9dd53.cjs.prod.js → version-tracker-abf7b029.cjs.prod.js} +1 -1
- package/dist/{version-tracker-4b5032f1.esm.js → version-tracker-d3961598.esm.js} +1 -1
- package/package.json +16 -16
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
5
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-0d0e6d8b.cjs.dev.js');
|
|
6
6
|
var index = require('./index-37a25e51.cjs.dev.js');
|
|
7
7
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
8
8
|
var ssr = require('@commercetools-frontend/application-config/ssr');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
5
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-c29f8aa0.cjs.prod.js');
|
|
6
6
|
var index = require('./index-6cd618cc.cjs.prod.js');
|
|
7
7
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
8
8
|
var ssr = require('@commercetools-frontend/application-config/ssr');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as ApplicationPageTitle, A as ApplicationShell, f as ApplicationShellProvider, C as ConfigureIntlProvider, h as CustomViewShell, I as InjectReducers, S as SetupFlopFlipProvider, i as SuspendedRoute, s as setupGlobalErrorListener, u as useRoutesCreator, d as version } from './index-
|
|
1
|
+
export { g as ApplicationPageTitle, A as ApplicationShell, f as ApplicationShellProvider, C as ConfigureIntlProvider, h as CustomViewShell, I as InjectReducers, S as SetupFlopFlipProvider, i as SuspendedRoute, s as setupGlobalErrorListener, u as useRoutesCreator, d as version } from './index-35f9f7c2.esm.js';
|
|
2
2
|
export { R as RouteCatchAll, a as applyDefaultMiddlewares } from './index-89e5711a.esm.js';
|
|
3
3
|
export { buildApiUrl, createApolloClient, createApolloContextForProxyForwardTo, createHttpClientOptions, executeHttpClientRequest, getMcApiUrl, selectProjectKeyFromUrl, selectUserId, useMcLazyQuery, useMcMutation, useMcQuery } from '@commercetools-frontend/application-shell-connectors';
|
|
4
4
|
export { entryPointUriPathToPermissionKeys, entryPointUriPathToResourceAccesses } from '@commercetools-frontend/application-config/ssr';
|
package/dist/{custom-view-dev-host-263f2c1a.cjs.dev.js → custom-view-dev-host-52595f60.cjs.dev.js}
RENAMED
|
@@ -12,7 +12,7 @@ var Constraints = require('@commercetools-uikit/constraints');
|
|
|
12
12
|
var PrimaryButton = require('@commercetools-uikit/primary-button');
|
|
13
13
|
var Spacings = require('@commercetools-uikit/spacings');
|
|
14
14
|
var Text = require('@commercetools-uikit/text');
|
|
15
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
15
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-0d0e6d8b.cjs.dev.js');
|
|
16
16
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
17
17
|
require('./index-37a25e51.cjs.dev.js');
|
|
18
18
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
@@ -10,7 +10,7 @@ import Constraints from '@commercetools-uikit/constraints';
|
|
|
10
10
|
import PrimaryButton from '@commercetools-uikit/primary-button';
|
|
11
11
|
import Spacings from '@commercetools-uikit/spacings';
|
|
12
12
|
import Text from '@commercetools-uikit/text';
|
|
13
|
-
import { A as ApplicationShell } from './index-
|
|
13
|
+
import { A as ApplicationShell } from './index-35f9f7c2.esm.js';
|
|
14
14
|
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
15
15
|
import './index-89e5711a.esm.js';
|
|
16
16
|
import '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
4
|
+
require('prop-types');
|
|
5
|
+
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
6
|
+
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
7
|
+
var react = require('react');
|
|
8
|
+
var reactRouterDom = require('react-router-dom');
|
|
9
|
+
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
10
|
+
var history = require('@commercetools-frontend/browser-history');
|
|
11
|
+
var Constraints = require('@commercetools-uikit/constraints');
|
|
12
|
+
var PrimaryButton = require('@commercetools-uikit/primary-button');
|
|
13
|
+
var Spacings = require('@commercetools-uikit/spacings');
|
|
14
|
+
var Text = require('@commercetools-uikit/text');
|
|
15
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-c29f8aa0.cjs.prod.js');
|
|
16
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
17
|
+
require('./index-6cd618cc.cjs.prod.js');
|
|
18
|
+
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
19
|
+
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
20
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
21
|
+
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
22
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
23
|
+
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
24
|
+
require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
25
|
+
require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
26
|
+
require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
27
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
28
|
+
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
29
|
+
require('@babel/runtime-corejs3/core-js-stable/reflect/has');
|
|
30
|
+
require('@reduxjs/toolkit');
|
|
31
|
+
require('lodash/mapValues');
|
|
32
|
+
require('omit-empty-es');
|
|
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-b070ff6c.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('./use-is-served-by-proxy-845cace5.cjs.prod.js');
|
|
57
|
+
require('@babel/runtime-corejs3/helpers/taggedTemplateLiteral');
|
|
58
|
+
require('@babel/runtime-corejs3/helpers/objectDestructuringEmpty');
|
|
59
|
+
require('@babel/runtime-corejs3/helpers/extends');
|
|
60
|
+
require('memoize-one');
|
|
61
|
+
require('react-select');
|
|
62
|
+
require('@commercetools-uikit/accessible-hidden');
|
|
63
|
+
require('@commercetools-uikit/select-input');
|
|
64
|
+
require('@commercetools-frontend/assets/images/ct-logo.svg');
|
|
65
|
+
require('@commercetools-uikit/loading-spinner');
|
|
66
|
+
require('@commercetools-frontend/l10n');
|
|
67
|
+
require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
68
|
+
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
69
|
+
require('@babel/runtime-corejs3/helpers/createClass');
|
|
70
|
+
require('@babel/runtime-corejs3/helpers/inherits');
|
|
71
|
+
require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
72
|
+
require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
73
|
+
require('@babel/runtime-corejs3/core-js-stable/object/from-entries');
|
|
74
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/flags');
|
|
75
|
+
require('@apollo/client/react');
|
|
76
|
+
require('@flopflip/combine-adapters');
|
|
77
|
+
require('@flopflip/http-adapter');
|
|
78
|
+
require('@flopflip/launchdarkly-adapter');
|
|
79
|
+
require('@flopflip/react-broadcast');
|
|
80
|
+
require('react-redux');
|
|
81
|
+
require('lodash/upperFirst');
|
|
82
|
+
require('@commercetools-uikit/design-system/materials/resets.css');
|
|
83
|
+
require('@commercetools-frontend/application-config/ssr');
|
|
84
|
+
require('@commercetools-frontend/permissions');
|
|
85
|
+
require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
86
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
87
|
+
require('@commercetools-frontend/actions-global');
|
|
88
|
+
|
|
89
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
90
|
+
|
|
91
|
+
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
92
|
+
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
93
|
+
var history__default = /*#__PURE__*/_interopDefault(history);
|
|
94
|
+
var Constraints__default = /*#__PURE__*/_interopDefault(Constraints);
|
|
95
|
+
var PrimaryButton__default = /*#__PURE__*/_interopDefault(PrimaryButton);
|
|
96
|
+
var Spacings__default = /*#__PURE__*/_interopDefault(Spacings);
|
|
97
|
+
var Text__default = /*#__PURE__*/_interopDefault(Text);
|
|
98
|
+
|
|
99
|
+
const LocalCustomViewLauncher = props => {
|
|
100
|
+
var _props$environment$__, _context, _customViewConfig$typ, _props$environment$__2;
|
|
101
|
+
const _useState = react.useState(false),
|
|
102
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
103
|
+
shouldRenderCustomView = _useState2[0],
|
|
104
|
+
setShouldRenderCustomView = _useState2[1];
|
|
105
|
+
// We expect this in development to be defined.
|
|
106
|
+
const customViewConfig = (_props$environment$__ = props.environment.__DEVELOPMENT__) === null || _props$environment$__ === void 0 ? void 0 : _props$environment$__.customViewConfig;
|
|
107
|
+
return jsxRuntime.jsx("main", {
|
|
108
|
+
children: jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
109
|
+
max: "scale",
|
|
110
|
+
children: jsxRuntime.jsxs(Spacings__default["default"].Inset, {
|
|
111
|
+
scale: "xl",
|
|
112
|
+
children: [jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
113
|
+
scale: "xl",
|
|
114
|
+
children: [jsxRuntime.jsx(Text__default["default"].Headline, {
|
|
115
|
+
as: "h1",
|
|
116
|
+
children: "Custom View loader"
|
|
117
|
+
}), jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
118
|
+
scale: "l",
|
|
119
|
+
children: [jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
120
|
+
scale: "m",
|
|
121
|
+
children: [jsxRuntime.jsxs(Text__default["default"].Body, {
|
|
122
|
+
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", {
|
|
123
|
+
children: "custom-view-config"
|
|
124
|
+
}), " file, these are the settings that will be used:"]
|
|
125
|
+
}), jsxRuntime.jsx("ul", {
|
|
126
|
+
children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
127
|
+
scale: "s",
|
|
128
|
+
children: [jsxRuntime.jsxs("li", {
|
|
129
|
+
children: ["Custom View ID: ", jsxRuntime.jsx("b", {
|
|
130
|
+
children: customViewConfig.id
|
|
131
|
+
})]
|
|
132
|
+
}), jsxRuntime.jsxs("li", {
|
|
133
|
+
children: ["Custom View permissions:", ' ', jsxRuntime.jsx("b", {
|
|
134
|
+
children: _mapInstanceProperty__default["default"](_context = customViewConfig.permissions).call(_context, permission => {
|
|
135
|
+
var _context2;
|
|
136
|
+
return _concatInstanceProperty__default["default"](_context2 = "(".concat(permission.name, ": ")).call(_context2, permission.oAuthScopes.join(', '), ")");
|
|
137
|
+
}).join(', ')
|
|
138
|
+
})]
|
|
139
|
+
}), jsxRuntime.jsxs("li", {
|
|
140
|
+
children: ["Custom View locators:", ' ', jsxRuntime.jsx("b", {
|
|
141
|
+
children: customViewConfig.locators.join(', ')
|
|
142
|
+
})]
|
|
143
|
+
}), jsxRuntime.jsxs("li", {
|
|
144
|
+
children: ["Custom View type: ", jsxRuntime.jsx("b", {
|
|
145
|
+
children: customViewConfig.type
|
|
146
|
+
})]
|
|
147
|
+
}), jsxRuntime.jsxs("li", {
|
|
148
|
+
children: ["Custom View size:", ' ', jsxRuntime.jsx("b", {
|
|
149
|
+
children: (_customViewConfig$typ = customViewConfig.typeSettings) === null || _customViewConfig$typ === void 0 ? void 0 : _customViewConfig$typ.size
|
|
150
|
+
})]
|
|
151
|
+
})]
|
|
152
|
+
})
|
|
153
|
+
})]
|
|
154
|
+
}), jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
155
|
+
max: 10,
|
|
156
|
+
children: jsxRuntime.jsx(PrimaryButton__default["default"], {
|
|
157
|
+
label: "Open the Custom View",
|
|
158
|
+
onClick: () => setShouldRenderCustomView(true)
|
|
159
|
+
})
|
|
160
|
+
})]
|
|
161
|
+
})]
|
|
162
|
+
}), shouldRenderCustomView && jsxRuntime.jsx(applicationComponents.CustomViewLoader, {
|
|
163
|
+
customView: customViewConfig,
|
|
164
|
+
hostUrl: (_props$environment$__2 = props.environment.__DEVELOPMENT__) === null || _props$environment$__2 === void 0 ? void 0 : _props$environment$__2.customViewHostUrl,
|
|
165
|
+
onClose: () => setShouldRenderCustomView(false)
|
|
166
|
+
})]
|
|
167
|
+
})
|
|
168
|
+
})
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
const SimulatedIframeRoute = props => {
|
|
172
|
+
const routeMatch = reactRouterDom.useRouteMatch();
|
|
173
|
+
console.info("\u2139\uFE0F Rendering a Custom View as it would be rendered within an iframe", routeMatch.url);
|
|
174
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
175
|
+
children: props.children
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
const CustomViewDevHost = props => {
|
|
179
|
+
return jsxRuntime.jsx(reactRouterDom.Router, {
|
|
180
|
+
history: history__default["default"],
|
|
181
|
+
children: jsxRuntime.jsxs(reactRouterDom.Switch, {
|
|
182
|
+
children: [jsxRuntime.jsx(reactRouterDom.Route, {
|
|
183
|
+
path: "/custom-views/:customViewId/projects/:projectKey",
|
|
184
|
+
children: jsxRuntime.jsx(SimulatedIframeRoute, {
|
|
185
|
+
children: props.children
|
|
186
|
+
})
|
|
187
|
+
}), jsxRuntime.jsx(reactRouterDom.Route, {
|
|
188
|
+
children: jsxRuntime.jsx(dist_commercetoolsFrontendApplicationShell.ApplicationShell, {
|
|
189
|
+
environment: window.app,
|
|
190
|
+
applicationMessages: props.applicationMessages,
|
|
191
|
+
disableRoutePermissionCheck: true,
|
|
192
|
+
children: jsxRuntime.jsx(LocalCustomViewLauncher, {
|
|
193
|
+
environment: window.app
|
|
194
|
+
})
|
|
195
|
+
})
|
|
196
|
+
})]
|
|
197
|
+
})
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
CustomViewDevHost.propTypes = {};
|
|
201
|
+
CustomViewDevHost.displayName = 'CustomViewDevHost';
|
|
202
|
+
|
|
203
|
+
exports["default"] = CustomViewDevHost;
|
|
@@ -112,9 +112,9 @@ var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
|
112
112
|
var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
|
|
113
113
|
|
|
114
114
|
// NOTE: This string will be replaced on build time with the package version.
|
|
115
|
-
var applicationShellVersion = "22.14.
|
|
115
|
+
var applicationShellVersion = "22.14.3";
|
|
116
116
|
|
|
117
|
-
const RequestsInFlightLoader = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./requests-in-flight-loader-
|
|
117
|
+
const RequestsInFlightLoader = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./requests-in-flight-loader-41d05ebb.cjs.dev.js' /* webpackChunkName: "requests-in-flight-loader" */); }));
|
|
118
118
|
|
|
119
119
|
// Attempt to load the `projectKey` from localStorage
|
|
120
120
|
function selectProjectKeyFromLocalStorage() {
|
|
@@ -594,7 +594,7 @@ FetchUser.displayName = 'FetchUser';
|
|
|
594
594
|
|
|
595
595
|
const Navbar = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./navbar-8409df86.cjs.dev.js' /* webpackChunkName: "navbar" */); }));
|
|
596
596
|
|
|
597
|
-
const ProjectContainer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./project-container-
|
|
597
|
+
const ProjectContainer = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./project-container-22dd3ee8.cjs.dev.js' /* webpackChunkName: "project-container" */); }));
|
|
598
598
|
|
|
599
599
|
const getSelectedDataLocaleForProject = projectLocales => {
|
|
600
600
|
const cachedDataLocale = window.localStorage.getItem(constants.STORAGE_KEYS.SELECTED_DATA_LOCALE);
|
|
@@ -718,7 +718,7 @@ var pimIndexerStates = {
|
|
|
718
718
|
NOT_INDEXED: 'NOT_INDEXED'
|
|
719
719
|
};
|
|
720
720
|
|
|
721
|
-
const QuickAccess = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./quick-access-
|
|
721
|
+
const QuickAccess = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./quick-access-08a2f835.cjs.dev.js' /* webpackChunkName: "quick-access" */); }));
|
|
722
722
|
|
|
723
723
|
const QuickAccessTrigger = props => {
|
|
724
724
|
const _useState = react.useState(false),
|
|
@@ -807,7 +807,7 @@ QuickAccessTrigger.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
807
807
|
} : {};
|
|
808
808
|
QuickAccessTrigger.displayName = 'QuickAccessTrigger';
|
|
809
809
|
|
|
810
|
-
const RedirectToLogout = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-logout-
|
|
810
|
+
const RedirectToLogout = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-logout-8cbbf5b3.cjs.dev.js' /* webpackChunkName: "redirect-to-logout" */); }));
|
|
811
811
|
|
|
812
812
|
const RedirectToProjectCreate = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./redirect-to-project-create-7b476aa6.cjs.dev.js' /* webpackChunkName: "redirect-to-project-create" */); }));
|
|
813
813
|
|
|
@@ -957,7 +957,7 @@ const ThemeSwitcher = () => {
|
|
|
957
957
|
});
|
|
958
958
|
};
|
|
959
959
|
|
|
960
|
-
const VersionTracker = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./version-tracker-
|
|
960
|
+
const VersionTracker = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./version-tracker-0c067072.cjs.dev.js' /* webpackChunkName: "version-tracker" */); }));
|
|
961
961
|
|
|
962
962
|
function ownKeys$5(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
963
963
|
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$5(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$5(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1462,7 +1462,7 @@ const hasCachedAuthenticationState = () => {
|
|
|
1462
1462
|
return window.localStorage.getItem(constants.STORAGE_KEYS.IS_AUTHENTICATED) === 'true';
|
|
1463
1463
|
};
|
|
1464
1464
|
|
|
1465
|
-
const OidcCallback = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./oidc-callback-
|
|
1465
|
+
const OidcCallback = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./oidc-callback-6aa0b446.cjs.dev.js' /* webpackChunkName: "oidc-callback" */); }));
|
|
1466
1466
|
|
|
1467
1467
|
function ownKeys$3(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1468
1468
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$3(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1700,7 +1700,7 @@ ApplicationShell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1700
1700
|
ApplicationShell.displayName = 'ApplicationShell';
|
|
1701
1701
|
ApplicationShell.version = applicationShellVersion;
|
|
1702
1702
|
|
|
1703
|
-
const CustomViewDevHost = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./custom-view-dev-host-
|
|
1703
|
+
const CustomViewDevHost = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./custom-view-dev-host-52595f60.cjs.dev.js' /* webpackChunkName: "custom-view-dev-host" */); }));
|
|
1704
1704
|
|
|
1705
1705
|
function ownKeys$1(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1706
1706
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1830,10 +1830,17 @@ function StrictModeEnablement(props) {
|
|
|
1830
1830
|
});
|
|
1831
1831
|
}
|
|
1832
1832
|
}
|
|
1833
|
+
|
|
1834
|
+
/*
|
|
1835
|
+
During e2e tests, the Custom View template is built in production mode but still runs on localhost.
|
|
1836
|
+
Checking for local production mode is necessary for applying the development host URL,
|
|
1837
|
+
creating an environment for testing interaction with the Custom View template.
|
|
1838
|
+
*/
|
|
1833
1839
|
StrictModeEnablement.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
1834
1840
|
enableReactStrictMode: _pt__default["default"].bool,
|
|
1835
1841
|
children: _pt__default["default"].node
|
|
1836
1842
|
} : {};
|
|
1843
|
+
const isLocalProdMode = process.env.NODE_ENV === 'production' && window.app.env === 'development';
|
|
1837
1844
|
function CustomViewShell(props) {
|
|
1838
1845
|
var _window$app$__DEVELOP;
|
|
1839
1846
|
const _useState = react.useState(),
|
|
@@ -1890,52 +1897,54 @@ function CustomViewShell(props) {
|
|
|
1890
1897
|
showLogo: true
|
|
1891
1898
|
});
|
|
1892
1899
|
}
|
|
1893
|
-
const hostUrl = process.env.NODE_ENV === 'development' ? (_window$app$__DEVELOP = window.app.__DEVELOPMENT__) === null || _window$app$__DEVELOP === void 0 ? void 0 : _window$app$__DEVELOP.customViewHostUrl : hostContext.hostUrl;
|
|
1894
|
-
return jsxRuntime.
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
children: jsxRuntime.jsxs(CustomViewShellAuthenticated, {
|
|
1906
|
-
dataLocale: hostContext.dataLocale,
|
|
1907
|
-
environment: window.app,
|
|
1908
|
-
messages: props.applicationMessages,
|
|
1909
|
-
projectKey: hostContext.projectKey,
|
|
1900
|
+
const hostUrl = process.env.NODE_ENV === 'development' || isLocalProdMode ? (_window$app$__DEVELOP = window.app.__DEVELOPMENT__) === null || _window$app$__DEVELOP === void 0 ? void 0 : _window$app$__DEVELOP.customViewHostUrl : hostContext.hostUrl;
|
|
1901
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1902
|
+
children: [jsxRuntime.jsx(GlobalStyles, {}), jsxRuntime.jsx(ApplicationShellProvider, {
|
|
1903
|
+
environment: window.app,
|
|
1904
|
+
applicationMessages: props.applicationMessages,
|
|
1905
|
+
apolloClient: props.apolloClient,
|
|
1906
|
+
children: _ref => {
|
|
1907
|
+
let isAuthenticated = _ref.isAuthenticated;
|
|
1908
|
+
if (isAuthenticated) {
|
|
1909
|
+
var _context;
|
|
1910
|
+
return jsxRuntime.jsx(applicationShellConnectors.CustomViewContextProvider, {
|
|
1911
|
+
hostUrl: hostUrl,
|
|
1910
1912
|
customViewConfig: hostContext.customViewConfig,
|
|
1911
|
-
children:
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
let locale = _ref2.locale,
|
|
1930
|
-
messages = _ref2.messages;
|
|
1931
|
-
return jsxRuntime.jsx(ConfigureIntlProvider, {
|
|
1932
|
-
locale: locale,
|
|
1933
|
-
messages: messages,
|
|
1934
|
-
children: jsxRuntime.jsx(applicationComponents.PageUnauthorized, {})
|
|
1913
|
+
children: jsxRuntime.jsxs(CustomViewShellAuthenticated, {
|
|
1914
|
+
dataLocale: hostContext.dataLocale,
|
|
1915
|
+
environment: window.app,
|
|
1916
|
+
messages: props.applicationMessages,
|
|
1917
|
+
projectKey: hostContext.projectKey,
|
|
1918
|
+
customViewConfig: hostContext.customViewConfig,
|
|
1919
|
+
children: [jsxRuntime.jsx(applicationComponents.PortalsContainer
|
|
1920
|
+
// @ts-ignore
|
|
1921
|
+
, {
|
|
1922
|
+
ref: layoutRefs
|
|
1923
|
+
}), jsxRuntime.jsx(NotificationsContainer, {
|
|
1924
|
+
notificationsGlobalRef: notificationsGlobalRef,
|
|
1925
|
+
notificationsPageRef: notificationsPageRef
|
|
1926
|
+
}), jsxRuntime.jsx(reactRouterDom.Route, {
|
|
1927
|
+
path: _concatInstanceProperty__default["default"](_context = "/custom-views/".concat(hostContext.customViewConfig.id, "/projects/")).call(_context, hostContext.projectKey),
|
|
1928
|
+
children: props.children
|
|
1929
|
+
})]
|
|
1930
|
+
})
|
|
1935
1931
|
});
|
|
1936
1932
|
}
|
|
1937
|
-
|
|
1938
|
-
|
|
1933
|
+
return jsxRuntime.jsx(i18n.AsyncLocaleData, {
|
|
1934
|
+
locale: browserLocale,
|
|
1935
|
+
applicationMessages: props.applicationMessages,
|
|
1936
|
+
children: _ref2 => {
|
|
1937
|
+
let locale = _ref2.locale,
|
|
1938
|
+
messages = _ref2.messages;
|
|
1939
|
+
return jsxRuntime.jsx(ConfigureIntlProvider, {
|
|
1940
|
+
locale: locale,
|
|
1941
|
+
messages: messages,
|
|
1942
|
+
children: jsxRuntime.jsx(applicationComponents.PageUnauthorized, {})
|
|
1943
|
+
});
|
|
1944
|
+
}
|
|
1945
|
+
});
|
|
1946
|
+
}
|
|
1947
|
+
})]
|
|
1939
1948
|
});
|
|
1940
1949
|
}
|
|
1941
1950
|
CustomViewShell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -1945,7 +1954,7 @@ CustomViewShell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1945
1954
|
children: _pt__default["default"].node.isRequired
|
|
1946
1955
|
} : {};
|
|
1947
1956
|
const CustomViewShellWrapper = props => {
|
|
1948
|
-
if (process.env.NODE_ENV === 'development' && !props.disableDevHost) {
|
|
1957
|
+
if ((process.env.NODE_ENV === 'development' || isLocalProdMode) && !props.disableDevHost) {
|
|
1949
1958
|
return jsxRuntime.jsx(StrictModeEnablement, {
|
|
1950
1959
|
enableReactStrictMode: props.enableReactStrictMode,
|
|
1951
1960
|
children: jsxRuntime.jsx(react.Suspense, {
|