@commercetools-frontend/application-shell 22.8.3 → 22.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{application-entry-point-dbbccce1.esm.js → application-entry-point-3613e4a5.esm.js} +1 -1
- package/dist/{application-entry-point-a5e4db17.cjs.prod.js → application-entry-point-bde45acf.cjs.prod.js} +2 -2
- package/dist/{application-entry-point-52223768.cjs.dev.js → application-entry-point-fd6f9973.cjs.dev.js} +2 -2
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +90 -68
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +90 -68
- package/dist/commercetools-frontend-application-shell.esm.js +43 -53
- package/dist/{custom-view-dev-host-9b43261f.esm.js → custom-view-dev-host-5ce5a507.esm.js} +17 -27
- package/dist/{custom-view-dev-host-a392d222.cjs.dev.js → custom-view-dev-host-621386e0.cjs.dev.js} +18 -28
- package/dist/declarations/src/components/navbar/use-navbar-state-manager.d.ts +1 -1
- package/dist/declarations/src/components/quick-access/types.d.ts +1 -1
- package/dist/declarations/src/components/user-settings-menu/index.d.ts +1 -1
- package/dist/declarations/src/constants.d.ts +7 -41
- package/dist/declarations/src/export-types.d.ts +1 -2
- package/dist/declarations/src/index.d.ts +1 -5
- package/dist/declarations/src/types/generated/settings.d.ts +223 -29
- package/dist/declarations/src/utils/index.d.ts +0 -5
- package/dist/index-37a25e51.cjs.dev.js +232 -0
- package/dist/index-6cd618cc.cjs.prod.js +232 -0
- package/dist/index-89e5711a.esm.js +206 -0
- package/dist/{index-4a75865e.cjs.prod.js → index-beeb5dbb.cjs.prod.js} +64 -195
- package/dist/index-c0b19086.cjs.dev.js +2081 -0
- package/dist/index-e6cf101e.esm.js +2019 -0
- package/dist/{navbar-b29ac568.esm.js → navbar-1d867dcd.esm.js} +50 -50
- package/dist/{navbar-48952f4b.cjs.dev.js → navbar-5d636a16.cjs.dev.js} +56 -56
- package/dist/{navbar-d62e53a4.cjs.prod.js → navbar-78f58680.cjs.prod.js} +46 -51
- package/dist/{oidc-a55e3dd9.cjs.prod.js → oidc-0c6ca06c.cjs.dev.js} +48 -7
- package/dist/{oidc-db881d40.esm.js → oidc-95696f7b.esm.js} +37 -2
- package/dist/{oidc-97f361cb.cjs.dev.js → oidc-b2ac8a92.cjs.prod.js} +48 -7
- package/dist/{oidc-callback-2f5b05ea.cjs.prod.js → oidc-callback-27fd978b.cjs.prod.js} +22 -32
- package/dist/{oidc-callback-1f9ca05f.esm.js → oidc-callback-7e6fcaff.esm.js} +22 -32
- package/dist/{oidc-callback-0a74a7dc.cjs.dev.js → oidc-callback-9d5cdf00.cjs.dev.js} +22 -32
- package/dist/{project-container-c4ebe8aa.cjs.dev.js → project-container-0ef3869c.cjs.dev.js} +26 -36
- package/dist/{project-container-a3deaee5.esm.js → project-container-b189c7a3.esm.js} +22 -32
- package/dist/{project-container-9641544a.cjs.prod.js → project-container-c6fb1e4f.cjs.prod.js} +26 -36
- package/dist/{project-expired-bd8619e1.cjs.prod.js → project-expired-911e2f79.cjs.prod.js} +20 -30
- package/dist/{project-expired-d6299039.esm.js → project-expired-bd4f93bc.esm.js} +20 -30
- package/dist/{project-expired-67bdb8ed.cjs.dev.js → project-expired-e2815596.cjs.dev.js} +20 -30
- package/dist/{project-not-found-7131fe47.esm.js → project-not-found-bfd9a058.esm.js} +20 -30
- package/dist/{project-not-found-6a440b40.cjs.dev.js → project-not-found-c0f09321.cjs.dev.js} +20 -30
- package/dist/{project-not-found-2fd77390.cjs.prod.js → project-not-found-e5255cac.cjs.prod.js} +20 -30
- package/dist/{project-not-initialized-888415dd.cjs.dev.js → project-not-initialized-0ed0f209.cjs.dev.js} +20 -30
- package/dist/{project-not-initialized-91e2d49f.cjs.prod.js → project-not-initialized-2b02f3bb.cjs.prod.js} +20 -30
- package/dist/{project-not-initialized-ac8b0f01.esm.js → project-not-initialized-8d0cab2e.esm.js} +20 -30
- package/dist/{project-suspended-90cd41ac.cjs.dev.js → project-suspended-94956aec.cjs.dev.js} +20 -30
- package/dist/{project-suspended-3bf9e6e2.esm.js → project-suspended-cee209a6.esm.js} +20 -30
- package/dist/{project-suspended-8ea83f97.cjs.prod.js → project-suspended-cfa2eb3b.cjs.prod.js} +20 -30
- package/dist/{quick-access-7859d40c.cjs.dev.js → quick-access-1b73b555.cjs.dev.js} +13 -23
- package/dist/{quick-access-13fcd04a.esm.js → quick-access-232ff40f.esm.js} +13 -23
- package/dist/{quick-access-d5b833d4.cjs.prod.js → quick-access-ce774311.cjs.prod.js} +13 -23
- package/dist/{redirect-to-login-45587473.esm.js → redirect-to-login-9535ddbc.esm.js} +9 -46
- package/dist/{redirect-to-login-9f939764.cjs.dev.js → redirect-to-login-aa538da2.cjs.dev.js} +10 -47
- package/dist/{redirect-to-login-96f9b90c.cjs.prod.js → redirect-to-login-ee9f3801.cjs.prod.js} +10 -47
- package/dist/{redirect-to-logout-3becf8fb.esm.js → redirect-to-logout-3a0798c1.esm.js} +21 -31
- package/dist/{redirect-to-logout-2eb95761.cjs.prod.js → redirect-to-logout-96e94d9d.cjs.prod.js} +21 -31
- package/dist/{redirect-to-logout-b3015931.cjs.dev.js → redirect-to-logout-ccdd9a48.cjs.dev.js} +21 -31
- package/dist/{requests-in-flight-loader-02cdbb97.cjs.prod.js → requests-in-flight-loader-7f4804b4.cjs.prod.js} +22 -32
- package/dist/{requests-in-flight-loader-df478973.esm.js → requests-in-flight-loader-8333ff01.esm.js} +22 -32
- package/dist/{requests-in-flight-loader-b5e014a6.cjs.dev.js → requests-in-flight-loader-b48dcc38.cjs.dev.js} +22 -32
- package/dist/{service-page-project-switcher-6bee2a11.cjs.prod.js → service-page-project-switcher-d656d2f0.cjs.prod.js} +1 -1
- package/dist/{service-page-project-switcher-7021623b.esm.js → service-page-project-switcher-dd1d0479.esm.js} +1 -1
- package/dist/{service-page-project-switcher-1059771d.cjs.dev.js → service-page-project-switcher-ea2d1f5b.cjs.dev.js} +1 -1
- package/dist/{use-applications-menu-d9c5a942.cjs.dev.js → use-applications-menu-10d6d71b.cjs.prod.js} +1 -2
- package/dist/{use-applications-menu-44c909ae.esm.js → use-applications-menu-902e4f5f.esm.js} +1 -2
- package/dist/{use-applications-menu-b3754808.cjs.prod.js → use-applications-menu-c03f484f.cjs.dev.js} +1 -2
- package/dist/{user-settings-menu-007b5fc6.esm.js → user-settings-menu-5841d422.esm.js} +2 -62
- package/dist/{user-settings-menu-40649589.cjs.dev.js → user-settings-menu-59dbf5d2.cjs.dev.js} +3 -63
- package/dist/{user-settings-menu-83aa2470.cjs.prod.js → user-settings-menu-70751be9.cjs.prod.js} +3 -63
- package/dist/{version-tracker-ac87bd0d.esm.js → version-tracker-8e09ba95.esm.js} +44 -16
- package/dist/{version-tracker-b30517eb.cjs.dev.js → version-tracker-b14edb65.cjs.prod.js} +45 -17
- package/dist/{version-tracker-3b334a55.cjs.prod.js → version-tracker-e862fb1a.cjs.dev.js} +45 -17
- package/package.json +18 -21
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.dev.js +1 -2
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.prod.js +1 -2
- package/ssr/dist/commercetools-frontend-application-shell-ssr.esm.js +1 -2
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.dev.js +5 -26
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +5 -26
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +3 -24
- package/dist/configure-apollo-881e73b2.cjs.dev.js +0 -821
- package/dist/configure-apollo-a9f36ac3.cjs.prod.js +0 -815
- package/dist/configure-apollo-dc168d1e.esm.js +0 -765
- package/dist/constants-0b9c2426.esm.js +0 -68
- package/dist/constants-0da1db32.cjs.prod.js +0 -78
- package/dist/constants-bef5a843.cjs.dev.js +0 -78
- package/dist/declarations/src/apollo-links/error-link.d.ts +0 -2
- package/dist/declarations/src/apollo-links/header-link.d.ts +0 -3
- package/dist/declarations/src/apollo-links/index.d.ts +0 -4
- package/dist/declarations/src/apollo-links/token-retry-link.d.ts +0 -3
- package/dist/declarations/src/apollo-links/utils.d.ts +0 -10
- package/dist/declarations/src/components/custom-view-loader/custom-view-loader.d.ts +0 -8
- package/dist/declarations/src/components/custom-view-loader/index.d.ts +0 -1
- package/dist/declarations/src/components/custom-view-loader/messages.d.ts +0 -7
- package/dist/declarations/src/configure-apollo.d.ts +0 -7
- package/dist/declarations/src/hooks/apollo-hooks/apollo-hooks.d.ts +0 -13
- package/dist/declarations/src/hooks/apollo-hooks/index.d.ts +0 -1
- package/dist/declarations/src/utils/apollo-client-runtime-cache.d.ts +0 -4
- package/dist/declarations/src/utils/apollo-context.d.ts +0 -15
- package/dist/declarations/src/utils/get-correlation-id/get-correlation-id.d.ts +0 -3
- package/dist/declarations/src/utils/get-correlation-id/index.d.ts +0 -1
- package/dist/declarations/src/utils/http-client.d.ts +0 -31
- package/dist/declarations/src/utils/logger.d.ts +0 -10
- package/dist/declarations/src/utils/oidc-storage.d.ts +0 -11
- package/dist/declarations/src/utils/select-project-key-from-url/index.d.ts +0 -1
- package/dist/declarations/src/utils/select-project-key-from-url/select-project-key-from-url.d.ts +0 -1
- package/dist/declarations/src/utils/select-team-id-from-storage/index.d.ts +0 -1
- package/dist/declarations/src/utils/select-team-id-from-storage/select-team-id-from-storage.d.ts +0 -1
- package/dist/declarations/src/utils/select-user-id/index.d.ts +0 -1
- package/dist/declarations/src/utils/select-user-id/select-user-id.d.ts +0 -1
- package/dist/index-3081e563.esm.js +0 -2159
- package/dist/index-85533f79.cjs.dev.js +0 -2225
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
4
|
+
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
5
|
+
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
6
|
+
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
7
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
8
|
+
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
9
|
+
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
10
|
+
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
11
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
12
|
+
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
13
|
+
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
14
|
+
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
15
|
+
var _Reflect$has = require('@babel/runtime-corejs3/core-js-stable/reflect/has');
|
|
16
|
+
var toolkit = require('@reduxjs/toolkit');
|
|
17
|
+
var mapValues = require('lodash/mapValues');
|
|
18
|
+
var omitEmpty = require('omit-empty-es');
|
|
19
|
+
var thunk = require('redux-thunk');
|
|
20
|
+
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
21
|
+
var constants = require('@commercetools-frontend/constants');
|
|
22
|
+
var notifications = require('@commercetools-frontend/notifications');
|
|
23
|
+
var sdk = require('@commercetools-frontend/sdk');
|
|
24
|
+
var react = require('react');
|
|
25
|
+
var _indexOfInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
|
|
26
|
+
var _sliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
27
|
+
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
28
|
+
var sentry = require('@commercetools-frontend/sentry');
|
|
29
|
+
var reactNotifications = require('@commercetools-frontend/react-notifications');
|
|
30
|
+
var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
31
|
+
var reduxLogger = require('redux-logger');
|
|
32
|
+
|
|
33
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
34
|
+
|
|
35
|
+
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
36
|
+
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
37
|
+
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
38
|
+
var _Object$getOwnPropertyDescriptor__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptor);
|
|
39
|
+
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
40
|
+
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
41
|
+
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
42
|
+
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
43
|
+
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
44
|
+
var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
45
|
+
var _Reflect$has__default = /*#__PURE__*/_interopDefault(_Reflect$has);
|
|
46
|
+
var mapValues__default = /*#__PURE__*/_interopDefault(mapValues);
|
|
47
|
+
var omitEmpty__default = /*#__PURE__*/_interopDefault(omitEmpty);
|
|
48
|
+
var thunk__default = /*#__PURE__*/_interopDefault(thunk);
|
|
49
|
+
var _indexOfInstanceProperty__default = /*#__PURE__*/_interopDefault(_indexOfInstanceProperty);
|
|
50
|
+
var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanceProperty);
|
|
51
|
+
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
52
|
+
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
53
|
+
|
|
54
|
+
const isShowRequestInFlightAction = action => action.type === constants.SHOW_LOADING;
|
|
55
|
+
const isHideRequestInFlightAction = action => action.type === constants.HIDE_LOADING;
|
|
56
|
+
const excludeFirstOccurrence = (list, item) => {
|
|
57
|
+
const index = _indexOfInstanceProperty__default["default"](list).call(list, item);
|
|
58
|
+
return [..._sliceInstanceProperty__default["default"](list).call(list, 0, index), ..._sliceInstanceProperty__default["default"](list).call(list, index + 1)];
|
|
59
|
+
};
|
|
60
|
+
var requestsInFlightReducer = ((requestsInFlight, action) => {
|
|
61
|
+
if (!requestsInFlight || !action) return [];
|
|
62
|
+
if (isShowRequestInFlightAction(action)) return [...requestsInFlight, action.payload];
|
|
63
|
+
if (isHideRequestInFlightAction(action)) {
|
|
64
|
+
// may only remove first occurence
|
|
65
|
+
if (!_includesInstanceProperty__default["default"](requestsInFlight).call(requestsInFlight, action.payload)) {
|
|
66
|
+
sentry.reportErrorToSentry(new Error("Tried to hide \"".concat(action.payload, "\", but it was not progressing!")));
|
|
67
|
+
return requestsInFlight;
|
|
68
|
+
}
|
|
69
|
+
return excludeFirstOccurrence(requestsInFlight, action.payload);
|
|
70
|
+
}
|
|
71
|
+
return requestsInFlight;
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const isAddNotificationErrorAction = action => {
|
|
75
|
+
const errorAction = action;
|
|
76
|
+
return errorAction.type === notifications.ADD_NOTIFICATION && errorAction.payload && (errorAction.payload.kind === constants.NOTIFICATION_KINDS_PAGE['api-error'] || errorAction.payload.kind === constants.NOTIFICATION_KINDS_PAGE['unexpected-error']);
|
|
77
|
+
};
|
|
78
|
+
const isHideAllNotificationsAction = action => action.type === constants.HIDE_ALL_PAGE_NOTIFICATIONS;
|
|
79
|
+
const hideNotificationsMiddleware = _ref => {
|
|
80
|
+
let getState = _ref.getState;
|
|
81
|
+
return next => action => {
|
|
82
|
+
if (isHideAllNotificationsAction(action) || isAddNotificationErrorAction(action)) {
|
|
83
|
+
var _context;
|
|
84
|
+
const state = getState();
|
|
85
|
+
_forEachInstanceProperty__default["default"](_context = reactNotifications.selectPageNotifications(state)).call(_context, notification => {
|
|
86
|
+
next(notifications.removeNotification(notification.id));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return next(action);
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const loggerMiddleware = reduxLogger.createLogger({
|
|
94
|
+
logger: applicationShellConnectors.logger,
|
|
95
|
+
collapsed: true,
|
|
96
|
+
colors: {
|
|
97
|
+
title: () => '#000000',
|
|
98
|
+
prevState: () => '#9E9E9E',
|
|
99
|
+
action: () => '#03A9F4',
|
|
100
|
+
nextState: () => '#4CAF50',
|
|
101
|
+
error: () => '#F20404'
|
|
102
|
+
},
|
|
103
|
+
// WARNING: Enabling this option causes huge performance degradation.
|
|
104
|
+
// Only enable if you want detailed debugging.
|
|
105
|
+
diff: false,
|
|
106
|
+
predicate: (_getState, action) => {
|
|
107
|
+
if (!action) return false;
|
|
108
|
+
const type = action.type,
|
|
109
|
+
payload = action.payload;
|
|
110
|
+
if (!type) return false;
|
|
111
|
+
if (_startsWithInstanceProperty__default["default"](type).call(type, 'SHOW_') || _startsWithInstanceProperty__default["default"](type).call(type, 'HIDE_') || _startsWithInstanceProperty__default["default"](type).call(type, 'APOLLO_')) return false;
|
|
112
|
+
switch (type) {
|
|
113
|
+
case notifications.REMOVE_NOTIFICATION:
|
|
114
|
+
return false;
|
|
115
|
+
case notifications.ADD_NOTIFICATION:
|
|
116
|
+
{
|
|
117
|
+
const ignoredKinds = ['api-error', 'unexpected-error'];
|
|
118
|
+
return !_includesInstanceProperty__default["default"](ignoredKinds).call(ignoredKinds, payload.kind);
|
|
119
|
+
}
|
|
120
|
+
default:
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
function ownKeys(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; }
|
|
127
|
+
function _objectSpread(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(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(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
128
|
+
const mergeObjectValues = object => {
|
|
129
|
+
var _context;
|
|
130
|
+
return _reduceInstanceProperty__default["default"](_context = _Object$entries__default["default"](object)).call(_context, (acc, _ref) => {
|
|
131
|
+
let _ref2 = _slicedToArray(_ref, 2),
|
|
132
|
+
value = _ref2[1];
|
|
133
|
+
return _objectSpread(_objectSpread({}, acc), value);
|
|
134
|
+
}, {});
|
|
135
|
+
};
|
|
136
|
+
const patchedGetCorrelationId = () => applicationShellConnectors.getCorrelationId({
|
|
137
|
+
userId: applicationShellConnectors.selectUserId()
|
|
138
|
+
});
|
|
139
|
+
const getAdditionalHeaders = () => {
|
|
140
|
+
const sessionToken = applicationShellConnectors.oidcStorage.getSessionToken();
|
|
141
|
+
return omitEmpty__default["default"]({
|
|
142
|
+
[constants.SUPPORTED_HEADERS.AUTHORIZATION]: sessionToken ? "Bearer ".concat(sessionToken) : undefined,
|
|
143
|
+
[constants.SUPPORTED_HEADERS.X_APPLICATION_ID]: window.app.applicationIdentifier,
|
|
144
|
+
[constants.SUPPORTED_HEADERS.X_CUSTOM_VIEW_ID]: window.app.customViewId,
|
|
145
|
+
[constants.SUPPORTED_HEADERS.X_TEAM_ID]: applicationShellConnectors.selectTeamIdFromStorage()
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
const sdkMiddleware = sdk.createMiddleware({
|
|
149
|
+
getCorrelationId: patchedGetCorrelationId,
|
|
150
|
+
getProjectKey: applicationShellConnectors.selectProjectKeyFromUrl,
|
|
151
|
+
getAdditionalHeaders
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @deprecated: This function should not be used directly anymore.
|
|
156
|
+
*/
|
|
157
|
+
const applyDefaultMiddlewares = function () {
|
|
158
|
+
for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
159
|
+
middlewares[_key] = arguments[_key];
|
|
160
|
+
}
|
|
161
|
+
return toolkit.applyMiddleware(...middlewares, thunk__default["default"], loggerMiddleware);
|
|
162
|
+
};
|
|
163
|
+
const createInternalReducer = function () {
|
|
164
|
+
let injectedReducers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
165
|
+
let preloadedState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
166
|
+
// not providing preloadedStateReducers to combineReducers will cause an error
|
|
167
|
+
// when preloadedState contains keys other than requestsInFlight and
|
|
168
|
+
// notifications:
|
|
169
|
+
// Unexpected key "new Key" found in preloadedState argument passed to createStore. Expected to find one of the known reducer keys instead: "requestsInFlight", "notifications". Unexpected keys will be ignored.
|
|
170
|
+
// https://redux.js.org/api/createstore#createstorereducer-preloadedstate-enhancer
|
|
171
|
+
const preloadedStateReducers = mapValues__default["default"](preloadedState, value => () => value);
|
|
172
|
+
|
|
173
|
+
// NOTE: since we don't know in advance which reducers will be injected,
|
|
174
|
+
// we pass an `unknown` type to express this uncertainty and make the compiler happy.
|
|
175
|
+
return toolkit.combineReducers(_objectSpread(_objectSpread({
|
|
176
|
+
requestsInFlight: requestsInFlightReducer,
|
|
177
|
+
notifications: notifications.reducer
|
|
178
|
+
}, injectedReducers), preloadedStateReducers));
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
// We use a factory as it's more practicable for tests
|
|
182
|
+
// The application can import the configured store (the default export)
|
|
183
|
+
const createReduxStore = function () {
|
|
184
|
+
let preloadedState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
185
|
+
let additionalMiddlewares = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
186
|
+
const store = toolkit.configureStore({
|
|
187
|
+
preloadedState,
|
|
188
|
+
reducer: createInternalReducer(undefined, preloadedState),
|
|
189
|
+
devTools: {
|
|
190
|
+
actionsDenylist: [constants.SHOW_LOADING, constants.HIDE_LOADING]
|
|
191
|
+
},
|
|
192
|
+
middleware: getDefaultMiddleware => [...additionalMiddlewares, hideNotificationsMiddleware, notifications.middleware, sdkMiddleware, ...getDefaultMiddleware({
|
|
193
|
+
// https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data
|
|
194
|
+
serializableCheck: false,
|
|
195
|
+
// This default check is logging warnings to console for some MC FE tests, probably
|
|
196
|
+
// due to lower resources when running tests on CI.
|
|
197
|
+
// We don't consider this check to be very valuable in this context so we decided
|
|
198
|
+
// to turn it off.
|
|
199
|
+
// https://redux-toolkit.js.org/api/immutabilityMiddleware
|
|
200
|
+
immutableCheck: false
|
|
201
|
+
}), loggerMiddleware]
|
|
202
|
+
});
|
|
203
|
+
const enhancedStore = store;
|
|
204
|
+
|
|
205
|
+
// Enable reducers to be injected on runtime (see `<InjectReducer>`)
|
|
206
|
+
enhancedStore.injectedReducers = {};
|
|
207
|
+
enhancedStore.injectReducers = _ref3 => {
|
|
208
|
+
let id = _ref3.id,
|
|
209
|
+
reducers = _ref3.reducers;
|
|
210
|
+
const hasReducerBeenInjected = _Reflect$has__default["default"](enhancedStore.injectedReducers, id) && enhancedStore.injectedReducers[id] === reducers;
|
|
211
|
+
if (!hasReducerBeenInjected) {
|
|
212
|
+
// Keep track of the reducer by id, so we can check if it's been injected aleady
|
|
213
|
+
enhancedStore.injectedReducers[id] = reducers;
|
|
214
|
+
// ...when we create the new reducer though, we spread the reducers from each namespace
|
|
215
|
+
enhancedStore.replaceReducer(createInternalReducer(mergeObjectValues(enhancedStore.injectedReducers)));
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
enhancedStore.removeReducers = _ref4 => {
|
|
219
|
+
let id = _ref4.id;
|
|
220
|
+
delete enhancedStore.injectedReducers[id];
|
|
221
|
+
enhancedStore.replaceReducer(createInternalReducer(mergeObjectValues(enhancedStore.injectedReducers)));
|
|
222
|
+
};
|
|
223
|
+
return enhancedStore;
|
|
224
|
+
};
|
|
225
|
+
var internalReduxStore = createReduxStore();
|
|
226
|
+
|
|
227
|
+
const RouteCatchAll = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./route-catch-all-293a1269.cjs.dev.js' /* webpackChunkName: "route-catch-all" */); }));
|
|
228
|
+
|
|
229
|
+
exports.RouteCatchAll = RouteCatchAll;
|
|
230
|
+
exports.applyDefaultMiddlewares = applyDefaultMiddlewares;
|
|
231
|
+
exports.createReduxStore = createReduxStore;
|
|
232
|
+
exports.internalReduxStore = internalReduxStore;
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
4
|
+
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
5
|
+
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
6
|
+
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
7
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
8
|
+
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
9
|
+
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
10
|
+
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
11
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
12
|
+
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
13
|
+
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
14
|
+
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
15
|
+
var _Reflect$has = require('@babel/runtime-corejs3/core-js-stable/reflect/has');
|
|
16
|
+
var toolkit = require('@reduxjs/toolkit');
|
|
17
|
+
var mapValues = require('lodash/mapValues');
|
|
18
|
+
var omitEmpty = require('omit-empty-es');
|
|
19
|
+
var thunk = require('redux-thunk');
|
|
20
|
+
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
21
|
+
var constants = require('@commercetools-frontend/constants');
|
|
22
|
+
var notifications = require('@commercetools-frontend/notifications');
|
|
23
|
+
var sdk = require('@commercetools-frontend/sdk');
|
|
24
|
+
var react = require('react');
|
|
25
|
+
var _indexOfInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
|
|
26
|
+
var _sliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
27
|
+
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
28
|
+
var sentry = require('@commercetools-frontend/sentry');
|
|
29
|
+
var reactNotifications = require('@commercetools-frontend/react-notifications');
|
|
30
|
+
var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
31
|
+
var reduxLogger = require('redux-logger');
|
|
32
|
+
|
|
33
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
34
|
+
|
|
35
|
+
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
36
|
+
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
37
|
+
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
38
|
+
var _Object$getOwnPropertyDescriptor__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptor);
|
|
39
|
+
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
40
|
+
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
41
|
+
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
42
|
+
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
43
|
+
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
44
|
+
var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
45
|
+
var _Reflect$has__default = /*#__PURE__*/_interopDefault(_Reflect$has);
|
|
46
|
+
var mapValues__default = /*#__PURE__*/_interopDefault(mapValues);
|
|
47
|
+
var omitEmpty__default = /*#__PURE__*/_interopDefault(omitEmpty);
|
|
48
|
+
var thunk__default = /*#__PURE__*/_interopDefault(thunk);
|
|
49
|
+
var _indexOfInstanceProperty__default = /*#__PURE__*/_interopDefault(_indexOfInstanceProperty);
|
|
50
|
+
var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanceProperty);
|
|
51
|
+
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
52
|
+
var _startsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_startsWithInstanceProperty);
|
|
53
|
+
|
|
54
|
+
const isShowRequestInFlightAction = action => action.type === constants.SHOW_LOADING;
|
|
55
|
+
const isHideRequestInFlightAction = action => action.type === constants.HIDE_LOADING;
|
|
56
|
+
const excludeFirstOccurrence = (list, item) => {
|
|
57
|
+
const index = _indexOfInstanceProperty__default["default"](list).call(list, item);
|
|
58
|
+
return [..._sliceInstanceProperty__default["default"](list).call(list, 0, index), ..._sliceInstanceProperty__default["default"](list).call(list, index + 1)];
|
|
59
|
+
};
|
|
60
|
+
var requestsInFlightReducer = ((requestsInFlight, action) => {
|
|
61
|
+
if (!requestsInFlight || !action) return [];
|
|
62
|
+
if (isShowRequestInFlightAction(action)) return [...requestsInFlight, action.payload];
|
|
63
|
+
if (isHideRequestInFlightAction(action)) {
|
|
64
|
+
// may only remove first occurence
|
|
65
|
+
if (!_includesInstanceProperty__default["default"](requestsInFlight).call(requestsInFlight, action.payload)) {
|
|
66
|
+
sentry.reportErrorToSentry(new Error("Tried to hide \"".concat(action.payload, "\", but it was not progressing!")));
|
|
67
|
+
return requestsInFlight;
|
|
68
|
+
}
|
|
69
|
+
return excludeFirstOccurrence(requestsInFlight, action.payload);
|
|
70
|
+
}
|
|
71
|
+
return requestsInFlight;
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const isAddNotificationErrorAction = action => {
|
|
75
|
+
const errorAction = action;
|
|
76
|
+
return errorAction.type === notifications.ADD_NOTIFICATION && errorAction.payload && (errorAction.payload.kind === constants.NOTIFICATION_KINDS_PAGE['api-error'] || errorAction.payload.kind === constants.NOTIFICATION_KINDS_PAGE['unexpected-error']);
|
|
77
|
+
};
|
|
78
|
+
const isHideAllNotificationsAction = action => action.type === constants.HIDE_ALL_PAGE_NOTIFICATIONS;
|
|
79
|
+
const hideNotificationsMiddleware = _ref => {
|
|
80
|
+
let getState = _ref.getState;
|
|
81
|
+
return next => action => {
|
|
82
|
+
if (isHideAllNotificationsAction(action) || isAddNotificationErrorAction(action)) {
|
|
83
|
+
var _context;
|
|
84
|
+
const state = getState();
|
|
85
|
+
_forEachInstanceProperty__default["default"](_context = reactNotifications.selectPageNotifications(state)).call(_context, notification => {
|
|
86
|
+
next(notifications.removeNotification(notification.id));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return next(action);
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const loggerMiddleware = reduxLogger.createLogger({
|
|
94
|
+
logger: applicationShellConnectors.logger,
|
|
95
|
+
collapsed: true,
|
|
96
|
+
colors: {
|
|
97
|
+
title: () => '#000000',
|
|
98
|
+
prevState: () => '#9E9E9E',
|
|
99
|
+
action: () => '#03A9F4',
|
|
100
|
+
nextState: () => '#4CAF50',
|
|
101
|
+
error: () => '#F20404'
|
|
102
|
+
},
|
|
103
|
+
// WARNING: Enabling this option causes huge performance degradation.
|
|
104
|
+
// Only enable if you want detailed debugging.
|
|
105
|
+
diff: false,
|
|
106
|
+
predicate: (_getState, action) => {
|
|
107
|
+
if (!action) return false;
|
|
108
|
+
const type = action.type,
|
|
109
|
+
payload = action.payload;
|
|
110
|
+
if (!type) return false;
|
|
111
|
+
if (_startsWithInstanceProperty__default["default"](type).call(type, 'SHOW_') || _startsWithInstanceProperty__default["default"](type).call(type, 'HIDE_') || _startsWithInstanceProperty__default["default"](type).call(type, 'APOLLO_')) return false;
|
|
112
|
+
switch (type) {
|
|
113
|
+
case notifications.REMOVE_NOTIFICATION:
|
|
114
|
+
return false;
|
|
115
|
+
case notifications.ADD_NOTIFICATION:
|
|
116
|
+
{
|
|
117
|
+
const ignoredKinds = ['api-error', 'unexpected-error'];
|
|
118
|
+
return !_includesInstanceProperty__default["default"](ignoredKinds).call(ignoredKinds, payload.kind);
|
|
119
|
+
}
|
|
120
|
+
default:
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
function ownKeys(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; }
|
|
127
|
+
function _objectSpread(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(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(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
128
|
+
const mergeObjectValues = object => {
|
|
129
|
+
var _context;
|
|
130
|
+
return _reduceInstanceProperty__default["default"](_context = _Object$entries__default["default"](object)).call(_context, (acc, _ref) => {
|
|
131
|
+
let _ref2 = _slicedToArray(_ref, 2),
|
|
132
|
+
value = _ref2[1];
|
|
133
|
+
return _objectSpread(_objectSpread({}, acc), value);
|
|
134
|
+
}, {});
|
|
135
|
+
};
|
|
136
|
+
const patchedGetCorrelationId = () => applicationShellConnectors.getCorrelationId({
|
|
137
|
+
userId: applicationShellConnectors.selectUserId()
|
|
138
|
+
});
|
|
139
|
+
const getAdditionalHeaders = () => {
|
|
140
|
+
const sessionToken = applicationShellConnectors.oidcStorage.getSessionToken();
|
|
141
|
+
return omitEmpty__default["default"]({
|
|
142
|
+
[constants.SUPPORTED_HEADERS.AUTHORIZATION]: sessionToken ? "Bearer ".concat(sessionToken) : undefined,
|
|
143
|
+
[constants.SUPPORTED_HEADERS.X_APPLICATION_ID]: window.app.applicationIdentifier,
|
|
144
|
+
[constants.SUPPORTED_HEADERS.X_CUSTOM_VIEW_ID]: window.app.customViewId,
|
|
145
|
+
[constants.SUPPORTED_HEADERS.X_TEAM_ID]: applicationShellConnectors.selectTeamIdFromStorage()
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
const sdkMiddleware = sdk.createMiddleware({
|
|
149
|
+
getCorrelationId: patchedGetCorrelationId,
|
|
150
|
+
getProjectKey: applicationShellConnectors.selectProjectKeyFromUrl,
|
|
151
|
+
getAdditionalHeaders
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @deprecated: This function should not be used directly anymore.
|
|
156
|
+
*/
|
|
157
|
+
const applyDefaultMiddlewares = function () {
|
|
158
|
+
for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
159
|
+
middlewares[_key] = arguments[_key];
|
|
160
|
+
}
|
|
161
|
+
return toolkit.applyMiddleware(...middlewares, thunk__default["default"], loggerMiddleware);
|
|
162
|
+
};
|
|
163
|
+
const createInternalReducer = function () {
|
|
164
|
+
let injectedReducers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
165
|
+
let preloadedState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
166
|
+
// not providing preloadedStateReducers to combineReducers will cause an error
|
|
167
|
+
// when preloadedState contains keys other than requestsInFlight and
|
|
168
|
+
// notifications:
|
|
169
|
+
// Unexpected key "new Key" found in preloadedState argument passed to createStore. Expected to find one of the known reducer keys instead: "requestsInFlight", "notifications". Unexpected keys will be ignored.
|
|
170
|
+
// https://redux.js.org/api/createstore#createstorereducer-preloadedstate-enhancer
|
|
171
|
+
const preloadedStateReducers = mapValues__default["default"](preloadedState, value => () => value);
|
|
172
|
+
|
|
173
|
+
// NOTE: since we don't know in advance which reducers will be injected,
|
|
174
|
+
// we pass an `unknown` type to express this uncertainty and make the compiler happy.
|
|
175
|
+
return toolkit.combineReducers(_objectSpread(_objectSpread({
|
|
176
|
+
requestsInFlight: requestsInFlightReducer,
|
|
177
|
+
notifications: notifications.reducer
|
|
178
|
+
}, injectedReducers), preloadedStateReducers));
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
// We use a factory as it's more practicable for tests
|
|
182
|
+
// The application can import the configured store (the default export)
|
|
183
|
+
const createReduxStore = function () {
|
|
184
|
+
let preloadedState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
185
|
+
let additionalMiddlewares = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
186
|
+
const store = toolkit.configureStore({
|
|
187
|
+
preloadedState,
|
|
188
|
+
reducer: createInternalReducer(undefined, preloadedState),
|
|
189
|
+
devTools: {
|
|
190
|
+
actionsDenylist: [constants.SHOW_LOADING, constants.HIDE_LOADING]
|
|
191
|
+
},
|
|
192
|
+
middleware: getDefaultMiddleware => [...additionalMiddlewares, hideNotificationsMiddleware, notifications.middleware, sdkMiddleware, ...getDefaultMiddleware({
|
|
193
|
+
// https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data
|
|
194
|
+
serializableCheck: false,
|
|
195
|
+
// This default check is logging warnings to console for some MC FE tests, probably
|
|
196
|
+
// due to lower resources when running tests on CI.
|
|
197
|
+
// We don't consider this check to be very valuable in this context so we decided
|
|
198
|
+
// to turn it off.
|
|
199
|
+
// https://redux-toolkit.js.org/api/immutabilityMiddleware
|
|
200
|
+
immutableCheck: false
|
|
201
|
+
}), loggerMiddleware]
|
|
202
|
+
});
|
|
203
|
+
const enhancedStore = store;
|
|
204
|
+
|
|
205
|
+
// Enable reducers to be injected on runtime (see `<InjectReducer>`)
|
|
206
|
+
enhancedStore.injectedReducers = {};
|
|
207
|
+
enhancedStore.injectReducers = _ref3 => {
|
|
208
|
+
let id = _ref3.id,
|
|
209
|
+
reducers = _ref3.reducers;
|
|
210
|
+
const hasReducerBeenInjected = _Reflect$has__default["default"](enhancedStore.injectedReducers, id) && enhancedStore.injectedReducers[id] === reducers;
|
|
211
|
+
if (!hasReducerBeenInjected) {
|
|
212
|
+
// Keep track of the reducer by id, so we can check if it's been injected aleady
|
|
213
|
+
enhancedStore.injectedReducers[id] = reducers;
|
|
214
|
+
// ...when we create the new reducer though, we spread the reducers from each namespace
|
|
215
|
+
enhancedStore.replaceReducer(createInternalReducer(mergeObjectValues(enhancedStore.injectedReducers)));
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
enhancedStore.removeReducers = _ref4 => {
|
|
219
|
+
let id = _ref4.id;
|
|
220
|
+
delete enhancedStore.injectedReducers[id];
|
|
221
|
+
enhancedStore.replaceReducer(createInternalReducer(mergeObjectValues(enhancedStore.injectedReducers)));
|
|
222
|
+
};
|
|
223
|
+
return enhancedStore;
|
|
224
|
+
};
|
|
225
|
+
var internalReduxStore = createReduxStore();
|
|
226
|
+
|
|
227
|
+
const RouteCatchAll = /*#__PURE__*/react.lazy(() => Promise.resolve().then(function () { return require('./route-catch-all-373c69c6.cjs.prod.js' /* webpackChunkName: "route-catch-all" */); }));
|
|
228
|
+
|
|
229
|
+
exports.RouteCatchAll = RouteCatchAll;
|
|
230
|
+
exports.applyDefaultMiddlewares = applyDefaultMiddlewares;
|
|
231
|
+
exports.createReduxStore = createReduxStore;
|
|
232
|
+
exports.internalReduxStore = internalReduxStore;
|