@commercetools-frontend/application-shell 21.8.0 → 21.10.0
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-f22a0ec9.cjs.dev.js → application-entry-point-4de6686c.cjs.dev.js} +48 -14
- package/dist/{application-entry-point-dc4da815.cjs.prod.js → application-entry-point-9a23a345.cjs.prod.js} +48 -14
- package/dist/{application-entry-point-14c74303.esm.js → application-entry-point-a5b662f7.esm.js} +48 -16
- package/dist/commercetools-frontend-application-shell.cjs.dev.js +9 -4
- package/dist/commercetools-frontend-application-shell.cjs.prod.js +9 -4
- package/dist/commercetools-frontend-application-shell.esm.js +6 -4
- package/dist/{constants-3cf6ed64.esm.js → constants-a3c850be.esm.js} +4 -1
- package/dist/{constants-bf2e1d68.cjs.dev.js → constants-c2c238ff.cjs.prod.js} +4 -1
- package/dist/{constants-f34da47c.cjs.prod.js → constants-d9a5241e.cjs.dev.js} +4 -1
- package/dist/declarations/src/components/requests-in-flight-loader/reducer.d.ts +1 -1
- package/dist/declarations/src/configure-apollo.d.ts +2 -1
- package/dist/declarations/src/constants.d.ts +3 -0
- package/dist/declarations/src/export-types.d.ts +9 -0
- package/dist/declarations/src/index.d.ts +2 -0
- package/dist/declarations/src/test-utils/test-utils.d.ts +3 -3
- package/dist/declarations/src/types/generated/ctp.d.ts +603 -4
- package/dist/declarations/src/types/generated/mc.d.ts +11 -0
- package/dist/declarations/src/types/generated/settings.d.ts +104 -8
- package/dist/declarations/src/utils/get-previous-project-key/get-previous-project-key.d.ts +1 -1
- package/dist/declarations/src/utils/gtm.d.ts +3 -3
- package/dist/declarations/src/utils/http-client.d.ts +19 -0
- package/dist/declarations/src/utils/oidc-storage.d.ts +2 -2
- package/dist/{index-691497c4.esm.js → index-5062ecc2.esm.js} +254 -102
- package/dist/{index-b937ebec.cjs.prod.js → index-e96ff96a.cjs.prod.js} +257 -100
- package/dist/{index-b67a270d.cjs.dev.js → index-f576ae07.cjs.dev.js} +257 -100
- package/dist/{oidc-82e151f9.cjs.prod.js → oidc-5b507512.cjs.prod.js} +1 -1
- package/dist/{oidc-8af521ca.esm.js → oidc-5cae2dba.esm.js} +1 -1
- package/dist/{oidc-ff089e6f.cjs.dev.js → oidc-9134face.cjs.dev.js} +1 -1
- package/dist/{project-expired-3ff8b6af.cjs.dev.js → project-expired-1f22bb6e.cjs.dev.js} +7 -5
- package/dist/{project-expired-f6ee2c5a.cjs.prod.js → project-expired-3802e644.cjs.prod.js} +7 -5
- package/dist/{project-expired-af63adca.esm.js → project-expired-609688e8.esm.js} +7 -5
- package/dist/{project-not-found-4d6af409.cjs.prod.js → project-not-found-2bf5f586.cjs.dev.js} +7 -5
- package/dist/{project-not-found-0fb97434.cjs.dev.js → project-not-found-345a1103.cjs.prod.js} +7 -5
- package/dist/{project-not-found-a8ec89b8.esm.js → project-not-found-931cbb6b.esm.js} +7 -5
- package/dist/{project-not-initialized-1a4af9f3.cjs.dev.js → project-not-initialized-24d58aac.cjs.dev.js} +7 -5
- package/dist/{project-not-initialized-7fb913bb.esm.js → project-not-initialized-69a8f77c.esm.js} +7 -5
- package/dist/{project-not-initialized-e67beb94.cjs.prod.js → project-not-initialized-f840b682.cjs.prod.js} +7 -5
- package/dist/{project-suspended-dc511990.cjs.prod.js → project-suspended-283ebad8.cjs.prod.js} +7 -5
- package/dist/{project-suspended-a3e8e976.cjs.dev.js → project-suspended-a21d49f2.cjs.dev.js} +7 -5
- package/dist/{project-suspended-b8d28c48.esm.js → project-suspended-b650b271.esm.js} +7 -5
- package/dist/{quick-access-69f5ce27.esm.js → quick-access-193a477e.esm.js} +6 -4
- package/dist/{quick-access-3c5120c2.cjs.prod.js → quick-access-6368a1c1.cjs.prod.js} +6 -4
- package/dist/{quick-access-c71b6351.cjs.dev.js → quick-access-d42f4898.cjs.dev.js} +6 -4
- package/dist/{service-page-project-switcher-76aa47ce.cjs.dev.js → service-page-project-switcher-5d2bef22.cjs.dev.js} +1 -1
- package/dist/{service-page-project-switcher-7dcfaf3a.cjs.prod.js → service-page-project-switcher-5e28ee0f.cjs.prod.js} +1 -1
- package/dist/{service-page-project-switcher-dffc7091.esm.js → service-page-project-switcher-ea8878cf.esm.js} +1 -1
- package/package.json +41 -41
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.dev.js +2 -2
- package/ssr/dist/commercetools-frontend-application-shell-ssr.cjs.prod.js +2 -2
- package/ssr/dist/commercetools-frontend-application-shell-ssr.esm.js +2 -2
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.dev.js +2 -2
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.cjs.prod.js +2 -2
- package/test-utils/dist/commercetools-frontend-application-shell-test-utils.esm.js +2 -2
|
@@ -22,7 +22,7 @@ var omitEmpty = require('omit-empty-es');
|
|
|
22
22
|
var notifications = require('@commercetools-frontend/notifications');
|
|
23
23
|
var sdk = require('@commercetools-frontend/sdk');
|
|
24
24
|
var constants = require('@commercetools-frontend/constants');
|
|
25
|
-
var constants$1 = require('./constants-
|
|
25
|
+
var constants$1 = require('./constants-d9a5241e.cjs.dev.js');
|
|
26
26
|
var reactNotifications = require('@commercetools-frontend/react-notifications');
|
|
27
27
|
var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
28
28
|
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
@@ -101,7 +101,7 @@ var _pt__default = /*#__PURE__*/_interopDefault(_pt);
|
|
|
101
101
|
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
102
102
|
|
|
103
103
|
// NOTE: This string will be replaced on build time with the package version.
|
|
104
|
-
var version = "21.
|
|
104
|
+
var version = "21.10.0";
|
|
105
105
|
|
|
106
106
|
var isAddNotificationErrorAction = function isAddNotificationErrorAction(action) {
|
|
107
107
|
var errorAction = action;
|
|
@@ -699,6 +699,30 @@ var getAppliedForwardToHeaders = function getAppliedForwardToHeaders(apolloConte
|
|
|
699
699
|
|
|
700
700
|
return {};
|
|
701
701
|
};
|
|
702
|
+
|
|
703
|
+
var extractSessionTokenFromResponse = function extractSessionTokenFromResponse(context) {
|
|
704
|
+
var _context$response, _context$response$hea, _context$restResponse;
|
|
705
|
+
|
|
706
|
+
var refreshedSessionToken = (_context$response = context.response) === null || _context$response === void 0 ? void 0 : (_context$response$hea = _context$response.headers) === null || _context$response$hea === void 0 ? void 0 : _context$response$hea.get('x-refreshed-session-token');
|
|
707
|
+
|
|
708
|
+
if (refreshedSessionToken) {
|
|
709
|
+
return refreshedSessionToken !== null && refreshedSessionToken !== void 0 ? refreshedSessionToken : null;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
var restResponseWithRefreshTokenHeader = (_context$restResponse = context.restResponses) === null || _context$restResponse === void 0 ? void 0 : _findInstanceProperty__default["default"](_context$restResponse).call(_context$restResponse, function (response) {
|
|
713
|
+
var _response$headers;
|
|
714
|
+
|
|
715
|
+
return (_response$headers = response.headers) === null || _response$headers === void 0 ? void 0 : _response$headers.has('x-refreshed-session-token');
|
|
716
|
+
});
|
|
717
|
+
|
|
718
|
+
if (restResponseWithRefreshTokenHeader) {
|
|
719
|
+
var _restResponseWithRefr;
|
|
720
|
+
|
|
721
|
+
return (_restResponseWithRefr = restResponseWithRefreshTokenHeader.headers.get('x-refreshed-session-token')) !== null && _restResponseWithRefr !== void 0 ? _restResponseWithRefr : null;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
return null;
|
|
725
|
+
};
|
|
702
726
|
/* eslint-disable import/prefer-default-export */
|
|
703
727
|
// Use a middleware to update the request headers with the correct params.
|
|
704
728
|
|
|
@@ -712,7 +736,7 @@ var headerLink = new client.ApolloLink(function (operation, forward) {
|
|
|
712
736
|
if (!apolloContext.skipGraphQlTargetCheck && !isKnownGraphQlTarget(graphQlTarget)) throw new Error(_concatInstanceProperty__default["default"](_context3 = "GraphQL target \"".concat(graphQlTarget, "\" is missing (or is not supported) in operation \"")).call(_context3, operation.operationName, "\""));
|
|
713
737
|
/**
|
|
714
738
|
* NOTE:
|
|
715
|
-
* The project key is read from the url in a project related
|
|
739
|
+
* The project key is read from the url in a project related application context.
|
|
716
740
|
* This holds for most applications like `application-categories`, `application-discounts` etc.
|
|
717
741
|
* However, the `application-account` does not run with the project key being part of the url.
|
|
718
742
|
* As a result we allow passing the project key as a variable on the operation allowing
|
|
@@ -731,10 +755,8 @@ var headerLink = new client.ApolloLink(function (operation, forward) {
|
|
|
731
755
|
})), _defineProperty(_objectSpread4, constants$1.SUPPORTED_HEADERS.X_GRAPHQL_TARGET, graphQlTarget), _defineProperty(_objectSpread4, constants$1.SUPPORTED_HEADERS.X_GRAPHQL_OPERATION_NAME, operation.operationName), _defineProperty(_objectSpread4, constants$1.SUPPORTED_HEADERS.X_TEAM_ID, teamId), _defineProperty(_objectSpread4, constants$1.SUPPORTED_HEADERS.X_APPLICATION_ID, window.app.applicationId), _defineProperty(_objectSpread4, constants$1.SUPPORTED_HEADERS.X_FEATURE_FLAG, featureFlag), _objectSpread4), getAppliedForwardToHeaders(apolloContext)))
|
|
732
756
|
});
|
|
733
757
|
return _mapInstanceProperty__default["default"](_context4 = forward(operation)).call(_context4, function (response) {
|
|
734
|
-
var _context$response, _context$response$hea;
|
|
735
|
-
|
|
736
758
|
var context = operation.getContext();
|
|
737
|
-
var refreshedSessionToken = (
|
|
759
|
+
var refreshedSessionToken = extractSessionTokenFromResponse(context);
|
|
738
760
|
|
|
739
761
|
if (refreshedSessionToken) {
|
|
740
762
|
setActiveSession(refreshedSessionToken);
|
|
@@ -762,8 +784,6 @@ var tokenRetryLink = new retry.RetryLink({
|
|
|
762
784
|
}
|
|
763
785
|
});
|
|
764
786
|
|
|
765
|
-
var _context;
|
|
766
|
-
|
|
767
787
|
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
768
788
|
|
|
769
789
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$1(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$1(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
@@ -783,16 +803,28 @@ var httpLink = client.createHttpLink({
|
|
|
783
803
|
'x-user-agent': userAgent
|
|
784
804
|
},
|
|
785
805
|
fetch: fetch
|
|
786
|
-
});
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
806
|
+
});
|
|
807
|
+
|
|
808
|
+
var createApolloLink = function createApolloLink() {
|
|
809
|
+
var _context;
|
|
790
810
|
|
|
791
|
-
var
|
|
811
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
812
|
+
return (// The order of links is IMPORTANT!
|
|
813
|
+
// In the request-phase they are executed top to bottom.
|
|
814
|
+
// In the response/phase they are executed bottom to top.
|
|
815
|
+
// The `httpLink` is terminating so it must be last, while `tokenRetryLink` and `errorLink`
|
|
816
|
+
// wrap the links the their right.
|
|
817
|
+
client.from(_concatInstanceProperty__default["default"](_context = [headerLink]).call(_context, _toConsumableArray(options.restLink ? [options.restLink] : []), [// Must be before `tokenRetryLink`.
|
|
818
|
+
errorLink], _toConsumableArray(isLoggerEnabled() ? [loggerLink__default["default"]] : []), [// Must be after `errorLink`.
|
|
819
|
+
tokenRetryLink, // Must be last.
|
|
820
|
+
httpLink]))
|
|
821
|
+
);
|
|
822
|
+
}; // This custom merge function allows to merge two arrays of objects.
|
|
792
823
|
// The incoming list is what we need to update to, but we still need
|
|
793
824
|
// to ensure that existing cache elements are not removed but updated.
|
|
794
825
|
// This is usually the case when elements get removed.
|
|
795
826
|
|
|
827
|
+
|
|
796
828
|
var mergeArraysObjects = function mergeArraysObjects() {
|
|
797
829
|
var existing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
798
830
|
var incoming = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -827,7 +859,7 @@ var createApolloClient = function createApolloClient() {
|
|
|
827
859
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
828
860
|
var customCacheConfig = (_options$cache = options === null || options === void 0 ? void 0 : options.cache) !== null && _options$cache !== void 0 ? _options$cache : {};
|
|
829
861
|
return new client.ApolloClient({
|
|
830
|
-
link:
|
|
862
|
+
link: createApolloLink(options),
|
|
831
863
|
// https://www.apollographql.com/docs/react/caching/cache-configuration/
|
|
832
864
|
cache: new client.InMemoryCache(_objectSpread$1(_objectSpread$1({}, customCacheConfig), {}, {
|
|
833
865
|
// https://www.apollographql.com/docs/react/caching/cache-configuration/#generating-unique-identifiers
|
|
@@ -1020,9 +1052,11 @@ exports.clearSession = clearSession;
|
|
|
1020
1052
|
exports.createApolloClient = createApolloClient;
|
|
1021
1053
|
exports.createReduxStore = createReduxStore;
|
|
1022
1054
|
exports.getActiveProjectKey = getActiveProjectKey;
|
|
1055
|
+
exports.getCorrelationId = getCorrelationId;
|
|
1023
1056
|
exports.getMcApiUrl = getMcApiUrl;
|
|
1024
1057
|
exports.getSessionScope = getSessionScope;
|
|
1025
1058
|
exports.getSessionState = getSessionState;
|
|
1059
|
+
exports.getSessionToken = getSessionToken;
|
|
1026
1060
|
exports.internalReduxStore = internalReduxStore;
|
|
1027
1061
|
exports.location = location;
|
|
1028
1062
|
exports.logger = logger;
|
|
@@ -22,7 +22,7 @@ var omitEmpty = require('omit-empty-es');
|
|
|
22
22
|
var notifications = require('@commercetools-frontend/notifications');
|
|
23
23
|
var sdk = require('@commercetools-frontend/sdk');
|
|
24
24
|
var constants = require('@commercetools-frontend/constants');
|
|
25
|
-
var constants$1 = require('./constants-
|
|
25
|
+
var constants$1 = require('./constants-c2c238ff.cjs.prod.js');
|
|
26
26
|
var reactNotifications = require('@commercetools-frontend/react-notifications');
|
|
27
27
|
var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
28
28
|
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
@@ -100,7 +100,7 @@ var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
|
100
100
|
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
101
101
|
|
|
102
102
|
// NOTE: This string will be replaced on build time with the package version.
|
|
103
|
-
var version = "21.
|
|
103
|
+
var version = "21.10.0";
|
|
104
104
|
|
|
105
105
|
var isAddNotificationErrorAction = function isAddNotificationErrorAction(action) {
|
|
106
106
|
var errorAction = action;
|
|
@@ -690,6 +690,30 @@ var getAppliedForwardToHeaders = function getAppliedForwardToHeaders(apolloConte
|
|
|
690
690
|
|
|
691
691
|
return {};
|
|
692
692
|
};
|
|
693
|
+
|
|
694
|
+
var extractSessionTokenFromResponse = function extractSessionTokenFromResponse(context) {
|
|
695
|
+
var _context$response, _context$response$hea, _context$restResponse;
|
|
696
|
+
|
|
697
|
+
var refreshedSessionToken = (_context$response = context.response) === null || _context$response === void 0 ? void 0 : (_context$response$hea = _context$response.headers) === null || _context$response$hea === void 0 ? void 0 : _context$response$hea.get('x-refreshed-session-token');
|
|
698
|
+
|
|
699
|
+
if (refreshedSessionToken) {
|
|
700
|
+
return refreshedSessionToken !== null && refreshedSessionToken !== void 0 ? refreshedSessionToken : null;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
var restResponseWithRefreshTokenHeader = (_context$restResponse = context.restResponses) === null || _context$restResponse === void 0 ? void 0 : _findInstanceProperty__default["default"](_context$restResponse).call(_context$restResponse, function (response) {
|
|
704
|
+
var _response$headers;
|
|
705
|
+
|
|
706
|
+
return (_response$headers = response.headers) === null || _response$headers === void 0 ? void 0 : _response$headers.has('x-refreshed-session-token');
|
|
707
|
+
});
|
|
708
|
+
|
|
709
|
+
if (restResponseWithRefreshTokenHeader) {
|
|
710
|
+
var _restResponseWithRefr;
|
|
711
|
+
|
|
712
|
+
return (_restResponseWithRefr = restResponseWithRefreshTokenHeader.headers.get('x-refreshed-session-token')) !== null && _restResponseWithRefr !== void 0 ? _restResponseWithRefr : null;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
return null;
|
|
716
|
+
};
|
|
693
717
|
/* eslint-disable import/prefer-default-export */
|
|
694
718
|
// Use a middleware to update the request headers with the correct params.
|
|
695
719
|
|
|
@@ -703,7 +727,7 @@ var headerLink = new client.ApolloLink(function (operation, forward) {
|
|
|
703
727
|
if (!apolloContext.skipGraphQlTargetCheck && !isKnownGraphQlTarget(graphQlTarget)) throw new Error(_concatInstanceProperty__default["default"](_context3 = "GraphQL target \"".concat(graphQlTarget, "\" is missing (or is not supported) in operation \"")).call(_context3, operation.operationName, "\""));
|
|
704
728
|
/**
|
|
705
729
|
* NOTE:
|
|
706
|
-
* The project key is read from the url in a project related
|
|
730
|
+
* The project key is read from the url in a project related application context.
|
|
707
731
|
* This holds for most applications like `application-categories`, `application-discounts` etc.
|
|
708
732
|
* However, the `application-account` does not run with the project key being part of the url.
|
|
709
733
|
* As a result we allow passing the project key as a variable on the operation allowing
|
|
@@ -722,10 +746,8 @@ var headerLink = new client.ApolloLink(function (operation, forward) {
|
|
|
722
746
|
})), _defineProperty(_objectSpread4, constants$1.SUPPORTED_HEADERS.X_GRAPHQL_TARGET, graphQlTarget), _defineProperty(_objectSpread4, constants$1.SUPPORTED_HEADERS.X_GRAPHQL_OPERATION_NAME, operation.operationName), _defineProperty(_objectSpread4, constants$1.SUPPORTED_HEADERS.X_TEAM_ID, teamId), _defineProperty(_objectSpread4, constants$1.SUPPORTED_HEADERS.X_APPLICATION_ID, window.app.applicationId), _defineProperty(_objectSpread4, constants$1.SUPPORTED_HEADERS.X_FEATURE_FLAG, featureFlag), _objectSpread4), getAppliedForwardToHeaders(apolloContext)))
|
|
723
747
|
});
|
|
724
748
|
return _mapInstanceProperty__default["default"](_context4 = forward(operation)).call(_context4, function (response) {
|
|
725
|
-
var _context$response, _context$response$hea;
|
|
726
|
-
|
|
727
749
|
var context = operation.getContext();
|
|
728
|
-
var refreshedSessionToken = (
|
|
750
|
+
var refreshedSessionToken = extractSessionTokenFromResponse(context);
|
|
729
751
|
|
|
730
752
|
if (refreshedSessionToken) {
|
|
731
753
|
setActiveSession(refreshedSessionToken);
|
|
@@ -753,8 +775,6 @@ var tokenRetryLink = new retry.RetryLink({
|
|
|
753
775
|
}
|
|
754
776
|
});
|
|
755
777
|
|
|
756
|
-
var _context;
|
|
757
|
-
|
|
758
778
|
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
759
779
|
|
|
760
780
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$1(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$1(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
@@ -774,16 +794,28 @@ var httpLink = client.createHttpLink({
|
|
|
774
794
|
'x-user-agent': userAgent
|
|
775
795
|
},
|
|
776
796
|
fetch: fetch
|
|
777
|
-
});
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
797
|
+
});
|
|
798
|
+
|
|
799
|
+
var createApolloLink = function createApolloLink() {
|
|
800
|
+
var _context;
|
|
781
801
|
|
|
782
|
-
var
|
|
802
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
803
|
+
return (// The order of links is IMPORTANT!
|
|
804
|
+
// In the request-phase they are executed top to bottom.
|
|
805
|
+
// In the response/phase they are executed bottom to top.
|
|
806
|
+
// The `httpLink` is terminating so it must be last, while `tokenRetryLink` and `errorLink`
|
|
807
|
+
// wrap the links the their right.
|
|
808
|
+
client.from(_concatInstanceProperty__default["default"](_context = [headerLink]).call(_context, _toConsumableArray(options.restLink ? [options.restLink] : []), [// Must be before `tokenRetryLink`.
|
|
809
|
+
errorLink], _toConsumableArray(isLoggerEnabled() ? [loggerLink__default["default"]] : []), [// Must be after `errorLink`.
|
|
810
|
+
tokenRetryLink, // Must be last.
|
|
811
|
+
httpLink]))
|
|
812
|
+
);
|
|
813
|
+
}; // This custom merge function allows to merge two arrays of objects.
|
|
783
814
|
// The incoming list is what we need to update to, but we still need
|
|
784
815
|
// to ensure that existing cache elements are not removed but updated.
|
|
785
816
|
// This is usually the case when elements get removed.
|
|
786
817
|
|
|
818
|
+
|
|
787
819
|
var mergeArraysObjects = function mergeArraysObjects() {
|
|
788
820
|
var existing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
789
821
|
var incoming = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -818,7 +850,7 @@ var createApolloClient = function createApolloClient() {
|
|
|
818
850
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
819
851
|
var customCacheConfig = (_options$cache = options === null || options === void 0 ? void 0 : options.cache) !== null && _options$cache !== void 0 ? _options$cache : {};
|
|
820
852
|
return new client.ApolloClient({
|
|
821
|
-
link:
|
|
853
|
+
link: createApolloLink(options),
|
|
822
854
|
// https://www.apollographql.com/docs/react/caching/cache-configuration/
|
|
823
855
|
cache: new client.InMemoryCache(_objectSpread$1(_objectSpread$1({}, customCacheConfig), {}, {
|
|
824
856
|
// https://www.apollographql.com/docs/react/caching/cache-configuration/#generating-unique-identifiers
|
|
@@ -995,9 +1027,11 @@ exports.clearSession = clearSession;
|
|
|
995
1027
|
exports.createApolloClient = createApolloClient;
|
|
996
1028
|
exports.createReduxStore = createReduxStore;
|
|
997
1029
|
exports.getActiveProjectKey = getActiveProjectKey;
|
|
1030
|
+
exports.getCorrelationId = getCorrelationId;
|
|
998
1031
|
exports.getMcApiUrl = getMcApiUrl;
|
|
999
1032
|
exports.getSessionScope = getSessionScope;
|
|
1000
1033
|
exports.getSessionState = getSessionState;
|
|
1034
|
+
exports.getSessionToken = getSessionToken;
|
|
1001
1035
|
exports.internalReduxStore = internalReduxStore;
|
|
1002
1036
|
exports.location = location;
|
|
1003
1037
|
exports.logger = logger;
|
package/dist/{application-entry-point-14c74303.esm.js → application-entry-point-a5b662f7.esm.js}
RENAMED
|
@@ -20,7 +20,7 @@ import omitEmpty from 'omit-empty-es';
|
|
|
20
20
|
import { ADD_NOTIFICATION, removeNotification, REMOVE_NOTIFICATION, reducer, middleware } from '@commercetools-frontend/notifications';
|
|
21
21
|
import { createMiddleware } from '@commercetools-frontend/sdk';
|
|
22
22
|
import { HIDE_ALL_PAGE_NOTIFICATIONS, NOTIFICATION_KINDS_PAGE, SHOW_LOADING, HIDE_LOADING, GRAPHQL_TARGETS, STATUS_CODES, LOGOUT_REASONS } from '@commercetools-frontend/constants';
|
|
23
|
-
import { S as STORAGE_KEYS, L as LOGIN_STRATEGY_OIDC, c as SUPPORTED_HEADERS } from './constants-
|
|
23
|
+
import { S as STORAGE_KEYS, L as LOGIN_STRATEGY_OIDC, c as SUPPORTED_HEADERS } from './constants-a3c850be.esm.js';
|
|
24
24
|
import { selectPageNotifications } from '@commercetools-frontend/react-notifications';
|
|
25
25
|
import _startsWithInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
|
|
26
26
|
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
@@ -35,7 +35,7 @@ import _sliceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instan
|
|
|
35
35
|
import { reportErrorToSentry } from '@commercetools-frontend/sentry';
|
|
36
36
|
import _URL from '@babel/runtime-corejs3/core-js-stable/url';
|
|
37
37
|
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
38
|
-
import { ApolloLink, createHttpLink,
|
|
38
|
+
import { ApolloLink, createHttpLink, ApolloClient, from, InMemoryCache } from '@apollo/client';
|
|
39
39
|
import createHttpUserAgent from '@commercetools/http-user-agent';
|
|
40
40
|
import loggerLink from 'apollo-link-logger';
|
|
41
41
|
import _Array$from from '@babel/runtime-corejs3/core-js-stable/array/from';
|
|
@@ -60,7 +60,7 @@ import { entryPointUriPathToPermissionKeys } from '@commercetools-frontend/appli
|
|
|
60
60
|
import { useApplicationContext } from '@commercetools-frontend/application-shell-connectors';
|
|
61
61
|
|
|
62
62
|
// NOTE: This string will be replaced on build time with the package version.
|
|
63
|
-
var version = "21.
|
|
63
|
+
var version = "21.10.0";
|
|
64
64
|
|
|
65
65
|
var isAddNotificationErrorAction = function isAddNotificationErrorAction(action) {
|
|
66
66
|
var errorAction = action;
|
|
@@ -658,6 +658,30 @@ var getAppliedForwardToHeaders = function getAppliedForwardToHeaders(apolloConte
|
|
|
658
658
|
|
|
659
659
|
return {};
|
|
660
660
|
};
|
|
661
|
+
|
|
662
|
+
var extractSessionTokenFromResponse = function extractSessionTokenFromResponse(context) {
|
|
663
|
+
var _context$response, _context$response$hea, _context$restResponse;
|
|
664
|
+
|
|
665
|
+
var refreshedSessionToken = (_context$response = context.response) === null || _context$response === void 0 ? void 0 : (_context$response$hea = _context$response.headers) === null || _context$response$hea === void 0 ? void 0 : _context$response$hea.get('x-refreshed-session-token');
|
|
666
|
+
|
|
667
|
+
if (refreshedSessionToken) {
|
|
668
|
+
return refreshedSessionToken !== null && refreshedSessionToken !== void 0 ? refreshedSessionToken : null;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
var restResponseWithRefreshTokenHeader = (_context$restResponse = context.restResponses) === null || _context$restResponse === void 0 ? void 0 : _findInstanceProperty(_context$restResponse).call(_context$restResponse, function (response) {
|
|
672
|
+
var _response$headers;
|
|
673
|
+
|
|
674
|
+
return (_response$headers = response.headers) === null || _response$headers === void 0 ? void 0 : _response$headers.has('x-refreshed-session-token');
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
if (restResponseWithRefreshTokenHeader) {
|
|
678
|
+
var _restResponseWithRefr;
|
|
679
|
+
|
|
680
|
+
return (_restResponseWithRefr = restResponseWithRefreshTokenHeader.headers.get('x-refreshed-session-token')) !== null && _restResponseWithRefr !== void 0 ? _restResponseWithRefr : null;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
return null;
|
|
684
|
+
};
|
|
661
685
|
/* eslint-disable import/prefer-default-export */
|
|
662
686
|
// Use a middleware to update the request headers with the correct params.
|
|
663
687
|
|
|
@@ -671,7 +695,7 @@ var headerLink = new ApolloLink(function (operation, forward) {
|
|
|
671
695
|
if (!apolloContext.skipGraphQlTargetCheck && !isKnownGraphQlTarget(graphQlTarget)) throw new Error(_concatInstanceProperty(_context3 = "GraphQL target \"".concat(graphQlTarget, "\" is missing (or is not supported) in operation \"")).call(_context3, operation.operationName, "\""));
|
|
672
696
|
/**
|
|
673
697
|
* NOTE:
|
|
674
|
-
* The project key is read from the url in a project related
|
|
698
|
+
* The project key is read from the url in a project related application context.
|
|
675
699
|
* This holds for most applications like `application-categories`, `application-discounts` etc.
|
|
676
700
|
* However, the `application-account` does not run with the project key being part of the url.
|
|
677
701
|
* As a result we allow passing the project key as a variable on the operation allowing
|
|
@@ -690,10 +714,8 @@ var headerLink = new ApolloLink(function (operation, forward) {
|
|
|
690
714
|
})), _defineProperty(_objectSpread4, SUPPORTED_HEADERS.X_GRAPHQL_TARGET, graphQlTarget), _defineProperty(_objectSpread4, SUPPORTED_HEADERS.X_GRAPHQL_OPERATION_NAME, operation.operationName), _defineProperty(_objectSpread4, SUPPORTED_HEADERS.X_TEAM_ID, teamId), _defineProperty(_objectSpread4, SUPPORTED_HEADERS.X_APPLICATION_ID, window.app.applicationId), _defineProperty(_objectSpread4, SUPPORTED_HEADERS.X_FEATURE_FLAG, featureFlag), _objectSpread4), getAppliedForwardToHeaders(apolloContext)))
|
|
691
715
|
});
|
|
692
716
|
return _mapInstanceProperty(_context4 = forward(operation)).call(_context4, function (response) {
|
|
693
|
-
var _context$response, _context$response$hea;
|
|
694
|
-
|
|
695
717
|
var context = operation.getContext();
|
|
696
|
-
var refreshedSessionToken = (
|
|
718
|
+
var refreshedSessionToken = extractSessionTokenFromResponse(context);
|
|
697
719
|
|
|
698
720
|
if (refreshedSessionToken) {
|
|
699
721
|
setActiveSession(refreshedSessionToken);
|
|
@@ -721,8 +743,6 @@ var tokenRetryLink = new RetryLink({
|
|
|
721
743
|
}
|
|
722
744
|
});
|
|
723
745
|
|
|
724
|
-
var _context;
|
|
725
|
-
|
|
726
746
|
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
727
747
|
|
|
728
748
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context4 = ownKeys$1(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context5 = ownKeys$1(Object(source))).call(_context5, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -742,16 +762,28 @@ var httpLink = createHttpLink({
|
|
|
742
762
|
'x-user-agent': userAgent
|
|
743
763
|
},
|
|
744
764
|
fetch: fetch
|
|
745
|
-
});
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
765
|
+
});
|
|
766
|
+
|
|
767
|
+
var createApolloLink = function createApolloLink() {
|
|
768
|
+
var _context;
|
|
749
769
|
|
|
750
|
-
var
|
|
770
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
771
|
+
return (// The order of links is IMPORTANT!
|
|
772
|
+
// In the request-phase they are executed top to bottom.
|
|
773
|
+
// In the response/phase they are executed bottom to top.
|
|
774
|
+
// The `httpLink` is terminating so it must be last, while `tokenRetryLink` and `errorLink`
|
|
775
|
+
// wrap the links the their right.
|
|
776
|
+
from(_concatInstanceProperty(_context = [headerLink]).call(_context, _toConsumableArray(options.restLink ? [options.restLink] : []), [// Must be before `tokenRetryLink`.
|
|
777
|
+
errorLink], _toConsumableArray(isLoggerEnabled() ? [loggerLink] : []), [// Must be after `errorLink`.
|
|
778
|
+
tokenRetryLink, // Must be last.
|
|
779
|
+
httpLink]))
|
|
780
|
+
);
|
|
781
|
+
}; // This custom merge function allows to merge two arrays of objects.
|
|
751
782
|
// The incoming list is what we need to update to, but we still need
|
|
752
783
|
// to ensure that existing cache elements are not removed but updated.
|
|
753
784
|
// This is usually the case when elements get removed.
|
|
754
785
|
|
|
786
|
+
|
|
755
787
|
var mergeArraysObjects = function mergeArraysObjects() {
|
|
756
788
|
var existing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
757
789
|
var incoming = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -786,7 +818,7 @@ var createApolloClient = function createApolloClient() {
|
|
|
786
818
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
787
819
|
var customCacheConfig = (_options$cache = options === null || options === void 0 ? void 0 : options.cache) !== null && _options$cache !== void 0 ? _options$cache : {};
|
|
788
820
|
return new ApolloClient({
|
|
789
|
-
link:
|
|
821
|
+
link: createApolloLink(options),
|
|
790
822
|
// https://www.apollographql.com/docs/react/caching/cache-configuration/
|
|
791
823
|
cache: new InMemoryCache(_objectSpread$1(_objectSpread$1({}, customCacheConfig), {}, {
|
|
792
824
|
// https://www.apollographql.com/docs/react/caching/cache-configuration/#generating-unique-identifiers
|
|
@@ -970,4 +1002,4 @@ ApplicationEntryPoint.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
970
1002
|
children: _pt.node
|
|
971
1003
|
} : {};
|
|
972
1004
|
|
|
973
|
-
export { ApplicationEntryPoint as A, REQUESTS_IN_FLIGHT_LOADER_DOM_ID as R, getActiveProjectKey as a, getSessionScope as b, location as c, getSessionState as d, setActiveSession as e, createApolloClient as f, getMcApiUrl as g, setCachedApolloClient as h, internalReduxStore as i, setSessionScope as j, setSessionState as k, logger as l, clearSession as m, selectProjectKeyFromUrl as n, RequestsInFlightLoader as o, RouteCatchAll as p,
|
|
1005
|
+
export { ApplicationEntryPoint as A, REQUESTS_IN_FLIGHT_LOADER_DOM_ID as R, getActiveProjectKey as a, getSessionScope as b, location as c, getSessionState as d, setActiveSession as e, createApolloClient as f, getMcApiUrl as g, setCachedApolloClient as h, internalReduxStore as i, setSessionScope as j, setSessionState as k, logger as l, clearSession as m, selectProjectKeyFromUrl as n, RequestsInFlightLoader as o, RouteCatchAll as p, getSessionToken as q, removeActiveProjectKey as r, setActiveProjectKey as s, selectUserId as t, useIsServedByProxy as u, version as v, getCorrelationId as w, applyDefaultMiddlewares as x, createReduxStore as y };
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var applicationEntryPoint = require('./application-entry-point-
|
|
6
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
5
|
+
var applicationEntryPoint = require('./application-entry-point-4de6686c.cjs.dev.js');
|
|
6
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-f576ae07.cjs.dev.js');
|
|
7
7
|
require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
8
8
|
require('uuid');
|
|
9
9
|
require('@babel/runtime-corejs3/core-js-stable/url');
|
|
@@ -31,7 +31,7 @@ require('omit-empty-es');
|
|
|
31
31
|
require('@commercetools-frontend/notifications');
|
|
32
32
|
require('@commercetools-frontend/sdk');
|
|
33
33
|
require('@commercetools-frontend/constants');
|
|
34
|
-
require('./constants-
|
|
34
|
+
require('./constants-d9a5241e.cjs.dev.js');
|
|
35
35
|
require('@commercetools-frontend/react-notifications');
|
|
36
36
|
require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
37
37
|
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
@@ -73,7 +73,7 @@ require('perfume.js');
|
|
|
73
73
|
require('@babel/runtime-corejs3/core-js-stable/instance/reverse');
|
|
74
74
|
require('lodash/camelCase');
|
|
75
75
|
require('@apollo/client/react');
|
|
76
|
-
require('./oidc-
|
|
76
|
+
require('./oidc-9134face.cjs.dev.js');
|
|
77
77
|
require('qss');
|
|
78
78
|
require('jwt-decode');
|
|
79
79
|
require('@commercetools-frontend/assets/images/locked-diamond.svg');
|
|
@@ -116,6 +116,8 @@ require('@commercetools-frontend/assets/images/diagonal-line.svg');
|
|
|
116
116
|
require('lodash/throttle');
|
|
117
117
|
require('@commercetools-frontend/url-utils');
|
|
118
118
|
require('@commercetools-frontend/actions-global');
|
|
119
|
+
require('@babel/runtime-corejs3/helpers/assertThisInitialized');
|
|
120
|
+
require('@babel/runtime-corejs3/helpers/wrapNativeSuper');
|
|
119
121
|
|
|
120
122
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
121
123
|
|
|
@@ -137,7 +139,10 @@ exports.GtmUserLogoutTracker = dist_commercetoolsFrontendApplicationShell.GtmUse
|
|
|
137
139
|
exports.InjectReducers = dist_commercetoolsFrontendApplicationShell.InjectReducers;
|
|
138
140
|
exports.SetupFlopFlipProvider = dist_commercetoolsFrontendApplicationShell.SetupFlopFlipProvider;
|
|
139
141
|
exports.SuspendedRoute = dist_commercetoolsFrontendApplicationShell.SuspendedRoute;
|
|
142
|
+
exports.buildApiUrl = dist_commercetoolsFrontendApplicationShell.buildApiUrl;
|
|
140
143
|
exports.createApolloContextForProxyForwardTo = dist_commercetoolsFrontendApplicationShell.createApolloContextForProxyForwardTo;
|
|
144
|
+
exports.createHttpClientOptions = dist_commercetoolsFrontendApplicationShell.createHttpClientOptions;
|
|
145
|
+
exports.executeHttpClientRequest = dist_commercetoolsFrontendApplicationShell.executeHttpClientRequest;
|
|
141
146
|
exports.setupGlobalErrorListener = dist_commercetoolsFrontendApplicationShell.setupGlobalErrorListener;
|
|
142
147
|
exports.useMcLazyQuery = dist_commercetoolsFrontendApplicationShell.useMcLazyQuery;
|
|
143
148
|
exports.useMcMutation = dist_commercetoolsFrontendApplicationShell.useMcMutation;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var applicationEntryPoint = require('./application-entry-point-
|
|
6
|
-
var dist_commercetoolsFrontendApplicationShell = require('./index-
|
|
5
|
+
var applicationEntryPoint = require('./application-entry-point-9a23a345.cjs.prod.js');
|
|
6
|
+
var dist_commercetoolsFrontendApplicationShell = require('./index-e96ff96a.cjs.prod.js');
|
|
7
7
|
require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
8
8
|
require('uuid');
|
|
9
9
|
require('@babel/runtime-corejs3/core-js-stable/url');
|
|
@@ -31,7 +31,7 @@ require('omit-empty-es');
|
|
|
31
31
|
require('@commercetools-frontend/notifications');
|
|
32
32
|
require('@commercetools-frontend/sdk');
|
|
33
33
|
require('@commercetools-frontend/constants');
|
|
34
|
-
require('./constants-
|
|
34
|
+
require('./constants-c2c238ff.cjs.prod.js');
|
|
35
35
|
require('@commercetools-frontend/react-notifications');
|
|
36
36
|
require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
37
37
|
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
@@ -73,7 +73,7 @@ require('perfume.js');
|
|
|
73
73
|
require('@babel/runtime-corejs3/core-js-stable/instance/reverse');
|
|
74
74
|
require('lodash/camelCase');
|
|
75
75
|
require('@apollo/client/react');
|
|
76
|
-
require('./oidc-
|
|
76
|
+
require('./oidc-5b507512.cjs.prod.js');
|
|
77
77
|
require('qss');
|
|
78
78
|
require('jwt-decode');
|
|
79
79
|
require('@commercetools-frontend/assets/images/locked-diamond.svg');
|
|
@@ -116,6 +116,8 @@ require('@commercetools-frontend/assets/images/diagonal-line.svg');
|
|
|
116
116
|
require('lodash/throttle');
|
|
117
117
|
require('@commercetools-frontend/url-utils');
|
|
118
118
|
require('@commercetools-frontend/actions-global');
|
|
119
|
+
require('@babel/runtime-corejs3/helpers/assertThisInitialized');
|
|
120
|
+
require('@babel/runtime-corejs3/helpers/wrapNativeSuper');
|
|
119
121
|
|
|
120
122
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
121
123
|
|
|
@@ -137,7 +139,10 @@ exports.GtmUserLogoutTracker = dist_commercetoolsFrontendApplicationShell.GtmUse
|
|
|
137
139
|
exports.InjectReducers = dist_commercetoolsFrontendApplicationShell.InjectReducers;
|
|
138
140
|
exports.SetupFlopFlipProvider = dist_commercetoolsFrontendApplicationShell.SetupFlopFlipProvider;
|
|
139
141
|
exports.SuspendedRoute = dist_commercetoolsFrontendApplicationShell.SuspendedRoute;
|
|
142
|
+
exports.buildApiUrl = dist_commercetoolsFrontendApplicationShell.buildApiUrl;
|
|
140
143
|
exports.createApolloContextForProxyForwardTo = dist_commercetoolsFrontendApplicationShell.createApolloContextForProxyForwardTo;
|
|
144
|
+
exports.createHttpClientOptions = dist_commercetoolsFrontendApplicationShell.createHttpClientOptions;
|
|
145
|
+
exports.executeHttpClientRequest = dist_commercetoolsFrontendApplicationShell.executeHttpClientRequest;
|
|
141
146
|
exports.setupGlobalErrorListener = dist_commercetoolsFrontendApplicationShell.setupGlobalErrorListener;
|
|
142
147
|
exports.useMcLazyQuery = dist_commercetoolsFrontendApplicationShell.useMcLazyQuery;
|
|
143
148
|
exports.useMcMutation = dist_commercetoolsFrontendApplicationShell.useMcMutation;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { p as RouteCatchAll,
|
|
2
|
-
export { A as ApplicationShell, a as ApplicationShellProvider, C as ConfigureIntlProvider, G as GtmContext, b as GtmUserLogoutTracker, I as InjectReducers, S as SetupFlopFlipProvider, d as SuspendedRoute, c as createApolloContextForProxyForwardTo, s as setupGlobalErrorListener, e as useMcLazyQuery, f as useMcMutation, u as useMcQuery } from './index-
|
|
1
|
+
export { p as RouteCatchAll, x as applyDefaultMiddlewares, f as createApolloClient, n as selectProjectKeyFromUrl, t as selectUserId, v as version } from './application-entry-point-a5b662f7.esm.js';
|
|
2
|
+
export { A as ApplicationShell, a as ApplicationShellProvider, C as ConfigureIntlProvider, G as GtmContext, b as GtmUserLogoutTracker, I as InjectReducers, S as SetupFlopFlipProvider, d as SuspendedRoute, g as buildApiUrl, c as createApolloContextForProxyForwardTo, h as createHttpClientOptions, i as executeHttpClientRequest, s as setupGlobalErrorListener, e as useMcLazyQuery, f as useMcMutation, u as useMcQuery } from './index-5062ecc2.esm.js';
|
|
3
3
|
import '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
4
4
|
import 'uuid';
|
|
5
5
|
import '@babel/runtime-corejs3/core-js-stable/url';
|
|
@@ -27,7 +27,7 @@ import 'omit-empty-es';
|
|
|
27
27
|
import '@commercetools-frontend/notifications';
|
|
28
28
|
import '@commercetools-frontend/sdk';
|
|
29
29
|
import '@commercetools-frontend/constants';
|
|
30
|
-
import './constants-
|
|
30
|
+
import './constants-a3c850be.esm.js';
|
|
31
31
|
import '@commercetools-frontend/react-notifications';
|
|
32
32
|
import '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
|
|
33
33
|
import '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
@@ -69,7 +69,7 @@ import 'perfume.js';
|
|
|
69
69
|
import '@babel/runtime-corejs3/core-js-stable/instance/reverse';
|
|
70
70
|
import 'lodash/camelCase';
|
|
71
71
|
import '@apollo/client/react';
|
|
72
|
-
import './oidc-
|
|
72
|
+
import './oidc-5cae2dba.esm.js';
|
|
73
73
|
import 'qss';
|
|
74
74
|
import 'jwt-decode';
|
|
75
75
|
import '@commercetools-frontend/assets/images/locked-diamond.svg';
|
|
@@ -112,3 +112,5 @@ import '@commercetools-frontend/assets/images/diagonal-line.svg';
|
|
|
112
112
|
import 'lodash/throttle';
|
|
113
113
|
import '@commercetools-frontend/url-utils';
|
|
114
114
|
import '@commercetools-frontend/actions-global';
|
|
115
|
+
import '@babel/runtime-corejs3/helpers/assertThisInitialized';
|
|
116
|
+
import '@babel/runtime-corejs3/helpers/wrapNativeSuper';
|
|
@@ -4,8 +4,10 @@ var DIMENSIONS = {
|
|
|
4
4
|
navMenuExpanded: '200px'
|
|
5
5
|
};
|
|
6
6
|
var SUPPORTED_HEADERS = {
|
|
7
|
+
ACCEPT: 'Accept',
|
|
7
8
|
ACCEPT_VERSION: 'Accept-version',
|
|
8
9
|
AUTHORIZATION: 'Authorization',
|
|
10
|
+
CONTENT_TYPE: 'Content-Type',
|
|
9
11
|
X_APPLICATION_ID: 'X-Application-Id',
|
|
10
12
|
X_CORRELATION_ID: 'X-Correlation-Id',
|
|
11
13
|
X_FEATURE_FLAG: 'X-Feature-Flag',
|
|
@@ -15,7 +17,8 @@ var SUPPORTED_HEADERS = {
|
|
|
15
17
|
X_GRAPHQL_OPERATION_NAME: 'X-Graphql-Operation-Name',
|
|
16
18
|
X_PROJECT_KEY: 'X-Project-Key',
|
|
17
19
|
X_TEAM_ID: 'X-Team-Id',
|
|
18
|
-
X_TOKEN_RETRY: 'X-Force-Token'
|
|
20
|
+
X_TOKEN_RETRY: 'X-Force-Token',
|
|
21
|
+
X_USER_AGENT: 'X-User-Agent'
|
|
19
22
|
};
|
|
20
23
|
var CONTAINERS = {
|
|
21
24
|
LOCALE_SWITCHER: 'locale-switcher-container'
|
|
@@ -6,8 +6,10 @@ var DIMENSIONS = {
|
|
|
6
6
|
navMenuExpanded: '200px'
|
|
7
7
|
};
|
|
8
8
|
var SUPPORTED_HEADERS = {
|
|
9
|
+
ACCEPT: 'Accept',
|
|
9
10
|
ACCEPT_VERSION: 'Accept-version',
|
|
10
11
|
AUTHORIZATION: 'Authorization',
|
|
12
|
+
CONTENT_TYPE: 'Content-Type',
|
|
11
13
|
X_APPLICATION_ID: 'X-Application-Id',
|
|
12
14
|
X_CORRELATION_ID: 'X-Correlation-Id',
|
|
13
15
|
X_FEATURE_FLAG: 'X-Feature-Flag',
|
|
@@ -17,7 +19,8 @@ var SUPPORTED_HEADERS = {
|
|
|
17
19
|
X_GRAPHQL_OPERATION_NAME: 'X-Graphql-Operation-Name',
|
|
18
20
|
X_PROJECT_KEY: 'X-Project-Key',
|
|
19
21
|
X_TEAM_ID: 'X-Team-Id',
|
|
20
|
-
X_TOKEN_RETRY: 'X-Force-Token'
|
|
22
|
+
X_TOKEN_RETRY: 'X-Force-Token',
|
|
23
|
+
X_USER_AGENT: 'X-User-Agent'
|
|
21
24
|
};
|
|
22
25
|
var CONTAINERS = {
|
|
23
26
|
LOCALE_SWITCHER: 'locale-switcher-container'
|
|
@@ -6,8 +6,10 @@ var DIMENSIONS = {
|
|
|
6
6
|
navMenuExpanded: '200px'
|
|
7
7
|
};
|
|
8
8
|
var SUPPORTED_HEADERS = {
|
|
9
|
+
ACCEPT: 'Accept',
|
|
9
10
|
ACCEPT_VERSION: 'Accept-version',
|
|
10
11
|
AUTHORIZATION: 'Authorization',
|
|
12
|
+
CONTENT_TYPE: 'Content-Type',
|
|
11
13
|
X_APPLICATION_ID: 'X-Application-Id',
|
|
12
14
|
X_CORRELATION_ID: 'X-Correlation-Id',
|
|
13
15
|
X_FEATURE_FLAG: 'X-Feature-Flag',
|
|
@@ -17,7 +19,8 @@ var SUPPORTED_HEADERS = {
|
|
|
17
19
|
X_GRAPHQL_OPERATION_NAME: 'X-Graphql-Operation-Name',
|
|
18
20
|
X_PROJECT_KEY: 'X-Project-Key',
|
|
19
21
|
X_TEAM_ID: 'X-Team-Id',
|
|
20
|
-
X_TOKEN_RETRY: 'X-Force-Token'
|
|
22
|
+
X_TOKEN_RETRY: 'X-Force-Token',
|
|
23
|
+
X_USER_AGENT: 'X-User-Agent'
|
|
21
24
|
};
|
|
22
25
|
var CONTAINERS = {
|
|
23
26
|
LOCALE_SWITCHER: 'locale-switcher-container'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Action } from 'redux';
|
|
2
2
|
import type { TRequestsInFlightState } from './types';
|
|
3
|
-
declare const _default: (requestsInFlight?: TRequestsInFlightState
|
|
3
|
+
declare const _default: (requestsInFlight?: TRequestsInFlightState, action?: Action) => string[];
|
|
4
4
|
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { NormalizedCacheObject, InMemoryCacheConfig } from '@apollo/client';
|
|
2
|
-
import { ApolloClient } from '@apollo/client';
|
|
2
|
+
import { ApolloClient, ApolloLink } from '@apollo/client';
|
|
3
3
|
declare type TApolloClientOptions = {
|
|
4
4
|
cache?: InMemoryCacheConfig;
|
|
5
|
+
restLink?: ApolloLink;
|
|
5
6
|
};
|
|
6
7
|
declare const createApolloClient: (options?: TApolloClientOptions) => ApolloClient<NormalizedCacheObject>;
|
|
7
8
|
export default createApolloClient;
|