@commercetools-frontend/application-shell 22.14.1 → 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-cc53ff72.cjs.dev.js → custom-view-dev-host-52595f60.cjs.dev.js} +1 -1
- package/dist/{custom-view-dev-host-cbf108c9.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-190fcd7f.cjs.dev.js → index-0d0e6d8b.cjs.dev.js} +98 -42
- package/dist/{index-76a06c5f.esm.js → index-35f9f7c2.esm.js} +98 -42
- package/dist/{index-d07d1e3f.cjs.prod.js → index-c29f8aa0.cjs.prod.js} +111 -40
- package/dist/{oidc-callback-f2c75e2d.cjs.prod.js → oidc-callback-25005367.cjs.prod.js} +1 -1
- package/dist/{oidc-callback-508c5239.cjs.dev.js → oidc-callback-6aa0b446.cjs.dev.js} +1 -1
- package/dist/{oidc-callback-758e96ec.esm.js → oidc-callback-860db268.esm.js} +1 -1
- package/dist/{project-container-de098f6b.cjs.prod.js → project-container-0b7034a5.cjs.prod.js} +5 -5
- package/dist/{project-container-bae27095.cjs.dev.js → project-container-22dd3ee8.cjs.dev.js} +5 -5
- package/dist/{project-container-ba60ec97.esm.js → project-container-8a000259.esm.js} +5 -5
- package/dist/{project-expired-371ff86e.esm.js → project-expired-175f09e7.esm.js} +2 -2
- package/dist/{project-expired-0e3d424a.cjs.dev.js → project-expired-7e9f4a37.cjs.dev.js} +2 -2
- package/dist/{project-expired-1ddd2af5.cjs.prod.js → project-expired-abde10a9.cjs.prod.js} +2 -2
- package/dist/{project-not-found-6c139fad.esm.js → project-not-found-89cc6d97.esm.js} +2 -2
- package/dist/{project-not-found-bc75cb7d.cjs.prod.js → project-not-found-aeb6b4e5.cjs.prod.js} +2 -2
- package/dist/{project-not-found-90c2b18e.cjs.dev.js → project-not-found-fcb9f62d.cjs.dev.js} +2 -2
- package/dist/{project-not-initialized-ddb69ed3.esm.js → project-not-initialized-1e4f45dc.esm.js} +2 -2
- package/dist/{project-not-initialized-4c3ec31f.cjs.dev.js → project-not-initialized-718a18d0.cjs.dev.js} +2 -2
- package/dist/{project-not-initialized-0b673fe7.cjs.prod.js → project-not-initialized-e8c5fae6.cjs.prod.js} +2 -2
- package/dist/{project-suspended-9e8d176c.esm.js → project-suspended-0d49681f.esm.js} +2 -2
- package/dist/{project-suspended-f53d45c9.cjs.prod.js → project-suspended-1f94c722.cjs.prod.js} +2 -2
- package/dist/{project-suspended-62a1b681.cjs.dev.js → project-suspended-d028eced.cjs.dev.js} +2 -2
- package/dist/{quick-access-3516dd17.cjs.dev.js → quick-access-08a2f835.cjs.dev.js} +1 -1
- package/dist/{quick-access-17179da4.esm.js → quick-access-11418f11.esm.js} +1 -1
- package/dist/{quick-access-713ed6cf.cjs.prod.js → quick-access-ecbaedf9.cjs.prod.js} +1 -1
- package/dist/{redirect-to-logout-ea121e87.cjs.prod.js → redirect-to-logout-2418d058.cjs.prod.js} +1 -1
- package/dist/{redirect-to-logout-47da024e.esm.js → redirect-to-logout-7fb8c085.esm.js} +1 -1
- package/dist/{redirect-to-logout-66d5d228.cjs.dev.js → redirect-to-logout-8cbbf5b3.cjs.dev.js} +1 -1
- package/dist/{requests-in-flight-loader-ffbb439c.cjs.dev.js → requests-in-flight-loader-41d05ebb.cjs.dev.js} +1 -1
- package/dist/{requests-in-flight-loader-a92766d3.cjs.prod.js → requests-in-flight-loader-7580242c.cjs.prod.js} +1 -1
- package/dist/{requests-in-flight-loader-788c3b51.esm.js → requests-in-flight-loader-9400ad17.esm.js} +1 -1
- package/dist/{service-page-project-switcher-4c79de0a.cjs.prod.js → service-page-project-switcher-3343ea60.cjs.prod.js} +1 -1
- package/dist/{service-page-project-switcher-1609cf1c.cjs.dev.js → service-page-project-switcher-c2446f31.cjs.dev.js} +1 -1
- package/dist/{service-page-project-switcher-2c199df9.esm.js → service-page-project-switcher-f7058ef7.esm.js} +1 -1
- package/dist/{version-tracker-7c9070d6.cjs.dev.js → version-tracker-0c067072.cjs.dev.js} +1 -1
- package/dist/{version-tracker-97ea0c67.cjs.prod.js → version-tracker-abf7b029.cjs.prod.js} +1 -1
- package/dist/{version-tracker-d42aafd6.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-cc53ff72.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; }
|
|
@@ -1750,7 +1750,8 @@ function CustomViewShellAuthenticated(props) {
|
|
|
1750
1750
|
environment: props.environment,
|
|
1751
1751
|
children: jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1752
1752
|
children: [jsxRuntime.jsx(designSystem.ThemeProvider, {
|
|
1753
|
-
theme: "default"
|
|
1753
|
+
theme: "default",
|
|
1754
|
+
themeOverrides: applicationComponents.themesOverrides.default
|
|
1754
1755
|
}), jsxRuntime.jsx(FetchProject, {
|
|
1755
1756
|
projectKey: props.projectKey,
|
|
1756
1757
|
children: _ref3 => {
|
|
@@ -1789,6 +1790,35 @@ CustomViewShellAuthenticated.propTypes = process.env.NODE_ENV !== "production" ?
|
|
|
1789
1790
|
} : {};
|
|
1790
1791
|
|
|
1791
1792
|
const browserLocale = getBrowserLocale(window);
|
|
1793
|
+
function NotificationsContainer(props) {
|
|
1794
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1795
|
+
children: [jsxRuntime.jsxs("div", {
|
|
1796
|
+
ref: props.notificationsGlobalRef,
|
|
1797
|
+
role: "region",
|
|
1798
|
+
"aria-live": "polite",
|
|
1799
|
+
style: {
|
|
1800
|
+
gridRow: 1,
|
|
1801
|
+
gridColumn: '1/3'
|
|
1802
|
+
},
|
|
1803
|
+
children: [jsxRuntime.jsx("div", {
|
|
1804
|
+
id: "above-top-navigation"
|
|
1805
|
+
}), jsxRuntime.jsx(reactNotifications.NotificationsList, {
|
|
1806
|
+
domain: constants.DOMAINS.GLOBAL
|
|
1807
|
+
})]
|
|
1808
|
+
}), jsxRuntime.jsx("div", {
|
|
1809
|
+
ref: props.notificationsPageRef,
|
|
1810
|
+
children: jsxRuntime.jsx(reactNotifications.NotificationsList, {
|
|
1811
|
+
domain: constants.DOMAINS.PAGE
|
|
1812
|
+
})
|
|
1813
|
+
}), jsxRuntime.jsx(reactNotifications.NotificationsList, {
|
|
1814
|
+
domain: constants.DOMAINS.SIDE
|
|
1815
|
+
})]
|
|
1816
|
+
});
|
|
1817
|
+
}
|
|
1818
|
+
NotificationsContainer.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
1819
|
+
notificationsGlobalRef: _pt__default["default"].any.isRequired,
|
|
1820
|
+
notificationsPageRef: _pt__default["default"].any.isRequired
|
|
1821
|
+
} : {};
|
|
1792
1822
|
function StrictModeEnablement(props) {
|
|
1793
1823
|
if (props.enableReactStrictMode) {
|
|
1794
1824
|
return jsxRuntime.jsx(react.StrictMode, {
|
|
@@ -1800,10 +1830,17 @@ function StrictModeEnablement(props) {
|
|
|
1800
1830
|
});
|
|
1801
1831
|
}
|
|
1802
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
|
+
*/
|
|
1803
1839
|
StrictModeEnablement.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
1804
1840
|
enableReactStrictMode: _pt__default["default"].bool,
|
|
1805
1841
|
children: _pt__default["default"].node
|
|
1806
1842
|
} : {};
|
|
1843
|
+
const isLocalProdMode = process.env.NODE_ENV === 'production' && window.app.env === 'development';
|
|
1807
1844
|
function CustomViewShell(props) {
|
|
1808
1845
|
var _window$app$__DEVELOP;
|
|
1809
1846
|
const _useState = react.useState(),
|
|
@@ -1811,6 +1848,12 @@ function CustomViewShell(props) {
|
|
|
1811
1848
|
hostContext = _useState2[0],
|
|
1812
1849
|
setHostContext = _useState2[1];
|
|
1813
1850
|
const iFrameCommunicationPort = react.useRef();
|
|
1851
|
+
const notificationsGlobalRef = react.useRef(null);
|
|
1852
|
+
const notificationsPageRef = react.useRef(null);
|
|
1853
|
+
const layoutRefs = react.useRef({
|
|
1854
|
+
notificationsGlobalRef,
|
|
1855
|
+
notificationsPageRef
|
|
1856
|
+
});
|
|
1814
1857
|
const hostMessageHandler = react.useCallback(event => {
|
|
1815
1858
|
if (event.data.eventName === constants.CUSTOM_VIEWS_EVENTS_NAMES.CUSTOM_VIEW_INITIALIZATION) {
|
|
1816
1859
|
setHostContext(event.data.eventData.context);
|
|
@@ -1854,41 +1897,54 @@ function CustomViewShell(props) {
|
|
|
1854
1897
|
showLogo: true
|
|
1855
1898
|
});
|
|
1856
1899
|
}
|
|
1857
|
-
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;
|
|
1858
|
-
return jsxRuntime.
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
dataLocale: hostContext.dataLocale,
|
|
1870
|
-
environment: window.app,
|
|
1871
|
-
messages: props.applicationMessages,
|
|
1872
|
-
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,
|
|
1873
1912
|
customViewConfig: hostContext.customViewConfig,
|
|
1874
|
-
children:
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
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
|
+
})
|
|
1888
1931
|
});
|
|
1889
1932
|
}
|
|
1890
|
-
|
|
1891
|
-
|
|
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
|
+
})]
|
|
1892
1948
|
});
|
|
1893
1949
|
}
|
|
1894
1950
|
CustomViewShell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -1898,7 +1954,7 @@ CustomViewShell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1898
1954
|
children: _pt__default["default"].node.isRequired
|
|
1899
1955
|
} : {};
|
|
1900
1956
|
const CustomViewShellWrapper = props => {
|
|
1901
|
-
if (process.env.NODE_ENV === 'development' && !props.disableDevHost) {
|
|
1957
|
+
if ((process.env.NODE_ENV === 'development' || isLocalProdMode) && !props.disableDevHost) {
|
|
1902
1958
|
return jsxRuntime.jsx(StrictModeEnablement, {
|
|
1903
1959
|
enableReactStrictMode: props.enableReactStrictMode,
|
|
1904
1960
|
children: jsxRuntime.jsx(react.Suspense, {
|