@commercetools-frontend/experimental-components 5.4.5 → 6.0.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/commercetools-frontend-experimental-components.cjs.dev.js +533 -334
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +526 -333
- package/dist/commercetools-frontend-experimental-components.esm.js +535 -336
- package/dist/styles.css +88 -73
- package/package.json +18 -19
|
@@ -14,9 +14,9 @@ var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/obje
|
|
|
14
14
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
15
15
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
16
16
|
var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
17
|
-
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
18
17
|
var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
19
18
|
var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
19
|
+
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
20
20
|
var _someInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
21
21
|
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
22
22
|
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
@@ -1674,8 +1674,8 @@ const getData = (code, field) => {
|
|
|
1674
1674
|
};
|
|
1675
1675
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
1676
1676
|
|
|
1677
|
-
function ownKeys$
|
|
1678
|
-
function _objectSpread$
|
|
1677
|
+
function ownKeys$1q(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; }
|
|
1678
|
+
function _objectSpread$1q(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1q(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1q(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1679
1679
|
function formatMoneyRangeValue(value, intl) {
|
|
1680
1680
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
1681
1681
|
if (value.from && value.to) return `${formatMoneyValue(value.from, value.currency, intl)} -
|
|
@@ -1685,7 +1685,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
1685
1685
|
return '';
|
|
1686
1686
|
}
|
|
1687
1687
|
function formatMoneyValue(amount, currency, intl) {
|
|
1688
|
-
return formatMoney$2(_objectSpread$
|
|
1688
|
+
return formatMoney$2(_objectSpread$1q({
|
|
1689
1689
|
centAmount: amount,
|
|
1690
1690
|
fractionDigits: getFractionDigit(currency)
|
|
1691
1691
|
}, currency ? {
|
|
@@ -1701,7 +1701,7 @@ function getFractionedAmount(moneyValue) {
|
|
|
1701
1701
|
return amount / 10 ** fractionDigits;
|
|
1702
1702
|
}
|
|
1703
1703
|
function formatMoney$2(moneyValue, intl, options) {
|
|
1704
|
-
return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$
|
|
1704
|
+
return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$1q({
|
|
1705
1705
|
style: 'currency',
|
|
1706
1706
|
currency: moneyValue.currencyCode,
|
|
1707
1707
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
@@ -1948,8 +1948,8 @@ const setDisplayName = nextDisplayName => Component => {
|
|
|
1948
1948
|
|
|
1949
1949
|
const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName(BaseComponent)})`;
|
|
1950
1950
|
|
|
1951
|
-
function ownKeys$
|
|
1952
|
-
function _objectSpread$
|
|
1951
|
+
function ownKeys$1p(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; }
|
|
1952
|
+
function _objectSpread$1p(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1p(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1p(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1953
1953
|
const injectDataTablePaginationState = initialValues => Component => {
|
|
1954
1954
|
const WithDataTablePaginationState = props => {
|
|
1955
1955
|
const _usePaginationState = uiKit.usePaginationState({
|
|
@@ -1962,7 +1962,7 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1962
1962
|
key: initialValues?.tableSorting?.key,
|
|
1963
1963
|
order: initialValues?.tableSorting?.order
|
|
1964
1964
|
});
|
|
1965
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1965
|
+
return jsxRuntime.jsx(Component, _objectSpread$1p(_objectSpread$1p({}, props), {}, {
|
|
1966
1966
|
dataTablePaginationState: {
|
|
1967
1967
|
page,
|
|
1968
1968
|
perPage,
|
|
@@ -1974,8 +1974,8 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1974
1974
|
return WithDataTablePaginationState;
|
|
1975
1975
|
};
|
|
1976
1976
|
|
|
1977
|
-
function ownKeys$
|
|
1978
|
-
function _objectSpread$
|
|
1977
|
+
function ownKeys$1o(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; }
|
|
1978
|
+
function _objectSpread$1o(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1o(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1o(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1979
1979
|
const injectNotifications = function () {
|
|
1980
1980
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
1981
1981
|
return Component => {
|
|
@@ -1990,7 +1990,7 @@ const injectNotifications = function () {
|
|
|
1990
1990
|
onActionError,
|
|
1991
1991
|
hideAllPageNotifications
|
|
1992
1992
|
};
|
|
1993
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1993
|
+
return jsxRuntime.jsx(Component, _objectSpread$1o(_objectSpread$1o({}, props), {}, {
|
|
1994
1994
|
[propName]: notifications
|
|
1995
1995
|
}));
|
|
1996
1996
|
};
|
|
@@ -1999,22 +1999,22 @@ const injectNotifications = function () {
|
|
|
1999
1999
|
};
|
|
2000
2000
|
};
|
|
2001
2001
|
|
|
2002
|
-
function ownKeys$
|
|
2003
|
-
function _objectSpread$
|
|
2002
|
+
function ownKeys$1n(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; }
|
|
2003
|
+
function _objectSpread$1n(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1n(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1n(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2004
2004
|
function isPropsMapper(mapProps) {
|
|
2005
2005
|
return typeof mapProps === 'function';
|
|
2006
2006
|
}
|
|
2007
2007
|
const withProps = mapProps => Component => {
|
|
2008
2008
|
const EnhancedWithProps = ownProps => {
|
|
2009
|
-
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
2010
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2009
|
+
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1n(_objectSpread$1n({}, ownProps), mapProps(ownProps)) : _objectSpread$1n(_objectSpread$1n({}, ownProps), mapProps);
|
|
2010
|
+
return jsxRuntime.jsx(Component, _objectSpread$1n({}, enhancedProps));
|
|
2011
2011
|
};
|
|
2012
2012
|
EnhancedWithProps.displayName = wrapDisplayName(Component, 'withProps');
|
|
2013
2013
|
return EnhancedWithProps;
|
|
2014
2014
|
};
|
|
2015
2015
|
|
|
2016
|
-
function ownKeys$
|
|
2017
|
-
function _objectSpread$
|
|
2016
|
+
function ownKeys$1m(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; }
|
|
2017
|
+
function _objectSpread$1m(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1m(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1m(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2018
2018
|
const useRedirectEffect = _ref => {
|
|
2019
2019
|
let goTo = _ref.goTo;
|
|
2020
2020
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -2034,30 +2034,30 @@ const defaultOptions$5 = {
|
|
|
2034
2034
|
skip: () => false
|
|
2035
2035
|
};
|
|
2036
2036
|
const withRedirectTo = options => Component => {
|
|
2037
|
-
const mergedOptions = _objectSpread$
|
|
2037
|
+
const mergedOptions = _objectSpread$1m(_objectSpread$1m({}, defaultOptions$5), options);
|
|
2038
2038
|
const WithRedirectTo = props => {
|
|
2039
2039
|
if (!mergedOptions.skip(props)) {
|
|
2040
2040
|
return jsxRuntime.jsx(RedirectTo, {
|
|
2041
2041
|
goTo: options.selectGoTo(props)
|
|
2042
2042
|
});
|
|
2043
2043
|
}
|
|
2044
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2044
|
+
return jsxRuntime.jsx(Component, _objectSpread$1m({}, props));
|
|
2045
2045
|
};
|
|
2046
2046
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
2047
2047
|
return WithRedirectTo;
|
|
2048
2048
|
};
|
|
2049
2049
|
|
|
2050
|
-
function ownKeys$
|
|
2051
|
-
function _objectSpread$
|
|
2050
|
+
function ownKeys$1l(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; }
|
|
2051
|
+
function _objectSpread$1l(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1l(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1l(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2052
2052
|
const defaultOptions$4 = {
|
|
2053
2053
|
propName: 'modalState',
|
|
2054
2054
|
isInitiallyOpen: false
|
|
2055
2055
|
};
|
|
2056
2056
|
const injectModalState$1 = options => Component => {
|
|
2057
|
-
const mergedOptions = _objectSpread$
|
|
2057
|
+
const mergedOptions = _objectSpread$1l(_objectSpread$1l({}, defaultOptions$4), options);
|
|
2058
2058
|
const WithModalState = props => {
|
|
2059
2059
|
const modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
2060
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2060
|
+
return jsxRuntime.jsx(Component, _objectSpread$1l(_objectSpread$1l({}, props), {}, {
|
|
2061
2061
|
[mergedOptions.propName]: modalState
|
|
2062
2062
|
}));
|
|
2063
2063
|
};
|
|
@@ -2065,17 +2065,17 @@ const injectModalState$1 = options => Component => {
|
|
|
2065
2065
|
return WithModalState;
|
|
2066
2066
|
};
|
|
2067
2067
|
|
|
2068
|
-
function ownKeys$
|
|
2069
|
-
function _objectSpread$
|
|
2068
|
+
function ownKeys$1k(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; }
|
|
2069
|
+
function _objectSpread$1k(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2070
2070
|
const defaultOptions$3 = {
|
|
2071
2071
|
propName: 'toggleState',
|
|
2072
2072
|
isInitiallyOpen: false
|
|
2073
2073
|
};
|
|
2074
2074
|
const injectModalState = options => Component => {
|
|
2075
|
-
const mergedOptions = _objectSpread$
|
|
2075
|
+
const mergedOptions = _objectSpread$1k(_objectSpread$1k({}, defaultOptions$3), options);
|
|
2076
2076
|
const WithToggleState = props => {
|
|
2077
2077
|
const toggleState = uiKit.useToggleState(mergedOptions.isInitiallyOpen);
|
|
2078
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2078
|
+
return jsxRuntime.jsx(Component, _objectSpread$1k(_objectSpread$1k({}, props), {}, {
|
|
2079
2079
|
[mergedOptions.propName]: toggleState
|
|
2080
2080
|
}));
|
|
2081
2081
|
};
|
|
@@ -2083,8 +2083,8 @@ const injectModalState = options => Component => {
|
|
|
2083
2083
|
return WithToggleState;
|
|
2084
2084
|
};
|
|
2085
2085
|
|
|
2086
|
-
function ownKeys$
|
|
2087
|
-
function _objectSpread$
|
|
2086
|
+
function ownKeys$1j(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; }
|
|
2087
|
+
function _objectSpread$1j(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$1j(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$1j(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2088
2088
|
const defaultOptions$2 = {
|
|
2089
2089
|
storageType: 'local',
|
|
2090
2090
|
segregateByUser: true
|
|
@@ -2102,7 +2102,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
|
|
|
2102
2102
|
const isNil = value => typeof value === 'undefined' || value === null;
|
|
2103
2103
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
2104
2104
|
var _context;
|
|
2105
|
-
const mergedOptions = _objectSpread$
|
|
2105
|
+
const mergedOptions = _objectSpread$1j(_objectSpread$1j({}, defaultOptions$2), options);
|
|
2106
2106
|
const userId = applicationShellConnectors.useApplicationContext(context => context.user?.id);
|
|
2107
2107
|
const scopedStorageKey = _filterInstanceProperty__default["default"](_context = [mergedOptions.segregateByUser && userId, storageKey]).call(_context, Boolean).join('/');
|
|
2108
2108
|
const readFromStorage = React.useCallback(() => {
|
|
@@ -2146,8 +2146,8 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
2146
2146
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
2147
2147
|
};
|
|
2148
2148
|
|
|
2149
|
-
function ownKeys$
|
|
2150
|
-
function _objectSpread$
|
|
2149
|
+
function ownKeys$1i(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; }
|
|
2150
|
+
function _objectSpread$1i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2151
2151
|
const defaultOptions$1 = {
|
|
2152
2152
|
propName: 'storage',
|
|
2153
2153
|
storageKey: '',
|
|
@@ -2160,7 +2160,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
2160
2160
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
2161
2161
|
* argument position does not allow passing specification of option(s).
|
|
2162
2162
|
*/
|
|
2163
|
-
const mergedOptions = _objectSpread$
|
|
2163
|
+
const mergedOptions = _objectSpread$1i(_objectSpread$1i({}, defaultOptions$1), options);
|
|
2164
2164
|
const WithStorage = props => {
|
|
2165
2165
|
const _useStorage = useStorage(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
2166
2166
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -2174,7 +2174,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
2174
2174
|
readFromStorage
|
|
2175
2175
|
}
|
|
2176
2176
|
};
|
|
2177
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
2177
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1i(_objectSpread$1i({}, props), storageProp));
|
|
2178
2178
|
};
|
|
2179
2179
|
WithStorage.displayName = wrapDisplayName(WrappedComponent, 'WithStorage');
|
|
2180
2180
|
return WithStorage;
|
|
@@ -2218,8 +2218,8 @@ const usePrevious = value => {
|
|
|
2218
2218
|
return ref.current;
|
|
2219
2219
|
};
|
|
2220
2220
|
|
|
2221
|
-
function ownKeys$
|
|
2222
|
-
function _objectSpread$
|
|
2221
|
+
function ownKeys$1h(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; }
|
|
2222
|
+
function _objectSpread$1h(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$1h(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$1h(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2223
2223
|
var FetchStoresQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sort" } }, type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "Variable", name: { kind: "Name", value: "sort" } } }, { kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "count" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "offset" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "StoreBasicInfo" }, directives: [] }, { kind: "Field", name: { kind: "Name", value: "countries" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "languages" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }] }, { kind: "Field", name: { kind: "Name", value: "distributionChannelsRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "distributionChannels" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "supplyChannels" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelection" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "StoreBasicInfo" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Store" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastModifiedAt" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 1089, source: { body: "#import '../../utils/graphql/fragments/store-basic-info.ctp.graphql'\n\nquery FetchStoresQuery(\n $limit: Int\n $offset: Int\n $sort: [String!]\n $where: String\n $excludeExtendedStoresList: Boolean!\n $excludeProductSelections: Boolean!\n) {\n stores(limit: $limit, offset: $offset, sort: $sort, where: $where) {\n total\n count\n offset\n results {\n ...StoreBasicInfo\n countries {\n code\n }\n languages @skip(if: $excludeExtendedStoresList)\n distributionChannelsRef {\n id\n }\n distributionChannels @skip(if: $excludeExtendedStoresList) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n supplyChannels @skip(if: $excludeExtendedStoresList) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n productSelections @skip(if: $excludeProductSelections) {\n active\n productSelection {\n id\n mode\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
2224
2224
|
const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
2225
2225
|
if (!storesQueryResult) return null;
|
|
@@ -2228,7 +2228,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
2228
2228
|
count: storesQueryResult.count,
|
|
2229
2229
|
offset: storesQueryResult.offset,
|
|
2230
2230
|
results: storesQueryResult.results?.map(store => {
|
|
2231
|
-
return _objectSpread$
|
|
2231
|
+
return _objectSpread$1h(_objectSpread$1h({}, store), {}, {
|
|
2232
2232
|
productSelections: store.productSelections?.filter(productSelectionRef => Boolean(productSelectionRef.productSelection))
|
|
2233
2233
|
});
|
|
2234
2234
|
})
|
|
@@ -2236,7 +2236,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
2236
2236
|
};
|
|
2237
2237
|
const createQueryVariables$6 = ownProps => {
|
|
2238
2238
|
var _context;
|
|
2239
|
-
return _objectSpread$
|
|
2239
|
+
return _objectSpread$1h(_objectSpread$1h({
|
|
2240
2240
|
limit: ownProps.limit,
|
|
2241
2241
|
offset: ownProps.offset,
|
|
2242
2242
|
sort: _sortInstanceProperty__default["default"](ownProps)
|
|
@@ -2382,8 +2382,8 @@ function useDidFormValidationFail() {
|
|
|
2382
2382
|
return Boolean(didFormValidationFail);
|
|
2383
2383
|
}
|
|
2384
2384
|
|
|
2385
|
-
function ownKeys$
|
|
2386
|
-
function _objectSpread$
|
|
2385
|
+
function ownKeys$1g(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; }
|
|
2386
|
+
function _objectSpread$1g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1g(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2387
2387
|
const TEN_MINUTES_IN_MS = 600000;
|
|
2388
2388
|
const defaultOptions = {
|
|
2389
2389
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -2411,7 +2411,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
2411
2411
|
};
|
|
2412
2412
|
const usePersistedReminder = function () {
|
|
2413
2413
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2414
|
-
const mergedOptions = _objectSpread$
|
|
2414
|
+
const mergedOptions = _objectSpread$1g(_objectSpread$1g({}, defaultOptions), options);
|
|
2415
2415
|
const _useStorage = useStorage(mergedOptions.storageKey, null),
|
|
2416
2416
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
2417
2417
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -2475,8 +2475,8 @@ var messages$I = reactIntl.defineMessages({
|
|
|
2475
2475
|
}
|
|
2476
2476
|
});
|
|
2477
2477
|
|
|
2478
|
-
function ownKeys$
|
|
2479
|
-
function _objectSpread$
|
|
2478
|
+
function ownKeys$1f(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; }
|
|
2479
|
+
function _objectSpread$1f(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1f(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2480
2480
|
const LinkToProfile = props => {
|
|
2481
2481
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
2482
2482
|
to: "/account/profile",
|
|
@@ -2496,7 +2496,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2496
2496
|
isBold: true,
|
|
2497
2497
|
intlMessage: messages$I.profileUpdated
|
|
2498
2498
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2499
|
-
intlMessage: _objectSpread$
|
|
2499
|
+
intlMessage: _objectSpread$1f(_objectSpread$1f({}, messages$I.addMoreInformation), {}, {
|
|
2500
2500
|
values: {
|
|
2501
2501
|
newline: getNewLine
|
|
2502
2502
|
}
|
|
@@ -2505,7 +2505,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2505
2505
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2506
2506
|
scale: "xs",
|
|
2507
2507
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2508
|
-
intlMessage: _objectSpread$
|
|
2508
|
+
intlMessage: _objectSpread$1f(_objectSpread$1f({}, messages$I.informationAndProfileLink), {}, {
|
|
2509
2509
|
values: {
|
|
2510
2510
|
newline: getNewLine,
|
|
2511
2511
|
link: getLinkToProfile
|
|
@@ -2662,8 +2662,8 @@ const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
|
2662
2662
|
// eslint-disable-next-line testing-library/await-async-utils
|
|
2663
2663
|
React.useCallback(debounce__default["default"](promiseCallback, wait), [promiseCallback]);
|
|
2664
2664
|
|
|
2665
|
-
function ownKeys$
|
|
2666
|
-
function _objectSpread$
|
|
2665
|
+
function ownKeys$1e(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; }
|
|
2666
|
+
function _objectSpread$1e(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$1e(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$1e(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2667
2667
|
const prepareMutableColumnProps = (columnConfig, mutableColumnProps) => {
|
|
2668
2668
|
const updatedColumnProps = {};
|
|
2669
2669
|
_forEachInstanceProperty__default["default"](mutableColumnProps).call(mutableColumnProps, columnProp => {
|
|
@@ -2683,14 +2683,14 @@ const retrieveColumnsWithCachedConfiguration = _ref => {
|
|
|
2683
2683
|
mutableColumnProps = _ref.mutableColumnProps;
|
|
2684
2684
|
return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](cachedVisibleTableConfiguration).call(cachedVisibleTableConfiguration, cachedColumn => _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedColumn.key))).call(_context, cachedConfig => {
|
|
2685
2685
|
const initialColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedConfig.key);
|
|
2686
|
-
return _objectSpread$
|
|
2686
|
+
return _objectSpread$1e(_objectSpread$1e({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2687
2687
|
});
|
|
2688
2688
|
};
|
|
2689
2689
|
const handleCacheUpdate = _ref2 => {
|
|
2690
2690
|
let update = _ref2.update,
|
|
2691
2691
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2692
2692
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2693
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2693
|
+
return updateCachedTableConfiguration(_objectSpread$1e(_objectSpread$1e({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2694
2694
|
};
|
|
2695
2695
|
|
|
2696
2696
|
// Signature:
|
|
@@ -2719,7 +2719,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2719
2719
|
return {
|
|
2720
2720
|
columnsConfig: _mapInstanceProperty__default["default"](initialVisibleColumnKeys).call(initialVisibleColumnKeys, visibleColumnKey => {
|
|
2721
2721
|
const visibleColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, columnConfig => columnConfig.key === visibleColumnKey);
|
|
2722
|
-
return _objectSpread$
|
|
2722
|
+
return _objectSpread$1e({
|
|
2723
2723
|
key: visibleColumnKey
|
|
2724
2724
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2725
2725
|
}),
|
|
@@ -2789,14 +2789,14 @@ const handlers$4 = {
|
|
|
2789
2789
|
}
|
|
2790
2790
|
};
|
|
2791
2791
|
|
|
2792
|
-
function ownKeys$
|
|
2793
|
-
function _objectSpread$
|
|
2792
|
+
function ownKeys$1d(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; }
|
|
2793
|
+
function _objectSpread$1d(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$1d(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$1d(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2794
2794
|
|
|
2795
2795
|
// eslint-disable-next-line import/prefer-default-export
|
|
2796
2796
|
const convertProductSelectionsFromGraphQl = productSelections => {
|
|
2797
2797
|
var _context;
|
|
2798
|
-
return productSelections?.results && _objectSpread$
|
|
2799
|
-
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$
|
|
2798
|
+
return productSelections?.results && _objectSpread$1d(_objectSpread$1d({}, productSelections), {}, {
|
|
2799
|
+
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$1d({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
2800
2800
|
from: 'nameAllLocales',
|
|
2801
2801
|
to: 'name'
|
|
2802
2802
|
}])))
|
|
@@ -2932,7 +2932,7 @@ var localizedTextTransformer = (localizedString => {
|
|
|
2932
2932
|
return _mapInstanceProperty__default["default"](_context = _Object$keys__default["default"](localizedString)).call(_context, locale => `${locale} = "${localizedString[locale]}"`).join(' and ');
|
|
2933
2933
|
});
|
|
2934
2934
|
|
|
2935
|
-
var styles$
|
|
2935
|
+
var styles$j = {
|
|
2936
2936
|
"loading-container": "centered-loading-spinner-module__loading-container___3_9-h"
|
|
2937
2937
|
};
|
|
2938
2938
|
/**
|
|
@@ -2940,7 +2940,7 @@ var styles$i = {
|
|
|
2940
2940
|
* - the ui-kit Spacings.Stack does not allow for custom styles, nor does it stretch to fill its container's height
|
|
2941
2941
|
*/
|
|
2942
2942
|
const CenteredLoadingSpinner = () => jsxRuntime.jsx("div", {
|
|
2943
|
-
className: styles$
|
|
2943
|
+
className: styles$j['loading-container'],
|
|
2944
2944
|
"data-testid": "centered-loading-spinner",
|
|
2945
2945
|
children: jsxRuntime.jsx(uiKit.LoadingSpinner, {})
|
|
2946
2946
|
});
|
|
@@ -2972,11 +2972,12 @@ var commonPickerMessages = reactIntl.defineMessages({
|
|
|
2972
2972
|
}
|
|
2973
2973
|
});
|
|
2974
2974
|
|
|
2975
|
-
function ownKeys$
|
|
2976
|
-
function _objectSpread$
|
|
2975
|
+
function ownKeys$1c(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; }
|
|
2976
|
+
function _objectSpread$1c(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$1c(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$1c(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2977
2977
|
var GetChannelsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channels" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "ListValue", values: [{ kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, { kind: "StringValue", value: "key", block: false }] } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "60" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
2978
2978
|
var GetChannelQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channel" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
2979
2979
|
var PickerInputChannel = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
2980
|
+
const getRolesClause = roles => roles && roles.length > 0 ? `roles contains any (${_mapInstanceProperty__default["default"](roles).call(roles, role => `"${role}"`).join(',')})` : undefined;
|
|
2980
2981
|
const ChannelPickerInput = _ref => {
|
|
2981
2982
|
let isClearable = _ref.isClearable,
|
|
2982
2983
|
isDisabled = _ref.isDisabled,
|
|
@@ -2988,16 +2989,19 @@ const ChannelPickerInput = _ref => {
|
|
|
2988
2989
|
hasError = _ref.hasError,
|
|
2989
2990
|
onError = _ref.onError,
|
|
2990
2991
|
placeholder = _ref.placeholder,
|
|
2991
|
-
|
|
2992
|
+
roles = _ref.roles;
|
|
2992
2993
|
const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
|
|
2993
2994
|
const _useIntl = reactIntl.useIntl(),
|
|
2994
2995
|
formatMessage = _useIntl.formatMessage;
|
|
2995
2996
|
const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
|
|
2996
|
-
const variables = React.useMemo(() =>
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
2997
|
+
const variables = React.useMemo(() => {
|
|
2998
|
+
const rolesClause = getRolesClause(roles);
|
|
2999
|
+
return _objectSpread$1c({
|
|
3000
|
+
sortByNamePath: `name.${dataLocale}`
|
|
3001
|
+
}, rolesClause && {
|
|
3002
|
+
extraWhere: rolesClause
|
|
3003
|
+
});
|
|
3004
|
+
}, [dataLocale, roles]);
|
|
3001
3005
|
const _useState = React.useState(),
|
|
3002
3006
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3003
3007
|
loadingError = _useState2[0],
|
|
@@ -3091,14 +3095,25 @@ const ChannelPickerInput = _ref => {
|
|
|
3091
3095
|
};
|
|
3092
3096
|
ChannelPickerInput.displayName = 'ChannelPickerInput';
|
|
3093
3097
|
|
|
3094
|
-
function
|
|
3095
|
-
function
|
|
3098
|
+
function _callSuper$9(_this, derived, args) {
|
|
3099
|
+
function isNativeReflectConstruct() {
|
|
3100
|
+
if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false;
|
|
3101
|
+
if (_Reflect$construct__default["default"].sham) return false;
|
|
3102
|
+
if (typeof Proxy === "function") return true;
|
|
3103
|
+
try {
|
|
3104
|
+
return !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {}));
|
|
3105
|
+
} catch (e) {
|
|
3106
|
+
return false;
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3109
|
+
derived = _getPrototypeOf(derived);
|
|
3110
|
+
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? _Reflect$construct__default["default"](derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
3111
|
+
}
|
|
3096
3112
|
let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
3097
3113
|
_inherits(FormattedDateTime, _PureComponent);
|
|
3098
|
-
var _super = _createSuper$9(FormattedDateTime);
|
|
3099
3114
|
function FormattedDateTime() {
|
|
3100
3115
|
_classCallCheck(this, FormattedDateTime);
|
|
3101
|
-
return
|
|
3116
|
+
return _callSuper$9(this, FormattedDateTime, arguments);
|
|
3102
3117
|
}
|
|
3103
3118
|
_createClass(FormattedDateTime, [{
|
|
3104
3119
|
key: "render",
|
|
@@ -3121,21 +3136,32 @@ var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
|
3121
3136
|
|
|
3122
3137
|
const keepDisplayName = component => setDisplayName(getDisplayName(component));
|
|
3123
3138
|
|
|
3124
|
-
function ownKeys$
|
|
3125
|
-
function _objectSpread$
|
|
3126
|
-
function
|
|
3127
|
-
function
|
|
3139
|
+
function ownKeys$1b(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; }
|
|
3140
|
+
function _objectSpread$1b(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1b(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1b(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3141
|
+
function _callSuper$8(_this, derived, args) {
|
|
3142
|
+
function isNativeReflectConstruct() {
|
|
3143
|
+
if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false;
|
|
3144
|
+
if (_Reflect$construct__default["default"].sham) return false;
|
|
3145
|
+
if (typeof Proxy === "function") return true;
|
|
3146
|
+
try {
|
|
3147
|
+
return !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {}));
|
|
3148
|
+
} catch (e) {
|
|
3149
|
+
return false;
|
|
3150
|
+
}
|
|
3151
|
+
}
|
|
3152
|
+
derived = _getPrototypeOf(derived);
|
|
3153
|
+
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? _Reflect$construct__default["default"](derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
3154
|
+
}
|
|
3128
3155
|
const withMouseOverState = BaseComponent => {
|
|
3129
3156
|
let WithMouseOverState = /*#__PURE__*/function (_Component) {
|
|
3130
3157
|
_inherits(WithMouseOverState, _Component);
|
|
3131
|
-
var _super = _createSuper$8(WithMouseOverState);
|
|
3132
3158
|
function WithMouseOverState() {
|
|
3133
3159
|
var _this;
|
|
3134
3160
|
_classCallCheck(this, WithMouseOverState);
|
|
3135
3161
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3136
3162
|
args[_key] = arguments[_key];
|
|
3137
3163
|
}
|
|
3138
|
-
_this =
|
|
3164
|
+
_this = _callSuper$8(this, WithMouseOverState, [...args]);
|
|
3139
3165
|
_this.state = {
|
|
3140
3166
|
isMouseOver: false
|
|
3141
3167
|
};
|
|
@@ -3154,7 +3180,7 @@ const withMouseOverState = BaseComponent => {
|
|
|
3154
3180
|
handleMouseOver: this.handleMouseOver,
|
|
3155
3181
|
handleMouseOut: this.handleMouseOut
|
|
3156
3182
|
};
|
|
3157
|
-
return jsxRuntime.jsx(BaseComponent, _objectSpread$
|
|
3183
|
+
return jsxRuntime.jsx(BaseComponent, _objectSpread$1b({}, _objectSpread$1b(_objectSpread$1b({}, this.props), injectedProps)));
|
|
3158
3184
|
}
|
|
3159
3185
|
}]);
|
|
3160
3186
|
return WithMouseOverState;
|
|
@@ -3163,11 +3189,23 @@ const withMouseOverState = BaseComponent => {
|
|
|
3163
3189
|
return WithMouseOverState;
|
|
3164
3190
|
};
|
|
3165
3191
|
|
|
3166
|
-
function ownKeys$
|
|
3167
|
-
function _objectSpread$
|
|
3168
|
-
function
|
|
3169
|
-
function
|
|
3170
|
-
|
|
3192
|
+
function ownKeys$1a(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; }
|
|
3193
|
+
function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1a(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3194
|
+
function _callSuper$7(_this, derived, args) {
|
|
3195
|
+
function isNativeReflectConstruct() {
|
|
3196
|
+
if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false;
|
|
3197
|
+
if (_Reflect$construct__default["default"].sham) return false;
|
|
3198
|
+
if (typeof Proxy === "function") return true;
|
|
3199
|
+
try {
|
|
3200
|
+
return !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {}));
|
|
3201
|
+
} catch (e) {
|
|
3202
|
+
return false;
|
|
3203
|
+
}
|
|
3204
|
+
}
|
|
3205
|
+
derived = _getPrototypeOf(derived);
|
|
3206
|
+
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? _Reflect$construct__default["default"](derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
3207
|
+
}
|
|
3208
|
+
var styles$i = {
|
|
3171
3209
|
"size": "throttled-field-module__size___324jx",
|
|
3172
3210
|
"input-text": "throttled-field-module__input-text___3zFFp",
|
|
3173
3211
|
"input-secondary": "throttled-field-module__input-secondary___cFo9e throttled-field-module__input-text___3zFFp throttled-field-module__size___324jx",
|
|
@@ -3181,14 +3219,13 @@ var styles$h = {
|
|
|
3181
3219
|
};
|
|
3182
3220
|
let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
3183
3221
|
_inherits(ThrottledField, _PureComponent);
|
|
3184
|
-
var _super = _createSuper$7(ThrottledField);
|
|
3185
3222
|
function ThrottledField() {
|
|
3186
3223
|
var _this;
|
|
3187
3224
|
_classCallCheck(this, ThrottledField);
|
|
3188
3225
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3189
3226
|
args[_key] = arguments[_key];
|
|
3190
3227
|
}
|
|
3191
|
-
_this =
|
|
3228
|
+
_this = _callSuper$7(this, ThrottledField, [...args]);
|
|
3192
3229
|
_this.state = {
|
|
3193
3230
|
draftValue: '',
|
|
3194
3231
|
prevValue: ''
|
|
@@ -3256,7 +3293,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3256
3293
|
}, {
|
|
3257
3294
|
key: "render",
|
|
3258
3295
|
value: function render() {
|
|
3259
|
-
const commonProps = _objectSpread$
|
|
3296
|
+
const commonProps = _objectSpread$1a(_objectSpread$1a({
|
|
3260
3297
|
value: this.state.draftValue,
|
|
3261
3298
|
autoComplete: this.props.autoComplete,
|
|
3262
3299
|
onChange: this.handleChange,
|
|
@@ -3275,23 +3312,23 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3275
3312
|
htmlFor: inputId,
|
|
3276
3313
|
children: this.props.label
|
|
3277
3314
|
})
|
|
3278
|
-
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$
|
|
3315
|
+
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$1a(_objectSpread$1a({}, commonProps), {}, {
|
|
3279
3316
|
id: inputId,
|
|
3280
|
-
className: classnames__default["default"](styles$
|
|
3281
|
-
[styles$
|
|
3282
|
-
[styles$
|
|
3317
|
+
className: classnames__default["default"](styles$i.textarea, styles$i[`textarea-${this.props.style}`], {
|
|
3318
|
+
[styles$i.invalid]: !this.props.isValid,
|
|
3319
|
+
[styles$i.disabled]: this.props.disabled
|
|
3283
3320
|
}),
|
|
3284
3321
|
rows: 1,
|
|
3285
3322
|
maxRows: this.props.autoSize ? undefined : 1,
|
|
3286
3323
|
cacheMeasurements: true
|
|
3287
|
-
})) : jsxRuntime.jsx("input", _objectSpread$
|
|
3324
|
+
})) : jsxRuntime.jsx("input", _objectSpread$1a(_objectSpread$1a({}, commonProps), {}, {
|
|
3288
3325
|
id: inputId,
|
|
3289
3326
|
ref: this.props.inputRef,
|
|
3290
3327
|
type: this.props.as,
|
|
3291
|
-
className: classnames__default["default"](styles$
|
|
3292
|
-
[styles$
|
|
3293
|
-
[styles$
|
|
3294
|
-
[styles$
|
|
3328
|
+
className: classnames__default["default"](styles$i[`input-${this.props.style}`], {
|
|
3329
|
+
[styles$i.invalid]: !this.props.isValid,
|
|
3330
|
+
[styles$i.disabled]: this.props.disabled,
|
|
3331
|
+
[styles$i.granular]: this.props.isGranular
|
|
3295
3332
|
})
|
|
3296
3333
|
}))]
|
|
3297
3334
|
});
|
|
@@ -3335,9 +3372,21 @@ var messages$F = reactIntl.defineMessages({
|
|
|
3335
3372
|
}
|
|
3336
3373
|
});
|
|
3337
3374
|
|
|
3338
|
-
function
|
|
3339
|
-
function
|
|
3340
|
-
|
|
3375
|
+
function _callSuper$6(_this, derived, args) {
|
|
3376
|
+
function isNativeReflectConstruct() {
|
|
3377
|
+
if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false;
|
|
3378
|
+
if (_Reflect$construct__default["default"].sham) return false;
|
|
3379
|
+
if (typeof Proxy === "function") return true;
|
|
3380
|
+
try {
|
|
3381
|
+
return !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {}));
|
|
3382
|
+
} catch (e) {
|
|
3383
|
+
return false;
|
|
3384
|
+
}
|
|
3385
|
+
}
|
|
3386
|
+
derived = _getPrototypeOf(derived);
|
|
3387
|
+
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? _Reflect$construct__default["default"](derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
3388
|
+
}
|
|
3389
|
+
var styles$h = {
|
|
3341
3390
|
"block": "search-input-module__block___1uM-y",
|
|
3342
3391
|
"container": "search-input-module__container___9u6if",
|
|
3343
3392
|
"input-container": "search-input-module__input-container___mJnyZ",
|
|
@@ -3354,14 +3403,13 @@ var styles$g = {
|
|
|
3354
3403
|
};
|
|
3355
3404
|
let SearchInput = /*#__PURE__*/function (_Component) {
|
|
3356
3405
|
_inherits(SearchInput, _Component);
|
|
3357
|
-
var _super = _createSuper$6(SearchInput);
|
|
3358
3406
|
function SearchInput() {
|
|
3359
3407
|
var _this;
|
|
3360
3408
|
_classCallCheck(this, SearchInput);
|
|
3361
3409
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3362
3410
|
args[_key] = arguments[_key];
|
|
3363
3411
|
}
|
|
3364
|
-
_this =
|
|
3412
|
+
_this = _callSuper$6(this, SearchInput, [...args]);
|
|
3365
3413
|
_this.state = {
|
|
3366
3414
|
initialValue: _this.props.initialValue,
|
|
3367
3415
|
text: _this.props.initialValue || ''
|
|
@@ -3413,14 +3461,14 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3413
3461
|
key: "render",
|
|
3414
3462
|
value: function render() {
|
|
3415
3463
|
return jsxRuntime.jsx("div", {
|
|
3416
|
-
className: classnames__default["default"](this.props.blockClassName, styles$
|
|
3464
|
+
className: classnames__default["default"](this.props.blockClassName, styles$h.block),
|
|
3417
3465
|
children: jsxRuntime.jsxs("div", {
|
|
3418
|
-
className: classnames__default["default"](this.props.containerClassName, styles$
|
|
3466
|
+
className: classnames__default["default"](this.props.containerClassName, styles$h.container),
|
|
3419
3467
|
children: [jsxRuntime.jsx("div", {
|
|
3420
|
-
className: classnames__default["default"](styles$
|
|
3421
|
-
[styles$
|
|
3422
|
-
[styles$
|
|
3423
|
-
[styles$
|
|
3468
|
+
className: classnames__default["default"](styles$h['input-container'], {
|
|
3469
|
+
[styles$h['input-container-hoverable']]: !this.props.disabled,
|
|
3470
|
+
[styles$h['input-container-disabled']]: this.props.disabled && this.props.enableDisabledStyle,
|
|
3471
|
+
[styles$h['input-container-granular']]: this.props.isGranular
|
|
3424
3472
|
}),
|
|
3425
3473
|
children: jsxRuntime.jsx(ThrottledField, {
|
|
3426
3474
|
style: "primary",
|
|
@@ -3438,8 +3486,8 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3438
3486
|
isGranular: this.props.isGranular
|
|
3439
3487
|
})
|
|
3440
3488
|
}), this.state.text && jsxRuntime.jsx(uiKit.SecondaryIconButton, {
|
|
3441
|
-
className: classnames__default["default"](styles$
|
|
3442
|
-
[styles$
|
|
3489
|
+
className: classnames__default["default"](styles$h['clear-icon-container'], {
|
|
3490
|
+
[styles$h['clear-icon-container-granular']]: this.props.isGranular
|
|
3443
3491
|
}),
|
|
3444
3492
|
icon: jsxRuntime.jsx(uiKit.CloseIcon, {}),
|
|
3445
3493
|
size: "medium",
|
|
@@ -3447,9 +3495,9 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3447
3495
|
onClick: this.handleClear
|
|
3448
3496
|
}), jsxRuntime.jsx("div", {
|
|
3449
3497
|
"data-testid": "search-button",
|
|
3450
|
-
className: classnames__default["default"](styles$
|
|
3451
|
-
[styles$
|
|
3452
|
-
[styles$
|
|
3498
|
+
className: classnames__default["default"](styles$h['search-icon-container'], {
|
|
3499
|
+
[styles$h['search-icon-container-hoverable']]: !this.props.disabled,
|
|
3500
|
+
[styles$h['search-icon-container-granular']]: this.props.isGranular
|
|
3453
3501
|
}),
|
|
3454
3502
|
onClick: this.props.disabled ? null : this.handleSubmit,
|
|
3455
3503
|
label: "search-button",
|
|
@@ -3643,8 +3691,8 @@ var messages$E = reactIntl.defineMessages({
|
|
|
3643
3691
|
}
|
|
3644
3692
|
});
|
|
3645
3693
|
|
|
3646
|
-
function ownKeys$
|
|
3647
|
-
function _objectSpread$
|
|
3694
|
+
function ownKeys$19(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; }
|
|
3695
|
+
function _objectSpread$19(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$19(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$19(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3648
3696
|
const getBottomOption = formatMessage => ({
|
|
3649
3697
|
options: [{
|
|
3650
3698
|
label: formatMessage ? formatMessage(messages$E.bottomOption) : messages$E.bottomOption,
|
|
@@ -3655,7 +3703,7 @@ const getBottomOption = formatMessage => ({
|
|
|
3655
3703
|
const Option$2 = props => {
|
|
3656
3704
|
const _useIntl = reactIntl.useIntl(),
|
|
3657
3705
|
formatMessage = _useIntl.formatMessage;
|
|
3658
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
3706
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$19(_objectSpread$19({}, props), {}, {
|
|
3659
3707
|
children: props.data.isBottomOption ? jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
3660
3708
|
tone: "secondary",
|
|
3661
3709
|
children: formatMessage(props.data.label)
|
|
@@ -3672,8 +3720,8 @@ const Option$2 = props => {
|
|
|
3672
3720
|
};
|
|
3673
3721
|
Option$2.displayName = 'Option';
|
|
3674
3722
|
|
|
3675
|
-
function ownKeys$
|
|
3676
|
-
function _objectSpread$
|
|
3723
|
+
function ownKeys$18(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; }
|
|
3724
|
+
function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$18(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$18(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3677
3725
|
const useHandlers = onChange => {
|
|
3678
3726
|
const _useState = React.useState(),
|
|
3679
3727
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -3683,8 +3731,8 @@ const useHandlers = onChange => {
|
|
|
3683
3731
|
setInputValue(changedValue);
|
|
3684
3732
|
}, []);
|
|
3685
3733
|
const handleChange = useEventCallback(event => {
|
|
3686
|
-
const eventWithExtractedValue = _objectSpread$
|
|
3687
|
-
target: _objectSpread$
|
|
3734
|
+
const eventWithExtractedValue = _objectSpread$18(_objectSpread$18({}, event), {}, {
|
|
3735
|
+
target: _objectSpread$18(_objectSpread$18({}, event.target), {}, {
|
|
3688
3736
|
value: event.target.value?.value
|
|
3689
3737
|
})
|
|
3690
3738
|
});
|
|
@@ -3693,9 +3741,9 @@ const useHandlers = onChange => {
|
|
|
3693
3741
|
return [handleInputChange, handleChange];
|
|
3694
3742
|
};
|
|
3695
3743
|
|
|
3696
|
-
const _excluded$
|
|
3697
|
-
function ownKeys$
|
|
3698
|
-
function _objectSpread$
|
|
3744
|
+
const _excluded$3 = ["extraWhere"];
|
|
3745
|
+
function ownKeys$17(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; }
|
|
3746
|
+
function _objectSpread$17(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$17(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$17(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3699
3747
|
const constructPrefixSearchPredicate = function () {
|
|
3700
3748
|
let prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
3701
3749
|
let lowerBound = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -3736,13 +3784,13 @@ const useLoadOptions = _ref => {
|
|
|
3736
3784
|
}
|
|
3737
3785
|
const _ref2 = variables ?? {},
|
|
3738
3786
|
extraWhere = _ref2.extraWhere,
|
|
3739
|
-
restVariables = _objectWithoutProperties(_ref2, _excluded$
|
|
3787
|
+
restVariables = _objectWithoutProperties(_ref2, _excluded$3);
|
|
3740
3788
|
if (typeof extraWhere === 'string') {
|
|
3741
3789
|
where = where ? `(${where}) and ${variables.extraWhere}` : variables.extraWhere;
|
|
3742
3790
|
}
|
|
3743
3791
|
return client$1.query({
|
|
3744
3792
|
query,
|
|
3745
|
-
variables: _objectSpread$
|
|
3793
|
+
variables: _objectSpread$17({
|
|
3746
3794
|
where
|
|
3747
3795
|
}, restVariables),
|
|
3748
3796
|
context: {
|
|
@@ -4029,9 +4077,9 @@ const StatePickerInput = _ref => {
|
|
|
4029
4077
|
};
|
|
4030
4078
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
4031
4079
|
|
|
4032
|
-
function ownKeys$
|
|
4033
|
-
function _objectSpread$
|
|
4034
|
-
const TooltipWrapper = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$
|
|
4080
|
+
function ownKeys$16(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; }
|
|
4081
|
+
function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$16(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$16(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4082
|
+
const TooltipWrapper = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$16({
|
|
4035
4083
|
ref: ref,
|
|
4036
4084
|
style: {
|
|
4037
4085
|
display: 'block',
|
|
@@ -4168,9 +4216,9 @@ const getPrefixSearchBounds = input => {
|
|
|
4168
4216
|
return [input, `${_sliceInstanceProperty__default["default"](input).call(input, 0, input.length - 1)}${getNextCharacter(_sliceInstanceProperty__default["default"](input).call(input, input.length - 1))}`];
|
|
4169
4217
|
};
|
|
4170
4218
|
|
|
4171
|
-
const _excluded = ["action"];
|
|
4172
|
-
function ownKeys$
|
|
4173
|
-
function _objectSpread$
|
|
4219
|
+
const _excluded$2 = ["action"];
|
|
4220
|
+
function ownKeys$15(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; }
|
|
4221
|
+
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$15(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$15(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4174
4222
|
|
|
4175
4223
|
/**
|
|
4176
4224
|
* Checks if a value is a LocalizedString
|
|
@@ -4192,7 +4240,7 @@ const getIsLocalizedString = maybeLocalizedString => {
|
|
|
4192
4240
|
*/
|
|
4193
4241
|
const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
|
|
4194
4242
|
if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
|
|
4195
|
-
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$
|
|
4243
|
+
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$15(_objectSpread$15({}, customFields), {}, {
|
|
4196
4244
|
[customField.name]: customField.value
|
|
4197
4245
|
}), {});
|
|
4198
4246
|
};
|
|
@@ -4216,7 +4264,7 @@ function transformLocalizedFieldsForCategory(category) {
|
|
|
4216
4264
|
const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
|
|
4217
4265
|
const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
|
|
4218
4266
|
const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
|
|
4219
|
-
return _objectSpread$
|
|
4267
|
+
return _objectSpread$15(_objectSpread$15(_objectSpread$15({}, transformedData), parent ? {
|
|
4220
4268
|
parent
|
|
4221
4269
|
} : {}), ancestors ? {
|
|
4222
4270
|
ancestors
|
|
@@ -4307,7 +4355,7 @@ const createAttributeTypeValue = attribute => {
|
|
|
4307
4355
|
const formatMoney = valueType => money => {
|
|
4308
4356
|
if (valueType === 'fixed') {
|
|
4309
4357
|
return {
|
|
4310
|
-
[money.type]: _objectSpread$
|
|
4358
|
+
[money.type]: _objectSpread$15({
|
|
4311
4359
|
centAmount: money.centAmount,
|
|
4312
4360
|
currencyCode: money.currencyCode
|
|
4313
4361
|
}, money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4472,7 +4520,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4472
4520
|
case 'addAttributeDefinition':
|
|
4473
4521
|
return {
|
|
4474
4522
|
[actionName]: {
|
|
4475
|
-
attributeDefinition: _objectSpread$
|
|
4523
|
+
attributeDefinition: _objectSpread$15(_objectSpread$15({}, actionPayload.attribute), {}, {
|
|
4476
4524
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
|
|
4477
4525
|
inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
|
|
4478
4526
|
type: createAttributeTypeValue(actionPayload.attribute)
|
|
@@ -4568,7 +4616,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4568
4616
|
return {
|
|
4569
4617
|
[actionName]: {
|
|
4570
4618
|
attributeName: actionPayload.attributeName,
|
|
4571
|
-
value: _objectSpread$
|
|
4619
|
+
value: _objectSpread$15(_objectSpread$15({}, actionPayload.value), {}, {
|
|
4572
4620
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
|
|
4573
4621
|
})
|
|
4574
4622
|
}
|
|
@@ -4577,7 +4625,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4577
4625
|
return {
|
|
4578
4626
|
[actionName]: {
|
|
4579
4627
|
attributeName: actionPayload.attributeName,
|
|
4580
|
-
newValue: _objectSpread$
|
|
4628
|
+
newValue: _objectSpread$15(_objectSpread$15({}, actionPayload.newValue), {}, {
|
|
4581
4629
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
|
|
4582
4630
|
})
|
|
4583
4631
|
}
|
|
@@ -4604,7 +4652,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4604
4652
|
name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
|
|
4605
4653
|
taxCategory: actionPayload.taxCategory,
|
|
4606
4654
|
money: {
|
|
4607
|
-
[actionPayload.money.type]: _objectSpread$
|
|
4655
|
+
[actionPayload.money.type]: _objectSpread$15({
|
|
4608
4656
|
centAmount: actionPayload.money.centAmount,
|
|
4609
4657
|
currencyCode: actionPayload.money.currencyCode
|
|
4610
4658
|
}, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4659,8 +4707,8 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4659
4707
|
fields: customFields
|
|
4660
4708
|
} : null;
|
|
4661
4709
|
return {
|
|
4662
|
-
[actionName]: _objectSpread$
|
|
4663
|
-
address: _objectSpread$
|
|
4710
|
+
[actionName]: _objectSpread$15(_objectSpread$15({}, actionPayload), {}, {
|
|
4711
|
+
address: _objectSpread$15(_objectSpread$15({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
|
|
4664
4712
|
custom
|
|
4665
4713
|
})
|
|
4666
4714
|
})
|
|
@@ -4702,7 +4750,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4702
4750
|
};
|
|
4703
4751
|
const createGraphQlUpdateActions = actions => _reduceInstanceProperty__default["default"](actions).call(actions, (previousActions, _ref9) => {
|
|
4704
4752
|
let actionName = _ref9.action,
|
|
4705
|
-
actionPayload = _objectWithoutProperties(_ref9, _excluded);
|
|
4753
|
+
actionPayload = _objectWithoutProperties(_ref9, _excluded$2);
|
|
4706
4754
|
return [...previousActions, convertAction(actionName, actionPayload)];
|
|
4707
4755
|
}, []);
|
|
4708
4756
|
const extractErrorFromGraphQlResponse = graphQlResponse => {
|
|
@@ -4735,8 +4783,8 @@ function omitDeep(obj, fieldsToOmit) {
|
|
|
4735
4783
|
return originalOmitDeep__default["default"](obj, fieldsToOmit);
|
|
4736
4784
|
}
|
|
4737
4785
|
|
|
4738
|
-
function ownKeys$
|
|
4739
|
-
function _objectSpread$
|
|
4786
|
+
function ownKeys$14(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; }
|
|
4787
|
+
function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$14(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$14(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4740
4788
|
function getPriceChannelName(price) {
|
|
4741
4789
|
return price.channel?.name ?? price.channel?.key ?? null;
|
|
4742
4790
|
}
|
|
@@ -4748,11 +4796,11 @@ function getDiscountValue(price) {
|
|
|
4748
4796
|
} else if (price.value?.type === PRECISION_TYPES.highPrecision && price.discounted?.value?.type === PRECISION_TYPES.centPrecision) {
|
|
4749
4797
|
fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
|
|
4750
4798
|
}
|
|
4751
|
-
return price.discounted ? _objectSpread$
|
|
4799
|
+
return price.discounted ? _objectSpread$14(_objectSpread$14({}, price.value), {}, {
|
|
4752
4800
|
fractionedAmount,
|
|
4753
4801
|
centAmount: price.value.centAmount - price.discounted.value.centAmount,
|
|
4754
4802
|
preciseAmount
|
|
4755
|
-
}) : _objectSpread$
|
|
4803
|
+
}) : _objectSpread$14(_objectSpread$14({}, price.value), {}, {
|
|
4756
4804
|
centAmount: 0
|
|
4757
4805
|
});
|
|
4758
4806
|
}
|
|
@@ -4776,7 +4824,7 @@ function getNetUnitPrice(_ref) {
|
|
|
4776
4824
|
}
|
|
4777
4825
|
let preciseAmount;
|
|
4778
4826
|
if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + taxRate.amount);
|
|
4779
|
-
return _objectSpread$
|
|
4827
|
+
return _objectSpread$14(_objectSpread$14({}, price.value), {}, {
|
|
4780
4828
|
centAmount,
|
|
4781
4829
|
preciseAmount
|
|
4782
4830
|
});
|
|
@@ -4792,7 +4840,7 @@ function getNetUnitPrice(_ref) {
|
|
|
4792
4840
|
}
|
|
4793
4841
|
let preciseAmount;
|
|
4794
4842
|
if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + lineItem.taxRate.amount);
|
|
4795
|
-
return _objectSpread$
|
|
4843
|
+
return _objectSpread$14(_objectSpread$14({}, price.value), {}, {
|
|
4796
4844
|
centAmount,
|
|
4797
4845
|
preciseAmount
|
|
4798
4846
|
});
|
|
@@ -4804,7 +4852,7 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4804
4852
|
const currencyCode = price.value.currencyCode;
|
|
4805
4853
|
const fractionedAmount = getFractionedAmount(price.value);
|
|
4806
4854
|
if (currencyCode && !isNil__default["default"](fractionedAmount)) {
|
|
4807
|
-
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$
|
|
4855
|
+
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$14(_objectSpread$14({}, minPrices), {}, {
|
|
4808
4856
|
[currencyCode]: price.value
|
|
4809
4857
|
});
|
|
4810
4858
|
}
|
|
@@ -4813,8 +4861,8 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4813
4861
|
return _Object$values__default["default"](minPricesByCurrency);
|
|
4814
4862
|
}
|
|
4815
4863
|
|
|
4816
|
-
function ownKeys$
|
|
4817
|
-
function _objectSpread$
|
|
4864
|
+
function ownKeys$13(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; }
|
|
4865
|
+
function _objectSpread$13(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$13(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$13(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4818
4866
|
const transformCustomFieldFromGraphQLResponse = resource => {
|
|
4819
4867
|
var _context, _context4;
|
|
4820
4868
|
return {
|
|
@@ -4829,14 +4877,14 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4829
4877
|
return {
|
|
4830
4878
|
name: fieldDefinition.name,
|
|
4831
4879
|
required: fieldDefinition.required,
|
|
4832
|
-
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$
|
|
4833
|
-
elementType: _objectSpread$
|
|
4880
|
+
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$13(_objectSpread$13({}, fieldDefinition.type), {}, {
|
|
4881
|
+
elementType: _objectSpread$13(_objectSpread$13({}, fieldDefinition.type.elementType), {}, {
|
|
4834
4882
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
4835
4883
|
key: value.key,
|
|
4836
4884
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
4837
4885
|
}))
|
|
4838
4886
|
})
|
|
4839
|
-
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$
|
|
4887
|
+
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$13(_objectSpread$13({}, fieldDefinition.type), {}, {
|
|
4840
4888
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
4841
4889
|
key: value.key,
|
|
4842
4890
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -4847,7 +4895,7 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4847
4895
|
})
|
|
4848
4896
|
}
|
|
4849
4897
|
},
|
|
4850
|
-
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$
|
|
4898
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$13(_objectSpread$13({}, fields), {}, {
|
|
4851
4899
|
[customField.name]: customField.value
|
|
4852
4900
|
}), {})
|
|
4853
4901
|
};
|
|
@@ -4859,7 +4907,7 @@ const convertProductSelectionFromGraphQl = productSelection => {
|
|
|
4859
4907
|
// Incase the product selection is not missing or if the current project dose not yet have access to the feature,
|
|
4860
4908
|
// in either case we return null
|
|
4861
4909
|
if (!productSelection) return null;
|
|
4862
|
-
return _objectSpread$
|
|
4910
|
+
return _objectSpread$13(_objectSpread$13({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
4863
4911
|
from: 'nameAllLocales',
|
|
4864
4912
|
to: 'name'
|
|
4865
4913
|
}])), {}, {
|
|
@@ -4882,8 +4930,8 @@ const transformAllToProperNounCase = text => {
|
|
|
4882
4930
|
return _mapInstanceProperty__default["default"](_context = text.split(' ')).call(_context, term => transformToProperNounCase(term)).join(' ');
|
|
4883
4931
|
};
|
|
4884
4932
|
|
|
4885
|
-
function ownKeys$
|
|
4886
|
-
function _objectSpread$
|
|
4933
|
+
function ownKeys$12(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; }
|
|
4934
|
+
function _objectSpread$12(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$12(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$12(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4887
4935
|
const REGEX_ISO8601 = /(\d{4}-\d{2}-\d{2}[T]\d{2}:\d{2}:\d{2}(\.\d{3}[Z]?))/;
|
|
4888
4936
|
const REGEX_TIME = /\d{2}:\d{2}/;
|
|
4889
4937
|
const REGEX_DATE = /\d{4}-\d{2}-\d{2}/;
|
|
@@ -4900,7 +4948,7 @@ function filterCustomTypeUpdateActionValues() {
|
|
|
4900
4948
|
if (updateAction.action === 'setCustomField' && _Array$isArray__default["default"](updateAction.value)) {
|
|
4901
4949
|
const definition = _findInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, field => field.name === updateAction.name);
|
|
4902
4950
|
const definitionName = definition.type.elementType.name;
|
|
4903
|
-
return _objectSpread$
|
|
4951
|
+
return _objectSpread$12(_objectSpread$12({}, updateAction), {}, {
|
|
4904
4952
|
value: filterNotDefinedValues(updateAction.value, definitionName)
|
|
4905
4953
|
});
|
|
4906
4954
|
}
|
|
@@ -4974,18 +5022,29 @@ function omitSetsOfSets() {
|
|
|
4974
5022
|
|
|
4975
5023
|
var GetProductTypesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetProductTypesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 212, source: { body: "query GetProductTypesQuery($where: String) {\n productTypes(where: $where) {\n results {\n id\n name\n }\n }\n}\n\nquery GetProductTypeQuery($id: String) {\n productType(id: $id) {\n id\n name\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
4976
5024
|
|
|
4977
|
-
function ownKeys$
|
|
4978
|
-
function _objectSpread$
|
|
4979
|
-
function
|
|
4980
|
-
function
|
|
5025
|
+
function ownKeys$11(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; }
|
|
5026
|
+
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$11(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$11(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5027
|
+
function _callSuper$5(_this, derived, args) {
|
|
5028
|
+
function isNativeReflectConstruct() {
|
|
5029
|
+
if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false;
|
|
5030
|
+
if (_Reflect$construct__default["default"].sham) return false;
|
|
5031
|
+
if (typeof Proxy === "function") return true;
|
|
5032
|
+
try {
|
|
5033
|
+
return !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {}));
|
|
5034
|
+
} catch (e) {
|
|
5035
|
+
return false;
|
|
5036
|
+
}
|
|
5037
|
+
}
|
|
5038
|
+
derived = _getPrototypeOf(derived);
|
|
5039
|
+
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? _Reflect$construct__default["default"](derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
5040
|
+
}
|
|
4981
5041
|
var FetchTypeDefinitionsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1172, source: { body: "query FetchTypeDefinitionsQuery($where: String, $limit: Int, $offset: Int) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n fieldDefinitions {\n type {\n name\n ... on SetType {\n elementType {\n name\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n ... on ReferenceType {\n referenceTypeId\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
4982
5042
|
const customizableResources$1 = ['asset', 'category', 'channel', 'customer', 'order', 'discount-code', 'cart-discount', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review'];
|
|
4983
5043
|
let CustomFieldDefinitionsConnector = /*#__PURE__*/function (_Component) {
|
|
4984
5044
|
_inherits(CustomFieldDefinitionsConnector, _Component);
|
|
4985
|
-
var _super = _createSuper$5(CustomFieldDefinitionsConnector);
|
|
4986
5045
|
function CustomFieldDefinitionsConnector() {
|
|
4987
5046
|
_classCallCheck(this, CustomFieldDefinitionsConnector);
|
|
4988
|
-
return
|
|
5047
|
+
return _callSuper$5(this, CustomFieldDefinitionsConnector, arguments);
|
|
4989
5048
|
}
|
|
4990
5049
|
_createClass(CustomFieldDefinitionsConnector, [{
|
|
4991
5050
|
key: "componentDidMount",
|
|
@@ -5035,7 +5094,7 @@ const mapDataToProps = _ref => {
|
|
|
5035
5094
|
return {
|
|
5036
5095
|
fetchTypeDefinitionsQuery: {
|
|
5037
5096
|
loading: fetchTypeDefinitionsQuery.loading,
|
|
5038
|
-
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$
|
|
5097
|
+
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$11({}, l10n.applyTransformedLocalizedFields(omitDeep(fieldDefinition, ['__typename'], {
|
|
5039
5098
|
isImmutable: true
|
|
5040
5099
|
}), [{
|
|
5041
5100
|
from: 'labelAllLocales',
|
|
@@ -5063,12 +5122,12 @@ const handlers$2 = {
|
|
|
5063
5122
|
}
|
|
5064
5123
|
};
|
|
5065
5124
|
|
|
5066
|
-
function ownKeys
|
|
5067
|
-
function _objectSpread
|
|
5125
|
+
function ownKeys$10(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; }
|
|
5126
|
+
function _objectSpread$10(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$10(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$10(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5068
5127
|
const restDocToForm = customFieldsFromRestResponse => {
|
|
5069
5128
|
return {
|
|
5070
5129
|
fields: customFieldsFromRestResponse.fields,
|
|
5071
|
-
type: _objectSpread
|
|
5130
|
+
type: _objectSpread$10({
|
|
5072
5131
|
id: customFieldsFromRestResponse.type.id
|
|
5073
5132
|
}, customFieldsFromRestResponse.type.obj)
|
|
5074
5133
|
};
|
|
@@ -5087,14 +5146,14 @@ const graphQlDocToForm = typeDefinition => {
|
|
|
5087
5146
|
name: fieldDefinition.name,
|
|
5088
5147
|
required: fieldDefinition.required,
|
|
5089
5148
|
inputHint: fieldDefinition.inputHint,
|
|
5090
|
-
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread
|
|
5091
|
-
elementType: _objectSpread
|
|
5149
|
+
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$10(_objectSpread$10({}, fieldDefinition.type), {}, {
|
|
5150
|
+
elementType: _objectSpread$10(_objectSpread$10({}, fieldDefinition.type.elementType), {}, {
|
|
5092
5151
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
5093
5152
|
key: value.key,
|
|
5094
5153
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
5095
5154
|
}))
|
|
5096
5155
|
})
|
|
5097
|
-
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread
|
|
5156
|
+
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$10(_objectSpread$10({}, fieldDefinition.type), {}, {
|
|
5098
5157
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
5099
5158
|
key: value.key,
|
|
5100
5159
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -5110,7 +5169,7 @@ const formToRestDoc = formCustomFields => ({
|
|
|
5110
5169
|
type: {
|
|
5111
5170
|
id: formCustomFields.type.id,
|
|
5112
5171
|
typeId: 'type',
|
|
5113
|
-
obj: _objectSpread
|
|
5172
|
+
obj: _objectSpread$10({}, formCustomFields.type)
|
|
5114
5173
|
},
|
|
5115
5174
|
fields: formCustomFields.fields
|
|
5116
5175
|
});
|
|
@@ -5118,7 +5177,7 @@ const formToGraphQlDoc = formCustomFields => ({
|
|
|
5118
5177
|
type: {
|
|
5119
5178
|
id: formCustomFields.type.id,
|
|
5120
5179
|
typeId: 'type',
|
|
5121
|
-
obj: _objectSpread
|
|
5180
|
+
obj: _objectSpread$10({}, omit__default["default"](formCustomFields.type, ['id']))
|
|
5122
5181
|
},
|
|
5123
5182
|
fields: omitBy__default["default"](formCustomFields.fields || {}, isNil__default["default"])
|
|
5124
5183
|
});
|
|
@@ -5131,10 +5190,22 @@ const createEmptyCustomFields = typeDefinition => ({
|
|
|
5131
5190
|
}
|
|
5132
5191
|
});
|
|
5133
5192
|
|
|
5134
|
-
function
|
|
5135
|
-
function
|
|
5193
|
+
function _callSuper$4(_this, derived, args) {
|
|
5194
|
+
function isNativeReflectConstruct() {
|
|
5195
|
+
if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false;
|
|
5196
|
+
if (_Reflect$construct__default["default"].sham) return false;
|
|
5197
|
+
if (typeof Proxy === "function") return true;
|
|
5198
|
+
try {
|
|
5199
|
+
return !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {}));
|
|
5200
|
+
} catch (e) {
|
|
5201
|
+
return false;
|
|
5202
|
+
}
|
|
5203
|
+
}
|
|
5204
|
+
derived = _getPrototypeOf(derived);
|
|
5205
|
+
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? _Reflect$construct__default["default"](derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
5206
|
+
}
|
|
5136
5207
|
var FetchTypeDefinitionsWithNamesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsWithNamesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "required" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 1445, source: { body: "query FetchTypeDefinitionsWithNamesQuery(\n $where: String\n $limit: Int\n $offset: Int\n) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n id\n key\n nameAllLocales {\n value\n locale\n }\n fieldDefinitions {\n required\n type {\n name\n ... on ReferenceType {\n referenceTypeId\n }\n ... on SetType {\n elementType {\n name\n ... on ReferenceType {\n referenceTypeId\n name\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n inputHint\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
5137
|
-
const customizableResources = ['asset', 'address', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item'];
|
|
5208
|
+
const customizableResources = ['asset', 'address', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item', 'order-parcel'];
|
|
5138
5209
|
const emptyTypeDefinitions = {
|
|
5139
5210
|
total: 0,
|
|
5140
5211
|
count: 0,
|
|
@@ -5142,10 +5213,9 @@ const emptyTypeDefinitions = {
|
|
|
5142
5213
|
};
|
|
5143
5214
|
let CustomFieldTypeDefinitionsConnector = /*#__PURE__*/function (_Component) {
|
|
5144
5215
|
_inherits(CustomFieldTypeDefinitionsConnector, _Component);
|
|
5145
|
-
var _super = _createSuper$4(CustomFieldTypeDefinitionsConnector);
|
|
5146
5216
|
function CustomFieldTypeDefinitionsConnector() {
|
|
5147
5217
|
_classCallCheck(this, CustomFieldTypeDefinitionsConnector);
|
|
5148
|
-
return
|
|
5218
|
+
return _callSuper$4(this, CustomFieldTypeDefinitionsConnector, arguments);
|
|
5149
5219
|
}
|
|
5150
5220
|
_createClass(CustomFieldTypeDefinitionsConnector, [{
|
|
5151
5221
|
key: "componentDidMount",
|
|
@@ -5249,8 +5319,8 @@ const REFERENCED_TYPES = {
|
|
|
5249
5319
|
zone: 'zone'
|
|
5250
5320
|
};
|
|
5251
5321
|
|
|
5252
|
-
function ownKeys
|
|
5253
|
-
function _objectSpread
|
|
5322
|
+
function ownKeys$$(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5323
|
+
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$$(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$$(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5254
5324
|
const extractDuplicatedValues = (values, type, language, languages) => {
|
|
5255
5325
|
let validatedValues = [];
|
|
5256
5326
|
if (type.name.toLowerCase() === 'money') {
|
|
@@ -5317,14 +5387,14 @@ function validations (formValues, language, languages) {
|
|
|
5317
5387
|
var _context2;
|
|
5318
5388
|
// Collect all required and set type fields
|
|
5319
5389
|
const fieldDefinitionsToValidate = _filterInstanceProperty__default["default"](_context2 = formValues.custom.type.fieldDefinitions).call(_context2, fieldDefinition => fieldDefinition.required || fieldDefinition.type.name.toLowerCase() === 'set');
|
|
5320
|
-
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread
|
|
5321
|
-
[fieldDefinition.name]: _objectSpread
|
|
5390
|
+
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$$(_objectSpread$$({}, acc), {}, {
|
|
5391
|
+
[fieldDefinition.name]: _objectSpread$$(_objectSpread$$({}, setMissingIfRequired(formValues, fieldDefinition)), setDuplicatedIfSet(formValues, fieldDefinition, language, languages))
|
|
5322
5392
|
}), {});
|
|
5323
5393
|
return withoutEmptyErrorsByField(errors);
|
|
5324
5394
|
}
|
|
5325
5395
|
|
|
5326
|
-
function ownKeys$
|
|
5327
|
-
function _objectSpread$
|
|
5396
|
+
function ownKeys$_(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5397
|
+
function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$_(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$_(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5328
5398
|
const DroppableWrapper = _ref => {
|
|
5329
5399
|
let children = _ref.children,
|
|
5330
5400
|
onDragEnd = _ref.onDragEnd;
|
|
@@ -5332,7 +5402,7 @@ const DroppableWrapper = _ref => {
|
|
|
5332
5402
|
onDragEnd: onDragEnd,
|
|
5333
5403
|
children: jsxRuntime.jsx(reactBeautifulDnd.Droppable, {
|
|
5334
5404
|
droppableId: "droppable",
|
|
5335
|
-
children: provided => jsxRuntime.jsxs("div", _objectSpread$
|
|
5405
|
+
children: provided => jsxRuntime.jsxs("div", _objectSpread$_(_objectSpread$_({
|
|
5336
5406
|
ref: provided.innerRef
|
|
5337
5407
|
}, provided.droppableProps), {}, {
|
|
5338
5408
|
children: [children, provided.placeholder]
|
|
@@ -5341,10 +5411,10 @@ const DroppableWrapper = _ref => {
|
|
|
5341
5411
|
});
|
|
5342
5412
|
};
|
|
5343
5413
|
|
|
5344
|
-
function ownKeys$
|
|
5345
|
-
function _objectSpread$
|
|
5414
|
+
function ownKeys$Z(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; }
|
|
5415
|
+
function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Z(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5346
5416
|
function DragHandle(props) {
|
|
5347
|
-
return jsxRuntime.jsx("div", _objectSpread$
|
|
5417
|
+
return jsxRuntime.jsx("div", _objectSpread$Z(_objectSpread$Z({}, props), {}, {
|
|
5348
5418
|
children: jsxRuntime.jsx(uiKit.IconButton, {
|
|
5349
5419
|
icon: jsxRuntime.jsx(uiKit.DragIcon, {}),
|
|
5350
5420
|
size: "medium",
|
|
@@ -5354,32 +5424,59 @@ function DragHandle(props) {
|
|
|
5354
5424
|
}
|
|
5355
5425
|
DragHandle.displayName = 'DragHandle';
|
|
5356
5426
|
|
|
5357
|
-
function ownKeys$
|
|
5358
|
-
function _objectSpread$
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5427
|
+
function ownKeys$Y(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; }
|
|
5428
|
+
function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Y(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Y(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5429
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__$1() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
5430
|
+
var _ref$1 = process.env.NODE_ENV === "production" ? {
|
|
5431
|
+
name: "1onfs6j",
|
|
5432
|
+
styles: "z-index:100000!important"
|
|
5433
|
+
} : {
|
|
5434
|
+
name: "4jor1w-child",
|
|
5435
|
+
styles: "z-index:100000!important;label:child;",
|
|
5436
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRyYWdnYWJsZS13cmFwcGVyLmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Q29CIiwiZmlsZSI6ImRyYWdnYWJsZS13cmFwcGVyLmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBEcmFnZ2FibGUgfSBmcm9tICdyZWFjdC1iZWF1dGlmdWwtZG5kJztcbmltcG9ydCBSZWFjdERPTSBmcm9tICdyZWFjdC1kb20nO1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcywgR3JpZCwgQ2FyZCB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL3VpLWtpdCc7XG5pbXBvcnQgeyBEcmFnSGFuZGxlIH0gZnJvbSAnLi9kcmFnLWhhbmRsZSc7XG5cbmV4cG9ydCBjb25zdCBEcmFnZ2FibGVXcmFwcGVyID0gKHtcbiAgY2hpbGRyZW4sXG4gIGRyYWdnYWJsZUtleSxcbiAgZHJhZ2dhYmxlSWQsXG4gIGluZGV4LFxufSkgPT4ge1xuICBjb25zdCBwb3J0YWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcbiAgcG9ydGFsLmlkID0gJ2RyYWctcmJkLXBvcnRhbCc7XG4gIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQocG9ydGFsKTtcblxuICBjb25zdCBEcmFnZ2luZ0NhcmQgPSAoeyBpc0RyYWdnaW5nLCBjaGlsZHJlbiB9KSA9PiB7XG4gICAgaWYgKGlzRHJhZ2dpbmcpIHtcbiAgICAgIHJldHVybiAoXG4gICAgICAgIDxDYXJkIHRoZW1lPVwibGlnaHRcIiBpbnNldFNjYWxlPVwibVwiPlxuICAgICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAgPC9DYXJkPlxuICAgICAgKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGNoaWxkcmVuO1xuICAgIH1cbiAgfTtcbiAgRHJhZ2dpbmdDYXJkLnByb3BUeXBlcyA9IHtcbiAgICBpc0RyYWdnaW5nOiBQcm9wVHlwZXMuYm9vbC5pc1JlcXVpcmVkLFxuICAgIGNoaWxkcmVuOiBQcm9wVHlwZXMubm9kZS5pc1JlcXVpcmVkLFxuICB9O1xuICByZXR1cm4gKFxuICAgIDxEcmFnZ2FibGUga2V5PXtkcmFnZ2FibGVLZXl9IGRyYWdnYWJsZUlkPXtkcmFnZ2FibGVJZH0gaW5kZXg9e2luZGV4fT5cbiAgICAgIHsocHJvdmlkZWQsIHNuYXBzaG90KSA9PiB7XG4gICAgICAgIGNvbnN0IGNoaWxkID0gKFxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIHJlZj17cHJvdmlkZWQuaW5uZXJSZWZ9XG4gICAgICAgICAgICB7Li4ucHJvdmlkZWQuZHJhZ2dhYmxlUHJvcHN9XG4gICAgICAgICAgICBjc3M9e2Nzc2BcbiAgICAgICAgICAgICAgei1pbmRleDogMTAwMDAwICFpbXBvcnRhbnQ7XG4gICAgICAgICAgICBgfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxEcmFnZ2luZ0NhcmQgaXNEcmFnZ2luZz17c25hcHNob3QuaXNEcmFnZ2luZ30+XG4gICAgICAgICAgICAgIDxHcmlkXG4gICAgICAgICAgICAgICAgZ3JpZFRlbXBsYXRlQ29sdW1ucz17JzFmciAyMGZyJ31cbiAgICAgICAgICAgICAgICBncmlkVGVtcGxhdGVSb3dzPVwiYXV0byAxZnIgYXV0b1wiXG4gICAgICAgICAgICAgICAgZ3JpZEdhcD17XG4gICAgICAgICAgICAgICAgICBzbmFwc2hvdC5pc0RyYWdnaW5nXG4gICAgICAgICAgICAgICAgICAgID8gY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU1xuICAgICAgICAgICAgICAgICAgICA6IGN1c3RvbVByb3BlcnRpZXMuc3BhY2luZ01cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8R3JpZC5JdGVtPlxuICAgICAgICAgICAgICAgICAgPERyYWdIYW5kbGUgey4uLnByb3ZpZGVkLmRyYWdIYW5kbGVQcm9wc30gLz5cbiAgICAgICAgICAgICAgICA8L0dyaWQuSXRlbT5cbiAgICAgICAgICAgICAgICA8R3JpZC5JdGVtPntjaGlsZHJlbn08L0dyaWQuSXRlbT5cbiAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgPC9EcmFnZ2luZ0NhcmQ+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG5cbiAgICAgICAgaWYgKCFzbmFwc2hvdC5pc0RyYWdnaW5nKSB7XG4gICAgICAgICAgcmV0dXJuIGNoaWxkO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gcmVuZGVyIHRoZSBkcmFnZ2FibGUgaW4gdGhlIHBvcnRhbCB3aGVuIGl0J3MgYmVpbmcgZHJhZ2dlZFxuICAgICAgICByZXR1cm4gUmVhY3RET00uY3JlYXRlUG9ydGFsKDxkaXY+e2NoaWxkfTwvZGl2PiwgcG9ydGFsKTtcbiAgICAgIH19XG4gICAgPC9EcmFnZ2FibGU+XG4gICk7XG59O1xuXG5EcmFnZ2FibGVXcmFwcGVyLnByb3BUeXBlcyA9IHtcbiAgZHJhZ2dhYmxlS2V5OiBQcm9wVHlwZXMuc3RyaW5nLmlzUmVxdWlyZWQsXG4gIGluZGV4OiBQcm9wVHlwZXMubnVtYmVyLmlzUmVxdWlyZWQsXG4gIGRyYWdnYWJsZUlkOiBQcm9wVHlwZXMuc3RyaW5nLmlzUmVxdWlyZWQsXG4gIGNoaWxkcmVuOiBQcm9wVHlwZXMubm9kZS5pc1JlcXVpcmVkLFxufTtcbiJdfQ== */",
|
|
5437
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
|
|
5438
|
+
};
|
|
5439
|
+
const DraggableWrapper = _ref2 => {
|
|
5440
|
+
let children = _ref2.children,
|
|
5441
|
+
draggableKey = _ref2.draggableKey,
|
|
5442
|
+
draggableId = _ref2.draggableId,
|
|
5443
|
+
index = _ref2.index;
|
|
5364
5444
|
const portal = document.createElement('div');
|
|
5365
5445
|
portal.id = 'drag-rbd-portal';
|
|
5366
5446
|
document.body.appendChild(portal);
|
|
5447
|
+
const DraggingCard = _ref3 => {
|
|
5448
|
+
let isDragging = _ref3.isDragging,
|
|
5449
|
+
children = _ref3.children;
|
|
5450
|
+
if (isDragging) {
|
|
5451
|
+
return jsxRuntime.jsx(uiKit.Card, {
|
|
5452
|
+
theme: "light",
|
|
5453
|
+
insetScale: "m",
|
|
5454
|
+
children: children
|
|
5455
|
+
});
|
|
5456
|
+
} else {
|
|
5457
|
+
return children;
|
|
5458
|
+
}
|
|
5459
|
+
};
|
|
5367
5460
|
return jsxRuntime.jsx(reactBeautifulDnd.Draggable, {
|
|
5368
5461
|
draggableId: draggableId,
|
|
5369
5462
|
index: index,
|
|
5370
5463
|
children: (provided, snapshot) => {
|
|
5371
|
-
const child = jsxRuntime.jsx("div", _objectSpread$
|
|
5464
|
+
const child = jsxRuntime.jsx("div", _objectSpread$Y(_objectSpread$Y({
|
|
5372
5465
|
ref: provided.innerRef
|
|
5373
5466
|
}, provided.draggableProps), {}, {
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
children:
|
|
5382
|
-
|
|
5467
|
+
css: _ref$1,
|
|
5468
|
+
children: jsxRuntime.jsx(DraggingCard, {
|
|
5469
|
+
isDragging: snapshot.isDragging,
|
|
5470
|
+
children: jsxRuntime.jsxs(uiKit.Grid, {
|
|
5471
|
+
gridTemplateColumns: '1fr 20fr',
|
|
5472
|
+
gridTemplateRows: "auto 1fr auto",
|
|
5473
|
+
gridGap: snapshot.isDragging ? uiKit.customProperties.spacingS : uiKit.customProperties.spacingM,
|
|
5474
|
+
children: [jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
5475
|
+
children: jsxRuntime.jsx(DragHandle, _objectSpread$Y({}, provided.dragHandleProps))
|
|
5476
|
+
}), jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
5477
|
+
children: children
|
|
5478
|
+
})]
|
|
5479
|
+
})
|
|
5383
5480
|
})
|
|
5384
5481
|
}));
|
|
5385
5482
|
if (!snapshot.isDragging) {
|
|
@@ -5394,8 +5491,8 @@ const DraggableWrapper = _ref => {
|
|
|
5394
5491
|
}, draggableKey);
|
|
5395
5492
|
};
|
|
5396
5493
|
|
|
5397
|
-
function ownKeys$
|
|
5398
|
-
function _objectSpread$
|
|
5494
|
+
function ownKeys$X(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; }
|
|
5495
|
+
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$X(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$X(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5399
5496
|
const DefaultWrapper = _ref => {
|
|
5400
5497
|
let children = _ref.children;
|
|
5401
5498
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
@@ -5416,24 +5513,24 @@ const DndProvider = _ref2 => {
|
|
|
5416
5513
|
children = _ref2.children;
|
|
5417
5514
|
const _useToggleState = uiKit.useToggleState(false),
|
|
5418
5515
|
_useToggleState2 = _slicedToArray(_useToggleState, 2),
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
if (
|
|
5516
|
+
isDnDMode = _useToggleState2[0],
|
|
5517
|
+
setDnDMode = _useToggleState2[1];
|
|
5518
|
+
if (isDnDMode) {
|
|
5422
5519
|
return jsxRuntime.jsx(DnDContext.Provider, {
|
|
5423
5520
|
value: {
|
|
5424
5521
|
onDragEnd,
|
|
5425
5522
|
DroppableWrapper,
|
|
5426
5523
|
DraggableWrapper,
|
|
5427
|
-
|
|
5428
|
-
|
|
5524
|
+
setDnDMode,
|
|
5525
|
+
isDnDMode
|
|
5429
5526
|
},
|
|
5430
5527
|
children: children
|
|
5431
5528
|
});
|
|
5432
5529
|
}
|
|
5433
5530
|
return jsxRuntime.jsx(DnDContext.Provider, {
|
|
5434
|
-
value: _objectSpread$
|
|
5435
|
-
|
|
5436
|
-
|
|
5531
|
+
value: _objectSpread$X(_objectSpread$X({}, dndContextDefaultValues), {}, {
|
|
5532
|
+
isDnDMode,
|
|
5533
|
+
setDnDMode
|
|
5437
5534
|
}),
|
|
5438
5535
|
children: children
|
|
5439
5536
|
});
|
|
@@ -5464,8 +5561,8 @@ function CustomTextInput(props) {
|
|
|
5464
5561
|
}
|
|
5465
5562
|
CustomTextInput.displayName = 'CustomTextInput';
|
|
5466
5563
|
|
|
5467
|
-
function ownKeys$
|
|
5468
|
-
function _objectSpread$
|
|
5564
|
+
function ownKeys$W(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; }
|
|
5565
|
+
function _objectSpread$W(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$W(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$W(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5469
5566
|
const getSubfieldLanguage = subfieldName => {
|
|
5470
5567
|
const lastDotIndex = _lastIndexOfInstanceProperty__default["default"](subfieldName).call(subfieldName, '.');
|
|
5471
5568
|
return subfieldName.substring(lastDotIndex + 1);
|
|
@@ -5488,7 +5585,7 @@ function CustomLocalizedTextInput(props) {
|
|
|
5488
5585
|
// as a whole.
|
|
5489
5586
|
|
|
5490
5587
|
const fieldLanguage = getSubfieldLanguage(subfieldName);
|
|
5491
|
-
const newValue = _objectSpread$
|
|
5588
|
+
const newValue = _objectSpread$W(_objectSpread$W({}, props.value), {}, {
|
|
5492
5589
|
[fieldLanguage]: rawValue
|
|
5493
5590
|
});
|
|
5494
5591
|
const nullifiedIfNeeded = uiKit.LocalizedTextInput.isEmpty(newValue) ? undefined : newValue;
|
|
@@ -5554,21 +5651,21 @@ function CustomNumberInput(props) {
|
|
|
5554
5651
|
}
|
|
5555
5652
|
CustomNumberInput.displayName = 'CustomNumberInput';
|
|
5556
5653
|
|
|
5557
|
-
function ownKeys$
|
|
5558
|
-
function _objectSpread$
|
|
5559
|
-
var styles$
|
|
5654
|
+
function ownKeys$V(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; }
|
|
5655
|
+
function _objectSpread$V(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$V(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$V(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5656
|
+
var styles$g = {
|
|
5560
5657
|
"container": "custom-money-input-module__container___1fdO2"
|
|
5561
5658
|
};
|
|
5562
5659
|
const fixCurrencyCode = (value, currencies) => {
|
|
5563
5660
|
if (value.currencyCode) return value;
|
|
5564
5661
|
const firstCurrency = currencies[0];
|
|
5565
|
-
return _objectSpread$
|
|
5662
|
+
return _objectSpread$V(_objectSpread$V({}, value), {}, {
|
|
5566
5663
|
currencyCode: firstCurrency
|
|
5567
5664
|
});
|
|
5568
5665
|
};
|
|
5569
5666
|
const fixAmount = value => {
|
|
5570
5667
|
if (!value.amount) {
|
|
5571
|
-
return _objectSpread$
|
|
5668
|
+
return _objectSpread$V(_objectSpread$V({}, value), {}, {
|
|
5572
5669
|
amount: '0'
|
|
5573
5670
|
});
|
|
5574
5671
|
}
|
|
@@ -5610,7 +5707,7 @@ function CustomMoneyInput(props) {
|
|
|
5610
5707
|
}
|
|
5611
5708
|
const handleChange = makeChangeHandler((rawValue, subfieldName) => {
|
|
5612
5709
|
const isAmount = _endsWithInstanceProperty__default["default"](subfieldName).call(subfieldName, 'amount');
|
|
5613
|
-
const newValue = _objectSpread$
|
|
5710
|
+
const newValue = _objectSpread$V({}, internalValue.current);
|
|
5614
5711
|
if (isAmount) newValue.amount = rawValue;else newValue.currencyCode = rawValue;
|
|
5615
5712
|
const fixedValue = fixEnteredValue(newValue, internalValue.current, currencies);
|
|
5616
5713
|
internalValue.current = fixedValue;
|
|
@@ -5620,7 +5717,7 @@ function CustomMoneyInput(props) {
|
|
|
5620
5717
|
|
|
5621
5718
|
// TODO(pa3): fix setting proper id in UIKit
|
|
5622
5719
|
return jsxRuntime.jsxs("div", {
|
|
5623
|
-
className: styles$
|
|
5720
|
+
className: styles$g.container,
|
|
5624
5721
|
"aria-labelledby": props.name,
|
|
5625
5722
|
children: [jsxRuntime.jsx(uiKit.AccessibleHidden, {
|
|
5626
5723
|
children: jsxRuntime.jsx("label", {
|
|
@@ -5746,7 +5843,7 @@ function getCategoriesByIds(apolloClient, options) {
|
|
|
5746
5843
|
});
|
|
5747
5844
|
}
|
|
5748
5845
|
|
|
5749
|
-
var styles$
|
|
5846
|
+
var styles$f = {
|
|
5750
5847
|
"container": "reference-search-module__container___3-iK3",
|
|
5751
5848
|
"missing-label": "reference-search-module__missing-label___az9AO"
|
|
5752
5849
|
};
|
|
@@ -5853,9 +5950,9 @@ function ReferenceSearch(props) {
|
|
|
5853
5950
|
props.onChange(option);
|
|
5854
5951
|
};
|
|
5855
5952
|
return jsxRuntime.jsxs("div", {
|
|
5856
|
-
className: styles$
|
|
5953
|
+
className: styles$f.container,
|
|
5857
5954
|
children: [areSomeItemsMissing && jsxRuntime.jsx("div", {
|
|
5858
|
-
className: styles$
|
|
5955
|
+
className: styles$f['missing-label'],
|
|
5859
5956
|
children: props.referenceIsMissingLabel
|
|
5860
5957
|
}), jsxRuntime.jsx(CustomFieldTooltip, {
|
|
5861
5958
|
title: tooltipTitle,
|
|
@@ -5919,8 +6016,8 @@ const messages$B = reactIntl.defineMessages({
|
|
|
5919
6016
|
}
|
|
5920
6017
|
});
|
|
5921
6018
|
|
|
5922
|
-
function ownKeys$
|
|
5923
|
-
function _objectSpread$
|
|
6019
|
+
function ownKeys$U(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; }
|
|
6020
|
+
function _objectSpread$U(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$U(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$U(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5924
6021
|
function Option$1(props) {
|
|
5925
6022
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
5926
6023
|
language: applicationContext.dataLocale,
|
|
@@ -5931,7 +6028,7 @@ function Option$1(props) {
|
|
|
5931
6028
|
const _useIntl = reactIntl.useIntl(),
|
|
5932
6029
|
formatMessage = _useIntl.formatMessage;
|
|
5933
6030
|
const category = props.data;
|
|
5934
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
6031
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$U(_objectSpread$U({}, props), {}, {
|
|
5935
6032
|
children: jsxRuntime.jsxs("div", {
|
|
5936
6033
|
"data-testid": "category-option",
|
|
5937
6034
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -5960,8 +6057,8 @@ function Option$1(props) {
|
|
|
5960
6057
|
}));
|
|
5961
6058
|
}
|
|
5962
6059
|
|
|
5963
|
-
function ownKeys$
|
|
5964
|
-
function _objectSpread$
|
|
6060
|
+
function ownKeys$T(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; }
|
|
6061
|
+
function _objectSpread$T(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$T(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$T(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5965
6062
|
const filterOption$1 = () => true;
|
|
5966
6063
|
function CategoryReferenceSearch(props) {
|
|
5967
6064
|
const _useIntl = reactIntl.useIntl(),
|
|
@@ -5973,7 +6070,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5973
6070
|
})),
|
|
5974
6071
|
language = _useApplicationContex.language,
|
|
5975
6072
|
languages = _useApplicationContex.languages;
|
|
5976
|
-
const mapItemToOption = React.useCallback(category => _objectSpread$
|
|
6073
|
+
const mapItemToOption = React.useCallback(category => _objectSpread$T(_objectSpread$T({}, category), {}, {
|
|
5977
6074
|
value: category.id,
|
|
5978
6075
|
label: l10n.formatLocalizedString(category, {
|
|
5979
6076
|
key: 'name',
|
|
@@ -5991,7 +6088,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5991
6088
|
}), [apolloClient]);
|
|
5992
6089
|
return jsxRuntime.jsx(ReferenceSearch, {
|
|
5993
6090
|
id: props.id,
|
|
5994
|
-
components: _objectSpread$
|
|
6091
|
+
components: _objectSpread$T({
|
|
5995
6092
|
Option: Option$1
|
|
5996
6093
|
}, props.components),
|
|
5997
6094
|
isClearable: props.isClearable,
|
|
@@ -6106,8 +6203,8 @@ const messages$A = reactIntl.defineMessages({
|
|
|
6106
6203
|
}
|
|
6107
6204
|
});
|
|
6108
6205
|
|
|
6109
|
-
function ownKeys$
|
|
6110
|
-
function _objectSpread$
|
|
6206
|
+
function ownKeys$S(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; }
|
|
6207
|
+
function _objectSpread$S(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$S(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$S(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6111
6208
|
function Option(props) {
|
|
6112
6209
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
6113
6210
|
language: applicationContext.dataLocale,
|
|
@@ -6118,7 +6215,7 @@ function Option(props) {
|
|
|
6118
6215
|
const _useIntl = reactIntl.useIntl(),
|
|
6119
6216
|
formatMessage = _useIntl.formatMessage;
|
|
6120
6217
|
const cartDiscount = props.data;
|
|
6121
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
6218
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$S(_objectSpread$S({}, props), {}, {
|
|
6122
6219
|
children: jsxRuntime.jsxs("div", {
|
|
6123
6220
|
"data-testid": "cart-discount-option",
|
|
6124
6221
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -6135,8 +6232,8 @@ function Option(props) {
|
|
|
6135
6232
|
}));
|
|
6136
6233
|
}
|
|
6137
6234
|
|
|
6138
|
-
function ownKeys$
|
|
6139
|
-
function _objectSpread$
|
|
6235
|
+
function ownKeys$R(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; }
|
|
6236
|
+
function _objectSpread$R(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$R(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$R(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6140
6237
|
var CartDiscountsCount$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "CartDiscountsCount" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 425, source: { body: "query SearchCartDiscount($where: String) {\n cartDiscounts(limit: 500, where: $where) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n\nquery FetchCartDiscountById($cartDiscountId: String!) {\n cartDiscount(id: $cartDiscountId) {\n id\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
6141
6238
|
const returnNullIfEmpty = value => value && value.id === '' ? null : value;
|
|
6142
6239
|
const filterOption = (option, text) => {
|
|
@@ -6162,7 +6259,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
6162
6259
|
})),
|
|
6163
6260
|
language = _useApplicationContex.language,
|
|
6164
6261
|
languages = _useApplicationContex.languages;
|
|
6165
|
-
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$
|
|
6262
|
+
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$R(_objectSpread$R({}, cartDiscount), {}, {
|
|
6166
6263
|
value: cartDiscount.id,
|
|
6167
6264
|
key: cartDiscount.key,
|
|
6168
6265
|
label: l10n.formatLocalizedString(cartDiscount, {
|
|
@@ -6625,8 +6722,8 @@ function CustomBooleanInputSet(props) {
|
|
|
6625
6722
|
}
|
|
6626
6723
|
CustomBooleanInputSet.displayName = 'CustomBooleanInputSet';
|
|
6627
6724
|
|
|
6628
|
-
function ownKeys$
|
|
6629
|
-
function _objectSpread$
|
|
6725
|
+
function ownKeys$Q(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; }
|
|
6726
|
+
function _objectSpread$Q(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys$Q(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys$Q(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6630
6727
|
const getTypeName = type => type.name.toLowerCase();
|
|
6631
6728
|
const findLabel = (enumType, key) => {
|
|
6632
6729
|
var _context;
|
|
@@ -6676,7 +6773,7 @@ const attributeDefinitionToFieldDefinition = attributeDefinition => ({
|
|
|
6676
6773
|
const nameValuePairsToMap = pairs => _reduceInstanceProperty__default["default"](pairs).call(pairs, (result, _ref2) => {
|
|
6677
6774
|
let name = _ref2.name,
|
|
6678
6775
|
value = _ref2.value;
|
|
6679
|
-
return _objectSpread$
|
|
6776
|
+
return _objectSpread$Q(_objectSpread$Q({}, result), {}, {
|
|
6680
6777
|
[name]: value
|
|
6681
6778
|
});
|
|
6682
6779
|
}, {});
|
|
@@ -6693,11 +6790,14 @@ const attributesMapToNameValuePairs = map => {
|
|
|
6693
6790
|
});
|
|
6694
6791
|
};
|
|
6695
6792
|
|
|
6793
|
+
const _excluded$1 = ["WrapperComponent"];
|
|
6696
6794
|
const getAttributeShortName = (fullName, attributesPrefix) => {
|
|
6697
6795
|
if (!attributesPrefix) return fullName;
|
|
6698
6796
|
return fullName.replace(`${attributesPrefix}.`, '');
|
|
6699
6797
|
};
|
|
6700
|
-
function ProductAttributes(
|
|
6798
|
+
function ProductAttributes(_ref) {
|
|
6799
|
+
let WrapperComponent = _ref.WrapperComponent,
|
|
6800
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
6701
6801
|
const formik$1 = formik.useFormikContext();
|
|
6702
6802
|
const fieldDefinitions = React.useMemo(() => {
|
|
6703
6803
|
var _context;
|
|
@@ -6721,7 +6821,8 @@ function ProductAttributes(props) {
|
|
|
6721
6821
|
isDisabled: props.isDisabled,
|
|
6722
6822
|
fieldDefinitions: fieldDefinitions,
|
|
6723
6823
|
setFieldValue: setFieldValue,
|
|
6724
|
-
inputValuesConverter: convertInputValue
|
|
6824
|
+
inputValuesConverter: convertInputValue,
|
|
6825
|
+
WrapperComponent: WrapperComponent
|
|
6725
6826
|
})
|
|
6726
6827
|
})
|
|
6727
6828
|
});
|
|
@@ -6773,23 +6874,23 @@ const messages$y = reactIntl.defineMessages({
|
|
|
6773
6874
|
}
|
|
6774
6875
|
});
|
|
6775
6876
|
|
|
6776
|
-
function ownKeys$
|
|
6777
|
-
function _objectSpread$
|
|
6877
|
+
function ownKeys$P(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; }
|
|
6878
|
+
function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$P(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$P(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6778
6879
|
var FetchProductTypeQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductTypeQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productType" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "attributeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "100" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "isRequired" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputTipAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "NestedAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizableEnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "NestedAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizableEnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1905, source: { body: "query FetchProductTypeQuery($id: String!) {\n productType(id: $id) {\n name\n attributeDefinitions(limit: 100) {\n results {\n name\n isRequired\n inputHint\n inputTipAllLocales {\n value\n locale\n }\n labelAllLocales {\n value\n locale\n }\n type {\n name\n ... on SetAttributeDefinitionType {\n elementType {\n name\n ... on NestedAttributeDefinitionType {\n typeRef {\n id\n }\n }\n ... on EnumAttributeDefinitionType {\n values {\n results {\n key\n label\n }\n }\n }\n ... on LocalizableEnumAttributeDefinitionType {\n values {\n results {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n ... on ReferenceAttributeDefinitionType {\n referenceTypeId\n }\n }\n }\n ... on ReferenceAttributeDefinitionType {\n referenceTypeId\n }\n ... on NestedAttributeDefinitionType {\n typeRef {\n id\n }\n }\n ... on EnumAttributeDefinitionType {\n values {\n results {\n key\n label\n }\n }\n }\n ... on LocalizableEnumAttributeDefinitionType {\n values {\n results {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
6779
6880
|
const mapAttributeDefinition = definition => {
|
|
6780
6881
|
var _context, _context2, _context3, _context4;
|
|
6781
|
-
return _objectSpread$
|
|
6882
|
+
return _objectSpread$P(_objectSpread$P({}, definition), {}, {
|
|
6782
6883
|
required: definition.isRequired,
|
|
6783
6884
|
inputTip: l10n.transformLocalizedFieldToLocalizedString(definition.inputTipAllLocales),
|
|
6784
6885
|
label: l10n.transformLocalizedFieldToLocalizedString(definition.labelAllLocales),
|
|
6785
|
-
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, definition.type?.elementType?.name) ? _objectSpread$
|
|
6786
|
-
elementType: _objectSpread$
|
|
6886
|
+
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, definition.type?.elementType?.name) ? _objectSpread$P(_objectSpread$P({}, definition.type), {}, {
|
|
6887
|
+
elementType: _objectSpread$P(_objectSpread$P({}, definition.type.elementType), {}, {
|
|
6787
6888
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](definition.type.elementType).results).call(_context2, value => ({
|
|
6788
6889
|
key: value.key,
|
|
6789
6890
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
6790
6891
|
}))
|
|
6791
6892
|
})
|
|
6792
|
-
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, definition.type?.name) ? _objectSpread$
|
|
6893
|
+
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, definition.type?.name) ? _objectSpread$P(_objectSpread$P({}, definition.type), {}, {
|
|
6793
6894
|
values: _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](definition.type).results).call(_context4, value => ({
|
|
6794
6895
|
key: value.key,
|
|
6795
6896
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -6910,8 +7011,8 @@ var messages$x = reactIntl.defineMessages({
|
|
|
6910
7011
|
|
|
6911
7012
|
const NestingLevelContext = /*#__PURE__*/React.createContext(0);
|
|
6912
7013
|
|
|
6913
|
-
function ownKeys$
|
|
6914
|
-
function _objectSpread$
|
|
7014
|
+
function ownKeys$O(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; }
|
|
7015
|
+
function _objectSpread$O(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$O(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$O(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6915
7016
|
const EditButton = props => {
|
|
6916
7017
|
const _useIntl = reactIntl.useIntl(),
|
|
6917
7018
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -6981,7 +7082,8 @@ const NestedAttributeModalPage = props => {
|
|
|
6981
7082
|
children: jsxRuntime.jsx(ProductAttributes, {
|
|
6982
7083
|
isDisabled: props.isDisabled,
|
|
6983
7084
|
isReadOnly: props.isReadOnly,
|
|
6984
|
-
attributeDefinitions: props.productType.attributeDefinitions
|
|
7085
|
+
attributeDefinitions: props.productType.attributeDefinitions,
|
|
7086
|
+
WrapperComponent: props.WrapperComponent
|
|
6985
7087
|
})
|
|
6986
7088
|
})
|
|
6987
7089
|
})
|
|
@@ -7058,13 +7160,13 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
7058
7160
|
const valuesAsMap = nameValuePairsToMap(value);
|
|
7059
7161
|
const initialValues = omitUnknownValues(valuesAsMap, attributeDefinitionsAsMap);
|
|
7060
7162
|
const openNestedAttributesForm = () => {
|
|
7061
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
7163
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$O(_objectSpread$O({}, parentFormik.status), {}, {
|
|
7062
7164
|
hideSaveToolbar: true
|
|
7063
7165
|
}));
|
|
7064
7166
|
attributesForm.openModal();
|
|
7065
7167
|
};
|
|
7066
7168
|
const closeNestedAttributesForm = () => {
|
|
7067
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
7169
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$O(_objectSpread$O({}, parentFormik.status), {}, {
|
|
7068
7170
|
hideSaveToolbar: false
|
|
7069
7171
|
}));
|
|
7070
7172
|
attributesForm.closeModal();
|
|
@@ -7100,7 +7202,8 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
7100
7202
|
isOpen: attributesForm.isModalOpen,
|
|
7101
7203
|
title: formTitle,
|
|
7102
7204
|
onClose: closeNestedAttributesForm,
|
|
7103
|
-
productType: productType
|
|
7205
|
+
productType: productType,
|
|
7206
|
+
WrapperComponent: props.WrapperComponent
|
|
7104
7207
|
})]
|
|
7105
7208
|
})
|
|
7106
7209
|
})
|
|
@@ -7110,7 +7213,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
7110
7213
|
});
|
|
7111
7214
|
CustomNestedInput.displayName = 'CustomNestedInput';
|
|
7112
7215
|
|
|
7113
|
-
var styles$
|
|
7216
|
+
var styles$e = {
|
|
7114
7217
|
"divider": "divider-module__divider___4-vdy",
|
|
7115
7218
|
"divider-horizontal": "divider-module__divider-horizontal___RuUcj",
|
|
7116
7219
|
"divider-vertical": "divider-module__divider-vertical___32kJG",
|
|
@@ -7123,10 +7226,10 @@ function Divider(_ref) {
|
|
|
7123
7226
|
orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation;
|
|
7124
7227
|
return jsxRuntime.jsx("hr", {
|
|
7125
7228
|
className: classnames__default["default"]({
|
|
7126
|
-
[styles$
|
|
7127
|
-
[styles$
|
|
7128
|
-
[styles$
|
|
7129
|
-
[styles$
|
|
7229
|
+
[styles$e['divider-solid']]: !isDashed,
|
|
7230
|
+
[styles$e['divider-dashed']]: isDashed,
|
|
7231
|
+
[styles$e['divider-horizontal']]: orientation === 'horizontal',
|
|
7232
|
+
[styles$e['divider-vertical']]: orientation === 'vertical'
|
|
7130
7233
|
})
|
|
7131
7234
|
});
|
|
7132
7235
|
}
|
|
@@ -7146,7 +7249,7 @@ const ExpandButton = props => props.totalValues > 1 ? jsxRuntime.jsxs(uiKit.Spac
|
|
|
7146
7249
|
}) : null;
|
|
7147
7250
|
ExpandButton.displayName = 'ExpandButton';
|
|
7148
7251
|
|
|
7149
|
-
var styles$
|
|
7252
|
+
var styles$d = {
|
|
7150
7253
|
"topAlign": "set-buttons-module__topAlign___3AZwc",
|
|
7151
7254
|
"gap": "set-buttons-module__gap___38Qr0"
|
|
7152
7255
|
}; // TODO(pa3): alignment of buttons made in a kinda ugly way (i.e. gap class).
|
|
@@ -7167,15 +7270,15 @@ const SetButtons = props => {
|
|
|
7167
7270
|
size: "big",
|
|
7168
7271
|
icon: jsxRuntime.jsx(uiKit.PlusBoldIcon, {})
|
|
7169
7272
|
}) : jsxRuntime.jsx("div", {
|
|
7170
|
-
className: styles$
|
|
7273
|
+
className: styles$d.gap
|
|
7171
7274
|
})]
|
|
7172
7275
|
})
|
|
7173
7276
|
});
|
|
7174
7277
|
};
|
|
7175
7278
|
SetButtons.displayName = 'SetButtons';
|
|
7176
7279
|
|
|
7177
|
-
function ownKeys$
|
|
7178
|
-
function _objectSpread$
|
|
7280
|
+
function ownKeys$N(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; }
|
|
7281
|
+
function _objectSpread$N(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$N(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$N(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7179
7282
|
const getDuplicateErrors = setValues => {
|
|
7180
7283
|
/* eslint-disable no-plusplus */
|
|
7181
7284
|
const result = [];
|
|
@@ -7229,7 +7332,7 @@ function CustomInputSet(props) {
|
|
|
7229
7332
|
touched = _useFormikContext.touched,
|
|
7230
7333
|
isSubmitting = _useFormikContext.isSubmitting,
|
|
7231
7334
|
dirty = _useFormikContext.dirty;
|
|
7232
|
-
const itemFieldDefinition = _objectSpread$
|
|
7335
|
+
const itemFieldDefinition = _objectSpread$N(_objectSpread$N({}, props.fieldDefinition), {}, {
|
|
7233
7336
|
type: props.fieldDefinition.type.elementType
|
|
7234
7337
|
});
|
|
7235
7338
|
const value = React.useMemo(() => props.value || [undefined], [props.value]);
|
|
@@ -7326,7 +7429,8 @@ function CustomInputSet(props) {
|
|
|
7326
7429
|
onBlur: props.onBlur,
|
|
7327
7430
|
setFieldValue: setItemValue,
|
|
7328
7431
|
value: fieldValue,
|
|
7329
|
-
hasError: props.hasError
|
|
7432
|
+
hasError: props.hasError,
|
|
7433
|
+
WrapperComponent: props.WrapperComponent
|
|
7330
7434
|
}), jsxRuntime.jsx(SetButtons, {
|
|
7331
7435
|
index: index,
|
|
7332
7436
|
isFirstItem: !isExpanded || index === 0,
|
|
@@ -7402,10 +7506,10 @@ var messages$w = reactIntl.defineMessages({
|
|
|
7402
7506
|
}
|
|
7403
7507
|
});
|
|
7404
7508
|
|
|
7405
|
-
function ownKeys$
|
|
7406
|
-
function _objectSpread$
|
|
7509
|
+
function ownKeys$M(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; }
|
|
7510
|
+
function _objectSpread$M(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$M(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$M(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7407
7511
|
function ProductTypeReference(props) {
|
|
7408
|
-
const productTypeMessage = _objectSpread$
|
|
7512
|
+
const productTypeMessage = _objectSpread$M(_objectSpread$M({}, messages$w.referencedProductType), {}, {
|
|
7409
7513
|
values: {
|
|
7410
7514
|
productTypeName: props.productType.name
|
|
7411
7515
|
}
|
|
@@ -7451,9 +7555,9 @@ function CustomNestedFieldInput(props) {
|
|
|
7451
7555
|
}
|
|
7452
7556
|
CustomNestedFieldInput.displayName = 'CustomNestedFieldInput';
|
|
7453
7557
|
|
|
7454
|
-
function ownKeys$
|
|
7455
|
-
function _objectSpread$
|
|
7456
|
-
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$
|
|
7558
|
+
function ownKeys$L(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; }
|
|
7559
|
+
function _objectSpread$L(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$L(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$L(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7560
|
+
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$L(_objectSpread$L({}, result), itemErrors), {});
|
|
7457
7561
|
|
|
7458
7562
|
// TODO(pa3): worth splitting in two components: one of set errors and one for
|
|
7459
7563
|
// all the other types of fields. So that there will be no isArray check.
|
|
@@ -7510,8 +7614,8 @@ var messages$v = reactIntl.defineMessages({
|
|
|
7510
7614
|
}
|
|
7511
7615
|
});
|
|
7512
7616
|
|
|
7513
|
-
function ownKeys$
|
|
7514
|
-
function _objectSpread$
|
|
7617
|
+
function ownKeys$K(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; }
|
|
7618
|
+
function _objectSpread$K(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$K(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$K(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7515
7619
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
7516
7620
|
var CartDiscountsCount = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "CartDiscountsCount" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 61, source: { body: "query CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
7517
7621
|
const CustomFieldsLabelHint = _ref2 => {
|
|
@@ -7541,7 +7645,7 @@ const CustomFieldsLabelHint = _ref2 => {
|
|
|
7541
7645
|
children: [jsxRuntime.jsx(uiKit.WarningIcon, {
|
|
7542
7646
|
size: "medium",
|
|
7543
7647
|
color: "warning"
|
|
7544
|
-
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
7648
|
+
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$K({}, messages$v.cartDiscountMoreThan500))]
|
|
7545
7649
|
});
|
|
7546
7650
|
}
|
|
7547
7651
|
return l10n.formatLocalizedString(fieldDefinition, {
|
|
@@ -7646,6 +7750,9 @@ const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref5 => {
|
|
|
7646
7750
|
});
|
|
7647
7751
|
CustomFieldsLabel.displayName = 'CustomFieldsTitle';
|
|
7648
7752
|
|
|
7753
|
+
const _excluded = ["WrapperComponent"];
|
|
7754
|
+
function ownKeys$J(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; }
|
|
7755
|
+
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$J(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$J(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7649
7756
|
const getFieldName = (parentName, fieldName) => {
|
|
7650
7757
|
if (!parentName) return fieldName;
|
|
7651
7758
|
return `${parentName}.${fieldName}`;
|
|
@@ -7659,7 +7766,9 @@ const isNested = fieldDefinition => {
|
|
|
7659
7766
|
}
|
|
7660
7767
|
return typeName === CUSTOM_FIELD_TYPES.nested;
|
|
7661
7768
|
};
|
|
7662
|
-
const CustomFieldsInternal =
|
|
7769
|
+
const CustomFieldsInternal = _ref => {
|
|
7770
|
+
let WrapperComponent = _ref.WrapperComponent,
|
|
7771
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
7663
7772
|
const _useFormikContext = formik.useFormikContext(),
|
|
7664
7773
|
errors = _useFormikContext.errors,
|
|
7665
7774
|
touched = _useFormikContext.touched,
|
|
@@ -7670,8 +7779,11 @@ const CustomFieldsInternal = props => {
|
|
|
7670
7779
|
const _useDnDContext = useDnDContext(),
|
|
7671
7780
|
DroppableWrapper = _useDnDContext.DroppableWrapper,
|
|
7672
7781
|
DraggableWrapper = _useDnDContext.DraggableWrapper,
|
|
7673
|
-
|
|
7782
|
+
isDnDMode = _useDnDContext.isDnDMode,
|
|
7783
|
+
onDragEnd = _useDnDContext.onDragEnd;
|
|
7784
|
+
const fieldKey = props.isDisabled ? 'disabled' : 'enabled';
|
|
7674
7785
|
return jsxRuntime.jsx(DroppableWrapper, {
|
|
7786
|
+
onDragEnd: onDragEnd,
|
|
7675
7787
|
children: _mapInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, (fieldDefinition, index) => {
|
|
7676
7788
|
const fieldName = getFieldName(props.name, fieldDefinition.name);
|
|
7677
7789
|
const isTouched = Boolean(formik.getIn(touched, fieldName));
|
|
@@ -7686,6 +7798,18 @@ const CustomFieldsInternal = props => {
|
|
|
7686
7798
|
};
|
|
7687
7799
|
return undefined;
|
|
7688
7800
|
};
|
|
7801
|
+
const FieldComponent = isNested(fieldDefinition) ? CustomNestedFieldInput : CustomFieldInput;
|
|
7802
|
+
const fieldProps = {
|
|
7803
|
+
name: fieldName,
|
|
7804
|
+
value: value,
|
|
7805
|
+
fieldDefinition: fieldDefinition,
|
|
7806
|
+
isDisabled: props.isDisabled || isDnDMode,
|
|
7807
|
+
isReadOnly: props.isReadOnly,
|
|
7808
|
+
onBlur: handleBlur,
|
|
7809
|
+
setFieldValue: props.setFieldValue,
|
|
7810
|
+
hasError: hasError
|
|
7811
|
+
};
|
|
7812
|
+
const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$J({}, fieldProps));
|
|
7689
7813
|
return jsxRuntime.jsx(formik.FastField, {
|
|
7690
7814
|
name: fieldName,
|
|
7691
7815
|
validate: validate,
|
|
@@ -7705,24 +7829,9 @@ const CustomFieldsInternal = props => {
|
|
|
7705
7829
|
}), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
7706
7830
|
scale: "xs",
|
|
7707
7831
|
alignItems: "stretch",
|
|
7708
|
-
children: [
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
fieldDefinition: fieldDefinition,
|
|
7712
|
-
isDisabled: props.isDisabled || isDragAndDropMode,
|
|
7713
|
-
isReadOnly: props.isReadOnly,
|
|
7714
|
-
onBlur: handleBlur,
|
|
7715
|
-
setFieldValue: props.setFieldValue
|
|
7716
|
-
}) : jsxRuntime.jsx(CustomFieldInput, {
|
|
7717
|
-
name: fieldName,
|
|
7718
|
-
value: value,
|
|
7719
|
-
fieldDefinition: fieldDefinition,
|
|
7720
|
-
isDisabled: props.isDisabled || isDragAndDropMode,
|
|
7721
|
-
isReadOnly: props.isReadOnly,
|
|
7722
|
-
onBlur: handleBlur,
|
|
7723
|
-
setFieldValue: props.setFieldValue,
|
|
7724
|
-
hasError: hasError
|
|
7725
|
-
}), jsxRuntime.jsx(CustomFieldErrors, {
|
|
7832
|
+
children: [WrapperComponent ? jsxRuntime.jsx(WrapperComponent, {
|
|
7833
|
+
children: Field
|
|
7834
|
+
}) : Field, jsxRuntime.jsx(CustomFieldErrors, {
|
|
7726
7835
|
isTouched: isTouched,
|
|
7727
7836
|
errors: fieldErrors
|
|
7728
7837
|
})]
|
|
@@ -7730,7 +7839,7 @@ const CustomFieldsInternal = props => {
|
|
|
7730
7839
|
})
|
|
7731
7840
|
})
|
|
7732
7841
|
})
|
|
7733
|
-
}, `${fieldName}-${index}`);
|
|
7842
|
+
}, `${fieldName}-${index}-${fieldKey}`);
|
|
7734
7843
|
})
|
|
7735
7844
|
});
|
|
7736
7845
|
};
|
|
@@ -7744,7 +7853,7 @@ const CustomFields = props => {
|
|
|
7744
7853
|
// Ensure you pass isWidthExpanded=true when adding the new layout component so the custom fields
|
|
7745
7854
|
// can expand to fill the width of the layout.
|
|
7746
7855
|
return jsxRuntime.jsx("div", {
|
|
7747
|
-
css: /*#__PURE__*/react$1.css("min-width:", props.isWidthExpanded ? '100%' : uiKit.customProperties.constraint11, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:CustomFields;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS1maWVsZHMuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWVjIiwiZmlsZSI6ImN1c3RvbS1maWVsZHMuanN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFByb3BUeXBlcyBmcm9tICdwcm9wLXR5cGVzJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IHVzZUZvcm1pa0NvbnRleHQgfSBmcm9tICdmb3JtaWsnO1xuaW1wb3J0IEN1c3RvbUZpZWxkc0ludGVybmFsIGZyb20gJy4vY3VzdG9tLWZpZWxkcy1pbnRlcm5hbCc7XG5pbXBvcnQgeyBjdXN0b21Qcm9wZXJ0aWVzLCBTcGFjaW5ncyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL3VpLWtpdCc7XG5cbmNvbnN0IG5vcENvbnZlcnRlciA9IChmaWVsZE5hbWUsIGZpZWxkVmFsdWUpID0+IGZpZWxkVmFsdWU7XG5cbmNvbnN0IEN1c3RvbUZpZWxkcyA9IChwcm9wcykgPT4ge1xuICBjb25zdCB7IHNldEZpZWxkVmFsdWUgfSA9IHVzZUZvcm1pa0NvbnRleHQoKTtcblxuICAvLyBFbnN1cmUgeW91IHBhc3MgaXNXaWR0aEV4cGFuZGVkPXRydWUgd2hlbiBhZGRpbmcgdGhlIG5ldyBsYXlvdXQgY29tcG9uZW50IHNvIHRoZSBjdXN0b20gZmllbGRzXG4gIC8vIGNhbiBleHBhbmQgdG8gZmlsbCB0aGUgd2lkdGggb2YgdGhlIGxheW91dC5cbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICBjc3M9e2Nzc2BcbiAgICAgICAgbWluLXdpZHRoOiAke3Byb3BzLmlzV2lkdGhFeHBhbmRlZFxuICAgICAgICAgID8gJzEwMCUnXG4gICAgICAgICAgOiBjdXN0b21Qcm9wZXJ0aWVzLmNvbnN0cmFpbnQxMX07XG4gICAgICBgfVxuICAgID5cbiAgICAgIDxTcGFjaW5ncy5TdGFjayBzY2FsZT1cInhsXCI+
|
|
7856
|
+
css: /*#__PURE__*/react$1.css("min-width:", props.isWidthExpanded ? '100%' : uiKit.customProperties.constraint11, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:CustomFields;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS1maWVsZHMuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWVjIiwiZmlsZSI6ImN1c3RvbS1maWVsZHMuanN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFByb3BUeXBlcyBmcm9tICdwcm9wLXR5cGVzJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IHVzZUZvcm1pa0NvbnRleHQgfSBmcm9tICdmb3JtaWsnO1xuaW1wb3J0IEN1c3RvbUZpZWxkc0ludGVybmFsIGZyb20gJy4vY3VzdG9tLWZpZWxkcy1pbnRlcm5hbCc7XG5pbXBvcnQgeyBjdXN0b21Qcm9wZXJ0aWVzLCBTcGFjaW5ncyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL3VpLWtpdCc7XG5cbmNvbnN0IG5vcENvbnZlcnRlciA9IChmaWVsZE5hbWUsIGZpZWxkVmFsdWUpID0+IGZpZWxkVmFsdWU7XG5cbmNvbnN0IEN1c3RvbUZpZWxkcyA9IChwcm9wcykgPT4ge1xuICBjb25zdCB7IHNldEZpZWxkVmFsdWUgfSA9IHVzZUZvcm1pa0NvbnRleHQoKTtcblxuICAvLyBFbnN1cmUgeW91IHBhc3MgaXNXaWR0aEV4cGFuZGVkPXRydWUgd2hlbiBhZGRpbmcgdGhlIG5ldyBsYXlvdXQgY29tcG9uZW50IHNvIHRoZSBjdXN0b20gZmllbGRzXG4gIC8vIGNhbiBleHBhbmQgdG8gZmlsbCB0aGUgd2lkdGggb2YgdGhlIGxheW91dC5cbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICBjc3M9e2Nzc2BcbiAgICAgICAgbWluLXdpZHRoOiAke3Byb3BzLmlzV2lkdGhFeHBhbmRlZFxuICAgICAgICAgID8gJzEwMCUnXG4gICAgICAgICAgOiBjdXN0b21Qcm9wZXJ0aWVzLmNvbnN0cmFpbnQxMX07XG4gICAgICBgfVxuICAgID5cbiAgICAgIDxTcGFjaW5ncy5TdGFjayBzY2FsZT1cInhsXCI+XG4gICAgICAgIDxDdXN0b21GaWVsZHNJbnRlcm5hbFxuICAgICAgICAgIG5hbWU9e3Byb3BzLm5hbWV9XG4gICAgICAgICAgaXNSZWFkT25seT17cHJvcHMuaXNSZWFkT25seX1cbiAgICAgICAgICBpc0Rpc2FibGVkPXtwcm9wcy5pc0Rpc2FibGVkfVxuICAgICAgICAgIGZpZWxkRGVmaW5pdGlvbnM9e3Byb3BzLmZpZWxkRGVmaW5pdGlvbnN9XG4gICAgICAgICAgc2V0RmllbGRWYWx1ZT17c2V0RmllbGRWYWx1ZX1cbiAgICAgICAgICBpbnB1dFZhbHVlc0NvbnZlcnRlcj17bm9wQ29udmVydGVyfVxuICAgICAgICAgIFdyYXBwZXJDb21wb25lbnQ9e3Byb3BzLldyYXBwZXJDb21wb25lbnR9XG4gICAgICAgIC8+XG4gICAgICA8L1NwYWNpbmdzLlN0YWNrPlxuICAgIDwvZGl2PlxuICApO1xufTtcbkN1c3RvbUZpZWxkcy5kaXNwbGF5TmFtZSA9ICdDdXN0b21GaWVsZHMnO1xuQ3VzdG9tRmllbGRzLnByb3BUeXBlcyA9IHtcbiAgaXNXaWR0aEV4cGFuZGVkOiBQcm9wVHlwZXMuYm9vbCxcbiAgaXNSZWFkT25seTogUHJvcFR5cGVzLmJvb2wsXG4gIGlzRGlzYWJsZWQ6IFByb3BUeXBlcy5ib29sLFxuICBuYW1lOiBQcm9wVHlwZXMuc3RyaW5nLFxuICBmaWVsZERlZmluaXRpb25zOiBQcm9wVHlwZXMuYXJyYXlPZihcbiAgICBQcm9wVHlwZXMuc2hhcGUoe1xuICAgICAgbmFtZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICAgIHJlcXVpcmVkOiBQcm9wVHlwZXMuYm9vbCxcblxuICAgICAgaW5wdXRIaW50OiBQcm9wVHlwZXMuc3RyaW5nLFxuICAgICAgaW5wdXRUaXA6IFByb3BUeXBlcy5vYmplY3QsXG4gICAgICBsYWJlbDogUHJvcFR5cGVzLm9iamVjdE9mKFByb3BUeXBlcy5zdHJpbmcpLFxuXG4gICAgICB0eXBlOiBQcm9wVHlwZXMub25lT2ZUeXBlKFtcbiAgICAgICAgUHJvcFR5cGVzLnNoYXBlKHtcbiAgICAgICAgICB0eXBlOiBQcm9wVHlwZXMuc2hhcGUoe1xuICAgICAgICAgICAgbmFtZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICAgICAgICB9KSxcbiAgICAgICAgfSksXG4gICAgICAgIC8vIFNldFxuICAgICAgICBQcm9wVHlwZXMuc2hhcGUoe1xuICAgICAgICAgIGVsZW1lbnRUeXBlOiBQcm9wVHlwZXMuc2hhcGUoe1xuICAgICAgICAgICAgdHlwZTogUHJvcFR5cGVzLnNoYXBlKHtcbiAgICAgICAgICAgICAgbmFtZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgIH0pLFxuICAgICAgICB9KSxcbiAgICAgIF0pLFxuICAgIH0pXG4gICksXG4gIFdyYXBwZXJDb21wb25lbnQ6IFByb3BUeXBlcy5lbGVtZW50VHlwZSxcbn07XG5cbmV4cG9ydCBkZWZhdWx0IEN1c3RvbUZpZWxkcztcbiJdfQ== */"),
|
|
7748
7857
|
children: jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
7749
7858
|
scale: "xl",
|
|
7750
7859
|
children: jsxRuntime.jsx(CustomFieldsInternal, {
|
|
@@ -7753,7 +7862,8 @@ const CustomFields = props => {
|
|
|
7753
7862
|
isDisabled: props.isDisabled,
|
|
7754
7863
|
fieldDefinitions: props.fieldDefinitions,
|
|
7755
7864
|
setFieldValue: setFieldValue,
|
|
7756
|
-
inputValuesConverter: nopConverter
|
|
7865
|
+
inputValuesConverter: nopConverter,
|
|
7866
|
+
WrapperComponent: props.WrapperComponent
|
|
7757
7867
|
})
|
|
7758
7868
|
})
|
|
7759
7869
|
});
|
|
@@ -8479,6 +8589,11 @@ const getFirst60Options = (storesOptions, currentValues) => {
|
|
|
8479
8589
|
const currentValuesLength = _Array$isArray__default["default"](currentValues) ? currentValues.length : 1;
|
|
8480
8590
|
return _sliceInstanceProperty__default["default"](storesOptions).call(storesOptions, 0, LOWER_STORES_LIMIT + currentValuesLength);
|
|
8481
8591
|
};
|
|
8592
|
+
const getCustomGroupLabelOption = customLabel => [{
|
|
8593
|
+
label: customLabel,
|
|
8594
|
+
value: '',
|
|
8595
|
+
isDisabled: true
|
|
8596
|
+
}];
|
|
8482
8597
|
|
|
8483
8598
|
var messages$s = reactIntl.defineMessages({
|
|
8484
8599
|
basicSelectInputPlaceholder: {
|
|
@@ -8574,16 +8689,23 @@ const StoresAsyncSelectInput = props => {
|
|
|
8574
8689
|
}));
|
|
8575
8690
|
}, [dataLocale, storesListFetcher.stores, props.renderSelectInputOptionValuesByField]);
|
|
8576
8691
|
const handleLoadOptions = async searchTerm => {
|
|
8577
|
-
if (!searchTerm)
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8692
|
+
if (!searchTerm) {
|
|
8693
|
+
const result = [...(props.renderLabel ? [{
|
|
8694
|
+
options: getCustomGroupLabelOption(props.renderLabel)
|
|
8695
|
+
}] : []), {
|
|
8696
|
+
options: getFirst60Options(mappedStoresListOptions, props.value)
|
|
8697
|
+
}, {
|
|
8698
|
+
options: emptyStoreOption(intl)
|
|
8699
|
+
}];
|
|
8700
|
+
return result;
|
|
8701
|
+
}
|
|
8582
8702
|
const filteredOptions = _filterInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, storeOption => {
|
|
8583
8703
|
var _context3, _context4;
|
|
8584
8704
|
return _includesInstanceProperty__default["default"](_context3 = storeOption.label.toLowerCase()).call(_context3, searchTerm.toLowerCase()) || storeOption.key && _includesInstanceProperty__default["default"](_context4 = storeOption.key.toLowerCase()).call(_context4, searchTerm.toLowerCase());
|
|
8585
8705
|
});
|
|
8586
|
-
return [{
|
|
8706
|
+
return [...(props.renderLabel ? [{
|
|
8707
|
+
options: getCustomGroupLabelOption(props.renderLabel)
|
|
8708
|
+
}] : []), {
|
|
8587
8709
|
options: getFirst60Options(filteredOptions, props.value)
|
|
8588
8710
|
}, {
|
|
8589
8711
|
options: emptyStoreOption(intl)
|
|
@@ -8591,7 +8713,7 @@ const StoresAsyncSelectInput = props => {
|
|
|
8591
8713
|
};
|
|
8592
8714
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8593
8715
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8594
|
-
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$D(_objectSpread$D({
|
|
8716
|
+
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$D(_objectSpread$D(_objectSpread$D({
|
|
8595
8717
|
id: props.id,
|
|
8596
8718
|
name: props.name,
|
|
8597
8719
|
placeholder: intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
@@ -8620,9 +8742,12 @@ const StoresAsyncSelectInput = props => {
|
|
|
8620
8742
|
maxMenuHeight: props.maxMenuHeight,
|
|
8621
8743
|
menuPortalTarget: props.menuPortalTarget,
|
|
8622
8744
|
menuPortalZIndex: props.menuPortalZIndex,
|
|
8745
|
+
menuIsOpen: props.menuIsOpen,
|
|
8623
8746
|
components: props.components,
|
|
8624
8747
|
controlShouldRenderValue: props.controlShouldRenderValue
|
|
8625
|
-
}, utils.filterDataAttributes(props)), utils.filterAriaAttributes(props))
|
|
8748
|
+
}, utils.filterDataAttributes(props)), utils.filterAriaAttributes(props)), props.iconLeft && {
|
|
8749
|
+
iconLeft: props.iconLeft
|
|
8750
|
+
})), jsxRuntime.jsx(uiKit.FieldErrors, {
|
|
8626
8751
|
errors: props.errors,
|
|
8627
8752
|
isVisible: hasError,
|
|
8628
8753
|
renderError: props.renderError
|
|
@@ -8659,12 +8784,17 @@ const StoresBasicSelectInput = props => {
|
|
|
8659
8784
|
const hasError = uiKit.SelectInput.isTouched(props.touched) && hasErrors$1(props.errors) || props.hasError;
|
|
8660
8785
|
const mappedStoresListOptions = React.useMemo(() => {
|
|
8661
8786
|
var _context2;
|
|
8662
|
-
|
|
8787
|
+
const results = _mapInstanceProperty__default["default"](_context2 = storesListFetcher.stores?.results || []).call(_context2, store => mapStoresToOptions({
|
|
8663
8788
|
store,
|
|
8664
8789
|
dataLocale,
|
|
8665
8790
|
renderSelectInputOptionValuesByField: props.renderSelectInputOptionValuesByField
|
|
8666
8791
|
}));
|
|
8667
|
-
|
|
8792
|
+
return props?.renderLabel ? [{
|
|
8793
|
+
options: getCustomGroupLabelOption(props.renderLabel)
|
|
8794
|
+
}, {
|
|
8795
|
+
options: results
|
|
8796
|
+
}] : results;
|
|
8797
|
+
}, [dataLocale, storesListFetcher.stores, props.renderSelectInputOptionValuesByField, props?.renderLabel]);
|
|
8668
8798
|
const handleChange = event => {
|
|
8669
8799
|
const value = event.target.value?.value ?? event.target.value;
|
|
8670
8800
|
const currentStore = _findInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, store => store.value === value);
|
|
@@ -8682,10 +8812,10 @@ const StoresBasicSelectInput = props => {
|
|
|
8682
8812
|
};
|
|
8683
8813
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8684
8814
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8685
|
-
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$C(_objectSpread$C({
|
|
8815
|
+
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$C(_objectSpread$C(_objectSpread$C({
|
|
8686
8816
|
id: props.id,
|
|
8687
8817
|
name: props.name,
|
|
8688
|
-
placeholder: intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
8818
|
+
placeholder: props.placeholder || intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
8689
8819
|
horizontalConstraint: props.horizontalConstraint,
|
|
8690
8820
|
options: mappedStoresListOptions,
|
|
8691
8821
|
isMulti: props.isMulti,
|
|
@@ -8705,9 +8835,12 @@ const StoresBasicSelectInput = props => {
|
|
|
8705
8835
|
maxMenuHeight: props.maxMenuHeight,
|
|
8706
8836
|
menuPortalTarget: props.menuPortalTarget,
|
|
8707
8837
|
menuPortalZIndex: props.menuPortalZIndex,
|
|
8838
|
+
menuIsOpen: props.menuIsOpen,
|
|
8708
8839
|
components: props.components,
|
|
8709
8840
|
controlShouldRenderValue: props.controlShouldRenderValue
|
|
8710
|
-
}, utils.filterDataAttributes(props)), utils.filterAriaAttributes(props))
|
|
8841
|
+
}, utils.filterDataAttributes(props)), utils.filterAriaAttributes(props)), props.iconLeft && {
|
|
8842
|
+
iconLeft: props.iconLeft
|
|
8843
|
+
})), jsxRuntime.jsx(uiKit.FieldErrors, {
|
|
8711
8844
|
errors: props.errors,
|
|
8712
8845
|
isVisible: hasError,
|
|
8713
8846
|
renderError: props.renderError
|
|
@@ -8776,6 +8909,10 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
8776
8909
|
function ownKeys$B(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; }
|
|
8777
8910
|
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$B(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$B(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8778
8911
|
var FetchStoresByWherePredicate = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresByWherePredicate" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "storesByWherePredicate" }, name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelection" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 525, source: { body: "query FetchStoresByWherePredicate(\n $where: String!\n $skipFetchingStores: Boolean!\n $excludeProductSelections: Boolean!\n) {\n storesByWherePredicate: stores(where: $where) @skip(if: $skipFetchingStores) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n productSelections @skip(if: $excludeProductSelections) {\n active\n productSelection {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8912
|
+
var styles$c = {
|
|
8913
|
+
"renderLabelContainer": "stores-search-selector-module__renderLabelContainer___3_PBc",
|
|
8914
|
+
"customLabel": "stores-search-selector-module__customLabel___1Xse8"
|
|
8915
|
+
};
|
|
8779
8916
|
const hasErrors = errors => {
|
|
8780
8917
|
var _context;
|
|
8781
8918
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8863,15 +9000,33 @@ const StoresSearchSelectInput = props => {
|
|
|
8863
9000
|
fetchPolicy: 'network-only'
|
|
8864
9001
|
}).then(_ref3 => {
|
|
8865
9002
|
let data = _ref3.data;
|
|
8866
|
-
|
|
9003
|
+
const result = data.storesByWherePredicate?.results.map(store => mapStoresToOptions({
|
|
8867
9004
|
store,
|
|
8868
9005
|
dataLocale,
|
|
8869
9006
|
renderSelectInputOptionValuesByField: props.renderSelectInputOptionValuesByField
|
|
8870
9007
|
}));
|
|
9008
|
+
if (!props.renderLabel) {
|
|
9009
|
+
return result;
|
|
9010
|
+
}
|
|
9011
|
+
return [...(props.renderLabel && result.length > 0 ? [{
|
|
9012
|
+
options: getCustomGroupLabelOption(props.renderLabel)
|
|
9013
|
+
}] : null), ...result];
|
|
8871
9014
|
});
|
|
8872
9015
|
return extractMatchedStores;
|
|
8873
9016
|
};
|
|
8874
9017
|
const loadOptionsDebounced = debounce__default["default"](handleLoadOptions, 500);
|
|
9018
|
+
const renderNoOptions = _ref4 => {
|
|
9019
|
+
let inputValue = _ref4.inputValue;
|
|
9020
|
+
return jsxRuntime.jsxs("div", {
|
|
9021
|
+
className: styles$c.renderLabelContainer,
|
|
9022
|
+
children: [jsxRuntime.jsx("div", {
|
|
9023
|
+
className: styles$c.customLabel,
|
|
9024
|
+
children: props?.renderLabel && props?.renderLabel
|
|
9025
|
+
}), jsxRuntime.jsx("div", {
|
|
9026
|
+
children: intl.formatMessage(inputValue ? messages$s.searchSelectInputNoOptionsFoundMessage : messages$s.searchSelectInputNoValueMessage)
|
|
9027
|
+
})]
|
|
9028
|
+
});
|
|
9029
|
+
};
|
|
8875
9030
|
if (storesByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8876
9031
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8877
9032
|
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$B(_objectSpread$B({
|
|
@@ -8892,10 +9047,7 @@ const StoresSearchSelectInput = props => {
|
|
|
8892
9047
|
onChange: props.onChange,
|
|
8893
9048
|
onBlur: props.onBlur,
|
|
8894
9049
|
loadingMessage: intl.formatMessage(messages$s.searchSelectInputLoadingMessage),
|
|
8895
|
-
noOptionsMessage:
|
|
8896
|
-
let inputValue = _ref4.inputValue;
|
|
8897
|
-
return intl.formatMessage(inputValue ? messages$s.searchSelectInputNoOptionsFoundMessage : messages$s.searchSelectInputNoValueMessage);
|
|
8898
|
-
},
|
|
9050
|
+
noOptionsMessage: renderNoOptions,
|
|
8899
9051
|
isDisabled: props.isDisabled || storesByFieldFetcher.isLoading,
|
|
8900
9052
|
isReadOnly: props.isReadOnly,
|
|
8901
9053
|
isClearable: props.isClearable,
|
|
@@ -8944,6 +9096,9 @@ const StoreSelectInput = props => {
|
|
|
8944
9096
|
if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8945
9097
|
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput : StoresSearchSelectInput;
|
|
8946
9098
|
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$A(_objectSpread$A({
|
|
9099
|
+
menuIsOpen: props.menuIsOpen,
|
|
9100
|
+
placeholder: props.placeholder,
|
|
9101
|
+
iconLeft: props.iconLeft,
|
|
8947
9102
|
projectKey: props.projectKey,
|
|
8948
9103
|
id: props.id,
|
|
8949
9104
|
name: props.name,
|
|
@@ -8962,6 +9117,7 @@ const StoreSelectInput = props => {
|
|
|
8962
9117
|
hasWarning: props.hasWarning,
|
|
8963
9118
|
errors: props.errors,
|
|
8964
9119
|
renderError: props.renderError,
|
|
9120
|
+
renderLabel: props.renderLabel,
|
|
8965
9121
|
touched: props.touched,
|
|
8966
9122
|
maxMenuHeight: props.maxMenuHeight,
|
|
8967
9123
|
menuPortalTarget: props.menuPortalTarget,
|
|
@@ -9231,9 +9387,9 @@ function numberTransformer(filterKey, filters) {
|
|
|
9231
9387
|
})) return '';
|
|
9232
9388
|
switch (type) {
|
|
9233
9389
|
case 'lessThan':
|
|
9234
|
-
return `(* to ${value - 1})`;
|
|
9390
|
+
return `(* to ${_parseInt__default["default"](value) - 1})`;
|
|
9235
9391
|
case 'moreThan':
|
|
9236
|
-
return `(${value + 1} to *)`;
|
|
9392
|
+
return `(${_parseInt__default["default"](value) + 1} to *)`;
|
|
9237
9393
|
case 'equalTo':
|
|
9238
9394
|
return `(${value} to ${value})`;
|
|
9239
9395
|
case 'range':
|
|
@@ -10909,8 +11065,20 @@ const PimIndexerContext = /*#__PURE__*/React.createContext(defaultValue);
|
|
|
10909
11065
|
|
|
10910
11066
|
function ownKeys$h(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; }
|
|
10911
11067
|
function _objectSpread$h(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$h(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$h(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10912
|
-
function
|
|
10913
|
-
function
|
|
11068
|
+
function _callSuper$3(_this, derived, args) {
|
|
11069
|
+
function isNativeReflectConstruct() {
|
|
11070
|
+
if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false;
|
|
11071
|
+
if (_Reflect$construct__default["default"].sham) return false;
|
|
11072
|
+
if (typeof Proxy === "function") return true;
|
|
11073
|
+
try {
|
|
11074
|
+
return !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {}));
|
|
11075
|
+
} catch (e) {
|
|
11076
|
+
return false;
|
|
11077
|
+
}
|
|
11078
|
+
}
|
|
11079
|
+
derived = _getPrototypeOf(derived);
|
|
11080
|
+
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? _Reflect$construct__default["default"](derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
11081
|
+
}
|
|
10914
11082
|
var RefreshProductIndices = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "RefreshProductIndices" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "ids" } }, type: { kind: "NonNullType", type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "refreshProducts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "ids" }, value: { kind: "Variable", name: { kind: "Name", value: "ids" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updatedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "deletedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "notFoundDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "unchangedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "failedRefreshedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "reason" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 1119, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10915
11083
|
var IndexProject = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "IndexProject" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "products" }, name: { kind: "Name", value: "reIndexAllProducts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indexingJobId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "existingIndexingJobId" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productTypes" }, name: { kind: "Name", value: "reIndexAllProductTypes" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indexingJobId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "existingIndexingJobId" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 1119, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10916
11084
|
var GetIndexingProgress = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetIndexingProgress" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productsJobId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productTypesJobId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "products" }, name: { kind: "Name", value: "getReindexingStatus" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "productsJobId" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "percentCompleted" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "completed" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productTypes" }, name: { kind: "Name", value: "getReindexingStatus" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "productTypesJobId" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "percentCompleted" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "completed" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 1119, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -10930,14 +11098,13 @@ const getIndexingJobIds = _ref => {
|
|
|
10930
11098
|
};
|
|
10931
11099
|
let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
10932
11100
|
_inherits(PimIndexerProvider, _PureComponent);
|
|
10933
|
-
var _super = _createSuper$3(PimIndexerProvider);
|
|
10934
11101
|
function PimIndexerProvider() {
|
|
10935
11102
|
var _this;
|
|
10936
11103
|
_classCallCheck(this, PimIndexerProvider);
|
|
10937
11104
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10938
11105
|
args[_key] = arguments[_key];
|
|
10939
11106
|
}
|
|
10940
|
-
_this =
|
|
11107
|
+
_this = _callSuper$3(this, PimIndexerProvider, [...args]);
|
|
10941
11108
|
_this.state = {
|
|
10942
11109
|
isLoading: true,
|
|
10943
11110
|
isPimIndexerUnreachable: false,
|
|
@@ -11130,14 +11297,25 @@ var pimIndexerProvider = flowRight__default["default"](applicationShellConnector
|
|
|
11130
11297
|
name: 'indexProject'
|
|
11131
11298
|
}), hoc.withApollo, reactIntl.injectIntl, injectNotifications())(PimIndexerProvider);
|
|
11132
11299
|
|
|
11133
|
-
function
|
|
11134
|
-
function
|
|
11300
|
+
function _callSuper$2(_this, derived, args) {
|
|
11301
|
+
function isNativeReflectConstruct() {
|
|
11302
|
+
if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false;
|
|
11303
|
+
if (_Reflect$construct__default["default"].sham) return false;
|
|
11304
|
+
if (typeof Proxy === "function") return true;
|
|
11305
|
+
try {
|
|
11306
|
+
return !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {}));
|
|
11307
|
+
} catch (e) {
|
|
11308
|
+
return false;
|
|
11309
|
+
}
|
|
11310
|
+
}
|
|
11311
|
+
derived = _getPrototypeOf(derived);
|
|
11312
|
+
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? _Reflect$construct__default["default"](derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
11313
|
+
}
|
|
11135
11314
|
let WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
11136
11315
|
_inherits(WithPimIndexer, _PureComponent);
|
|
11137
|
-
var _super = _createSuper$2(WithPimIndexer);
|
|
11138
11316
|
function WithPimIndexer() {
|
|
11139
11317
|
_classCallCheck(this, WithPimIndexer);
|
|
11140
|
-
return
|
|
11318
|
+
return _callSuper$2(this, WithPimIndexer, arguments);
|
|
11141
11319
|
}
|
|
11142
11320
|
_createClass(WithPimIndexer, [{
|
|
11143
11321
|
key: "render",
|
|
@@ -11503,8 +11681,20 @@ StoreSelectField.defaultProps = {
|
|
|
11503
11681
|
|
|
11504
11682
|
function ownKeys$b(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; }
|
|
11505
11683
|
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$b(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$b(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11506
|
-
function
|
|
11507
|
-
function
|
|
11684
|
+
function _callSuper$1(_this, derived, args) {
|
|
11685
|
+
function isNativeReflectConstruct() {
|
|
11686
|
+
if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false;
|
|
11687
|
+
if (_Reflect$construct__default["default"].sham) return false;
|
|
11688
|
+
if (typeof Proxy === "function") return true;
|
|
11689
|
+
try {
|
|
11690
|
+
return !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {}));
|
|
11691
|
+
} catch (e) {
|
|
11692
|
+
return false;
|
|
11693
|
+
}
|
|
11694
|
+
}
|
|
11695
|
+
derived = _getPrototypeOf(derived);
|
|
11696
|
+
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? _Reflect$construct__default["default"](derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
11697
|
+
}
|
|
11508
11698
|
var styles$3 = {
|
|
11509
11699
|
"invalid": "validated-input-module__invalid___380EL",
|
|
11510
11700
|
"container": "validated-input-module__container___3L2KB"
|
|
@@ -11616,14 +11806,13 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11616
11806
|
});
|
|
11617
11807
|
let ValidatedInput = /*#__PURE__*/function (_PureComponent) {
|
|
11618
11808
|
_inherits(ValidatedInput, _PureComponent);
|
|
11619
|
-
var _super = _createSuper$1(ValidatedInput);
|
|
11620
11809
|
function ValidatedInput() {
|
|
11621
11810
|
var _this;
|
|
11622
11811
|
_classCallCheck(this, ValidatedInput);
|
|
11623
11812
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
11624
11813
|
args[_key] = arguments[_key];
|
|
11625
11814
|
}
|
|
11626
|
-
_this =
|
|
11815
|
+
_this = _callSuper$1(this, ValidatedInput, [...args]);
|
|
11627
11816
|
_this.state = {
|
|
11628
11817
|
validStatus: _initialValidState
|
|
11629
11818
|
};
|
|
@@ -11742,14 +11931,13 @@ function simpleInput(type) {
|
|
|
11742
11931
|
var _class2;
|
|
11743
11932
|
return _class2 = /*#__PURE__*/function (_PureComponent2) {
|
|
11744
11933
|
_inherits(_class2, _PureComponent2);
|
|
11745
|
-
var _super2 = _createSuper$1(_class2);
|
|
11746
11934
|
function _class2() {
|
|
11747
11935
|
var _this2;
|
|
11748
11936
|
_classCallCheck(this, _class2);
|
|
11749
11937
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
11750
11938
|
args[_key2] = arguments[_key2];
|
|
11751
11939
|
}
|
|
11752
|
-
_this2 =
|
|
11940
|
+
_this2 = _callSuper$1(this, _class2, [...args]);
|
|
11753
11941
|
_this2.handleBlur = event => {
|
|
11754
11942
|
if (_this2.props.onBlurValue) _this2.props.onBlurValue(event.target.value);
|
|
11755
11943
|
};
|
|
@@ -11997,8 +12185,20 @@ MultiValueSearchInput.displayName = 'MultiValueSearchInput';
|
|
|
11997
12185
|
|
|
11998
12186
|
function ownKeys$7(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; }
|
|
11999
12187
|
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$7(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$7(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12000
|
-
function
|
|
12001
|
-
function
|
|
12188
|
+
function _callSuper(_this, derived, args) {
|
|
12189
|
+
function isNativeReflectConstruct() {
|
|
12190
|
+
if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false;
|
|
12191
|
+
if (_Reflect$construct__default["default"].sham) return false;
|
|
12192
|
+
if (typeof Proxy === "function") return true;
|
|
12193
|
+
try {
|
|
12194
|
+
return !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {}));
|
|
12195
|
+
} catch (e) {
|
|
12196
|
+
return false;
|
|
12197
|
+
}
|
|
12198
|
+
}
|
|
12199
|
+
derived = _getPrototypeOf(derived);
|
|
12200
|
+
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? _Reflect$construct__default["default"](derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
12201
|
+
}
|
|
12002
12202
|
var styles = {
|
|
12003
12203
|
"invalid": "numeric-format-input-module__invalid___3LcyE",
|
|
12004
12204
|
"disabled": "numeric-format-input-module__disabled___hb6h4"
|
|
@@ -12010,14 +12210,13 @@ Cleave__default["default"].displayName = 'Cleave';
|
|
|
12010
12210
|
const isValidValue = value => isFinite__default["default"](value) || isNil__default["default"](value);
|
|
12011
12211
|
let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
12012
12212
|
_inherits(NumericFormatInput, _PureComponent);
|
|
12013
|
-
var _super = _createSuper(NumericFormatInput);
|
|
12014
12213
|
function NumericFormatInput() {
|
|
12015
12214
|
var _this;
|
|
12016
12215
|
_classCallCheck(this, NumericFormatInput);
|
|
12017
12216
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
12018
12217
|
args[_key] = arguments[_key];
|
|
12019
12218
|
}
|
|
12020
|
-
_this =
|
|
12219
|
+
_this = _callSuper(this, NumericFormatInput, [...args]);
|
|
12021
12220
|
_this.state = {
|
|
12022
12221
|
parsedValue: _this.props.value
|
|
12023
12222
|
};
|