@commercetools-frontend/application-shell-connectors 24.7.2 → 24.8.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/commercetools-frontend-application-shell-connectors.cjs.d.ts +2 -2
- package/dist/commercetools-frontend-application-shell-connectors.cjs.dev.js +7 -29
- package/dist/commercetools-frontend-application-shell-connectors.cjs.prod.js +7 -14
- package/dist/commercetools-frontend-application-shell-connectors.esm.js +7 -28
- package/dist/declarations/src/components/application-context/application-context.d.ts +6 -6
- package/dist/declarations/src/components/application-context/index.d.ts +4 -4
- package/dist/declarations/src/components/application-context/normalizers.d.ts +1 -1
- package/dist/declarations/src/components/custom-view-context/custom-view-context.d.ts +1 -1
- package/dist/declarations/src/components/custom-view-context/index.d.ts +2 -2
- package/dist/declarations/src/components/project-extension-image-regex/index.d.ts +2 -2
- package/dist/declarations/src/components/project-extension-image-regex/project-extension-image-regex.d.ts +3 -3
- package/dist/declarations/src/export-types.d.ts +5 -5
- package/dist/declarations/src/hooks/apollo-hooks/apollo-hooks.d.ts +1 -1
- package/dist/declarations/src/hooks/apollo-hooks/index.d.ts +1 -1
- package/dist/declarations/src/index.d.ts +12 -12
- package/dist/declarations/src/test-utils/index.d.ts +1 -1
- package/dist/declarations/src/test-utils/test-utils.d.ts +10 -10
- package/dist/declarations/src/utils/apollo-context.d.ts +1 -1
- package/dist/declarations/src/utils/get-correlation-id/index.d.ts +1 -1
- package/dist/declarations/src/utils/get-mc-api-url/index.d.ts +1 -1
- package/dist/declarations/src/utils/index.d.ts +7 -7
- package/dist/declarations/src/utils/select-project-key-from-url/index.d.ts +1 -1
- package/dist/declarations/src/utils/select-team-id-from-storage/index.d.ts +1 -1
- package/dist/declarations/src/utils/select-user-id/index.d.ts +1 -1
- package/package.json +10 -10
- package/test-utils/dist/commercetools-frontend-application-shell-connectors-test-utils.cjs.d.ts +2 -2
- package/dist/commercetools-frontend-application-shell-connectors.cjs.d.ts.map +0 -1
- 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/utils/get-display-name.d.ts +0 -3
- package/test-utils/dist/commercetools-frontend-application-shell-connectors-test-utils.cjs.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./declarations/src/index";
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
export * from "./declarations/src/index.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1hcHBsaWNhdGlvbi1zaGVsbC1jb25uZWN0b3JzLmNqcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi9kZWNsYXJhdGlvbnMvc3JjL2luZGV4LmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
|
|
@@ -11,7 +11,6 @@ var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-
|
|
|
11
11
|
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
12
12
|
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
13
13
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
14
|
-
var _pt = require('prop-types');
|
|
15
14
|
var react = require('react');
|
|
16
15
|
var moment = require('moment-timezone');
|
|
17
16
|
var sentry = require('@commercetools-frontend/sentry');
|
|
@@ -40,10 +39,9 @@ var uuid = require('uuid');
|
|
|
40
39
|
var _Reflect$construct = require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
41
40
|
var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
42
41
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
43
|
-
var _assertThisInitialized = require('@babel/runtime-corejs3/helpers/assertThisInitialized');
|
|
44
|
-
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
45
42
|
var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
46
43
|
var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
44
|
+
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
47
45
|
var _wrapNativeSuper = require('@babel/runtime-corejs3/helpers/wrapNativeSuper');
|
|
48
46
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
49
47
|
var retry = require('@apollo/client/link/retry');
|
|
@@ -58,7 +56,6 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachIns
|
|
|
58
56
|
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
59
57
|
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
60
58
|
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
61
|
-
var _pt__default = /*#__PURE__*/_interopDefault(_pt);
|
|
62
59
|
var moment__default = /*#__PURE__*/_interopDefault(moment);
|
|
63
60
|
var _URL__default = /*#__PURE__*/_interopDefault(_URL);
|
|
64
61
|
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
@@ -79,7 +76,7 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
|
|
|
79
76
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
80
77
|
|
|
81
78
|
// NOTE: This string will be replaced on build time with the package version.
|
|
82
|
-
var version = "24.
|
|
79
|
+
var version = "24.8.1";
|
|
83
80
|
|
|
84
81
|
// From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
|
|
85
82
|
const getDisplayName = Component => {
|
|
@@ -344,10 +341,6 @@ const ApplicationContextProvider = props => jsxRuntime.jsx(Context$2.Provider, {
|
|
|
344
341
|
value: createApplicationContext(props.environment, props.user, props.project, props.projectDataLocale),
|
|
345
342
|
children: props.children
|
|
346
343
|
});
|
|
347
|
-
ApplicationContextProvider.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
348
|
-
projectDataLocale: _pt__default["default"].string,
|
|
349
|
-
children: _pt__default["default"].node.isRequired
|
|
350
|
-
} : {};
|
|
351
344
|
ApplicationContextProvider.displayName = 'ApplicationContextProvider';
|
|
352
345
|
const ApplicationContext = props => jsxRuntime.jsx(Context$2.Consumer, {
|
|
353
346
|
children: context => {
|
|
@@ -359,9 +352,6 @@ const ApplicationContext = props => jsxRuntime.jsx(Context$2.Consumer, {
|
|
|
359
352
|
return props.render(applicationContext);
|
|
360
353
|
}
|
|
361
354
|
});
|
|
362
|
-
ApplicationContext.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
363
|
-
render: _pt__default["default"].func.isRequired
|
|
364
|
-
} : {};
|
|
365
355
|
ApplicationContext.displayName = 'ApplicationContext';
|
|
366
356
|
function withApplicationContext(mapApplicationContextToProps) {
|
|
367
357
|
return Component => {
|
|
@@ -431,11 +421,7 @@ const CustomViewContextProvider = props => {
|
|
|
431
421
|
|
|
432
422
|
// Use function overloading to declare two possible signatures with two
|
|
433
423
|
// distict return types, based on the selector function argument.
|
|
434
|
-
|
|
435
|
-
hostUrl: _pt__default["default"].string.isRequired,
|
|
436
|
-
customViewConfig: _pt__default["default"].any.isRequired,
|
|
437
|
-
children: _pt__default["default"].node.isRequired
|
|
438
|
-
} : {};
|
|
424
|
+
|
|
439
425
|
// Then implement the function. Typescript will pick the appropriate signature
|
|
440
426
|
// based on the function arguments.
|
|
441
427
|
function useCustomViewContextHook(selector) {
|
|
@@ -492,10 +478,6 @@ const ProjectExtensionProviderForImageRegex = props => {
|
|
|
492
478
|
children: props.children
|
|
493
479
|
});
|
|
494
480
|
};
|
|
495
|
-
ProjectExtensionProviderForImageRegex.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
496
|
-
skip: _pt__default["default"].bool,
|
|
497
|
-
children: _pt__default["default"].node.isRequired
|
|
498
|
-
} : {};
|
|
499
481
|
ProjectExtensionProviderForImageRegex.displayName = 'ProjectExtensionProviderForImageRegex';
|
|
500
482
|
const GetProjectExtensionImageRegex = props => {
|
|
501
483
|
useWarning(false, `@commercetools-frontend/application-shell-connectors: It is not recommended to use the 'GetProjectExtensionImageRegex' anymore. Please use the 'useProjectExtensionImageRegex' hook instead.`);
|
|
@@ -503,9 +485,6 @@ const GetProjectExtensionImageRegex = props => {
|
|
|
503
485
|
children: imageRegexContext => props.render(imageRegexContext)
|
|
504
486
|
});
|
|
505
487
|
};
|
|
506
|
-
GetProjectExtensionImageRegex.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
507
|
-
render: _pt__default["default"].func.isRequired
|
|
508
|
-
} : {};
|
|
509
488
|
GetProjectExtensionImageRegex.displayName = 'GetProjectExtensionImageRegex';
|
|
510
489
|
function withProjectExtensionImageRegex() {
|
|
511
490
|
let propKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'imageRegexData';
|
|
@@ -772,7 +751,7 @@ var oidcStorage = /*#__PURE__*/Object.freeze({
|
|
|
772
751
|
setSessionScope: setSessionScope
|
|
773
752
|
});
|
|
774
753
|
|
|
775
|
-
function
|
|
754
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
776
755
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
777
756
|
function ownKeys$2(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; }
|
|
778
757
|
function _objectSpread$2(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$2(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$2(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -842,17 +821,16 @@ function createHttpClientOptions() {
|
|
|
842
821
|
};
|
|
843
822
|
}
|
|
844
823
|
let RenewTokenError = /*#__PURE__*/function (_Error) {
|
|
845
|
-
_inherits(RenewTokenError, _Error);
|
|
846
|
-
var _super = _createSuper(RenewTokenError);
|
|
847
824
|
function RenewTokenError(message) {
|
|
848
825
|
var _this;
|
|
849
826
|
_classCallCheck(this, RenewTokenError);
|
|
850
|
-
_this =
|
|
851
|
-
_Object$defineProperty__default["default"](
|
|
827
|
+
_this = _callSuper(this, RenewTokenError, [message]);
|
|
828
|
+
_Object$defineProperty__default["default"](_this, 'name', {
|
|
852
829
|
value: 'RenewTokenError'
|
|
853
830
|
});
|
|
854
831
|
return _this;
|
|
855
832
|
}
|
|
833
|
+
_inherits(RenewTokenError, _Error);
|
|
856
834
|
return _createClass(RenewTokenError);
|
|
857
835
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
858
836
|
async function executeHttpClientRequest(fetcher) {
|
|
@@ -11,7 +11,6 @@ var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-
|
|
|
11
11
|
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
12
12
|
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
13
13
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
14
|
-
require('prop-types');
|
|
15
14
|
var react = require('react');
|
|
16
15
|
var moment = require('moment-timezone');
|
|
17
16
|
var sentry = require('@commercetools-frontend/sentry');
|
|
@@ -40,10 +39,9 @@ var uuid = require('uuid');
|
|
|
40
39
|
var _Reflect$construct = require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
41
40
|
var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
42
41
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
43
|
-
var _assertThisInitialized = require('@babel/runtime-corejs3/helpers/assertThisInitialized');
|
|
44
|
-
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
45
42
|
var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
46
43
|
var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
44
|
+
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
47
45
|
var _wrapNativeSuper = require('@babel/runtime-corejs3/helpers/wrapNativeSuper');
|
|
48
46
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
49
47
|
var retry = require('@apollo/client/link/retry');
|
|
@@ -77,7 +75,7 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
|
|
|
77
75
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
78
76
|
|
|
79
77
|
// NOTE: This string will be replaced on build time with the package version.
|
|
80
|
-
var version = "24.
|
|
78
|
+
var version = "24.8.1";
|
|
81
79
|
|
|
82
80
|
// From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
|
|
83
81
|
const getDisplayName = Component => {
|
|
@@ -342,7 +340,6 @@ const ApplicationContextProvider = props => jsxRuntime.jsx(Context$2.Provider, {
|
|
|
342
340
|
value: createApplicationContext(props.environment, props.user, props.project, props.projectDataLocale),
|
|
343
341
|
children: props.children
|
|
344
342
|
});
|
|
345
|
-
ApplicationContextProvider.propTypes = {};
|
|
346
343
|
ApplicationContextProvider.displayName = 'ApplicationContextProvider';
|
|
347
344
|
const ApplicationContext = props => jsxRuntime.jsx(Context$2.Consumer, {
|
|
348
345
|
children: context => {
|
|
@@ -354,7 +351,6 @@ const ApplicationContext = props => jsxRuntime.jsx(Context$2.Consumer, {
|
|
|
354
351
|
return props.render(applicationContext);
|
|
355
352
|
}
|
|
356
353
|
});
|
|
357
|
-
ApplicationContext.propTypes = {};
|
|
358
354
|
ApplicationContext.displayName = 'ApplicationContext';
|
|
359
355
|
function withApplicationContext(mapApplicationContextToProps) {
|
|
360
356
|
return Component => {
|
|
@@ -424,7 +420,7 @@ const CustomViewContextProvider = props => {
|
|
|
424
420
|
|
|
425
421
|
// Use function overloading to declare two possible signatures with two
|
|
426
422
|
// distict return types, based on the selector function argument.
|
|
427
|
-
|
|
423
|
+
|
|
428
424
|
// Then implement the function. Typescript will pick the appropriate signature
|
|
429
425
|
// based on the function arguments.
|
|
430
426
|
function useCustomViewContextHook(selector) {
|
|
@@ -480,7 +476,6 @@ const ProjectExtensionProviderForImageRegex = props => {
|
|
|
480
476
|
children: props.children
|
|
481
477
|
});
|
|
482
478
|
};
|
|
483
|
-
ProjectExtensionProviderForImageRegex.propTypes = {};
|
|
484
479
|
ProjectExtensionProviderForImageRegex.displayName = 'ProjectExtensionProviderForImageRegex';
|
|
485
480
|
const GetProjectExtensionImageRegex = props => {
|
|
486
481
|
useWarning();
|
|
@@ -488,7 +483,6 @@ const GetProjectExtensionImageRegex = props => {
|
|
|
488
483
|
children: imageRegexContext => props.render(imageRegexContext)
|
|
489
484
|
});
|
|
490
485
|
};
|
|
491
|
-
GetProjectExtensionImageRegex.propTypes = {};
|
|
492
486
|
GetProjectExtensionImageRegex.displayName = 'GetProjectExtensionImageRegex';
|
|
493
487
|
function withProjectExtensionImageRegex() {
|
|
494
488
|
let propKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'imageRegexData';
|
|
@@ -750,7 +744,7 @@ var oidcStorage = /*#__PURE__*/Object.freeze({
|
|
|
750
744
|
setSessionScope: setSessionScope
|
|
751
745
|
});
|
|
752
746
|
|
|
753
|
-
function
|
|
747
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
754
748
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
755
749
|
function ownKeys$2(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; }
|
|
756
750
|
function _objectSpread$2(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$2(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$2(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -820,17 +814,16 @@ function createHttpClientOptions() {
|
|
|
820
814
|
};
|
|
821
815
|
}
|
|
822
816
|
let RenewTokenError = /*#__PURE__*/function (_Error) {
|
|
823
|
-
_inherits(RenewTokenError, _Error);
|
|
824
|
-
var _super = _createSuper(RenewTokenError);
|
|
825
817
|
function RenewTokenError(message) {
|
|
826
818
|
var _this;
|
|
827
819
|
_classCallCheck(this, RenewTokenError);
|
|
828
|
-
_this =
|
|
829
|
-
_Object$defineProperty__default["default"](
|
|
820
|
+
_this = _callSuper(this, RenewTokenError, [message]);
|
|
821
|
+
_Object$defineProperty__default["default"](_this, 'name', {
|
|
830
822
|
value: 'RenewTokenError'
|
|
831
823
|
});
|
|
832
824
|
return _this;
|
|
833
825
|
}
|
|
826
|
+
_inherits(RenewTokenError, _Error);
|
|
834
827
|
return _createClass(RenewTokenError);
|
|
835
828
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
836
829
|
async function executeHttpClientRequest(fetcher) {
|
|
@@ -7,7 +7,6 @@ import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-st
|
|
|
7
7
|
import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
8
8
|
import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
9
9
|
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
10
|
-
import _pt from 'prop-types';
|
|
11
10
|
import { createContext, useContext, useCallback, useEffect, useMemo } from 'react';
|
|
12
11
|
import moment from 'moment-timezone';
|
|
13
12
|
import { reportErrorToSentry } from '@commercetools-frontend/sentry';
|
|
@@ -36,16 +35,15 @@ import { v4 } from 'uuid';
|
|
|
36
35
|
import _Reflect$construct from '@babel/runtime-corejs3/core-js-stable/reflect/construct';
|
|
37
36
|
import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
|
|
38
37
|
import _classCallCheck from '@babel/runtime-corejs3/helpers/esm/classCallCheck';
|
|
39
|
-
import _assertThisInitialized from '@babel/runtime-corejs3/helpers/esm/assertThisInitialized';
|
|
40
|
-
import _inherits from '@babel/runtime-corejs3/helpers/esm/inherits';
|
|
41
38
|
import _possibleConstructorReturn from '@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn';
|
|
42
39
|
import _getPrototypeOf from '@babel/runtime-corejs3/helpers/esm/getPrototypeOf';
|
|
40
|
+
import _inherits from '@babel/runtime-corejs3/helpers/esm/inherits';
|
|
43
41
|
import _wrapNativeSuper from '@babel/runtime-corejs3/helpers/esm/wrapNativeSuper';
|
|
44
42
|
import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
45
43
|
import { RetryLink } from '@apollo/client/link/retry';
|
|
46
44
|
|
|
47
45
|
// NOTE: This string will be replaced on build time with the package version.
|
|
48
|
-
var version = "24.
|
|
46
|
+
var version = "24.8.1";
|
|
49
47
|
|
|
50
48
|
// From https://github.com/acdlite/recompose/blob/master/src/packages/recompose/getDisplayName.js
|
|
51
49
|
const getDisplayName = Component => {
|
|
@@ -310,10 +308,6 @@ const ApplicationContextProvider = props => jsx(Context$2.Provider, {
|
|
|
310
308
|
value: createApplicationContext(props.environment, props.user, props.project, props.projectDataLocale),
|
|
311
309
|
children: props.children
|
|
312
310
|
});
|
|
313
|
-
ApplicationContextProvider.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
314
|
-
projectDataLocale: _pt.string,
|
|
315
|
-
children: _pt.node.isRequired
|
|
316
|
-
} : {};
|
|
317
311
|
ApplicationContextProvider.displayName = 'ApplicationContextProvider';
|
|
318
312
|
const ApplicationContext = props => jsx(Context$2.Consumer, {
|
|
319
313
|
children: context => {
|
|
@@ -325,9 +319,6 @@ const ApplicationContext = props => jsx(Context$2.Consumer, {
|
|
|
325
319
|
return props.render(applicationContext);
|
|
326
320
|
}
|
|
327
321
|
});
|
|
328
|
-
ApplicationContext.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
329
|
-
render: _pt.func.isRequired
|
|
330
|
-
} : {};
|
|
331
322
|
ApplicationContext.displayName = 'ApplicationContext';
|
|
332
323
|
function withApplicationContext(mapApplicationContextToProps) {
|
|
333
324
|
return Component => {
|
|
@@ -397,11 +388,7 @@ const CustomViewContextProvider = props => {
|
|
|
397
388
|
|
|
398
389
|
// Use function overloading to declare two possible signatures with two
|
|
399
390
|
// distict return types, based on the selector function argument.
|
|
400
|
-
|
|
401
|
-
hostUrl: _pt.string.isRequired,
|
|
402
|
-
customViewConfig: _pt.any.isRequired,
|
|
403
|
-
children: _pt.node.isRequired
|
|
404
|
-
} : {};
|
|
391
|
+
|
|
405
392
|
// Then implement the function. Typescript will pick the appropriate signature
|
|
406
393
|
// based on the function arguments.
|
|
407
394
|
function useCustomViewContextHook(selector) {
|
|
@@ -458,10 +445,6 @@ const ProjectExtensionProviderForImageRegex = props => {
|
|
|
458
445
|
children: props.children
|
|
459
446
|
});
|
|
460
447
|
};
|
|
461
|
-
ProjectExtensionProviderForImageRegex.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
462
|
-
skip: _pt.bool,
|
|
463
|
-
children: _pt.node.isRequired
|
|
464
|
-
} : {};
|
|
465
448
|
ProjectExtensionProviderForImageRegex.displayName = 'ProjectExtensionProviderForImageRegex';
|
|
466
449
|
const GetProjectExtensionImageRegex = props => {
|
|
467
450
|
useWarning(false, `@commercetools-frontend/application-shell-connectors: It is not recommended to use the 'GetProjectExtensionImageRegex' anymore. Please use the 'useProjectExtensionImageRegex' hook instead.`);
|
|
@@ -469,9 +452,6 @@ const GetProjectExtensionImageRegex = props => {
|
|
|
469
452
|
children: imageRegexContext => props.render(imageRegexContext)
|
|
470
453
|
});
|
|
471
454
|
};
|
|
472
|
-
GetProjectExtensionImageRegex.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
473
|
-
render: _pt.func.isRequired
|
|
474
|
-
} : {};
|
|
475
455
|
GetProjectExtensionImageRegex.displayName = 'GetProjectExtensionImageRegex';
|
|
476
456
|
function withProjectExtensionImageRegex() {
|
|
477
457
|
let propKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'imageRegexData';
|
|
@@ -738,7 +718,7 @@ var oidcStorage = /*#__PURE__*/Object.freeze({
|
|
|
738
718
|
setSessionScope: setSessionScope
|
|
739
719
|
});
|
|
740
720
|
|
|
741
|
-
function
|
|
721
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
742
722
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
743
723
|
function ownKeys$2(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
744
724
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$2(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$2(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -808,17 +788,16 @@ function createHttpClientOptions() {
|
|
|
808
788
|
};
|
|
809
789
|
}
|
|
810
790
|
let RenewTokenError = /*#__PURE__*/function (_Error) {
|
|
811
|
-
_inherits(RenewTokenError, _Error);
|
|
812
|
-
var _super = _createSuper(RenewTokenError);
|
|
813
791
|
function RenewTokenError(message) {
|
|
814
792
|
var _this;
|
|
815
793
|
_classCallCheck(this, RenewTokenError);
|
|
816
|
-
_this =
|
|
817
|
-
_Object$defineProperty(
|
|
794
|
+
_this = _callSuper(this, RenewTokenError, [message]);
|
|
795
|
+
_Object$defineProperty(_this, 'name', {
|
|
818
796
|
value: 'RenewTokenError'
|
|
819
797
|
});
|
|
820
798
|
return _this;
|
|
821
799
|
}
|
|
800
|
+
_inherits(RenewTokenError, _Error);
|
|
822
801
|
return _createClass(RenewTokenError);
|
|
823
802
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
824
803
|
async function executeHttpClientRequest(fetcher) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import type { ApplicationWindow } from '@commercetools-frontend/constants';
|
|
3
|
-
import type { TFetchLoggedInUserQuery, TFetchProjectQuery, TIdTokenUserInfo } from
|
|
3
|
+
import type { TFetchLoggedInUserQuery, TFetchProjectQuery, TIdTokenUserInfo } from "../../types/generated/mc.js";
|
|
4
4
|
type TFetchedUser = TFetchLoggedInUserQuery['user'];
|
|
5
5
|
type TFetchedProject = TFetchProjectQuery['project'];
|
|
6
6
|
type TApplicationContextPermissions = {
|
|
@@ -42,22 +42,22 @@ type TApplicationContextUser = Pick<NonNullable<TFetchedUser>, 'id' | 'email' |
|
|
|
42
42
|
};
|
|
43
43
|
declare const Context: import("react").Context<{}>;
|
|
44
44
|
export declare const mapUserToApplicationContextUser: (user?: TFetchedUser) => TApplicationContextUser | null;
|
|
45
|
-
export declare const mapEnvironmentToApplicationContextEnvironment: <AdditionalEnvironmentProperties extends {}>(environment: AdditionalEnvironmentProperties &
|
|
45
|
+
export declare const mapEnvironmentToApplicationContextEnvironment: <AdditionalEnvironmentProperties extends {}>(environment: AdditionalEnvironmentProperties & TApplicationContextEnvironment, origin?: string) => AdditionalEnvironmentProperties & {
|
|
46
46
|
mcApiUrl: string;
|
|
47
47
|
applicationId: string;
|
|
48
48
|
applicationIdentifier: string;
|
|
49
49
|
applicationName: string;
|
|
50
50
|
entryPointUriPath: string;
|
|
51
|
-
customViewId?: string
|
|
51
|
+
customViewId?: string;
|
|
52
52
|
revision: string;
|
|
53
53
|
env: string;
|
|
54
54
|
location: string;
|
|
55
55
|
cdnUrl: string;
|
|
56
56
|
frontendHost: string;
|
|
57
57
|
servedByProxy: boolean;
|
|
58
|
-
ldClientSideId?: string
|
|
59
|
-
trackingSentry?: string
|
|
60
|
-
__DEVELOPMENT__?: import("@commercetools-frontend/constants").ApplicationRuntimeEnvironmentForDevelopment
|
|
58
|
+
ldClientSideId?: string;
|
|
59
|
+
trackingSentry?: string;
|
|
60
|
+
__DEVELOPMENT__?: import("@commercetools-frontend/constants").ApplicationRuntimeEnvironmentForDevelopment;
|
|
61
61
|
};
|
|
62
62
|
export declare const mapProjectToApplicationContextProject: (project?: TFetchedProject) => {
|
|
63
63
|
key: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ProviderProps, TApplicationContext as ApplicationContext } from
|
|
2
|
-
import type { TMenuVisibilities as NormalizedMenuVisibilities, TPermissions as NormalizedPermissions, TActionRights as NormalizedActionRights, TDataFences as NormalizedDataFences } from
|
|
1
|
+
import type { ProviderProps, TApplicationContext as ApplicationContext } from "./application-context.js";
|
|
2
|
+
import type { TMenuVisibilities as NormalizedMenuVisibilities, TPermissions as NormalizedPermissions, TActionRights as NormalizedActionRights, TDataFences as NormalizedDataFences } from "./normalizers.js";
|
|
3
3
|
export type TProviderProps<AdditionalEnvironmentProperties extends {}> = ProviderProps<AdditionalEnvironmentProperties>;
|
|
4
4
|
export type TApplicationContext<AdditionalEnvironmentProperties extends {}> = ApplicationContext<AdditionalEnvironmentProperties>;
|
|
5
5
|
export type TNormalizedMenuVisibilities = NormalizedMenuVisibilities;
|
|
6
6
|
export type TNormalizedPermissions = NormalizedPermissions;
|
|
7
7
|
export type TNormalizedActionRights = NormalizedActionRights;
|
|
8
8
|
export type TNormalizedDataFences = NormalizedDataFences;
|
|
9
|
-
export { Context, ApplicationContext, ApplicationContextProvider, withApplicationContext, useApplicationContext, } from
|
|
10
|
-
export { normalizeAllAppliedActionRights, normalizeAllAppliedDataFences, normalizeAllAppliedMenuVisibilities, normalizeAllAppliedPermissions, } from
|
|
9
|
+
export { Context, ApplicationContext, ApplicationContextProvider, withApplicationContext, useApplicationContext, } from "./application-context.js";
|
|
10
|
+
export { normalizeAllAppliedActionRights, normalizeAllAppliedDataFences, normalizeAllAppliedMenuVisibilities, normalizeAllAppliedPermissions, } from "./normalizers.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TAppliedPermission, TAppliedActionRight, TAppliedMenuVisibilities, TStoreDataFence } from
|
|
1
|
+
import type { TAppliedPermission, TAppliedActionRight, TAppliedMenuVisibilities, TStoreDataFence } from "../../types/generated/mc.js";
|
|
2
2
|
export type TMenuVisibilities = {
|
|
3
3
|
[key: string]: boolean;
|
|
4
4
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import type { CustomViewData } from '@commercetools-frontend/constants';
|
|
3
|
-
import { type TApplicationContext } from
|
|
3
|
+
import { type TApplicationContext } from "../application-context/index.js";
|
|
4
4
|
export type TCustomViewContext = {
|
|
5
5
|
hostUrl: string;
|
|
6
6
|
customViewConfig: CustomViewData;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TCustomViewContextProviderProps as CustomViewContextProviderProps, TCustomViewContext as CustomViewContext } from
|
|
1
|
+
import type { TCustomViewContextProviderProps as CustomViewContextProviderProps, TCustomViewContext as CustomViewContext } from "./custom-view-context.js";
|
|
2
2
|
export type TCustomViewContextProviderProps = CustomViewContextProviderProps;
|
|
3
3
|
export type TCustomViewContext = CustomViewContext;
|
|
4
|
-
export { CustomViewContextProvider, useCustomViewContext, } from
|
|
4
|
+
export { CustomViewContextProvider, useCustomViewContext, } from "./custom-view-context.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TImageRegexContext as ImageRegexContext } from
|
|
1
|
+
import type { TImageRegexContext as ImageRegexContext } from "./project-extension-image-regex.js";
|
|
2
2
|
export type TImageRegexContext = ImageRegexContext;
|
|
3
|
-
export { GetProjectExtensionImageRegex, ProjectExtensionProviderForImageRegex, withProjectExtensionImageRegex, useProjectExtensionImageRegex, } from
|
|
3
|
+
export { GetProjectExtensionImageRegex, ProjectExtensionProviderForImageRegex, withProjectExtensionImageRegex, useProjectExtensionImageRegex, } from "./project-extension-image-regex.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentType, type ReactNode } from 'react';
|
|
2
|
-
import type { TImageRegexOptions } from
|
|
2
|
+
import type { TImageRegexOptions } from "../../types/generated/settings.js";
|
|
3
3
|
export type TImageRegexContext = {
|
|
4
4
|
isLoading: boolean;
|
|
5
5
|
imageRegex?: {
|
|
@@ -18,8 +18,8 @@ type ConsumerProps = {
|
|
|
18
18
|
declare const useProjectExtensionImageRegex: () => {
|
|
19
19
|
isLoading: boolean;
|
|
20
20
|
imageRegex: {
|
|
21
|
-
small?: Pick<TImageRegexOptions, "
|
|
22
|
-
thumb?: Pick<TImageRegexOptions, "
|
|
21
|
+
small?: Pick<TImageRegexOptions, "flag" | "replace" | "search"> | null;
|
|
22
|
+
thumb?: Pick<TImageRegexOptions, "flag" | "replace" | "search"> | null;
|
|
23
23
|
} | null | undefined;
|
|
24
24
|
};
|
|
25
25
|
declare const ProjectExtensionProviderForImageRegex: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { TProviderProps as ProviderProps, TApplicationContext as ApplicationContext, TNormalizedMenuVisibilities as NormalizedMenuVisibilities, TNormalizedPermissions as NormalizedPermissions, TNormalizedActionRights as NormalizedActionRights, TNormalizedDataFences as NormalizedDataFences } from
|
|
2
|
-
import type { TCustomViewContextProviderProps as CustomViewContextProviderProps, TCustomViewContext as CustomViewContext } from
|
|
3
|
-
import type { TImageRegexContext as ImageRegexContext } from
|
|
4
|
-
import type { TApolloContext as ApolloContext } from
|
|
5
|
-
import type { TFetcher, TFetcherResponse, THeaders, TConfig, TOptions, TForwardToAudiencePolicy as ForwardToAudiencePolicy } from
|
|
1
|
+
import type { TProviderProps as ProviderProps, TApplicationContext as ApplicationContext, TNormalizedMenuVisibilities as NormalizedMenuVisibilities, TNormalizedPermissions as NormalizedPermissions, TNormalizedActionRights as NormalizedActionRights, TNormalizedDataFences as NormalizedDataFences } from "./components/application-context/index.js";
|
|
2
|
+
import type { TCustomViewContextProviderProps as CustomViewContextProviderProps, TCustomViewContext as CustomViewContext } from "./components/custom-view-context/index.js";
|
|
3
|
+
import type { TImageRegexContext as ImageRegexContext } from "./components/project-extension-image-regex/index.js";
|
|
4
|
+
import type { TApolloContext as ApolloContext } from "./utils/apollo-context.js";
|
|
5
|
+
import type { TFetcher, TFetcherResponse, THeaders, TConfig, TOptions, TForwardToAudiencePolicy as ForwardToAudiencePolicy } from "./utils/http-client.js";
|
|
6
6
|
export type TProviderProps<AdditionalEnvironmentProperties extends {}> = ProviderProps<AdditionalEnvironmentProperties>;
|
|
7
7
|
export type TApplicationContext<AdditionalEnvironmentProperties extends {}> = ApplicationContext<AdditionalEnvironmentProperties>;
|
|
8
8
|
export type TNormalizedMenuVisibilities = NormalizedMenuVisibilities;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OperationVariables, QueryResult, QueryHookOptions, QueryTuple, MutationTuple, MutationHookOptions, TypedDocumentNode, DocumentNode } from '@apollo/client';
|
|
2
|
-
import type { TApolloContext } from
|
|
2
|
+
import type { TApolloContext } from "../../utils/apollo-context.js";
|
|
3
3
|
type TQueryOptionsWithContext<TData = unknown, TVariables extends OperationVariables = OperationVariables> = QueryHookOptions<TData, TVariables> & {
|
|
4
4
|
context: TApolloContext;
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./apollo-hooks.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { default as version } from
|
|
2
|
-
export * from
|
|
3
|
-
export { Context, ApplicationContext, ApplicationContextProvider, withApplicationContext, useApplicationContext, normalizeAllAppliedActionRights, normalizeAllAppliedDataFences, normalizeAllAppliedMenuVisibilities, normalizeAllAppliedPermissions, } from
|
|
4
|
-
export { useCustomViewParentDataRefresher } from
|
|
5
|
-
export { CustomViewContextProvider, useCustomViewContext, } from
|
|
6
|
-
export { GetProjectExtensionImageRegex, ProjectExtensionProviderForImageRegex, withProjectExtensionImageRegex, useProjectExtensionImageRegex, } from
|
|
7
|
-
export { default as createApolloClient } from
|
|
8
|
-
export { getCorrelationId, getMcApiUrl, isLoggerEnabled, logger, selectUserId, selectProjectKeyFromUrl, selectTeamIdFromStorage, createApolloContextForProxyForwardTo, } from
|
|
9
|
-
export { useMcQuery, useMcLazyQuery, useMcMutation, } from
|
|
10
|
-
export { buildApiUrl, createHttpClientOptions, executeHttpClientRequest, } from
|
|
11
|
-
export * as oidcStorage from
|
|
12
|
-
export { setCachedApolloClient, getCachedApolloClient, } from
|
|
1
|
+
export { default as version } from "./version.js";
|
|
2
|
+
export * from "./export-types.js";
|
|
3
|
+
export { Context, ApplicationContext, ApplicationContextProvider, withApplicationContext, useApplicationContext, normalizeAllAppliedActionRights, normalizeAllAppliedDataFences, normalizeAllAppliedMenuVisibilities, normalizeAllAppliedPermissions, } from "./components/application-context/index.js";
|
|
4
|
+
export { useCustomViewParentDataRefresher } from "./hooks/custom-views/use-custom-view-parent-data-refresher.js";
|
|
5
|
+
export { CustomViewContextProvider, useCustomViewContext, } from "./components/custom-view-context/index.js";
|
|
6
|
+
export { GetProjectExtensionImageRegex, ProjectExtensionProviderForImageRegex, withProjectExtensionImageRegex, useProjectExtensionImageRegex, } from "./components/project-extension-image-regex/index.js";
|
|
7
|
+
export { default as createApolloClient } from "./configure-apollo.js";
|
|
8
|
+
export { getCorrelationId, getMcApiUrl, isLoggerEnabled, logger, selectUserId, selectProjectKeyFromUrl, selectTeamIdFromStorage, createApolloContextForProxyForwardTo, } from "./utils/index.js";
|
|
9
|
+
export { useMcQuery, useMcLazyQuery, useMcMutation, } from "./hooks/apollo-hooks/index.js";
|
|
10
|
+
export { buildApiUrl, createHttpClientOptions, executeHttpClientRequest, } from "./utils/http-client.js";
|
|
11
|
+
export * as oidcStorage from "./utils/oidc-storage.js";
|
|
12
|
+
export { setCachedApolloClient, getCachedApolloClient, } from "./utils/apollo-client-runtime-cache.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./test-utils.js";
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import type { Maybe, TFetchProjectExtensionImageRegexQuery } from
|
|
1
|
+
import type { Maybe, TFetchProjectExtensionImageRegexQuery } from "../types/generated/settings.js";
|
|
2
2
|
export declare const createGraphqlResponseForProjectExtensionImageRegexQuery: (customResponse?: Partial<TFetchProjectExtensionImageRegexQuery>) => {
|
|
3
3
|
__typename?: "Query" | undefined;
|
|
4
4
|
projectExtension: {
|
|
5
|
-
__typename?: "ProjectExtension"
|
|
5
|
+
__typename?: "ProjectExtension";
|
|
6
6
|
id: string;
|
|
7
7
|
imageRegex?: {
|
|
8
|
-
__typename?: "ImageRegex"
|
|
8
|
+
__typename?: "ImageRegex";
|
|
9
9
|
thumb?: {
|
|
10
|
-
__typename?: "ImageRegexOptions"
|
|
11
|
-
flag?: string | null
|
|
10
|
+
__typename?: "ImageRegexOptions";
|
|
11
|
+
flag?: string | null;
|
|
12
12
|
search: string;
|
|
13
13
|
replace: string;
|
|
14
|
-
} | null
|
|
14
|
+
} | null;
|
|
15
15
|
small?: {
|
|
16
|
-
__typename?: "ImageRegexOptions"
|
|
17
|
-
flag?: string | null
|
|
16
|
+
__typename?: "ImageRegexOptions";
|
|
17
|
+
flag?: string | null;
|
|
18
18
|
search: string;
|
|
19
19
|
replace: string;
|
|
20
|
-
} | null
|
|
21
|
-
} | null
|
|
20
|
+
} | null;
|
|
21
|
+
} | null;
|
|
22
22
|
} | {
|
|
23
23
|
__typename: string;
|
|
24
24
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TGraphQLTargets } from '@commercetools-frontend/constants';
|
|
2
|
-
import type { THeaders, TForwardToConfig } from
|
|
2
|
+
import type { THeaders, TForwardToConfig } from "./http-client.js";
|
|
3
3
|
export type TApolloContext = {
|
|
4
4
|
uri?: string;
|
|
5
5
|
headers?: THeaders;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./get-correlation-id.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./get-mc-api-url.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { default as selectTeamIdFromStorage } from
|
|
2
|
-
export { default as selectProjectKeyFromUrl } from
|
|
3
|
-
export { default as selectUserId } from
|
|
4
|
-
export { default as getCorrelationId } from
|
|
5
|
-
export { default as getMcApiUrl } from
|
|
6
|
-
export { createApolloContextForProxyForwardTo } from
|
|
7
|
-
export { isLoggerEnabled, default as logger } from
|
|
1
|
+
export { default as selectTeamIdFromStorage } from "./select-team-id-from-storage/index.js";
|
|
2
|
+
export { default as selectProjectKeyFromUrl } from "./select-project-key-from-url/index.js";
|
|
3
|
+
export { default as selectUserId } from "./select-user-id/index.js";
|
|
4
|
+
export { default as getCorrelationId } from "./get-correlation-id/index.js";
|
|
5
|
+
export { default as getMcApiUrl } from "./get-mc-api-url/index.js";
|
|
6
|
+
export { createApolloContextForProxyForwardTo } from "./apollo-context.js";
|
|
7
|
+
export { isLoggerEnabled, default as logger } from "./logger.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./select-project-key-from-url.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./select-team-id-from-storage.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from "./select-user-id.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/application-shell-connectors",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.8.1",
|
|
4
4
|
"description": "Contains complementary tools for @commercetools-frontend/application-shell",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@babel/runtime": "^7.22.15",
|
|
39
39
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
40
|
-
"@commercetools-frontend/application-config": "24.
|
|
41
|
-
"@commercetools-frontend/browser-history": "24.
|
|
42
|
-
"@commercetools-frontend/constants": "24.
|
|
43
|
-
"@commercetools-frontend/sentry": "24.
|
|
40
|
+
"@commercetools-frontend/application-config": "24.8.1",
|
|
41
|
+
"@commercetools-frontend/browser-history": "24.8.1",
|
|
42
|
+
"@commercetools-frontend/constants": "24.8.1",
|
|
43
|
+
"@commercetools-frontend/sentry": "24.8.1",
|
|
44
44
|
"@commercetools/http-user-agent": "3.0.0",
|
|
45
45
|
"@emotion/react": "^11.14.0",
|
|
46
46
|
"@types/lodash": "^4.14.198",
|
|
47
47
|
"@types/prop-types": "^15.7.5",
|
|
48
48
|
"@types/react": "^19.0.3",
|
|
49
49
|
"apollo-link-logger": "2.0.1",
|
|
50
|
-
"graphql": "16.
|
|
50
|
+
"graphql": "16.11.0",
|
|
51
51
|
"lodash": "4.17.21",
|
|
52
|
-
"moment-timezone": "^0.
|
|
52
|
+
"moment-timezone": "^0.6.0",
|
|
53
53
|
"omit-empty-es": "1.2.0",
|
|
54
54
|
"prop-types": "15.8.1",
|
|
55
55
|
"tiny-warning": "1.0.3",
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
"wait-for-observables": "1.0.3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@apollo/client": "3.
|
|
60
|
+
"@apollo/client": "3.13.9",
|
|
61
61
|
"@testing-library/react": "16.1.0",
|
|
62
|
-
"@types/jest": "^29.5.
|
|
62
|
+
"@types/jest": "^29.5.14",
|
|
63
63
|
"headers-polyfill": "^3.1.2",
|
|
64
64
|
"jest": "29.7.0",
|
|
65
65
|
"jest-mock": "29.7.0",
|
|
66
|
-
"msw": "
|
|
66
|
+
"msw": "^1.3.5",
|
|
67
67
|
"react": "19.0.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
package/test-utils/dist/commercetools-frontend-application-shell-connectors-test-utils.cjs.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "../../dist/declarations/src/test-utils/index";
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
export * from "../../dist/declarations/src/test-utils/index.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1hcHBsaWNhdGlvbi1zaGVsbC1jb25uZWN0b3JzLXRlc3QtdXRpbHMuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9kaXN0L2RlY2xhcmF0aW9ucy9zcmMvdGVzdC11dGlscy9pbmRleC5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commercetools-frontend-application-shell-connectors.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ServerError, ServerParseError } from '@apollo/client';
|
|
2
|
-
import type { ErrorResponse } from '@apollo/client/link/error';
|
|
3
|
-
import type { GraphQLError } from 'graphql';
|
|
4
|
-
import type { TApolloContext } from '../utils/apollo-context';
|
|
5
|
-
declare const getSkipTokenRetry: (context: TApolloContext) => boolean;
|
|
6
|
-
declare const forwardTokenRetryHeader: (headers: TApolloContext['headers']) => TApolloContext['headers'];
|
|
7
|
-
declare const getDoesGraphQLTargetSupportTokenRetry: (context: TApolloContext) => boolean;
|
|
8
|
-
declare const isHttpError: (error: ErrorResponse['networkError']) => error is ServerParseError | ServerError;
|
|
9
|
-
declare const isGraphQLError: (error: ErrorResponse['graphQLErrors']) => error is GraphQLError[];
|
|
10
|
-
export { getSkipTokenRetry, forwardTokenRetryHeader, getDoesGraphQLTargetSupportTokenRetry, isHttpError, isGraphQLError, };
|
package/test-utils/dist/commercetools-frontend-application-shell-connectors-test-utils.cjs.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commercetools-frontend-application-shell-connectors-test-utils.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/test-utils/index.d.ts"],"names":[],"mappings":"AAAA"}
|