@commercetools-frontend/experimental-components 5.0.3 → 5.1.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 +663 -483
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +663 -483
- package/dist/commercetools-frontend-experimental-components.esm.js +658 -479
- package/dist/styles.css +316 -316
- package/package.json +18 -18
|
@@ -376,7 +376,7 @@ function uniqueObjects(items) {
|
|
|
376
376
|
|
|
377
377
|
*/
|
|
378
378
|
|
|
379
|
-
const messages$
|
|
379
|
+
const messages$K = reactIntl.defineMessages({
|
|
380
380
|
unique: {
|
|
381
381
|
id: 'Validation.unique',
|
|
382
382
|
description: 'An error message to show if the field must be unique',
|
|
@@ -1671,8 +1671,8 @@ const getData = (code, field) => {
|
|
|
1671
1671
|
};
|
|
1672
1672
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
1673
1673
|
|
|
1674
|
-
function ownKeys$
|
|
1675
|
-
function _objectSpread$
|
|
1674
|
+
function ownKeys$1k(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1675
|
+
function _objectSpread$1k(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1k(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1k(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1676
1676
|
function formatMoneyRangeValue(value, intl) {
|
|
1677
1677
|
var _context;
|
|
1678
1678
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
@@ -1682,7 +1682,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
1682
1682
|
return '';
|
|
1683
1683
|
}
|
|
1684
1684
|
function formatMoneyValue(amount, currency, intl) {
|
|
1685
|
-
return formatMoney$1(_objectSpread$
|
|
1685
|
+
return formatMoney$1(_objectSpread$1k({
|
|
1686
1686
|
centAmount: amount,
|
|
1687
1687
|
fractionDigits: getFractionDigit(currency)
|
|
1688
1688
|
}, currency ? {
|
|
@@ -1699,14 +1699,14 @@ function getFractionedAmount(moneyValue) {
|
|
|
1699
1699
|
}
|
|
1700
1700
|
function formatMoney$1(moneyValue, intl, options) {
|
|
1701
1701
|
var _moneyValue$fractione;
|
|
1702
|
-
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$
|
|
1702
|
+
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$1k({
|
|
1703
1703
|
style: 'currency',
|
|
1704
1704
|
currency: moneyValue.currencyCode,
|
|
1705
1705
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
1706
1706
|
}, options));
|
|
1707
1707
|
}
|
|
1708
1708
|
|
|
1709
|
-
var messages$
|
|
1709
|
+
var messages$J = reactIntl.defineMessages({
|
|
1710
1710
|
booleanYes: {
|
|
1711
1711
|
id: 'AttributeTypeFormats.boolean.yes',
|
|
1712
1712
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -1791,7 +1791,7 @@ const formatDateTime = _ref7 => {
|
|
|
1791
1791
|
const formatBoolean = _ref8 => {
|
|
1792
1792
|
let value = _ref8.value,
|
|
1793
1793
|
intl = _ref8.intl;
|
|
1794
|
-
return value ? intl.formatMessage(messages$
|
|
1794
|
+
return value ? intl.formatMessage(messages$J.booleanYes) : intl.formatMessage(messages$J.booleanNo);
|
|
1795
1795
|
};
|
|
1796
1796
|
const formatNilType = _ref9 => {
|
|
1797
1797
|
let value = _ref9.value,
|
|
@@ -1953,8 +1953,8 @@ const wrapDisplayName = (BaseComponent, hocName) => {
|
|
|
1953
1953
|
return _concatInstanceProperty__default["default"](_context = "".concat(hocName, "(")).call(_context, getDisplayName(BaseComponent), ")");
|
|
1954
1954
|
};
|
|
1955
1955
|
|
|
1956
|
-
function ownKeys$
|
|
1957
|
-
function _objectSpread$
|
|
1956
|
+
function ownKeys$1j(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1957
|
+
function _objectSpread$1j(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1j(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1j(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1958
1958
|
const injectDataTablePaginationState = initialValues => Component => {
|
|
1959
1959
|
const WithDataTablePaginationState = props => {
|
|
1960
1960
|
var _initialValues$tableS, _initialValues$tableS2;
|
|
@@ -1965,10 +1965,10 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1965
1965
|
page = _usePaginationState.page,
|
|
1966
1966
|
perPage = _usePaginationState.perPage;
|
|
1967
1967
|
const tableSorting = uiKit.useDataTableSortingState({
|
|
1968
|
-
key: initialValues === null || initialValues === void 0
|
|
1969
|
-
order: initialValues === null || initialValues === void 0
|
|
1968
|
+
key: initialValues === null || initialValues === void 0 || (_initialValues$tableS = initialValues.tableSorting) === null || _initialValues$tableS === void 0 ? void 0 : _initialValues$tableS.key,
|
|
1969
|
+
order: initialValues === null || initialValues === void 0 || (_initialValues$tableS2 = initialValues.tableSorting) === null || _initialValues$tableS2 === void 0 ? void 0 : _initialValues$tableS2.order
|
|
1970
1970
|
});
|
|
1971
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1971
|
+
return jsxRuntime.jsx(Component, _objectSpread$1j(_objectSpread$1j({}, props), {}, {
|
|
1972
1972
|
dataTablePaginationState: {
|
|
1973
1973
|
page,
|
|
1974
1974
|
perPage,
|
|
@@ -1980,8 +1980,8 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1980
1980
|
return WithDataTablePaginationState;
|
|
1981
1981
|
};
|
|
1982
1982
|
|
|
1983
|
-
function ownKeys$
|
|
1984
|
-
function _objectSpread$
|
|
1983
|
+
function ownKeys$1i(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1984
|
+
function _objectSpread$1i(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1i(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1i(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1985
1985
|
const injectNotifications = function () {
|
|
1986
1986
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
1987
1987
|
return Component => {
|
|
@@ -1996,7 +1996,7 @@ const injectNotifications = function () {
|
|
|
1996
1996
|
onActionError,
|
|
1997
1997
|
hideAllPageNotifications
|
|
1998
1998
|
};
|
|
1999
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1999
|
+
return jsxRuntime.jsx(Component, _objectSpread$1i(_objectSpread$1i({}, props), {}, {
|
|
2000
2000
|
[propName]: notifications
|
|
2001
2001
|
}));
|
|
2002
2002
|
};
|
|
@@ -2005,22 +2005,22 @@ const injectNotifications = function () {
|
|
|
2005
2005
|
};
|
|
2006
2006
|
};
|
|
2007
2007
|
|
|
2008
|
-
function ownKeys$
|
|
2009
|
-
function _objectSpread$
|
|
2008
|
+
function ownKeys$1h(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2009
|
+
function _objectSpread$1h(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1h(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1h(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2010
2010
|
function isPropsMapper(mapProps) {
|
|
2011
2011
|
return typeof mapProps === 'function';
|
|
2012
2012
|
}
|
|
2013
2013
|
const withProps = mapProps => Component => {
|
|
2014
2014
|
const EnhancedWithProps = ownProps => {
|
|
2015
|
-
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
2016
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2015
|
+
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1h(_objectSpread$1h({}, ownProps), mapProps(ownProps)) : _objectSpread$1h(_objectSpread$1h({}, ownProps), mapProps);
|
|
2016
|
+
return jsxRuntime.jsx(Component, _objectSpread$1h({}, enhancedProps));
|
|
2017
2017
|
};
|
|
2018
2018
|
EnhancedWithProps.displayName = wrapDisplayName(Component, 'withProps');
|
|
2019
2019
|
return EnhancedWithProps;
|
|
2020
2020
|
};
|
|
2021
2021
|
|
|
2022
|
-
function ownKeys$
|
|
2023
|
-
function _objectSpread$
|
|
2022
|
+
function ownKeys$1g(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2023
|
+
function _objectSpread$1g(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1g(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1g(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2024
2024
|
const useRedirectEffect = _ref => {
|
|
2025
2025
|
let goTo = _ref.goTo;
|
|
2026
2026
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -2040,30 +2040,30 @@ const defaultOptions$5 = {
|
|
|
2040
2040
|
skip: () => false
|
|
2041
2041
|
};
|
|
2042
2042
|
const withRedirectTo = options => Component => {
|
|
2043
|
-
const mergedOptions = _objectSpread$
|
|
2043
|
+
const mergedOptions = _objectSpread$1g(_objectSpread$1g({}, defaultOptions$5), options);
|
|
2044
2044
|
const WithRedirectTo = props => {
|
|
2045
2045
|
if (!mergedOptions.skip(props)) {
|
|
2046
2046
|
return jsxRuntime.jsx(RedirectTo, {
|
|
2047
2047
|
goTo: options.selectGoTo(props)
|
|
2048
2048
|
});
|
|
2049
2049
|
}
|
|
2050
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2050
|
+
return jsxRuntime.jsx(Component, _objectSpread$1g({}, props));
|
|
2051
2051
|
};
|
|
2052
2052
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
2053
2053
|
return WithRedirectTo;
|
|
2054
2054
|
};
|
|
2055
2055
|
|
|
2056
|
-
function ownKeys$
|
|
2057
|
-
function _objectSpread$
|
|
2056
|
+
function ownKeys$1f(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2057
|
+
function _objectSpread$1f(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1f(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1f(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2058
2058
|
const defaultOptions$4 = {
|
|
2059
2059
|
propName: 'modalState',
|
|
2060
2060
|
isInitiallyOpen: false
|
|
2061
2061
|
};
|
|
2062
2062
|
const injectModalState$1 = options => Component => {
|
|
2063
|
-
const mergedOptions = _objectSpread$
|
|
2063
|
+
const mergedOptions = _objectSpread$1f(_objectSpread$1f({}, defaultOptions$4), options);
|
|
2064
2064
|
const WithModalState = props => {
|
|
2065
2065
|
const modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
2066
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2066
|
+
return jsxRuntime.jsx(Component, _objectSpread$1f(_objectSpread$1f({}, props), {}, {
|
|
2067
2067
|
[mergedOptions.propName]: modalState
|
|
2068
2068
|
}));
|
|
2069
2069
|
};
|
|
@@ -2071,17 +2071,17 @@ const injectModalState$1 = options => Component => {
|
|
|
2071
2071
|
return WithModalState;
|
|
2072
2072
|
};
|
|
2073
2073
|
|
|
2074
|
-
function ownKeys$
|
|
2075
|
-
function _objectSpread$
|
|
2074
|
+
function ownKeys$1e(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2075
|
+
function _objectSpread$1e(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1e(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1e(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2076
2076
|
const defaultOptions$3 = {
|
|
2077
2077
|
propName: 'toggleState',
|
|
2078
2078
|
isInitiallyOpen: false
|
|
2079
2079
|
};
|
|
2080
2080
|
const injectModalState = options => Component => {
|
|
2081
|
-
const mergedOptions = _objectSpread$
|
|
2081
|
+
const mergedOptions = _objectSpread$1e(_objectSpread$1e({}, defaultOptions$3), options);
|
|
2082
2082
|
const WithToggleState = props => {
|
|
2083
2083
|
const toggleState = uiKit.useToggleState(mergedOptions.isInitiallyOpen);
|
|
2084
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2084
|
+
return jsxRuntime.jsx(Component, _objectSpread$1e(_objectSpread$1e({}, props), {}, {
|
|
2085
2085
|
[mergedOptions.propName]: toggleState
|
|
2086
2086
|
}));
|
|
2087
2087
|
};
|
|
@@ -2089,8 +2089,8 @@ const injectModalState = options => Component => {
|
|
|
2089
2089
|
return WithToggleState;
|
|
2090
2090
|
};
|
|
2091
2091
|
|
|
2092
|
-
function ownKeys$
|
|
2093
|
-
function _objectSpread$
|
|
2092
|
+
function ownKeys$1d(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2093
|
+
function _objectSpread$1d(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1d(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1d(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2094
2094
|
const defaultOptions$2 = {
|
|
2095
2095
|
storageType: 'local',
|
|
2096
2096
|
segregateByUser: true
|
|
@@ -2108,7 +2108,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
|
|
|
2108
2108
|
const isNil = value => typeof value === 'undefined' || value === null;
|
|
2109
2109
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
2110
2110
|
var _context;
|
|
2111
|
-
const mergedOptions = _objectSpread$
|
|
2111
|
+
const mergedOptions = _objectSpread$1d(_objectSpread$1d({}, defaultOptions$2), options);
|
|
2112
2112
|
const userId = applicationShellConnectors.useApplicationContext(context => {
|
|
2113
2113
|
var _context$user;
|
|
2114
2114
|
return (_context$user = context.user) === null || _context$user === void 0 ? void 0 : _context$user.id;
|
|
@@ -2156,8 +2156,8 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
2156
2156
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
2157
2157
|
};
|
|
2158
2158
|
|
|
2159
|
-
function ownKeys$
|
|
2160
|
-
function _objectSpread$
|
|
2159
|
+
function ownKeys$1c(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2160
|
+
function _objectSpread$1c(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1c(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1c(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2161
2161
|
const defaultOptions$1 = {
|
|
2162
2162
|
propName: 'storage',
|
|
2163
2163
|
storageKey: '',
|
|
@@ -2170,7 +2170,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
2170
2170
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
2171
2171
|
* argument position does not allow passing specification of option(s).
|
|
2172
2172
|
*/
|
|
2173
|
-
const mergedOptions = _objectSpread$
|
|
2173
|
+
const mergedOptions = _objectSpread$1c(_objectSpread$1c({}, defaultOptions$1), options);
|
|
2174
2174
|
const WithStorage = props => {
|
|
2175
2175
|
const _useStorage = useStorage(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
2176
2176
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -2184,7 +2184,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
2184
2184
|
readFromStorage
|
|
2185
2185
|
}
|
|
2186
2186
|
};
|
|
2187
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
2187
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1c(_objectSpread$1c({}, props), storageProp));
|
|
2188
2188
|
};
|
|
2189
2189
|
WithStorage.displayName = wrapDisplayName(WrappedComponent, 'WithStorage');
|
|
2190
2190
|
return WithStorage;
|
|
@@ -2228,8 +2228,8 @@ const usePrevious = value => {
|
|
|
2228
2228
|
return ref.current;
|
|
2229
2229
|
};
|
|
2230
2230
|
|
|
2231
|
-
function ownKeys$
|
|
2232
|
-
function _objectSpread$
|
|
2231
|
+
function ownKeys$1b(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2232
|
+
function _objectSpread$1b(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1b(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1b(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2233
2233
|
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: "type" }, 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 type\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
2234
2234
|
const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
2235
2235
|
var _storesQueryResult$re;
|
|
@@ -2240,7 +2240,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
2240
2240
|
offset: storesQueryResult.offset,
|
|
2241
2241
|
results: (_storesQueryResult$re = storesQueryResult.results) === null || _storesQueryResult$re === void 0 ? void 0 : _mapInstanceProperty__default["default"](_storesQueryResult$re).call(_storesQueryResult$re, store => {
|
|
2242
2242
|
var _store$productSelecti;
|
|
2243
|
-
return _objectSpread$
|
|
2243
|
+
return _objectSpread$1b(_objectSpread$1b({}, store), {}, {
|
|
2244
2244
|
productSelections: (_store$productSelecti = store.productSelections) === null || _store$productSelecti === void 0 ? void 0 : _filterInstanceProperty__default["default"](_store$productSelecti).call(_store$productSelecti, productSelectionRef => Boolean(productSelectionRef.productSelection))
|
|
2245
2245
|
});
|
|
2246
2246
|
})
|
|
@@ -2248,7 +2248,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
2248
2248
|
};
|
|
2249
2249
|
const createQueryVariables$6 = ownProps => {
|
|
2250
2250
|
var _context;
|
|
2251
|
-
return _objectSpread$
|
|
2251
|
+
return _objectSpread$1b(_objectSpread$1b({
|
|
2252
2252
|
limit: ownProps.limit,
|
|
2253
2253
|
offset: ownProps.offset,
|
|
2254
2254
|
sort: _sortInstanceProperty__default["default"](ownProps)
|
|
@@ -2403,8 +2403,8 @@ function useDidFormValidationFail() {
|
|
|
2403
2403
|
return Boolean(didFormValidationFail);
|
|
2404
2404
|
}
|
|
2405
2405
|
|
|
2406
|
-
function ownKeys$
|
|
2407
|
-
function _objectSpread$
|
|
2406
|
+
function ownKeys$1a(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2407
|
+
function _objectSpread$1a(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1a(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2408
2408
|
const TEN_MINUTES_IN_MS = 600000;
|
|
2409
2409
|
const defaultOptions = {
|
|
2410
2410
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -2432,7 +2432,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
2432
2432
|
};
|
|
2433
2433
|
const usePersistedReminder = function () {
|
|
2434
2434
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2435
|
-
const mergedOptions = _objectSpread$
|
|
2435
|
+
const mergedOptions = _objectSpread$1a(_objectSpread$1a({}, defaultOptions), options);
|
|
2436
2436
|
const _useStorage = useStorage(mergedOptions.storageKey, null),
|
|
2437
2437
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
2438
2438
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -2478,7 +2478,7 @@ const usePersistedReminder = function () {
|
|
|
2478
2478
|
return [hasReminderExpired, hasChosenReminderRef, scheduleReminder];
|
|
2479
2479
|
};
|
|
2480
2480
|
|
|
2481
|
-
var messages$
|
|
2481
|
+
var messages$I = reactIntl.defineMessages({
|
|
2482
2482
|
profileUpdated: {
|
|
2483
2483
|
id: 'NotificationText.profileUpdated',
|
|
2484
2484
|
description: 'Label for the notification header',
|
|
@@ -2496,8 +2496,8 @@ var messages$H = reactIntl.defineMessages({
|
|
|
2496
2496
|
}
|
|
2497
2497
|
});
|
|
2498
2498
|
|
|
2499
|
-
function ownKeys$
|
|
2500
|
-
function _objectSpread$
|
|
2499
|
+
function ownKeys$19(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2500
|
+
function _objectSpread$19(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$19(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$19(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2501
2501
|
const LinkToProfile = props => {
|
|
2502
2502
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
2503
2503
|
to: "/account/profile",
|
|
@@ -2515,9 +2515,9 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2515
2515
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2516
2516
|
as: "p",
|
|
2517
2517
|
isBold: true,
|
|
2518
|
-
intlMessage: messages$
|
|
2518
|
+
intlMessage: messages$I.profileUpdated
|
|
2519
2519
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2520
|
-
intlMessage: _objectSpread$
|
|
2520
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$I.addMoreInformation), {}, {
|
|
2521
2521
|
values: {
|
|
2522
2522
|
newline: getNewLine
|
|
2523
2523
|
}
|
|
@@ -2526,7 +2526,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2526
2526
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2527
2527
|
scale: "xs",
|
|
2528
2528
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2529
|
-
intlMessage: _objectSpread$
|
|
2529
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$I.informationAndProfileLink), {}, {
|
|
2530
2530
|
values: {
|
|
2531
2531
|
newline: getNewLine,
|
|
2532
2532
|
link: getLinkToProfile
|
|
@@ -2647,7 +2647,7 @@ const useEventCallback = (fn, dependencies) => {
|
|
|
2647
2647
|
}, [ref]);
|
|
2648
2648
|
};
|
|
2649
2649
|
|
|
2650
|
-
var messages$
|
|
2650
|
+
var messages$H = reactIntl.defineMessages({
|
|
2651
2651
|
fallbackHint: {
|
|
2652
2652
|
id: 'KeyFallback.fallbackHint',
|
|
2653
2653
|
description: 'key fallback for a specified resource key (e.g name)',
|
|
@@ -2671,7 +2671,7 @@ const useLocalizedKeyFallback = () => {
|
|
|
2671
2671
|
return values => {
|
|
2672
2672
|
if (!values.resource) return null;
|
|
2673
2673
|
const localizedString = values.resource[values.localizedStringFieldName];
|
|
2674
|
-
const fallbackHintWithKey = intl.formatMessage(messages$
|
|
2674
|
+
const fallbackHintWithKey = intl.formatMessage(messages$H.fallbackHint, {
|
|
2675
2675
|
key: values.resource.key
|
|
2676
2676
|
});
|
|
2677
2677
|
if (!localizedString) return fallbackHintWithKey;
|
|
@@ -2683,8 +2683,8 @@ const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
|
2683
2683
|
// eslint-disable-next-line testing-library/await-async-utils
|
|
2684
2684
|
React.useCallback(debounce__default["default"](promiseCallback, wait), [promiseCallback]);
|
|
2685
2685
|
|
|
2686
|
-
function ownKeys$
|
|
2687
|
-
function _objectSpread$
|
|
2686
|
+
function ownKeys$18(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2687
|
+
function _objectSpread$18(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$18(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$18(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2688
2688
|
const prepareMutableColumnProps = (columnConfig, mutableColumnProps) => {
|
|
2689
2689
|
const updatedColumnProps = {};
|
|
2690
2690
|
_forEachInstanceProperty__default["default"](mutableColumnProps).call(mutableColumnProps, columnProp => {
|
|
@@ -2704,14 +2704,14 @@ const retrieveColumnsWithCachedConfiguration = _ref => {
|
|
|
2704
2704
|
mutableColumnProps = _ref.mutableColumnProps;
|
|
2705
2705
|
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 => {
|
|
2706
2706
|
const initialColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedConfig.key);
|
|
2707
|
-
return _objectSpread$
|
|
2707
|
+
return _objectSpread$18(_objectSpread$18({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2708
2708
|
});
|
|
2709
2709
|
};
|
|
2710
2710
|
const handleCacheUpdate = _ref2 => {
|
|
2711
2711
|
let update = _ref2.update,
|
|
2712
2712
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2713
2713
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2714
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2714
|
+
return updateCachedTableConfiguration(_objectSpread$18(_objectSpread$18({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2715
2715
|
};
|
|
2716
2716
|
|
|
2717
2717
|
// Signature:
|
|
@@ -2740,7 +2740,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2740
2740
|
return {
|
|
2741
2741
|
columnsConfig: _mapInstanceProperty__default["default"](initialVisibleColumnKeys).call(initialVisibleColumnKeys, visibleColumnKey => {
|
|
2742
2742
|
const visibleColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, columnConfig => columnConfig.key === visibleColumnKey);
|
|
2743
|
-
return _objectSpread$
|
|
2743
|
+
return _objectSpread$18({
|
|
2744
2744
|
key: visibleColumnKey
|
|
2745
2745
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2746
2746
|
}),
|
|
@@ -2796,7 +2796,7 @@ const useProductSelectionsTotalFetcher = props => {
|
|
|
2796
2796
|
data = _useQuery.data;
|
|
2797
2797
|
return {
|
|
2798
2798
|
isLoading: loading,
|
|
2799
|
-
total: data === null || data === void 0
|
|
2799
|
+
total: data === null || data === void 0 || (_data$productSelectio = data.productSelections) === null || _data$productSelectio === void 0 ? void 0 : _data$productSelectio.total
|
|
2800
2800
|
};
|
|
2801
2801
|
};
|
|
2802
2802
|
|
|
@@ -2811,14 +2811,14 @@ const handlers$4 = {
|
|
|
2811
2811
|
}
|
|
2812
2812
|
};
|
|
2813
2813
|
|
|
2814
|
-
function ownKeys$
|
|
2815
|
-
function _objectSpread$
|
|
2814
|
+
function ownKeys$17(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2815
|
+
function _objectSpread$17(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$17(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$17(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2816
2816
|
|
|
2817
2817
|
// eslint-disable-next-line import/prefer-default-export
|
|
2818
2818
|
const convertProductSelectionsFromGraphQl = productSelections => {
|
|
2819
2819
|
var _context;
|
|
2820
|
-
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$
|
|
2821
|
-
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$
|
|
2820
|
+
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$17(_objectSpread$17({}, productSelections), {}, {
|
|
2821
|
+
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$17({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
2822
2822
|
from: 'nameAllLocales',
|
|
2823
2823
|
to: 'name'
|
|
2824
2824
|
}])))
|
|
@@ -2968,7 +2968,7 @@ const CenteredLoadingSpinner = () => jsxRuntime.jsx("div", {
|
|
|
2968
2968
|
});
|
|
2969
2969
|
CenteredLoadingSpinner.displayName = 'CenteredLoadingSpinner';
|
|
2970
2970
|
|
|
2971
|
-
var messages$
|
|
2971
|
+
var messages$G = reactIntl.defineMessages({
|
|
2972
2972
|
noChannelsFound: {
|
|
2973
2973
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
2974
2974
|
description: 'The message to display when no channels were found',
|
|
@@ -2994,8 +2994,8 @@ var commonPickerMessages = reactIntl.defineMessages({
|
|
|
2994
2994
|
}
|
|
2995
2995
|
});
|
|
2996
2996
|
|
|
2997
|
-
function ownKeys$
|
|
2998
|
-
function _objectSpread$
|
|
2997
|
+
function ownKeys$16(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2998
|
+
function _objectSpread$16(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$16(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$16(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2999
2999
|
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 } } } };
|
|
3000
3000
|
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 } } } };
|
|
3001
3001
|
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 } } } };
|
|
@@ -3016,7 +3016,7 @@ const ChannelPickerInput = _ref => {
|
|
|
3016
3016
|
const _useIntl = reactIntl.useIntl(),
|
|
3017
3017
|
formatMessage = _useIntl.formatMessage;
|
|
3018
3018
|
const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
|
|
3019
|
-
const variables = React.useMemo(() => _objectSpread$
|
|
3019
|
+
const variables = React.useMemo(() => _objectSpread$16({
|
|
3020
3020
|
sortByNamePath: "name.".concat(dataLocale)
|
|
3021
3021
|
}, role && {
|
|
3022
3022
|
where: "roles contains any (\"".concat(role, "\")")
|
|
@@ -3077,8 +3077,8 @@ const ChannelPickerInput = _ref => {
|
|
|
3077
3077
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
3078
3078
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
3079
3079
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
3080
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
3081
|
-
const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0
|
|
3080
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$G.noChannelsFound), [loadingError, formatMessage]);
|
|
3081
|
+
const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0 || (_currentOption$data = currentOption.data) === null || _currentOption$data === void 0 ? void 0 : _currentOption$data.label) !== null && _currentOption$data$l !== void 0 ? _currentOption$data$l : '';
|
|
3082
3082
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
3083
3083
|
max: "scale",
|
|
3084
3084
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
@@ -3088,7 +3088,7 @@ const ChannelPickerInput = _ref => {
|
|
|
3088
3088
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
3089
3089
|
id: name,
|
|
3090
3090
|
name: name,
|
|
3091
|
-
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$
|
|
3091
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$G.placeholder),
|
|
3092
3092
|
loadOptions: loadOptionsDebounced,
|
|
3093
3093
|
defaultOptions: true,
|
|
3094
3094
|
showOptionGroupDivider: true,
|
|
@@ -3131,7 +3131,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
3131
3131
|
var _this$props;
|
|
3132
3132
|
let user = _ref.user;
|
|
3133
3133
|
return formatDateTime$1(this.props.type, this.props.value, {
|
|
3134
|
-
timeZone: (this === null || this === void 0
|
|
3134
|
+
timeZone: (this === null || this === void 0 || (_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.timeZone) || (user === null || user === void 0 ? void 0 : user.timeZone),
|
|
3135
3135
|
locale: this.props.intl.locale
|
|
3136
3136
|
});
|
|
3137
3137
|
}
|
|
@@ -3145,8 +3145,8 @@ var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
|
3145
3145
|
|
|
3146
3146
|
const keepDisplayName = component => setDisplayName(getDisplayName(component));
|
|
3147
3147
|
|
|
3148
|
-
function ownKeys$
|
|
3149
|
-
function _objectSpread$
|
|
3148
|
+
function ownKeys$15(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3149
|
+
function _objectSpread$15(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$15(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$15(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3150
3150
|
function _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3151
3151
|
function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3152
3152
|
const withMouseOverState = BaseComponent => {
|
|
@@ -3178,7 +3178,7 @@ const withMouseOverState = BaseComponent => {
|
|
|
3178
3178
|
handleMouseOver: this.handleMouseOver,
|
|
3179
3179
|
handleMouseOut: this.handleMouseOut
|
|
3180
3180
|
};
|
|
3181
|
-
return jsxRuntime.jsx(BaseComponent, _objectSpread$
|
|
3181
|
+
return jsxRuntime.jsx(BaseComponent, _objectSpread$15({}, _objectSpread$15(_objectSpread$15({}, this.props), injectedProps)));
|
|
3182
3182
|
}
|
|
3183
3183
|
}]);
|
|
3184
3184
|
return WithMouseOverState;
|
|
@@ -3187,8 +3187,8 @@ const withMouseOverState = BaseComponent => {
|
|
|
3187
3187
|
return WithMouseOverState;
|
|
3188
3188
|
};
|
|
3189
3189
|
|
|
3190
|
-
function ownKeys$
|
|
3191
|
-
function _objectSpread$
|
|
3190
|
+
function ownKeys$14(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3191
|
+
function _objectSpread$14(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$14(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$14(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3192
3192
|
function _createSuper$7(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$7(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3193
3193
|
function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3194
3194
|
var styles$h = {
|
|
@@ -3299,7 +3299,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3299
3299
|
}, {
|
|
3300
3300
|
key: "render",
|
|
3301
3301
|
value: function render() {
|
|
3302
|
-
const commonProps = _objectSpread$
|
|
3302
|
+
const commonProps = _objectSpread$14(_objectSpread$14({
|
|
3303
3303
|
value: this.state.draftValue,
|
|
3304
3304
|
autoComplete: this.props.autoComplete,
|
|
3305
3305
|
onChange: this.handleChange,
|
|
@@ -3318,7 +3318,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3318
3318
|
htmlFor: inputId,
|
|
3319
3319
|
children: this.props.label
|
|
3320
3320
|
})
|
|
3321
|
-
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$
|
|
3321
|
+
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$14(_objectSpread$14({}, commonProps), {}, {
|
|
3322
3322
|
id: inputId,
|
|
3323
3323
|
className: classnames__default["default"](styles$h.textarea, styles$h["textarea-".concat(this.props.style)], {
|
|
3324
3324
|
[styles$h.invalid]: !this.props.isValid,
|
|
@@ -3327,7 +3327,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3327
3327
|
rows: 1,
|
|
3328
3328
|
maxRows: this.props.autoSize ? undefined : 1,
|
|
3329
3329
|
cacheMeasurements: true
|
|
3330
|
-
})) : jsxRuntime.jsx("input", _objectSpread$
|
|
3330
|
+
})) : jsxRuntime.jsx("input", _objectSpread$14(_objectSpread$14({}, commonProps), {}, {
|
|
3331
3331
|
id: inputId,
|
|
3332
3332
|
ref: this.props.inputRef,
|
|
3333
3333
|
type: this.props.as,
|
|
@@ -3354,7 +3354,7 @@ ThrottledField.defaultProps = {
|
|
|
3354
3354
|
label: 'Throttled field'
|
|
3355
3355
|
};
|
|
3356
3356
|
|
|
3357
|
-
var messages$
|
|
3357
|
+
var messages$F = reactIntl.defineMessages({
|
|
3358
3358
|
buttonLabel: {
|
|
3359
3359
|
id: 'SearchInput.buttonLabel',
|
|
3360
3360
|
description: 'Label for "Search" button.',
|
|
@@ -3461,7 +3461,7 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3461
3461
|
"data-testid": this.props.testId || 'search-input',
|
|
3462
3462
|
value: this.state.text,
|
|
3463
3463
|
label: this.props.label,
|
|
3464
|
-
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$
|
|
3464
|
+
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$F.placeholder),
|
|
3465
3465
|
inputRef: this.props.inputRef || this.setInputRef,
|
|
3466
3466
|
onChange: this.handleInputChange,
|
|
3467
3467
|
onEnter: this.handleEnter,
|
|
@@ -3554,7 +3554,7 @@ const useFetchProductTypesFromPIM = _ref => {
|
|
|
3554
3554
|
const fetchProductTypesFromPim = React.useCallback(async searchTerm => {
|
|
3555
3555
|
var _result$hits$map, _result$hits;
|
|
3556
3556
|
const result = await dispatch(createSearchProductsFromPIMAction(searchTerm, projectKey));
|
|
3557
|
-
const ids = (_result$hits$map = result === null || result === void 0
|
|
3557
|
+
const ids = (_result$hits$map = result === null || result === void 0 || (_result$hits = result.hits) === null || _result$hits === void 0 ? void 0 : _mapInstanceProperty__default["default"](_result$hits).call(_result$hits, hit => hit.id)) !== null && _result$hits$map !== void 0 ? _result$hits$map : [];
|
|
3558
3558
|
// Avoid sending any requests if it's clear that nothing is found
|
|
3559
3559
|
if (ids.length === 0) {
|
|
3560
3560
|
return {
|
|
@@ -3637,7 +3637,7 @@ const useFetchProductTypessFromCTP = _ref2 => {
|
|
|
3637
3637
|
}, [prefixSearchFields, executeGraphQLRequest]);
|
|
3638
3638
|
};
|
|
3639
3639
|
const usePimStatus = () => {
|
|
3640
|
-
var _data$indicesExist
|
|
3640
|
+
var _data$indicesExist;
|
|
3641
3641
|
const _useQuery = react.useQuery(FetchIndicesExist$1, {
|
|
3642
3642
|
context: {
|
|
3643
3643
|
target: constants.GRAPHQL_TARGETS.PIM_INDEXER
|
|
@@ -3647,7 +3647,7 @@ const usePimStatus = () => {
|
|
|
3647
3647
|
data = _useQuery.data;
|
|
3648
3648
|
return {
|
|
3649
3649
|
data,
|
|
3650
|
-
isProjectIndexed: Boolean(data === null || data === void 0
|
|
3650
|
+
isProjectIndexed: Boolean(data === null || data === void 0 || (_data$indicesExist = data.indicesExist) === null || _data$indicesExist === void 0 || (_data$indicesExist = _data$indicesExist.productTypes) === null || _data$indicesExist === void 0 ? void 0 : _data$indicesExist.searchableIndexExists)
|
|
3651
3651
|
};
|
|
3652
3652
|
};
|
|
3653
3653
|
const useProductTypeOptions = _ref3 => {
|
|
@@ -3676,7 +3676,7 @@ const useProductTypeOptions = _ref3 => {
|
|
|
3676
3676
|
};
|
|
3677
3677
|
};
|
|
3678
3678
|
|
|
3679
|
-
var messages$
|
|
3679
|
+
var messages$E = reactIntl.defineMessages({
|
|
3680
3680
|
bottomOption: {
|
|
3681
3681
|
id: 'Products.Pickers.bottomOption',
|
|
3682
3682
|
description: 'The message to display at the end of the options menu',
|
|
@@ -3684,11 +3684,11 @@ var messages$D = reactIntl.defineMessages({
|
|
|
3684
3684
|
}
|
|
3685
3685
|
});
|
|
3686
3686
|
|
|
3687
|
-
function ownKeys$
|
|
3688
|
-
function _objectSpread$
|
|
3687
|
+
function ownKeys$13(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3688
|
+
function _objectSpread$13(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$13(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$13(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3689
3689
|
const getBottomOption = formatMessage => ({
|
|
3690
3690
|
options: [{
|
|
3691
|
-
label: formatMessage ? formatMessage(messages$
|
|
3691
|
+
label: formatMessage ? formatMessage(messages$E.bottomOption) : messages$E.bottomOption,
|
|
3692
3692
|
isBottomOption: true,
|
|
3693
3693
|
isDisabled: true
|
|
3694
3694
|
}]
|
|
@@ -3696,7 +3696,7 @@ const getBottomOption = formatMessage => ({
|
|
|
3696
3696
|
const Option$2 = props => {
|
|
3697
3697
|
const _useIntl = reactIntl.useIntl(),
|
|
3698
3698
|
formatMessage = _useIntl.formatMessage;
|
|
3699
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
3699
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$13(_objectSpread$13({}, props), {}, {
|
|
3700
3700
|
children: props.data.isBottomOption ? jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
3701
3701
|
tone: "secondary",
|
|
3702
3702
|
children: formatMessage(props.data.label)
|
|
@@ -3713,8 +3713,8 @@ const Option$2 = props => {
|
|
|
3713
3713
|
};
|
|
3714
3714
|
Option$2.displayName = 'Option';
|
|
3715
3715
|
|
|
3716
|
-
function ownKeys$
|
|
3717
|
-
function _objectSpread$
|
|
3716
|
+
function ownKeys$12(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3717
|
+
function _objectSpread$12(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$12(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$12(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3718
3718
|
const useHandlers = onChange => {
|
|
3719
3719
|
const _useState = React.useState(),
|
|
3720
3720
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -3725,8 +3725,8 @@ const useHandlers = onChange => {
|
|
|
3725
3725
|
}, []);
|
|
3726
3726
|
const handleChange = useEventCallback(event => {
|
|
3727
3727
|
var _event$target$value;
|
|
3728
|
-
const eventWithExtractedValue = _objectSpread$
|
|
3729
|
-
target: _objectSpread$
|
|
3728
|
+
const eventWithExtractedValue = _objectSpread$12(_objectSpread$12({}, event), {}, {
|
|
3729
|
+
target: _objectSpread$12(_objectSpread$12({}, event.target), {}, {
|
|
3730
3730
|
value: (_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.value
|
|
3731
3731
|
})
|
|
3732
3732
|
});
|
|
@@ -3735,8 +3735,8 @@ const useHandlers = onChange => {
|
|
|
3735
3735
|
return [handleInputChange, handleChange];
|
|
3736
3736
|
};
|
|
3737
3737
|
|
|
3738
|
-
function ownKeys
|
|
3739
|
-
function _objectSpread
|
|
3738
|
+
function ownKeys$11(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3739
|
+
function _objectSpread$11(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$11(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$11(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3740
3740
|
const constructPrefixSearchPredicate = function () {
|
|
3741
3741
|
let prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
3742
3742
|
let lowerBound = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -3779,7 +3779,7 @@ const useLoadOptions = _ref => {
|
|
|
3779
3779
|
}();
|
|
3780
3780
|
return client$1.query({
|
|
3781
3781
|
query,
|
|
3782
|
-
variables: _objectSpread
|
|
3782
|
+
variables: _objectSpread$11({
|
|
3783
3783
|
where
|
|
3784
3784
|
}, variables),
|
|
3785
3785
|
context: {
|
|
@@ -3833,7 +3833,7 @@ function useCurrentOption(_ref) {
|
|
|
3833
3833
|
};
|
|
3834
3834
|
}
|
|
3835
3835
|
|
|
3836
|
-
var messages$
|
|
3836
|
+
var messages$D = reactIntl.defineMessages({
|
|
3837
3837
|
noProductTypesFound: {
|
|
3838
3838
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
3839
3839
|
description: 'The message to display when no product types were found',
|
|
@@ -3913,7 +3913,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
3913
3913
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
3914
3914
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
3915
3915
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
3916
|
-
const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0
|
|
3916
|
+
const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0 || (_currentOption$data = currentOption.data) === null || _currentOption$data === void 0 ? void 0 : _currentOption$data.label) !== null && _currentOption$data$l !== void 0 ? _currentOption$data$l : '';
|
|
3917
3917
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
3918
3918
|
max: "scale",
|
|
3919
3919
|
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
@@ -3923,7 +3923,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
3923
3923
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
3924
3924
|
id: name,
|
|
3925
3925
|
name: name,
|
|
3926
|
-
placeholder: formatMessage(messages$
|
|
3926
|
+
placeholder: formatMessage(messages$D.placeholder),
|
|
3927
3927
|
loadOptions: loadOptionsDebounced,
|
|
3928
3928
|
defaultOptions: [],
|
|
3929
3929
|
isClearable: isClearable,
|
|
@@ -3936,7 +3936,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
3936
3936
|
onInputChange: handleInputChange,
|
|
3937
3937
|
onBlur: onBlur,
|
|
3938
3938
|
value: currentOption.data,
|
|
3939
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
3939
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$D.noProductTypesFound),
|
|
3940
3940
|
hasError: hasError || isLoadingFailed
|
|
3941
3941
|
})
|
|
3942
3942
|
}), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -3948,7 +3948,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
3948
3948
|
};
|
|
3949
3949
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
3950
3950
|
|
|
3951
|
-
var messages$
|
|
3951
|
+
var messages$C = reactIntl.defineMessages({
|
|
3952
3952
|
noStatesFound: {
|
|
3953
3953
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
3954
3954
|
description: 'The message to display when no states were found',
|
|
@@ -4032,8 +4032,8 @@ const StatePickerInput = _ref => {
|
|
|
4032
4032
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
4033
4033
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
4034
4034
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
4035
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
4036
|
-
const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0
|
|
4035
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$C.noStatesFound), [loadingError, formatMessage]);
|
|
4036
|
+
const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0 || (_currentOption$data = currentOption.data) === null || _currentOption$data === void 0 ? void 0 : _currentOption$data.label) !== null && _currentOption$data$l !== void 0 ? _currentOption$data$l : '';
|
|
4037
4037
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
4038
4038
|
max: "scale",
|
|
4039
4039
|
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
@@ -4044,7 +4044,7 @@ const StatePickerInput = _ref => {
|
|
|
4044
4044
|
id: name,
|
|
4045
4045
|
name: name,
|
|
4046
4046
|
horizontalConstraint: "scale",
|
|
4047
|
-
placeholder: formatMessage(messages$
|
|
4047
|
+
placeholder: formatMessage(messages$C.placeholder),
|
|
4048
4048
|
loadOptions: loadOptionsDebounced,
|
|
4049
4049
|
defaultOptions: true,
|
|
4050
4050
|
showOptionGroupDivider: true,
|
|
@@ -4070,9 +4070,9 @@ const StatePickerInput = _ref => {
|
|
|
4070
4070
|
};
|
|
4071
4071
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
4072
4072
|
|
|
4073
|
-
function ownKeys$
|
|
4074
|
-
function _objectSpread$
|
|
4075
|
-
const TooltipWrapper = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$
|
|
4073
|
+
function ownKeys$10(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4074
|
+
function _objectSpread$10(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$10(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$10(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
4075
|
+
const TooltipWrapper = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$10({
|
|
4076
4076
|
ref: ref,
|
|
4077
4077
|
style: {
|
|
4078
4078
|
display: 'block',
|
|
@@ -4210,8 +4210,8 @@ const getPrefixSearchBounds = input => {
|
|
|
4210
4210
|
};
|
|
4211
4211
|
|
|
4212
4212
|
const _excluded = ["action"];
|
|
4213
|
-
function ownKeys
|
|
4214
|
-
function _objectSpread
|
|
4213
|
+
function ownKeys$$(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4214
|
+
function _objectSpread$$(target) { for (var i = 1; i < arguments.length; i++) { var _context8, _context9; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$$(Object(source), !0)).call(_context8, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$$(Object(source))).call(_context9, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
4215
4215
|
|
|
4216
4216
|
/**
|
|
4217
4217
|
* Checks if a value is a LocalizedString
|
|
@@ -4233,7 +4233,7 @@ const getIsLocalizedString = maybeLocalizedString => {
|
|
|
4233
4233
|
*/
|
|
4234
4234
|
const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
|
|
4235
4235
|
if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
|
|
4236
|
-
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread
|
|
4236
|
+
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$$(_objectSpread$$({}, customFields), {}, {
|
|
4237
4237
|
[customField.name]: customField.value
|
|
4238
4238
|
}), {});
|
|
4239
4239
|
};
|
|
@@ -4257,7 +4257,7 @@ function transformLocalizedFieldsForCategory(category) {
|
|
|
4257
4257
|
const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
|
|
4258
4258
|
const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
|
|
4259
4259
|
const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
|
|
4260
|
-
return _objectSpread
|
|
4260
|
+
return _objectSpread$$(_objectSpread$$(_objectSpread$$({}, transformedData), parent ? {
|
|
4261
4261
|
parent
|
|
4262
4262
|
} : {}), ancestors ? {
|
|
4263
4263
|
ancestors
|
|
@@ -4482,7 +4482,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4482
4482
|
case 'addAttributeDefinition':
|
|
4483
4483
|
return {
|
|
4484
4484
|
[actionName]: {
|
|
4485
|
-
attributeDefinition: _objectSpread
|
|
4485
|
+
attributeDefinition: _objectSpread$$(_objectSpread$$({}, actionPayload.attribute), {}, {
|
|
4486
4486
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
|
|
4487
4487
|
inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
|
|
4488
4488
|
type: createAttributeTypeValue(actionPayload.attribute)
|
|
@@ -4578,7 +4578,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4578
4578
|
return {
|
|
4579
4579
|
[actionName]: {
|
|
4580
4580
|
attributeName: actionPayload.attributeName,
|
|
4581
|
-
value: _objectSpread
|
|
4581
|
+
value: _objectSpread$$(_objectSpread$$({}, actionPayload.value), {}, {
|
|
4582
4582
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
|
|
4583
4583
|
})
|
|
4584
4584
|
}
|
|
@@ -4587,7 +4587,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4587
4587
|
return {
|
|
4588
4588
|
[actionName]: {
|
|
4589
4589
|
attributeName: actionPayload.attributeName,
|
|
4590
|
-
newValue: _objectSpread
|
|
4590
|
+
newValue: _objectSpread$$(_objectSpread$$({}, actionPayload.newValue), {}, {
|
|
4591
4591
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
|
|
4592
4592
|
})
|
|
4593
4593
|
}
|
|
@@ -4614,7 +4614,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4614
4614
|
name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
|
|
4615
4615
|
taxCategory: actionPayload.taxCategory,
|
|
4616
4616
|
money: {
|
|
4617
|
-
[actionPayload.money.type]: _objectSpread
|
|
4617
|
+
[actionPayload.money.type]: _objectSpread$$({
|
|
4618
4618
|
centAmount: actionPayload.money.centAmount,
|
|
4619
4619
|
currencyCode: actionPayload.money.currencyCode
|
|
4620
4620
|
}, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4649,7 +4649,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4649
4649
|
case 'addAddress':
|
|
4650
4650
|
case 'changeAddress':
|
|
4651
4651
|
{
|
|
4652
|
-
var _actionPayload$addres, _context6, _actionPayload$addres2
|
|
4652
|
+
var _actionPayload$addres, _context6, _actionPayload$addres2;
|
|
4653
4653
|
const _ref3 = ((_actionPayload$addres = actionPayload.address) === null || _actionPayload$addres === void 0 ? void 0 : _actionPayload$addres.custom) || {},
|
|
4654
4654
|
_ref3$fields = _ref3.fields,
|
|
4655
4655
|
fields = _ref3$fields === void 0 ? {} : _ref3$fields;
|
|
@@ -4662,15 +4662,15 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4662
4662
|
value: _JSON$stringify__default["default"](value)
|
|
4663
4663
|
};
|
|
4664
4664
|
});
|
|
4665
|
-
const custom = (_actionPayload$addres2 = actionPayload.address) !== null && _actionPayload$addres2 !== void 0 && (_actionPayload$
|
|
4665
|
+
const custom = (_actionPayload$addres2 = actionPayload.address) !== null && _actionPayload$addres2 !== void 0 && (_actionPayload$addres2 = _actionPayload$addres2.custom) !== null && _actionPayload$addres2 !== void 0 && (_actionPayload$addres2 = _actionPayload$addres2.type) !== null && _actionPayload$addres2 !== void 0 && _actionPayload$addres2.id ? {
|
|
4666
4666
|
type: {
|
|
4667
4667
|
id: actionPayload.address.custom.type.id
|
|
4668
4668
|
},
|
|
4669
4669
|
fields: customFields
|
|
4670
4670
|
} : null;
|
|
4671
4671
|
return {
|
|
4672
|
-
[actionName]: _objectSpread
|
|
4673
|
-
address: _objectSpread
|
|
4672
|
+
[actionName]: _objectSpread$$(_objectSpread$$({}, actionPayload), {}, {
|
|
4673
|
+
address: _objectSpread$$(_objectSpread$$({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
|
|
4674
4674
|
custom
|
|
4675
4675
|
})
|
|
4676
4676
|
})
|
|
@@ -4716,8 +4716,8 @@ const createGraphQlUpdateActions = actions => _reduceInstanceProperty__default["
|
|
|
4716
4716
|
return [...previousActions, convertAction(actionName, actionPayload)];
|
|
4717
4717
|
}, []);
|
|
4718
4718
|
const extractErrorFromGraphQlResponse = graphQlResponse => {
|
|
4719
|
-
var _graphQlResponse$netw, _graphQlResponse$
|
|
4720
|
-
if (((_graphQlResponse$netw = graphQlResponse.networkError) === null || _graphQlResponse$netw === void 0
|
|
4719
|
+
var _graphQlResponse$netw, _graphQlResponse$grap;
|
|
4720
|
+
if (((_graphQlResponse$netw = graphQlResponse.networkError) === null || _graphQlResponse$netw === void 0 || (_graphQlResponse$netw = _graphQlResponse$netw.result) === null || _graphQlResponse$netw === void 0 || (_graphQlResponse$netw = _graphQlResponse$netw.errors) === null || _graphQlResponse$netw === void 0 ? void 0 : _graphQlResponse$netw.length) > 0) {
|
|
4721
4721
|
return graphQlResponse.networkError.result.errors;
|
|
4722
4722
|
}
|
|
4723
4723
|
if (((_graphQlResponse$grap = graphQlResponse.graphQLErrors) === null || _graphQlResponse$grap === void 0 ? void 0 : _graphQlResponse$grap.length) > 0) {
|
|
@@ -4746,26 +4746,26 @@ function omitDeep(obj, fieldsToOmit) {
|
|
|
4746
4746
|
return originalOmitDeep__default["default"](obj, fieldsToOmit);
|
|
4747
4747
|
}
|
|
4748
4748
|
|
|
4749
|
-
function ownKeys$
|
|
4750
|
-
function _objectSpread$
|
|
4749
|
+
function ownKeys$_(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4750
|
+
function _objectSpread$_(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$_(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$_(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
4751
4751
|
function getPriceChannelName(price) {
|
|
4752
4752
|
var _ref, _price$channel$name, _price$channel, _price$channel2;
|
|
4753
4753
|
return (_ref = (_price$channel$name = (_price$channel = price.channel) === null || _price$channel === void 0 ? void 0 : _price$channel.name) !== null && _price$channel$name !== void 0 ? _price$channel$name : (_price$channel2 = price.channel) === null || _price$channel2 === void 0 ? void 0 : _price$channel2.key) !== null && _ref !== void 0 ? _ref : null;
|
|
4754
4754
|
}
|
|
4755
4755
|
function getDiscountValue(price) {
|
|
4756
|
-
var _price$value, _price$value2, _price$discounted
|
|
4756
|
+
var _price$value, _price$value2, _price$discounted;
|
|
4757
4757
|
let preciseAmount;
|
|
4758
4758
|
let fractionedAmount;
|
|
4759
4759
|
if (((_price$value = price.value) === null || _price$value === void 0 ? void 0 : _price$value.type) === PRECISION_TYPES.highPrecision && price.discounted.value.type === PRECISION_TYPES.highPrecision) {
|
|
4760
4760
|
preciseAmount = price.value.preciseAmount - price.discounted.value.preciseAmount;
|
|
4761
|
-
} else if (((_price$value2 = price.value) === null || _price$value2 === void 0 ? void 0 : _price$value2.type) === PRECISION_TYPES.highPrecision && ((_price$discounted = price.discounted) === null || _price$discounted === void 0
|
|
4761
|
+
} else if (((_price$value2 = price.value) === null || _price$value2 === void 0 ? void 0 : _price$value2.type) === PRECISION_TYPES.highPrecision && ((_price$discounted = price.discounted) === null || _price$discounted === void 0 || (_price$discounted = _price$discounted.value) === null || _price$discounted === void 0 ? void 0 : _price$discounted.type) === PRECISION_TYPES.centPrecision) {
|
|
4762
4762
|
fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
|
|
4763
4763
|
}
|
|
4764
|
-
return price.discounted ? _objectSpread$
|
|
4764
|
+
return price.discounted ? _objectSpread$_(_objectSpread$_({}, price.value), {}, {
|
|
4765
4765
|
fractionedAmount,
|
|
4766
4766
|
centAmount: price.value.centAmount - price.discounted.value.centAmount,
|
|
4767
4767
|
preciseAmount
|
|
4768
|
-
}) : _objectSpread$
|
|
4768
|
+
}) : _objectSpread$_(_objectSpread$_({}, price.value), {}, {
|
|
4769
4769
|
centAmount: 0
|
|
4770
4770
|
});
|
|
4771
4771
|
}
|
|
@@ -4773,17 +4773,17 @@ function getSelectedPrice(price) {
|
|
|
4773
4773
|
return price.discounted ? price.discounted : price;
|
|
4774
4774
|
}
|
|
4775
4775
|
function getNetUnitPrice(_ref2) {
|
|
4776
|
-
var _lineItem$perMethodTa, _filteredPerMethodTax
|
|
4776
|
+
var _lineItem$perMethodTa, _filteredPerMethodTax;
|
|
4777
4777
|
let lineItem = _ref2.lineItem,
|
|
4778
4778
|
shouldRoundAmount = _ref2.shouldRoundAmount;
|
|
4779
4779
|
const price = getSelectedPrice(lineItem.price);
|
|
4780
|
-
const filteredPerMethodTaxRate = lineItem === null || lineItem === void 0
|
|
4781
|
-
var _lineItem$shippingDet
|
|
4782
|
-
return (lineItem === null || lineItem === void 0
|
|
4780
|
+
const filteredPerMethodTaxRate = lineItem === null || lineItem === void 0 || (_lineItem$perMethodTa = lineItem.perMethodTaxRate) === null || _lineItem$perMethodTa === void 0 ? void 0 : _filterInstanceProperty__default["default"](_lineItem$perMethodTa).call(_lineItem$perMethodTa, perMethodTax => {
|
|
4781
|
+
var _lineItem$shippingDet;
|
|
4782
|
+
return (lineItem === null || lineItem === void 0 || (_lineItem$shippingDet = lineItem.shippingDetails) === null || _lineItem$shippingDet === void 0 || (_lineItem$shippingDet = _lineItem$shippingDet.targets) === null || _lineItem$shippingDet === void 0 ? void 0 : _findIndexInstanceProperty__default["default"](_lineItem$shippingDet).call(_lineItem$shippingDet, target => (target === null || target === void 0 ? void 0 : target.shippingMethodKey) === (perMethodTax === null || perMethodTax === void 0 ? void 0 : perMethodTax.shippingMethodKey))) >= 0;
|
|
4783
4783
|
});
|
|
4784
4784
|
|
|
4785
4785
|
// when shipping mode is multi with the same tax rate
|
|
4786
|
-
if ((filteredPerMethodTaxRate === null || filteredPerMethodTaxRate === void 0 ? void 0 : filteredPerMethodTaxRate.length) > 0 && (_filteredPerMethodTax = filteredPerMethodTaxRate[0]) !== null && _filteredPerMethodTax !== void 0 && (
|
|
4786
|
+
if ((filteredPerMethodTaxRate === null || filteredPerMethodTaxRate === void 0 ? void 0 : filteredPerMethodTaxRate.length) > 0 && (_filteredPerMethodTax = filteredPerMethodTaxRate[0]) !== null && _filteredPerMethodTax !== void 0 && (_filteredPerMethodTax = _filteredPerMethodTax.taxRate) !== null && _filteredPerMethodTax !== void 0 && _filteredPerMethodTax.includedInPrice) {
|
|
4787
4787
|
var _price$value3, _price$value4;
|
|
4788
4788
|
const taxRate = filteredPerMethodTaxRate[0].taxRate;
|
|
4789
4789
|
let centAmount;
|
|
@@ -4794,7 +4794,7 @@ function getNetUnitPrice(_ref2) {
|
|
|
4794
4794
|
}
|
|
4795
4795
|
let preciseAmount;
|
|
4796
4796
|
if (((_price$value4 = price.value) === null || _price$value4 === void 0 ? void 0 : _price$value4.type) === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + taxRate.amount);
|
|
4797
|
-
return _objectSpread$
|
|
4797
|
+
return _objectSpread$_(_objectSpread$_({}, price.value), {}, {
|
|
4798
4798
|
centAmount,
|
|
4799
4799
|
preciseAmount
|
|
4800
4800
|
});
|
|
@@ -4811,7 +4811,7 @@ function getNetUnitPrice(_ref2) {
|
|
|
4811
4811
|
}
|
|
4812
4812
|
let preciseAmount;
|
|
4813
4813
|
if (((_price$value6 = price.value) === null || _price$value6 === void 0 ? void 0 : _price$value6.type) === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + lineItem.taxRate.amount);
|
|
4814
|
-
return _objectSpread$
|
|
4814
|
+
return _objectSpread$_(_objectSpread$_({}, price.value), {}, {
|
|
4815
4815
|
centAmount,
|
|
4816
4816
|
preciseAmount
|
|
4817
4817
|
});
|
|
@@ -4823,7 +4823,7 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4823
4823
|
const currencyCode = price.value.currencyCode;
|
|
4824
4824
|
const fractionedAmount = getFractionedAmount(price.value);
|
|
4825
4825
|
if (currencyCode && !isNil__default["default"](fractionedAmount)) {
|
|
4826
|
-
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$
|
|
4826
|
+
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$_(_objectSpread$_({}, minPrices), {}, {
|
|
4827
4827
|
[currencyCode]: price.value
|
|
4828
4828
|
});
|
|
4829
4829
|
}
|
|
@@ -4832,8 +4832,8 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4832
4832
|
return _Object$values__default["default"](minPricesByCurrency);
|
|
4833
4833
|
}
|
|
4834
4834
|
|
|
4835
|
-
function ownKeys$
|
|
4836
|
-
function _objectSpread$
|
|
4835
|
+
function ownKeys$Z(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4836
|
+
function _objectSpread$Z(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$Z(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$Z(Object(source))).call(_context6, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
4837
4837
|
const transformCustomFieldFromGraphQLResponse = resource => {
|
|
4838
4838
|
var _context, _context4;
|
|
4839
4839
|
return {
|
|
@@ -4844,18 +4844,18 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4844
4844
|
key: resource.custom.type.key,
|
|
4845
4845
|
name: l10n.transformLocalizedFieldToLocalizedString(resource.custom.type.nameAllLocales),
|
|
4846
4846
|
fieldDefinitions: _mapInstanceProperty__default["default"](_context = resource.custom.type.fieldDefinitions).call(_context, fieldDefinition => {
|
|
4847
|
-
var _fieldDefinition$type,
|
|
4847
|
+
var _fieldDefinition$type, _context2, _fieldDefinition$type2, _context3;
|
|
4848
4848
|
return {
|
|
4849
4849
|
name: fieldDefinition.name,
|
|
4850
4850
|
required: fieldDefinition.required,
|
|
4851
|
-
type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0
|
|
4852
|
-
elementType: _objectSpread$
|
|
4851
|
+
type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0 || (_fieldDefinition$type = _fieldDefinition$type.elementType) === null || _fieldDefinition$type === void 0 ? void 0 : _fieldDefinition$type.name) === 'LocalizedEnum' ? _objectSpread$Z(_objectSpread$Z({}, fieldDefinition.type), {}, {
|
|
4852
|
+
elementType: _objectSpread$Z(_objectSpread$Z({}, fieldDefinition.type.elementType), {}, {
|
|
4853
4853
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
4854
4854
|
key: value.key,
|
|
4855
4855
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
4856
4856
|
}))
|
|
4857
4857
|
})
|
|
4858
|
-
}) : ((_fieldDefinition$
|
|
4858
|
+
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$Z(_objectSpread$Z({}, fieldDefinition.type), {}, {
|
|
4859
4859
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
4860
4860
|
key: value.key,
|
|
4861
4861
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -4866,7 +4866,7 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4866
4866
|
})
|
|
4867
4867
|
}
|
|
4868
4868
|
},
|
|
4869
|
-
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$
|
|
4869
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$Z(_objectSpread$Z({}, fields), {}, {
|
|
4870
4870
|
[customField.name]: customField.value
|
|
4871
4871
|
}), {})
|
|
4872
4872
|
};
|
|
@@ -4878,7 +4878,7 @@ const convertProductSelectionFromGraphQl = productSelection => {
|
|
|
4878
4878
|
// Incase the product selection is not missing or if the current project dose not yet have access to the feature,
|
|
4879
4879
|
// in either case we return null
|
|
4880
4880
|
if (!productSelection) return null;
|
|
4881
|
-
return _objectSpread$
|
|
4881
|
+
return _objectSpread$Z(_objectSpread$Z({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
4882
4882
|
from: 'nameAllLocales',
|
|
4883
4883
|
to: 'name'
|
|
4884
4884
|
}])), {}, {
|
|
@@ -4901,8 +4901,8 @@ const transformAllToProperNounCase = text => {
|
|
|
4901
4901
|
return _mapInstanceProperty__default["default"](_context = text.split(' ')).call(_context, term => transformToProperNounCase(term)).join(' ');
|
|
4902
4902
|
};
|
|
4903
4903
|
|
|
4904
|
-
function ownKeys$
|
|
4905
|
-
function _objectSpread$
|
|
4904
|
+
function ownKeys$Y(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4905
|
+
function _objectSpread$Y(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$Y(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$Y(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
4906
4906
|
const REGEX_ISO8601 = /(\d{4}-\d{2}-\d{2}[T]\d{2}:\d{2}:\d{2}(\.\d{3}[Z]?))/;
|
|
4907
4907
|
const REGEX_TIME = /\d{2}:\d{2}/;
|
|
4908
4908
|
const REGEX_DATE = /\d{4}-\d{2}-\d{2}/;
|
|
@@ -4919,7 +4919,7 @@ function filterCustomTypeUpdateActionValues() {
|
|
|
4919
4919
|
if (updateAction.action === 'setCustomField' && _Array$isArray__default["default"](updateAction.value)) {
|
|
4920
4920
|
const definition = _findInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, field => field.name === updateAction.name);
|
|
4921
4921
|
const definitionName = definition.type.elementType.name;
|
|
4922
|
-
return _objectSpread$
|
|
4922
|
+
return _objectSpread$Y(_objectSpread$Y({}, updateAction), {}, {
|
|
4923
4923
|
value: filterNotDefinedValues(updateAction.value, definitionName)
|
|
4924
4924
|
});
|
|
4925
4925
|
}
|
|
@@ -4993,8 +4993,8 @@ function omitSetsOfSets() {
|
|
|
4993
4993
|
|
|
4994
4994
|
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 } } } };
|
|
4995
4995
|
|
|
4996
|
-
function ownKeys$
|
|
4997
|
-
function _objectSpread$
|
|
4996
|
+
function ownKeys$X(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4997
|
+
function _objectSpread$X(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$X(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$X(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
4998
4998
|
function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4999
4999
|
function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5000
5000
|
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 } } } };
|
|
@@ -5054,7 +5054,7 @@ const mapDataToProps = _ref => {
|
|
|
5054
5054
|
return {
|
|
5055
5055
|
fetchTypeDefinitionsQuery: {
|
|
5056
5056
|
loading: fetchTypeDefinitionsQuery.loading,
|
|
5057
|
-
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$
|
|
5057
|
+
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$X({}, l10n.applyTransformedLocalizedFields(omitDeep(fieldDefinition, ['__typename'], {
|
|
5058
5058
|
isImmutable: true
|
|
5059
5059
|
}), [{
|
|
5060
5060
|
from: 'labelAllLocales',
|
|
@@ -5082,12 +5082,12 @@ const handlers$2 = {
|
|
|
5082
5082
|
}
|
|
5083
5083
|
};
|
|
5084
5084
|
|
|
5085
|
-
function ownKeys$
|
|
5086
|
-
function _objectSpread$
|
|
5085
|
+
function ownKeys$W(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5086
|
+
function _objectSpread$W(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$W(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$W(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5087
5087
|
const restDocToForm = customFieldsFromRestResponse => {
|
|
5088
5088
|
return {
|
|
5089
5089
|
fields: customFieldsFromRestResponse.fields,
|
|
5090
|
-
type: _objectSpread$
|
|
5090
|
+
type: _objectSpread$W({
|
|
5091
5091
|
id: customFieldsFromRestResponse.type.id
|
|
5092
5092
|
}, customFieldsFromRestResponse.type.obj)
|
|
5093
5093
|
};
|
|
@@ -5101,19 +5101,19 @@ const graphQlDocToForm = typeDefinition => {
|
|
|
5101
5101
|
key: typeDefinition.key,
|
|
5102
5102
|
name: l10n.transformLocalizedFieldToLocalizedString(typeDefinition.nameAllLocales),
|
|
5103
5103
|
fieldDefinitions: _mapInstanceProperty__default["default"](_context = typeDefinition.fieldDefinitions).call(_context, fieldDefinition => {
|
|
5104
|
-
var _fieldDefinition$type,
|
|
5104
|
+
var _fieldDefinition$type, _context2, _fieldDefinition$type2, _context3;
|
|
5105
5105
|
return {
|
|
5106
5106
|
name: fieldDefinition.name,
|
|
5107
5107
|
required: fieldDefinition.required,
|
|
5108
5108
|
inputHint: fieldDefinition.inputHint,
|
|
5109
|
-
type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0
|
|
5110
|
-
elementType: _objectSpread$
|
|
5109
|
+
type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0 || (_fieldDefinition$type = _fieldDefinition$type.elementType) === null || _fieldDefinition$type === void 0 ? void 0 : _fieldDefinition$type.name) === 'LocalizedEnum' ? _objectSpread$W(_objectSpread$W({}, fieldDefinition.type), {}, {
|
|
5110
|
+
elementType: _objectSpread$W(_objectSpread$W({}, fieldDefinition.type.elementType), {}, {
|
|
5111
5111
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
5112
5112
|
key: value.key,
|
|
5113
5113
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
5114
5114
|
}))
|
|
5115
5115
|
})
|
|
5116
|
-
}) : ((_fieldDefinition$
|
|
5116
|
+
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$W(_objectSpread$W({}, fieldDefinition.type), {}, {
|
|
5117
5117
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
5118
5118
|
key: value.key,
|
|
5119
5119
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -5129,7 +5129,7 @@ const formToRestDoc = formCustomFields => ({
|
|
|
5129
5129
|
type: {
|
|
5130
5130
|
id: formCustomFields.type.id,
|
|
5131
5131
|
typeId: 'type',
|
|
5132
|
-
obj: _objectSpread$
|
|
5132
|
+
obj: _objectSpread$W({}, formCustomFields.type)
|
|
5133
5133
|
},
|
|
5134
5134
|
fields: formCustomFields.fields
|
|
5135
5135
|
});
|
|
@@ -5137,7 +5137,7 @@ const formToGraphQlDoc = formCustomFields => ({
|
|
|
5137
5137
|
type: {
|
|
5138
5138
|
id: formCustomFields.type.id,
|
|
5139
5139
|
typeId: 'type',
|
|
5140
|
-
obj: _objectSpread$
|
|
5140
|
+
obj: _objectSpread$W({}, omit__default["default"](formCustomFields.type, ['id']))
|
|
5141
5141
|
},
|
|
5142
5142
|
fields: omitBy__default["default"](formCustomFields.fields || {}, isNil__default["default"])
|
|
5143
5143
|
});
|
|
@@ -5153,7 +5153,7 @@ const createEmptyCustomFields = typeDefinition => ({
|
|
|
5153
5153
|
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5154
5154
|
function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5155
5155
|
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 } } } };
|
|
5156
|
-
const customizableResources = ['asset', 'address', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', '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'];
|
|
5156
|
+
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'];
|
|
5157
5157
|
const emptyTypeDefinitions = {
|
|
5158
5158
|
total: 0,
|
|
5159
5159
|
count: 0,
|
|
@@ -5211,7 +5211,7 @@ const createGraphQlOptions = ownProps => {
|
|
|
5211
5211
|
}
|
|
5212
5212
|
};
|
|
5213
5213
|
};
|
|
5214
|
-
var
|
|
5214
|
+
var CustomFieldTypeDefinitionsConnector$1 = hoistNonReactStatics__default["default"](hoc.graphql(FetchTypeDefinitionsWithNamesQuery, {
|
|
5215
5215
|
name: 'fetchTypeDefinitionsQuery',
|
|
5216
5216
|
skip: ownProps => ownProps.isDisabled,
|
|
5217
5217
|
options: createGraphQlOptions
|
|
@@ -5268,8 +5268,8 @@ const REFERENCED_TYPES = {
|
|
|
5268
5268
|
zone: 'zone'
|
|
5269
5269
|
};
|
|
5270
5270
|
|
|
5271
|
-
function ownKeys$
|
|
5272
|
-
function _objectSpread$
|
|
5271
|
+
function ownKeys$V(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5272
|
+
function _objectSpread$V(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$V(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$V(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5273
5273
|
const extractDuplicatedValues = (values, type, language, languages) => {
|
|
5274
5274
|
let validatedValues = [];
|
|
5275
5275
|
if (type.name.toLowerCase() === 'money') {
|
|
@@ -5336,8 +5336,8 @@ function validations (formValues, language, languages) {
|
|
|
5336
5336
|
var _context2;
|
|
5337
5337
|
// Collect all required and set type fields
|
|
5338
5338
|
const fieldDefinitionsToValidate = _filterInstanceProperty__default["default"](_context2 = formValues.custom.type.fieldDefinitions).call(_context2, fieldDefinition => fieldDefinition.required || fieldDefinition.type.name.toLowerCase() === 'set');
|
|
5339
|
-
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$
|
|
5340
|
-
[fieldDefinition.name]: _objectSpread$
|
|
5339
|
+
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$V(_objectSpread$V({}, acc), {}, {
|
|
5340
|
+
[fieldDefinition.name]: _objectSpread$V(_objectSpread$V({}, setMissingIfRequired(formValues, fieldDefinition)), setDuplicatedIfSet(formValues, fieldDefinition, language, languages))
|
|
5341
5341
|
}), {});
|
|
5342
5342
|
return withoutEmptyErrorsByField(errors);
|
|
5343
5343
|
}
|
|
@@ -5364,8 +5364,8 @@ function CustomTextInput(props) {
|
|
|
5364
5364
|
}
|
|
5365
5365
|
CustomTextInput.displayName = 'CustomTextInput';
|
|
5366
5366
|
|
|
5367
|
-
function ownKeys$
|
|
5368
|
-
function _objectSpread$
|
|
5367
|
+
function ownKeys$U(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5368
|
+
function _objectSpread$U(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$U(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$U(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5369
5369
|
const getSubfieldLanguage = subfieldName => {
|
|
5370
5370
|
const lastDotIndex = _lastIndexOfInstanceProperty__default["default"](subfieldName).call(subfieldName, '.');
|
|
5371
5371
|
return subfieldName.substring(lastDotIndex + 1);
|
|
@@ -5389,7 +5389,7 @@ function CustomLocalizedTextInput(props) {
|
|
|
5389
5389
|
// as a whole.
|
|
5390
5390
|
|
|
5391
5391
|
const fieldLanguage = getSubfieldLanguage(subfieldName);
|
|
5392
|
-
const newValue = _objectSpread$
|
|
5392
|
+
const newValue = _objectSpread$U(_objectSpread$U({}, props.value), {}, {
|
|
5393
5393
|
[fieldLanguage]: rawValue
|
|
5394
5394
|
});
|
|
5395
5395
|
const nullifiedIfNeeded = uiKit.LocalizedTextInput.isEmpty(newValue) ? undefined : newValue;
|
|
@@ -5456,21 +5456,21 @@ function CustomNumberInput(props) {
|
|
|
5456
5456
|
}
|
|
5457
5457
|
CustomNumberInput.displayName = 'CustomNumberInput';
|
|
5458
5458
|
|
|
5459
|
-
function ownKeys$
|
|
5460
|
-
function _objectSpread$
|
|
5459
|
+
function ownKeys$T(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5460
|
+
function _objectSpread$T(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$T(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$T(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5461
5461
|
var styles$f = {
|
|
5462
5462
|
"container": "custom-money-input-module__container___1fdO2"
|
|
5463
5463
|
};
|
|
5464
5464
|
const fixCurrencyCode = (value, currencies) => {
|
|
5465
5465
|
if (value.currencyCode) return value;
|
|
5466
5466
|
const firstCurrency = currencies[0];
|
|
5467
|
-
return _objectSpread$
|
|
5467
|
+
return _objectSpread$T(_objectSpread$T({}, value), {}, {
|
|
5468
5468
|
currencyCode: firstCurrency
|
|
5469
5469
|
});
|
|
5470
5470
|
};
|
|
5471
5471
|
const fixAmount = value => {
|
|
5472
5472
|
if (!value.amount) {
|
|
5473
|
-
return _objectSpread$
|
|
5473
|
+
return _objectSpread$T(_objectSpread$T({}, value), {}, {
|
|
5474
5474
|
amount: '0'
|
|
5475
5475
|
});
|
|
5476
5476
|
}
|
|
@@ -5512,7 +5512,7 @@ function CustomMoneyInput(props) {
|
|
|
5512
5512
|
}
|
|
5513
5513
|
const handleChange = makeChangeHandler((rawValue, subfieldName) => {
|
|
5514
5514
|
const isAmount = _endsWithInstanceProperty__default["default"](subfieldName).call(subfieldName, 'amount');
|
|
5515
|
-
const newValue = _objectSpread$
|
|
5515
|
+
const newValue = _objectSpread$T({}, internalValue.current);
|
|
5516
5516
|
if (isAmount) newValue.amount = rawValue;else newValue.currencyCode = rawValue;
|
|
5517
5517
|
const fixedValue = fixEnteredValue(newValue, internalValue.current, currencies);
|
|
5518
5518
|
internalValue.current = fixedValue;
|
|
@@ -5793,7 +5793,7 @@ function ReferenceSearch(props) {
|
|
|
5793
5793
|
});
|
|
5794
5794
|
}
|
|
5795
5795
|
|
|
5796
|
-
const messages$
|
|
5796
|
+
const messages$B = reactIntl.defineMessages({
|
|
5797
5797
|
placeholder: {
|
|
5798
5798
|
id: 'CategoryReferenceSearch.placeholder',
|
|
5799
5799
|
description: 'Placeholder for search for a category',
|
|
@@ -5826,8 +5826,8 @@ const messages$A = reactIntl.defineMessages({
|
|
|
5826
5826
|
}
|
|
5827
5827
|
});
|
|
5828
5828
|
|
|
5829
|
-
function ownKeys$
|
|
5830
|
-
function _objectSpread$
|
|
5829
|
+
function ownKeys$S(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5830
|
+
function _objectSpread$S(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$S(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$S(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5831
5831
|
function Option$1(props) {
|
|
5832
5832
|
var _context, _context2;
|
|
5833
5833
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -5839,7 +5839,7 @@ function Option$1(props) {
|
|
|
5839
5839
|
const _useIntl = reactIntl.useIntl(),
|
|
5840
5840
|
formatMessage = _useIntl.formatMessage;
|
|
5841
5841
|
const category = props.data;
|
|
5842
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
5842
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$S(_objectSpread$S({}, props), {}, {
|
|
5843
5843
|
children: jsxRuntime.jsxs("div", {
|
|
5844
5844
|
"data-testid": "category-option",
|
|
5845
5845
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -5850,7 +5850,7 @@ function Option$1(props) {
|
|
|
5850
5850
|
fallbackOrder: languages
|
|
5851
5851
|
})
|
|
5852
5852
|
}), category.parent && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5853
|
-
children: _concatInstanceProperty__default["default"](_context = "".concat(formatMessage(messages$
|
|
5853
|
+
children: _concatInstanceProperty__default["default"](_context = "".concat(formatMessage(messages$B.parentCategory), ": ")).call(_context, l10n.formatLocalizedString(category.parent, {
|
|
5854
5854
|
key: 'name',
|
|
5855
5855
|
locale: language,
|
|
5856
5856
|
fallbackOrder: languages
|
|
@@ -5862,14 +5862,14 @@ function Option$1(props) {
|
|
|
5862
5862
|
fallbackOrder: languages
|
|
5863
5863
|
}))
|
|
5864
5864
|
}), category.externalId && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5865
|
-
children: _concatInstanceProperty__default["default"](_context2 = "".concat(formatMessage(messages$
|
|
5865
|
+
children: _concatInstanceProperty__default["default"](_context2 = "".concat(formatMessage(messages$B.externalId), ": ")).call(_context2, category.externalId || constants.NO_VALUE_FALLBACK)
|
|
5866
5866
|
})]
|
|
5867
5867
|
})
|
|
5868
5868
|
}));
|
|
5869
5869
|
}
|
|
5870
5870
|
|
|
5871
|
-
function ownKeys$
|
|
5872
|
-
function _objectSpread$
|
|
5871
|
+
function ownKeys$R(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5872
|
+
function _objectSpread$R(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$R(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$R(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5873
5873
|
const filterOption$1 = () => true;
|
|
5874
5874
|
function CategoryReferenceSearch(props) {
|
|
5875
5875
|
const _useIntl = reactIntl.useIntl(),
|
|
@@ -5881,7 +5881,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5881
5881
|
})),
|
|
5882
5882
|
language = _useApplicationContex.language,
|
|
5883
5883
|
languages = _useApplicationContex.languages;
|
|
5884
|
-
const mapItemToOption = React.useCallback(category => _objectSpread$
|
|
5884
|
+
const mapItemToOption = React.useCallback(category => _objectSpread$R(_objectSpread$R({}, category), {}, {
|
|
5885
5885
|
value: category.id,
|
|
5886
5886
|
label: l10n.formatLocalizedString(category, {
|
|
5887
5887
|
key: 'name',
|
|
@@ -5899,7 +5899,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5899
5899
|
}), [apolloClient]);
|
|
5900
5900
|
return jsxRuntime.jsx(ReferenceSearch, {
|
|
5901
5901
|
id: props.id,
|
|
5902
|
-
components: _objectSpread$
|
|
5902
|
+
components: _objectSpread$R({
|
|
5903
5903
|
Option: Option$1
|
|
5904
5904
|
}, props.components),
|
|
5905
5905
|
isClearable: props.isClearable,
|
|
@@ -5910,10 +5910,10 @@ function CategoryReferenceSearch(props) {
|
|
|
5910
5910
|
onBlur: props.onBlur,
|
|
5911
5911
|
onChange: props.onChange,
|
|
5912
5912
|
value: props.value,
|
|
5913
|
-
placeholderLabel: formatMessage(messages$
|
|
5914
|
-
searchPromptLabel: formatMessage(messages$
|
|
5915
|
-
noResultsLabel: formatMessage(messages$
|
|
5916
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5913
|
+
placeholderLabel: formatMessage(messages$B.placeholder),
|
|
5914
|
+
searchPromptLabel: formatMessage(messages$B.searchPrompt),
|
|
5915
|
+
noResultsLabel: formatMessage(messages$B.noResults),
|
|
5916
|
+
referenceIsMissingLabel: formatMessage(messages$B.isMissing),
|
|
5917
5917
|
mapItemToOption: mapItemToOption,
|
|
5918
5918
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5919
5919
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5989,7 +5989,7 @@ function getCartDiscountById(apolloClient, options) {
|
|
|
5989
5989
|
});
|
|
5990
5990
|
}
|
|
5991
5991
|
|
|
5992
|
-
const messages$
|
|
5992
|
+
const messages$A = reactIntl.defineMessages({
|
|
5993
5993
|
placeholder: {
|
|
5994
5994
|
id: 'CartDiscountReferenceSearch.placeholder',
|
|
5995
5995
|
description: 'Placeholder for search for a cart discount',
|
|
@@ -6017,8 +6017,8 @@ const messages$z = reactIntl.defineMessages({
|
|
|
6017
6017
|
}
|
|
6018
6018
|
});
|
|
6019
6019
|
|
|
6020
|
-
function ownKeys$
|
|
6021
|
-
function _objectSpread$
|
|
6020
|
+
function ownKeys$Q(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6021
|
+
function _objectSpread$Q(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Q(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Q(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
6022
6022
|
function Option(props) {
|
|
6023
6023
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
6024
6024
|
language: applicationContext.dataLocale,
|
|
@@ -6029,7 +6029,7 @@ function Option(props) {
|
|
|
6029
6029
|
const _useIntl = reactIntl.useIntl(),
|
|
6030
6030
|
formatMessage = _useIntl.formatMessage;
|
|
6031
6031
|
const cartDiscount = props.data;
|
|
6032
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
6032
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$Q(_objectSpread$Q({}, props), {}, {
|
|
6033
6033
|
children: jsxRuntime.jsxs("div", {
|
|
6034
6034
|
"data-testid": "cart-discount-option",
|
|
6035
6035
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -6040,14 +6040,14 @@ function Option(props) {
|
|
|
6040
6040
|
fallbackOrder: languages
|
|
6041
6041
|
})
|
|
6042
6042
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
6043
|
-
children: [formatMessage(messages$
|
|
6043
|
+
children: [formatMessage(messages$A.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
|
|
6044
6044
|
})]
|
|
6045
6045
|
})
|
|
6046
6046
|
}));
|
|
6047
6047
|
}
|
|
6048
6048
|
|
|
6049
|
-
function ownKeys$
|
|
6050
|
-
function _objectSpread$
|
|
6049
|
+
function ownKeys$P(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6050
|
+
function _objectSpread$P(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$P(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$P(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
6051
6051
|
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 } } } };
|
|
6052
6052
|
const returnNullIfEmpty = value => value && value.id === '' ? null : value;
|
|
6053
6053
|
const filterOption = (option, text) => {
|
|
@@ -6073,7 +6073,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
6073
6073
|
})),
|
|
6074
6074
|
language = _useApplicationContex.language,
|
|
6075
6075
|
languages = _useApplicationContex.languages;
|
|
6076
|
-
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$
|
|
6076
|
+
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$P(_objectSpread$P({}, cartDiscount), {}, {
|
|
6077
6077
|
value: cartDiscount.id,
|
|
6078
6078
|
key: cartDiscount.key,
|
|
6079
6079
|
label: l10n.formatLocalizedString(cartDiscount, {
|
|
@@ -6116,10 +6116,10 @@ function CartDiscountReferenceSearch(props) {
|
|
|
6116
6116
|
onBlur: props.onBlur,
|
|
6117
6117
|
onChange: props.onChange,
|
|
6118
6118
|
value: returnNullIfEmpty(props.value),
|
|
6119
|
-
placeholderLabel: formatMessage(messages$
|
|
6120
|
-
searchPromptLabel: formatMessage(messages$
|
|
6121
|
-
noResultsLabel: formatMessage(messages$
|
|
6122
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
6119
|
+
placeholderLabel: formatMessage(messages$A.placeholder),
|
|
6120
|
+
searchPromptLabel: formatMessage(messages$A.searchPrompt),
|
|
6121
|
+
noResultsLabel: formatMessage(messages$A.noResults),
|
|
6122
|
+
referenceIsMissingLabel: formatMessage(messages$A.isMissing),
|
|
6123
6123
|
mapItemToOption: mapItemToOption,
|
|
6124
6124
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
6125
6125
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -6180,7 +6180,7 @@ function CustomCartDiscountReferenceInput(props) {
|
|
|
6180
6180
|
});
|
|
6181
6181
|
}
|
|
6182
6182
|
|
|
6183
|
-
var messages$
|
|
6183
|
+
var messages$z = reactIntl.defineMessages({
|
|
6184
6184
|
noProductsFound: {
|
|
6185
6185
|
id: 'Shared.ProductPickerInput.noProductsFound',
|
|
6186
6186
|
description: 'The message to display when no products were found',
|
|
@@ -6269,7 +6269,7 @@ const ProductPickerInput = _ref => {
|
|
|
6269
6269
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
6270
6270
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
6271
6271
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
6272
|
-
const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0
|
|
6272
|
+
const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0 || (_currentOption$data = currentOption.data) === null || _currentOption$data === void 0 ? void 0 : _currentOption$data.label) !== null && _currentOption$data$l !== void 0 ? _currentOption$data$l : '';
|
|
6273
6273
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
6274
6274
|
max: "scale",
|
|
6275
6275
|
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
@@ -6279,7 +6279,7 @@ const ProductPickerInput = _ref => {
|
|
|
6279
6279
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
6280
6280
|
id: name,
|
|
6281
6281
|
name: name,
|
|
6282
|
-
placeholder: formatMessage(messages$
|
|
6282
|
+
placeholder: formatMessage(messages$z.placeholder),
|
|
6283
6283
|
loadOptions: loadOptionsDebounced,
|
|
6284
6284
|
defaultOptions: [],
|
|
6285
6285
|
isClearable: isClearable,
|
|
@@ -6293,7 +6293,7 @@ const ProductPickerInput = _ref => {
|
|
|
6293
6293
|
onInputChange: handleInputChange,
|
|
6294
6294
|
onBlur: onBlur,
|
|
6295
6295
|
value: currentOption.data,
|
|
6296
|
-
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$
|
|
6296
|
+
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$z.noProductsFound),
|
|
6297
6297
|
hasError: hasError || isLoadingFailed
|
|
6298
6298
|
})
|
|
6299
6299
|
}), isLoadingFailed && showLoadingErrorMessage && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -6543,8 +6543,8 @@ function CustomBooleanInputSet(props) {
|
|
|
6543
6543
|
}
|
|
6544
6544
|
CustomBooleanInputSet.displayName = 'CustomBooleanInputSet';
|
|
6545
6545
|
|
|
6546
|
-
function ownKeys$
|
|
6547
|
-
function _objectSpread$
|
|
6546
|
+
function ownKeys$O(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6547
|
+
function _objectSpread$O(target) { for (var i = 1; i < arguments.length; i++) { var _context7, _context8; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys$O(Object(source), !0)).call(_context7, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys$O(Object(source))).call(_context8, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
6548
6548
|
const getTypeName = type => type.name.toLowerCase();
|
|
6549
6549
|
const findLabel = (enumType, key) => {
|
|
6550
6550
|
var _enumType$values$find, _enumType$values$find2, _context;
|
|
@@ -6593,7 +6593,7 @@ const attributeDefinitionToFieldDefinition = attributeDefinition => ({
|
|
|
6593
6593
|
const nameValuePairsToMap = pairs => _reduceInstanceProperty__default["default"](pairs).call(pairs, (result, _ref2) => {
|
|
6594
6594
|
let name = _ref2.name,
|
|
6595
6595
|
value = _ref2.value;
|
|
6596
|
-
return _objectSpread$
|
|
6596
|
+
return _objectSpread$O(_objectSpread$O({}, result), {}, {
|
|
6597
6597
|
[name]: value
|
|
6598
6598
|
});
|
|
6599
6599
|
}, {});
|
|
@@ -6677,7 +6677,7 @@ function ProductAttributeInput(props) {
|
|
|
6677
6677
|
ProductAttributeInput.displayName = 'ProductAttributeInput';
|
|
6678
6678
|
|
|
6679
6679
|
// eslint-disable-next-line import/prefer-default-export
|
|
6680
|
-
const messages$
|
|
6680
|
+
const messages$y = reactIntl.defineMessages({
|
|
6681
6681
|
aboveFifthLevelWarning: {
|
|
6682
6682
|
id: 'attributeInputByType.nestedAttributes.aboveFifthLevelWarning',
|
|
6683
6683
|
description: 'Warning message shown when nested attribute are above the fifth level',
|
|
@@ -6690,23 +6690,23 @@ const messages$x = reactIntl.defineMessages({
|
|
|
6690
6690
|
}
|
|
6691
6691
|
});
|
|
6692
6692
|
|
|
6693
|
-
function ownKeys$
|
|
6694
|
-
function _objectSpread$
|
|
6693
|
+
function ownKeys$N(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6694
|
+
function _objectSpread$N(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$N(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$N(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
6695
6695
|
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 } } } };
|
|
6696
6696
|
const mapAttributeDefinition = definition => {
|
|
6697
|
-
var _context, _definition$type,
|
|
6698
|
-
return _objectSpread$
|
|
6697
|
+
var _context, _definition$type, _context2, _context3, _definition$type2, _context4;
|
|
6698
|
+
return _objectSpread$N(_objectSpread$N({}, definition), {}, {
|
|
6699
6699
|
required: definition.isRequired,
|
|
6700
6700
|
inputTip: l10n.transformLocalizedFieldToLocalizedString(definition.inputTipAllLocales),
|
|
6701
6701
|
label: l10n.transformLocalizedFieldToLocalizedString(definition.labelAllLocales),
|
|
6702
|
-
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, (_definition$type = definition.type) === null || _definition$type === void 0
|
|
6703
|
-
elementType: _objectSpread$
|
|
6702
|
+
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, (_definition$type = definition.type) === null || _definition$type === void 0 || (_definition$type = _definition$type.elementType) === null || _definition$type === void 0 ? void 0 : _definition$type.name) ? _objectSpread$N(_objectSpread$N({}, definition.type), {}, {
|
|
6703
|
+
elementType: _objectSpread$N(_objectSpread$N({}, definition.type.elementType), {}, {
|
|
6704
6704
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](definition.type.elementType).results).call(_context2, value => ({
|
|
6705
6705
|
key: value.key,
|
|
6706
6706
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
6707
6707
|
}))
|
|
6708
6708
|
})
|
|
6709
|
-
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, (_definition$type2 = definition.type) === null || _definition$type2 === void 0 ? void 0 : _definition$type2.name) ? _objectSpread$
|
|
6709
|
+
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, (_definition$type2 = definition.type) === null || _definition$type2 === void 0 ? void 0 : _definition$type2.name) ? _objectSpread$N(_objectSpread$N({}, definition.type), {}, {
|
|
6710
6710
|
values: _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](definition.type).results).call(_context4, value => ({
|
|
6711
6711
|
key: value.key,
|
|
6712
6712
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -6747,7 +6747,7 @@ function useNestedProductType(fieldDefinition) {
|
|
|
6747
6747
|
};
|
|
6748
6748
|
}
|
|
6749
6749
|
|
|
6750
|
-
var messages$
|
|
6750
|
+
var messages$x = reactIntl.defineMessages({
|
|
6751
6751
|
updateButton: {
|
|
6752
6752
|
id: 'NestedAttributes.Details.updateButton',
|
|
6753
6753
|
description: 'Update button label',
|
|
@@ -6827,14 +6827,14 @@ var messages$w = reactIntl.defineMessages({
|
|
|
6827
6827
|
|
|
6828
6828
|
const NestingLevelContext = /*#__PURE__*/React.createContext(0);
|
|
6829
6829
|
|
|
6830
|
-
function ownKeys$
|
|
6831
|
-
function _objectSpread$
|
|
6830
|
+
function ownKeys$M(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6831
|
+
function _objectSpread$M(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$M(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$M(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
6832
6832
|
const EditButton = props => {
|
|
6833
6833
|
const _useIntl = reactIntl.useIntl(),
|
|
6834
6834
|
formatMessage = _useIntl.formatMessage;
|
|
6835
6835
|
return jsxRuntime.jsx(uiKit.Tooltip, {
|
|
6836
6836
|
placement: "top",
|
|
6837
|
-
title: formatMessage(messages$
|
|
6837
|
+
title: formatMessage(messages$x.editTooltip),
|
|
6838
6838
|
children: jsxRuntime.jsx(uiKit.IconButton, {
|
|
6839
6839
|
label: "Edit",
|
|
6840
6840
|
isDisabled: props.isDisabled,
|
|
@@ -6850,12 +6850,12 @@ const DropChangesConfirmation = props => {
|
|
|
6850
6850
|
formatMessage = _useIntl2.formatMessage;
|
|
6851
6851
|
return jsxRuntime.jsx(applicationComponents.ConfirmationDialog, {
|
|
6852
6852
|
isOpen: props.isOpen || false,
|
|
6853
|
-
title: formatMessage(messages$
|
|
6854
|
-
labelPrimary: formatMessage(messages$
|
|
6853
|
+
title: formatMessage(messages$x.confirmationDialogTitle),
|
|
6854
|
+
labelPrimary: formatMessage(messages$x.nestedAttributesConfirmLabel),
|
|
6855
6855
|
onConfirm: props.onConfirm,
|
|
6856
6856
|
onCancel: props.onCancel,
|
|
6857
6857
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6858
|
-
intlMessage: messages$
|
|
6858
|
+
intlMessage: messages$x.confirmationDialogBody
|
|
6859
6859
|
})
|
|
6860
6860
|
});
|
|
6861
6861
|
};
|
|
@@ -6880,11 +6880,11 @@ const NestedAttributeModalPage = props => {
|
|
|
6880
6880
|
children: [jsxRuntime.jsx(uiKit.SecondaryButton, {
|
|
6881
6881
|
isDisabled: !formik$1.dirty,
|
|
6882
6882
|
iconLeft: jsxRuntime.jsx(uiKit.RevertIcon, {}),
|
|
6883
|
-
label: formatMessage(messages$
|
|
6883
|
+
label: formatMessage(messages$x.cancelButton),
|
|
6884
6884
|
onClick: formik$1.resetForm
|
|
6885
6885
|
}), jsxRuntime.jsx(applicationComponents.CustomFormModalPage.FormPrimaryButton, {
|
|
6886
6886
|
isDisabled: !formik$1.dirty,
|
|
6887
|
-
label: formatMessage(messages$
|
|
6887
|
+
label: formatMessage(messages$x.updateButton),
|
|
6888
6888
|
onClick: formik$1.handleSubmit
|
|
6889
6889
|
})]
|
|
6890
6890
|
}),
|
|
@@ -6913,7 +6913,7 @@ NestedAttributeModalPage.displayName = 'NestedAttributeModalPage';
|
|
|
6913
6913
|
const MaxNestingLevelReached = () => jsxRuntime.jsx(uiKit.FieldLabel, {
|
|
6914
6914
|
title: "",
|
|
6915
6915
|
hint: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6916
|
-
intlMessage: messages$
|
|
6916
|
+
intlMessage: messages$y.aboveFifthLevelWarning
|
|
6917
6917
|
}),
|
|
6918
6918
|
hintIcon: jsxRuntime.jsx(uiKit.WarningIcon, {})
|
|
6919
6919
|
});
|
|
@@ -6925,7 +6925,7 @@ const NestedInputControls = props => {
|
|
|
6925
6925
|
if (nextNestingLevel >= 6) return jsxRuntime.jsx(MaxNestingLevelReached, {});
|
|
6926
6926
|
const hasAttributes = props.productType.attributeDefinitions.length > 0;
|
|
6927
6927
|
if (!hasAttributes) return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6928
|
-
intlMessage: messages$
|
|
6928
|
+
intlMessage: messages$x.emptyProductType,
|
|
6929
6929
|
tone: "secondary"
|
|
6930
6930
|
});
|
|
6931
6931
|
return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
@@ -6939,7 +6939,7 @@ const NestedInputControls = props => {
|
|
|
6939
6939
|
children: props.productType.name
|
|
6940
6940
|
}), props.isEmpty && jsxRuntime.jsx("span", {
|
|
6941
6941
|
children: jsxRuntime.jsx(uiKit.Tag, {
|
|
6942
|
-
children: formatMessage(messages$
|
|
6942
|
+
children: formatMessage(messages$y.emptySetItem)
|
|
6943
6943
|
})
|
|
6944
6944
|
})]
|
|
6945
6945
|
}), jsxRuntime.jsx(EditButton, {
|
|
@@ -6975,13 +6975,13 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
6975
6975
|
const valuesAsMap = nameValuePairsToMap(value);
|
|
6976
6976
|
const initialValues = omitUnknownValues(valuesAsMap, attributeDefinitionsAsMap);
|
|
6977
6977
|
const openNestedAttributesForm = () => {
|
|
6978
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
6978
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$M(_objectSpread$M({}, parentFormik.status), {}, {
|
|
6979
6979
|
hideSaveToolbar: true
|
|
6980
6980
|
}));
|
|
6981
6981
|
attributesForm.openModal();
|
|
6982
6982
|
};
|
|
6983
6983
|
const closeNestedAttributesForm = () => {
|
|
6984
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
6984
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$M(_objectSpread$M({}, parentFormik.status), {}, {
|
|
6985
6985
|
hideSaveToolbar: false
|
|
6986
6986
|
}));
|
|
6987
6987
|
attributesForm.closeModal();
|
|
@@ -7001,7 +7001,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
7001
7001
|
if (nestingLevel !== 0) parentFormik.submitForm();else showNotification({
|
|
7002
7002
|
kind: 'success',
|
|
7003
7003
|
domain: constants.DOMAINS.SIDE,
|
|
7004
|
-
text: formatMessage(messages$
|
|
7004
|
+
text: formatMessage(messages$x.attributeUpdateSucceeded)
|
|
7005
7005
|
});
|
|
7006
7006
|
setSubmitting(false);
|
|
7007
7007
|
},
|
|
@@ -7085,8 +7085,8 @@ const SetButtons = props => {
|
|
|
7085
7085
|
};
|
|
7086
7086
|
SetButtons.displayName = 'SetButtons';
|
|
7087
7087
|
|
|
7088
|
-
function ownKeys$
|
|
7089
|
-
function _objectSpread$
|
|
7088
|
+
function ownKeys$L(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7089
|
+
function _objectSpread$L(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$L(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$L(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
7090
7090
|
const getDuplicateErrors = setValues => {
|
|
7091
7091
|
/* eslint-disable no-plusplus */
|
|
7092
7092
|
const result = [];
|
|
@@ -7143,7 +7143,7 @@ function CustomInputSet(props) {
|
|
|
7143
7143
|
touched = _useFormikContext.touched,
|
|
7144
7144
|
isSubmitting = _useFormikContext.isSubmitting,
|
|
7145
7145
|
dirty = _useFormikContext.dirty;
|
|
7146
|
-
const itemFieldDefinition = _objectSpread$
|
|
7146
|
+
const itemFieldDefinition = _objectSpread$L(_objectSpread$L({}, props.fieldDefinition), {}, {
|
|
7147
7147
|
type: props.fieldDefinition.type.elementType
|
|
7148
7148
|
});
|
|
7149
7149
|
const value = React.useMemo(() => props.value || [undefined], [props.value]);
|
|
@@ -7303,7 +7303,7 @@ const CustomFieldInput = /*#__PURE__*/React.memo(props => {
|
|
|
7303
7303
|
});
|
|
7304
7304
|
CustomFieldInput.displayName = 'CustomFieldInput';
|
|
7305
7305
|
|
|
7306
|
-
var messages$
|
|
7306
|
+
var messages$w = reactIntl.defineMessages({
|
|
7307
7307
|
referencedProductType: {
|
|
7308
7308
|
id: 'NestedAttributes.referencedProductType',
|
|
7309
7309
|
description: 'Product type referenced hint',
|
|
@@ -7311,10 +7311,10 @@ var messages$v = reactIntl.defineMessages({
|
|
|
7311
7311
|
}
|
|
7312
7312
|
});
|
|
7313
7313
|
|
|
7314
|
-
function ownKeys$
|
|
7315
|
-
function _objectSpread$
|
|
7314
|
+
function ownKeys$K(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7315
|
+
function _objectSpread$K(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$K(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$K(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
7316
7316
|
function ProductTypeReference(props) {
|
|
7317
|
-
const productTypeMessage = _objectSpread$
|
|
7317
|
+
const productTypeMessage = _objectSpread$K(_objectSpread$K({}, messages$w.referencedProductType), {}, {
|
|
7318
7318
|
values: {
|
|
7319
7319
|
productTypeName: props.productType.name
|
|
7320
7320
|
}
|
|
@@ -7360,9 +7360,9 @@ function CustomNestedFieldInput(props) {
|
|
|
7360
7360
|
}
|
|
7361
7361
|
CustomNestedFieldInput.displayName = 'CustomNestedFieldInput';
|
|
7362
7362
|
|
|
7363
|
-
function ownKeys$
|
|
7364
|
-
function _objectSpread$
|
|
7365
|
-
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$
|
|
7363
|
+
function ownKeys$J(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7364
|
+
function _objectSpread$J(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$J(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$J(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
7365
|
+
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$J(_objectSpread$J({}, result), itemErrors), {});
|
|
7366
7366
|
|
|
7367
7367
|
// TODO(pa3): worth splitting in two components: one of set errors and one for
|
|
7368
7368
|
// all the other types of fields. So that there will be no isArray check.
|
|
@@ -7373,15 +7373,15 @@ const CustomFieldErrors = props => {
|
|
|
7373
7373
|
const errors = _Array$isArray__default["default"](props.errors) ? mergeSetItemsErrors(props.errors) : props.errors;
|
|
7374
7374
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7375
7375
|
children: [props.isTouched || didFormValidationFail && (errors === null || errors === void 0 ? void 0 : errors.missing) && jsxRuntime.jsx(_.ErrorMessage, {
|
|
7376
|
-
intlMessage: messages$
|
|
7376
|
+
intlMessage: messages$K.required
|
|
7377
7377
|
}), props.isTouched || didFormValidationFail && (errors === null || errors === void 0 ? void 0 : errors.duplicated) && jsxRuntime.jsx(_.ErrorMessage, {
|
|
7378
|
-
intlMessage: messages$
|
|
7378
|
+
intlMessage: messages$K.unique
|
|
7379
7379
|
})]
|
|
7380
7380
|
});
|
|
7381
7381
|
};
|
|
7382
7382
|
CustomFieldErrors.displayName = 'CustomFieldErrors';
|
|
7383
7383
|
|
|
7384
|
-
var messages$
|
|
7384
|
+
var messages$v = reactIntl.defineMessages({
|
|
7385
7385
|
productReferenceLabel: {
|
|
7386
7386
|
id: 'CustomFieldsLabel.productReferenceLabel',
|
|
7387
7387
|
description: 'Label shown above the product picker input.',
|
|
@@ -7414,8 +7414,8 @@ var messages$u = reactIntl.defineMessages({
|
|
|
7414
7414
|
}
|
|
7415
7415
|
});
|
|
7416
7416
|
|
|
7417
|
-
function ownKeys$
|
|
7418
|
-
function _objectSpread$
|
|
7417
|
+
function ownKeys$I(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7418
|
+
function _objectSpread$I(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$I(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$I(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
7419
7419
|
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 } } } };
|
|
7420
7420
|
const CustomFieldsLabelHint = _ref => {
|
|
7421
7421
|
var _type$name;
|
|
@@ -7445,7 +7445,7 @@ const CustomFieldsLabelHint = _ref => {
|
|
|
7445
7445
|
children: [jsxRuntime.jsx(uiKit.WarningIcon, {
|
|
7446
7446
|
size: "medium",
|
|
7447
7447
|
color: "warning"
|
|
7448
|
-
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
7448
|
+
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$I({}, messages$v.cartDiscountMoreThan500))]
|
|
7449
7449
|
});
|
|
7450
7450
|
}
|
|
7451
7451
|
return l10n.formatLocalizedString(fieldDefinition, {
|
|
@@ -7459,8 +7459,8 @@ function CustomFieldsProductTypeReferenceSubtitle() {
|
|
|
7459
7459
|
formatMessage = _useIntl.formatMessage;
|
|
7460
7460
|
const _usePimStatus = usePimStatus(),
|
|
7461
7461
|
isProjectIndexed = _usePimStatus.isProjectIndexed;
|
|
7462
|
-
if (isProjectIndexed) return formatMessage(messages$
|
|
7463
|
-
return formatMessage(messages$
|
|
7462
|
+
if (isProjectIndexed) return formatMessage(messages$v.productTypeReferenceLabelI);
|
|
7463
|
+
return formatMessage(messages$v.productTypeReferenceLabel);
|
|
7464
7464
|
}
|
|
7465
7465
|
|
|
7466
7466
|
// TODO(pa3): this logic may be misplaced and probably
|
|
@@ -7476,7 +7476,7 @@ function CustomFieldsLabelSubtitle(_ref2) {
|
|
|
7476
7476
|
const referenceTypeId = type.referenceTypeId;
|
|
7477
7477
|
const referenceTypeName = capitalizeFirst(referenceTypeId);
|
|
7478
7478
|
if (_includesInstanceProperty__default["default"](_context = [SEARCHABLE_REFERENCES.category, SEARCHABLE_REFERENCES.cartDiscount]).call(_context, referenceTypeId)) return referenceTypeName;
|
|
7479
|
-
return referenceTypeId === SEARCHABLE_REFERENCES.product ? formatMessage(messages$
|
|
7479
|
+
return referenceTypeId === SEARCHABLE_REFERENCES.product ? formatMessage(messages$v.productReferenceLabel) : referenceTypeId === SEARCHABLE_REFERENCES.productType ? jsxRuntime.jsx(CustomFieldsProductTypeReferenceSubtitle, {}) : referenceTypeId === SEARCHABLE_REFERENCES.channel ? formatMessage(messages$v.channelReferenceLabel) : referenceTypeId === SEARCHABLE_REFERENCES.state ? formatMessage(messages$v.stateReferenceLabel) : "".concat(referenceTypeName, " ID");
|
|
7480
7480
|
}
|
|
7481
7481
|
const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref3 => {
|
|
7482
7482
|
let name = _ref3.name,
|
|
@@ -7631,8 +7631,8 @@ var pickerMessages = reactIntl.defineMessages({
|
|
|
7631
7631
|
}
|
|
7632
7632
|
});
|
|
7633
7633
|
|
|
7634
|
-
function ownKeys$
|
|
7635
|
-
function _objectSpread$
|
|
7634
|
+
function ownKeys$H(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7635
|
+
function _objectSpread$H(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$H(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$H(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
7636
7636
|
const PRODUCT_SELECTION_TYPES = {
|
|
7637
7637
|
INCLUSION: 'individual',
|
|
7638
7638
|
EXCLUSION: 'individual exclusion'
|
|
@@ -7646,7 +7646,7 @@ const addTypeToLabel = function (ps) {
|
|
|
7646
7646
|
var _context;
|
|
7647
7647
|
let enableExcludingProducts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
7648
7648
|
if (!ps) return undefined;
|
|
7649
|
-
return _objectSpread$
|
|
7649
|
+
return _objectSpread$H(_objectSpread$H({}, ps), {}, {
|
|
7650
7650
|
label: _concatInstanceProperty__default["default"](_context = "".concat(ps === null || ps === void 0 ? void 0 : ps.label)).call(_context, enableExcludingProducts ? " (type: ".concat(getType(ps === null || ps === void 0 ? void 0 : ps.type), ")") : '')
|
|
7651
7651
|
});
|
|
7652
7652
|
};
|
|
@@ -7942,7 +7942,7 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
7942
7942
|
fetchPolicy: 'network-only'
|
|
7943
7943
|
}),
|
|
7944
7944
|
data = _await$client$query.data;
|
|
7945
|
-
const matchedProductSelections = (_data$productSelectio = data === null || data === void 0
|
|
7945
|
+
const matchedProductSelections = (_data$productSelectio = data === null || data === void 0 || (_data$productSelectio2 = data.productSelections) === null || _data$productSelectio2 === void 0 ? void 0 : _data$productSelectio2.results) !== null && _data$productSelectio !== void 0 ? _data$productSelectio : [];
|
|
7946
7946
|
const updatedProductSelections = _mapInstanceProperty__default["default"](matchedProductSelections).call(matchedProductSelections, convertProductSelectionFromGraphQl);
|
|
7947
7947
|
const filteredProductSelections = _filterInstanceProperty__default["default"](updatedProductSelections).call(updatedProductSelections, ps => {
|
|
7948
7948
|
var _context2;
|
|
@@ -7997,12 +7997,12 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
7997
7997
|
});
|
|
7998
7998
|
}
|
|
7999
7999
|
|
|
8000
|
-
function ownKeys$
|
|
8001
|
-
function _objectSpread$
|
|
8000
|
+
function ownKeys$G(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8001
|
+
function _objectSpread$G(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$G(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$G(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8002
8002
|
function TypeSelectInputOption(props) {
|
|
8003
8003
|
const data = props.data;
|
|
8004
8004
|
const noValueFallback = props.noValueFallback || constants.NO_VALUE_FALLBACK;
|
|
8005
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8005
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$G(_objectSpread$G({}, props), {}, {
|
|
8006
8006
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
8007
8007
|
scale: "xs",
|
|
8008
8008
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -8017,18 +8017,18 @@ function TypeSelectInputOption(props) {
|
|
|
8017
8017
|
}));
|
|
8018
8018
|
}
|
|
8019
8019
|
|
|
8020
|
-
function ownKeys$
|
|
8021
|
-
function _objectSpread$
|
|
8020
|
+
function ownKeys$F(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8021
|
+
function _objectSpread$F(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$F(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$F(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8022
8022
|
function ProductSelectionsPicker(props) {
|
|
8023
8023
|
const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher();
|
|
8024
8024
|
const components = React.useMemo(() => {
|
|
8025
8025
|
return {
|
|
8026
8026
|
Option: optionInnerProps => {
|
|
8027
8027
|
if (optionInnerProps.isDisabled) {
|
|
8028
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8028
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$F({}, optionInnerProps));
|
|
8029
8029
|
}
|
|
8030
8030
|
if (props.optionType === TYPE_PROPERTY) {
|
|
8031
|
-
return jsxRuntime.jsx(TypeSelectInputOption, _objectSpread$
|
|
8031
|
+
return jsxRuntime.jsx(TypeSelectInputOption, _objectSpread$F({}, optionInnerProps));
|
|
8032
8032
|
}
|
|
8033
8033
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8034
8034
|
optionType: props.optionType,
|
|
@@ -8040,7 +8040,7 @@ function ProductSelectionsPicker(props) {
|
|
|
8040
8040
|
if (productSelectionsTotalFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8041
8041
|
const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= props.lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= props.upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
|
|
8042
8042
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8043
|
-
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$
|
|
8043
|
+
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$F(_objectSpread$F({}, props), {}, {
|
|
8044
8044
|
components: components
|
|
8045
8045
|
}))
|
|
8046
8046
|
});
|
|
@@ -8063,7 +8063,7 @@ ProductSelectionsPicker.defaultProps = {
|
|
|
8063
8063
|
|
|
8064
8064
|
const COUNTRIES_ASYNC_LOADING_LIMIT = 60;
|
|
8065
8065
|
|
|
8066
|
-
var messages$
|
|
8066
|
+
var messages$u = reactIntl.defineMessages({
|
|
8067
8067
|
countriesBasicSelectPlaceholder: {
|
|
8068
8068
|
id: 'CountriesPicker.countriesBasicSelectPlaceholder',
|
|
8069
8069
|
description: 'Placeholder of the basic field for countries',
|
|
@@ -8091,7 +8091,7 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
8091
8091
|
value: props.value,
|
|
8092
8092
|
isRequired: props.isRequired,
|
|
8093
8093
|
description: props.description,
|
|
8094
|
-
placeholder: intl.formatMessage(messages$
|
|
8094
|
+
placeholder: intl.formatMessage(messages$u.countriesBasicSelectPlaceholder),
|
|
8095
8095
|
options: props.options,
|
|
8096
8096
|
onChange: props.onChange,
|
|
8097
8097
|
isDisabled: props.isDisabled,
|
|
@@ -8101,10 +8101,10 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
8101
8101
|
});
|
|
8102
8102
|
}
|
|
8103
8103
|
|
|
8104
|
-
function ownKeys$
|
|
8105
|
-
function _objectSpread$
|
|
8104
|
+
function ownKeys$E(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8105
|
+
function _objectSpread$E(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$E(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$E(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8106
8106
|
const emptyCountryOption = intl => [{
|
|
8107
|
-
label: intl.formatMessage(messages$
|
|
8107
|
+
label: intl.formatMessage(messages$u.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
8108
8108
|
value: undefined,
|
|
8109
8109
|
isDisabled: true
|
|
8110
8110
|
}];
|
|
@@ -8129,7 +8129,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8129
8129
|
const onOptionChange = event => {
|
|
8130
8130
|
const countries = event.target.value;
|
|
8131
8131
|
props.onChange({
|
|
8132
|
-
target: _objectSpread$
|
|
8132
|
+
target: _objectSpread$E(_objectSpread$E({}, event.target), {}, {
|
|
8133
8133
|
value: _mapInstanceProperty__default["default"](countries).call(countries, country => {
|
|
8134
8134
|
var _country$value;
|
|
8135
8135
|
return (_country$value = country === null || country === void 0 ? void 0 : country.value) !== null && _country$value !== void 0 ? _country$value : country;
|
|
@@ -8150,7 +8150,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8150
8150
|
var _context3;
|
|
8151
8151
|
return _findInstanceProperty__default["default"](_context3 = props.options).call(_context3, country => country.value === countryCode);
|
|
8152
8152
|
}),
|
|
8153
|
-
placeholder: intl.formatMessage(messages$
|
|
8153
|
+
placeholder: intl.formatMessage(messages$u.countriesAsyncSelectPlaceholder),
|
|
8154
8154
|
loadOptions: handleLoadOptions,
|
|
8155
8155
|
onChange: onOptionChange,
|
|
8156
8156
|
isDisabled: props.isDisabled,
|
|
@@ -8160,13 +8160,13 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8160
8160
|
});
|
|
8161
8161
|
}
|
|
8162
8162
|
|
|
8163
|
-
function ownKeys$
|
|
8164
|
-
function _objectSpread$
|
|
8163
|
+
function ownKeys$D(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8164
|
+
function _objectSpread$D(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$D(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$D(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8165
8165
|
function CountriesPicker(props) {
|
|
8166
8166
|
var _props$options;
|
|
8167
8167
|
const CustomCountriesPicker = ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.length) <= props.countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
|
|
8168
8168
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8169
|
-
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$
|
|
8169
|
+
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$D({}, props))
|
|
8170
8170
|
});
|
|
8171
8171
|
}
|
|
8172
8172
|
CountriesPicker.defaultProps = {
|
|
@@ -8176,7 +8176,7 @@ CountriesPicker.defaultProps = {
|
|
|
8176
8176
|
hasWarning: false
|
|
8177
8177
|
};
|
|
8178
8178
|
|
|
8179
|
-
var messages$
|
|
8179
|
+
var messages$t = reactIntl.defineMessages({
|
|
8180
8180
|
noCustomerGroupsFound: {
|
|
8181
8181
|
id: 'Prices.CustomerGroupPickerInput.noCustomerGroupsFound',
|
|
8182
8182
|
description: 'The message to display when no customer groups were found',
|
|
@@ -8267,8 +8267,8 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
8267
8267
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
8268
8268
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
8269
8269
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
8270
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
8271
|
-
const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0
|
|
8270
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$t.noCustomerGroupsFound), [loadingError, formatMessage]);
|
|
8271
|
+
const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0 || (_currentOption$data = currentOption.data) === null || _currentOption$data === void 0 ? void 0 : _currentOption$data.label) !== null && _currentOption$data$l !== void 0 ? _currentOption$data$l : '';
|
|
8272
8272
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
8273
8273
|
max: "scale",
|
|
8274
8274
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
@@ -8278,7 +8278,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
8278
8278
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
8279
8279
|
id: name,
|
|
8280
8280
|
name: name,
|
|
8281
|
-
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$
|
|
8281
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$t.placeholder),
|
|
8282
8282
|
loadOptions: loadOptionsDebounced,
|
|
8283
8283
|
defaultOptions: true,
|
|
8284
8284
|
showOptionGroupDivider: true,
|
|
@@ -8348,7 +8348,7 @@ const getFirst60Options = (storesOptions, currentValues) => {
|
|
|
8348
8348
|
return _sliceInstanceProperty__default["default"](storesOptions).call(storesOptions, 0, LOWER_STORES_LIMIT + currentValuesLength);
|
|
8349
8349
|
};
|
|
8350
8350
|
|
|
8351
|
-
var messages$
|
|
8351
|
+
var messages$s = reactIntl.defineMessages({
|
|
8352
8352
|
basicSelectInputPlaceholder: {
|
|
8353
8353
|
id: 'Shared.StoreSelectInput.basicSelectInputPlaceholder',
|
|
8354
8354
|
description: 'The placeholder shown for basic select input',
|
|
@@ -8374,6 +8374,11 @@ var messages$r = reactIntl.defineMessages({
|
|
|
8374
8374
|
description: 'The message shown in search select input when matches are found',
|
|
8375
8375
|
defaultMessage: 'No matches found for your search term'
|
|
8376
8376
|
},
|
|
8377
|
+
searchSelectInputNoValueMessage: {
|
|
8378
|
+
id: 'Shared.StoreSelectInput.searchSelectInputNoValueMessage',
|
|
8379
|
+
description: 'The message shown in search select input when value of the input is empty',
|
|
8380
|
+
defaultMessage: 'No autosuggestions available. Start typing to load results based on case-sensitive exact matches'
|
|
8381
|
+
},
|
|
8377
8382
|
asyncSelectDropdownTypeAheadPrompt: {
|
|
8378
8383
|
id: 'Shared.StoreSelectInput.asyncSelectDropdownTypeAheadPrompt',
|
|
8379
8384
|
description: 'Message shown telling the user to start typing to load more channels',
|
|
@@ -8381,8 +8386,8 @@ var messages$r = reactIntl.defineMessages({
|
|
|
8381
8386
|
}
|
|
8382
8387
|
});
|
|
8383
8388
|
|
|
8384
|
-
function ownKeys$
|
|
8385
|
-
function _objectSpread$
|
|
8389
|
+
function ownKeys$C(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8390
|
+
function _objectSpread$C(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$C(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$C(Object(source))).call(_context6, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8386
8391
|
const hasErrors$2 = errors => {
|
|
8387
8392
|
var _context;
|
|
8388
8393
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8407,7 +8412,7 @@ const getValueFromOptions$1 = _ref => {
|
|
|
8407
8412
|
return _findInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, store => currentlySelectedStores === store.value);
|
|
8408
8413
|
};
|
|
8409
8414
|
const emptyStoreOption = intl => [{
|
|
8410
|
-
label: intl.formatMessage(messages$
|
|
8415
|
+
label: intl.formatMessage(messages$s.asyncSelectDropdownTypeAheadPrompt),
|
|
8411
8416
|
value: undefined,
|
|
8412
8417
|
isDisabled: true
|
|
8413
8418
|
}];
|
|
@@ -8454,10 +8459,10 @@ const StoresAsyncSelectInput = props => {
|
|
|
8454
8459
|
};
|
|
8455
8460
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8456
8461
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8457
|
-
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$
|
|
8462
|
+
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$C(_objectSpread$C({
|
|
8458
8463
|
id: props.id,
|
|
8459
8464
|
name: props.name,
|
|
8460
|
-
placeholder: intl.formatMessage(messages$
|
|
8465
|
+
placeholder: intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
8461
8466
|
horizontalConstraint: props.horizontalConstraint,
|
|
8462
8467
|
loadOptions: handleLoadOptions,
|
|
8463
8468
|
defaultOptions: true,
|
|
@@ -8497,8 +8502,8 @@ StoresAsyncSelectInput.defaultProps = {
|
|
|
8497
8502
|
shouldFetchProductSelections: false
|
|
8498
8503
|
};
|
|
8499
8504
|
|
|
8500
|
-
function ownKeys$
|
|
8501
|
-
function _objectSpread$
|
|
8505
|
+
function ownKeys$B(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8506
|
+
function _objectSpread$B(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$B(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$B(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8502
8507
|
const hasErrors$1 = errors => {
|
|
8503
8508
|
var _context;
|
|
8504
8509
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8546,10 +8551,10 @@ const StoresBasicSelectInput = props => {
|
|
|
8546
8551
|
};
|
|
8547
8552
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8548
8553
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8549
|
-
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$
|
|
8554
|
+
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$B(_objectSpread$B({
|
|
8550
8555
|
id: props.id,
|
|
8551
8556
|
name: props.name,
|
|
8552
|
-
placeholder: intl.formatMessage(messages$
|
|
8557
|
+
placeholder: intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
8553
8558
|
horizontalConstraint: props.horizontalConstraint,
|
|
8554
8559
|
options: mappedStoresListOptions,
|
|
8555
8560
|
isMulti: props.isMulti,
|
|
@@ -8642,8 +8647,8 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
8642
8647
|
};
|
|
8643
8648
|
};
|
|
8644
8649
|
|
|
8645
|
-
function ownKeys$
|
|
8646
|
-
function _objectSpread$
|
|
8650
|
+
function ownKeys$A(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8651
|
+
function _objectSpread$A(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$A(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$A(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8647
8652
|
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 } } } };
|
|
8648
8653
|
const hasErrors = errors => {
|
|
8649
8654
|
var _context;
|
|
@@ -8745,10 +8750,10 @@ const StoresSearchSelectInput = props => {
|
|
|
8745
8750
|
const loadOptionsDebounced = debounce__default["default"](handleLoadOptions, 500);
|
|
8746
8751
|
if (storesByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8747
8752
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8748
|
-
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$
|
|
8753
|
+
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$A(_objectSpread$A({
|
|
8749
8754
|
id: props.id,
|
|
8750
8755
|
name: props.name,
|
|
8751
|
-
placeholder: intl.formatMessage(messages$
|
|
8756
|
+
placeholder: intl.formatMessage(messages$s.searchSelectInputPlaceholder),
|
|
8752
8757
|
horizontalConstraint: props.horizontalConstraint,
|
|
8753
8758
|
loadOptions: loadOptionsDebounced,
|
|
8754
8759
|
defaultOptions: false,
|
|
@@ -8762,8 +8767,11 @@ const StoresSearchSelectInput = props => {
|
|
|
8762
8767
|
}),
|
|
8763
8768
|
onChange: props.onChange,
|
|
8764
8769
|
onBlur: props.onBlur,
|
|
8765
|
-
loadingMessage: intl.formatMessage(messages$
|
|
8766
|
-
noOptionsMessage:
|
|
8770
|
+
loadingMessage: intl.formatMessage(messages$s.searchSelectInputLoadingMessage),
|
|
8771
|
+
noOptionsMessage: _ref4 => {
|
|
8772
|
+
let inputValue = _ref4.inputValue;
|
|
8773
|
+
return intl.formatMessage(inputValue ? messages$s.searchSelectInputNoOptionsFoundMessage : messages$s.searchSelectInputNoValueMessage);
|
|
8774
|
+
},
|
|
8767
8775
|
isDisabled: props.isDisabled || storesByFieldFetcher.isLoading,
|
|
8768
8776
|
isReadOnly: props.isReadOnly,
|
|
8769
8777
|
isClearable: props.isClearable,
|
|
@@ -8791,8 +8799,8 @@ StoresSearchSelectInput.defaultProps = {
|
|
|
8791
8799
|
shouldFetchProductSelections: false
|
|
8792
8800
|
};
|
|
8793
8801
|
|
|
8794
|
-
function ownKeys$
|
|
8795
|
-
function _objectSpread$
|
|
8802
|
+
function ownKeys$z(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8803
|
+
function _objectSpread$z(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$z(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$z(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8796
8804
|
const StoreSelectInput = props => {
|
|
8797
8805
|
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher(props.projectKey);
|
|
8798
8806
|
const components = React.useMemo(() => {
|
|
@@ -8800,7 +8808,7 @@ const StoreSelectInput = props => {
|
|
|
8800
8808
|
// eslint-disable-next-line react/display-name
|
|
8801
8809
|
Option: optionInnerProps => {
|
|
8802
8810
|
if (optionInnerProps.isDisabled) {
|
|
8803
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8811
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$z({}, optionInnerProps));
|
|
8804
8812
|
}
|
|
8805
8813
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8806
8814
|
optionType: props.optionType,
|
|
@@ -8811,7 +8819,7 @@ const StoreSelectInput = props => {
|
|
|
8811
8819
|
}, [props.optionType]);
|
|
8812
8820
|
if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8813
8821
|
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput : StoresSearchSelectInput;
|
|
8814
|
-
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$
|
|
8822
|
+
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$z(_objectSpread$z({
|
|
8815
8823
|
projectKey: props.projectKey,
|
|
8816
8824
|
id: props.id,
|
|
8817
8825
|
name: props.name,
|
|
@@ -8866,7 +8874,7 @@ const businessRoleConstants = {
|
|
|
8866
8874
|
|
|
8867
8875
|
const businessRoleKeys = _Object$values__default["default"](businessRoleConstants);
|
|
8868
8876
|
|
|
8869
|
-
var messages$
|
|
8877
|
+
var messages$r = reactIntl.defineMessages({
|
|
8870
8878
|
ExecutiveManagement: {
|
|
8871
8879
|
id: 'Shared.businessRoles.executiveManagement',
|
|
8872
8880
|
description: 'The label for one of the selectable business roles',
|
|
@@ -8924,7 +8932,7 @@ function convertRatioToPercentage(ratio) {
|
|
|
8924
8932
|
return _parseFloat__default["default"]((ratio * 100).toFixed(2));
|
|
8925
8933
|
}
|
|
8926
8934
|
|
|
8927
|
-
const messages$
|
|
8935
|
+
const messages$q = reactIntl.defineMessages({
|
|
8928
8936
|
inputFieldError: {
|
|
8929
8937
|
id: 'Search.Filters.validation.customField.inputFieldError',
|
|
8930
8938
|
description: 'Error message for empty input field ',
|
|
@@ -8945,14 +8953,14 @@ const validateValue = (value, type, intl) => {
|
|
|
8945
8953
|
if (validateSingleFilter({
|
|
8946
8954
|
value
|
|
8947
8955
|
})) {
|
|
8948
|
-
return intl.formatMessage(messages$
|
|
8956
|
+
return intl.formatMessage(messages$q.inputFieldError);
|
|
8949
8957
|
}
|
|
8950
8958
|
if (type === FIELD_TYPES.Money && (validateSingleFilter({
|
|
8951
8959
|
value: value.currencyCode
|
|
8952
8960
|
}) || validateSingleFilter({
|
|
8953
8961
|
value: value.amount
|
|
8954
8962
|
}))) {
|
|
8955
|
-
return intl.formatMessage(messages$
|
|
8963
|
+
return intl.formatMessage(messages$q.inputFieldError);
|
|
8956
8964
|
}
|
|
8957
8965
|
return null;
|
|
8958
8966
|
};
|
|
@@ -8960,7 +8968,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
8960
8968
|
let value = _ref.value;
|
|
8961
8969
|
if (!value || !value.type) {
|
|
8962
8970
|
return {
|
|
8963
|
-
type: intl.formatMessage(messages$
|
|
8971
|
+
type: intl.formatMessage(messages$q.optionFieldError)
|
|
8964
8972
|
};
|
|
8965
8973
|
}
|
|
8966
8974
|
const typeName = value.type.name;
|
|
@@ -8968,7 +8976,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
8968
8976
|
const filterValue = value.value;
|
|
8969
8977
|
if (hasOption && !value.option) {
|
|
8970
8978
|
return {
|
|
8971
|
-
option: intl.formatMessage(messages$
|
|
8979
|
+
option: intl.formatMessage(messages$q.optionFieldError)
|
|
8972
8980
|
};
|
|
8973
8981
|
}
|
|
8974
8982
|
if (value.option === FILTER_TYPES.range) {
|
|
@@ -8987,7 +8995,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
8987
8995
|
} : null;
|
|
8988
8996
|
}
|
|
8989
8997
|
|
|
8990
|
-
const messages$
|
|
8998
|
+
const messages$p = reactIntl.defineMessages({
|
|
8991
8999
|
rangeMissingValue: {
|
|
8992
9000
|
id: 'Search.Filters.validation.date.rangeMissingValue',
|
|
8993
9001
|
description: 'error message if missing a value in a range',
|
|
@@ -9012,25 +9020,25 @@ function validateFilter$1(_ref, intl) {
|
|
|
9012
9020
|
if (validateSingleFilter({
|
|
9013
9021
|
value: value === null || value === void 0 ? void 0 : value.from
|
|
9014
9022
|
})) return {
|
|
9015
|
-
from: intl.formatMessage(messages$
|
|
9023
|
+
from: intl.formatMessage(messages$p.rangeMissingValue)
|
|
9016
9024
|
};
|
|
9017
9025
|
if (validateSingleFilter({
|
|
9018
9026
|
value: value === null || value === void 0 ? void 0 : value.to
|
|
9019
9027
|
})) return {
|
|
9020
|
-
to: intl.formatMessage(messages$
|
|
9028
|
+
to: intl.formatMessage(messages$p.rangeMissingValue)
|
|
9021
9029
|
};
|
|
9022
9030
|
if (moment__default$1["default"](value === null || value === void 0 ? void 0 : value.to).isBefore(value === null || value === void 0 ? void 0 : value.from)) return {
|
|
9023
|
-
from: intl.formatMessage(messages$
|
|
9031
|
+
from: intl.formatMessage(messages$p.rangeToSmallerThanFrom)
|
|
9024
9032
|
};
|
|
9025
9033
|
} else if (type === 'equalTo' || type === 'lessThan' || type === 'moreThan') {
|
|
9026
9034
|
if (validateSingleFilter({
|
|
9027
9035
|
value
|
|
9028
|
-
})) return intl.formatMessage(messages$
|
|
9036
|
+
})) return intl.formatMessage(messages$p.missingValue);
|
|
9029
9037
|
}
|
|
9030
9038
|
return null;
|
|
9031
9039
|
}
|
|
9032
9040
|
|
|
9033
|
-
const messages$
|
|
9041
|
+
const messages$o = reactIntl.defineMessages({
|
|
9034
9042
|
rangeMissingValue: {
|
|
9035
9043
|
id: 'Search.Filters.validation.number.rangeMissingValue',
|
|
9036
9044
|
description: 'error message if missing a value in a range',
|
|
@@ -9049,30 +9057,30 @@ function validateFilter(_ref, intl) {
|
|
|
9049
9057
|
_ref$allowFloat = _ref.allowFloat,
|
|
9050
9058
|
allowFloat = _ref$allowFloat === void 0 ? true : _ref$allowFloat;
|
|
9051
9059
|
if (type !== 'range') {
|
|
9052
|
-
if (!allowFloat && !isInteger(value)) return intl.formatMessage(messages$
|
|
9060
|
+
if (!allowFloat && !isInteger(value)) return intl.formatMessage(messages$K.integer);
|
|
9053
9061
|
return null;
|
|
9054
9062
|
}
|
|
9055
9063
|
|
|
9056
9064
|
// only range types from here
|
|
9057
9065
|
|
|
9058
9066
|
if (!allowFloat && !isInteger(value.from)) return {
|
|
9059
|
-
from: intl.formatMessage(messages$
|
|
9067
|
+
from: intl.formatMessage(messages$K.integer)
|
|
9060
9068
|
};
|
|
9061
9069
|
if (!allowFloat && !isInteger(value.to)) return {
|
|
9062
|
-
to: intl.formatMessage(messages$
|
|
9070
|
+
to: intl.formatMessage(messages$K.integer)
|
|
9063
9071
|
};
|
|
9064
9072
|
if (validateSingleFilter({
|
|
9065
9073
|
value: value.from
|
|
9066
9074
|
})) return {
|
|
9067
|
-
from: intl.formatMessage(messages$
|
|
9075
|
+
from: intl.formatMessage(messages$o.rangeMissingValue)
|
|
9068
9076
|
};
|
|
9069
9077
|
if (validateSingleFilter({
|
|
9070
9078
|
value: value.to
|
|
9071
9079
|
})) return {
|
|
9072
|
-
to: intl.formatMessage(messages$
|
|
9080
|
+
to: intl.formatMessage(messages$o.rangeMissingValue)
|
|
9073
9081
|
};
|
|
9074
9082
|
if (_parseFloat__default["default"](value.to) < _parseFloat__default["default"](value.from)) return {
|
|
9075
|
-
from: intl.formatMessage(messages$
|
|
9083
|
+
from: intl.formatMessage(messages$o.rangeToSmallerThanFrom)
|
|
9076
9084
|
};
|
|
9077
9085
|
return null;
|
|
9078
9086
|
}
|
|
@@ -9366,10 +9374,10 @@ const RESOURCES_WITH_PLATFORM_LIMITS = {
|
|
|
9366
9374
|
carts: 'carts'
|
|
9367
9375
|
};
|
|
9368
9376
|
|
|
9369
|
-
function ownKeys$
|
|
9370
|
-
function _objectSpread$
|
|
9377
|
+
function ownKeys$y(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9378
|
+
function _objectSpread$y(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$y(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$y(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9371
9379
|
const resourcesWithPlatformLimits = _Object$keys__default["default"](RESOURCES_WITH_PLATFORM_LIMITS);
|
|
9372
|
-
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$
|
|
9380
|
+
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$y({
|
|
9373
9381
|
[camelCase__default["default"]("should include ".concat(nextNameOfLimit))]: platformLimit ? nextNameOfLimit === platformLimit : true
|
|
9374
9382
|
}, previousIncludedLimits), {});
|
|
9375
9383
|
|
|
@@ -9431,7 +9439,7 @@ const useInterceptNavigation = hasReachedErrorLimit => {
|
|
|
9431
9439
|
};
|
|
9432
9440
|
};
|
|
9433
9441
|
|
|
9434
|
-
var messages$
|
|
9442
|
+
var messages$n = reactIntl.defineMessages({
|
|
9435
9443
|
shippingMethods: {
|
|
9436
9444
|
id: 'PlatformLimits.Notifications.shippingMethodsWarning',
|
|
9437
9445
|
description: 'warning message about platform limit exceeded',
|
|
@@ -9459,8 +9467,8 @@ var messages$m = reactIntl.defineMessages({
|
|
|
9459
9467
|
}
|
|
9460
9468
|
});
|
|
9461
9469
|
|
|
9462
|
-
function ownKeys$
|
|
9463
|
-
function _objectSpread$
|
|
9470
|
+
function ownKeys$x(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9471
|
+
function _objectSpread$x(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$x(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$x(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9464
9472
|
const getCustomerSupportLink$1 = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
9465
9473
|
isExternal: true,
|
|
9466
9474
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -9471,7 +9479,7 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
9471
9479
|
limit = _ref.limit;
|
|
9472
9480
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9473
9481
|
type: "warning",
|
|
9474
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9482
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$x(_objectSpread$x({}, messages$n[resource]), {}, {
|
|
9475
9483
|
values: {
|
|
9476
9484
|
limit,
|
|
9477
9485
|
customersupport: getCustomerSupportLink$1
|
|
@@ -9484,7 +9492,7 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
9484
9492
|
};
|
|
9485
9493
|
PlatformLimitWarningNotification.displayName = 'PlatformLimitWarningNotification';
|
|
9486
9494
|
|
|
9487
|
-
var messages$
|
|
9495
|
+
var messages$m = reactIntl.defineMessages({
|
|
9488
9496
|
shippingMethods: {
|
|
9489
9497
|
id: 'PlatformLimits.Notifications.shippingMethodsError',
|
|
9490
9498
|
description: 'error message about platform limit exceeded',
|
|
@@ -9512,8 +9520,8 @@ var messages$l = reactIntl.defineMessages({
|
|
|
9512
9520
|
}
|
|
9513
9521
|
});
|
|
9514
9522
|
|
|
9515
|
-
function ownKeys$
|
|
9516
|
-
function _objectSpread$
|
|
9523
|
+
function ownKeys$w(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9524
|
+
function _objectSpread$w(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$w(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$w(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9517
9525
|
const getCustomerSupportLink = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
9518
9526
|
isExternal: true,
|
|
9519
9527
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -9524,7 +9532,7 @@ const PlatformLimitErrorNotification = _ref => {
|
|
|
9524
9532
|
limit = _ref.limit;
|
|
9525
9533
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9526
9534
|
type: "error",
|
|
9527
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9535
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$w(_objectSpread$w({}, messages$m[resource]), {}, {
|
|
9528
9536
|
values: {
|
|
9529
9537
|
limit,
|
|
9530
9538
|
customersupport: getCustomerSupportLink
|
|
@@ -9542,8 +9550,8 @@ const Notifications = {
|
|
|
9542
9550
|
Error: PlatformLimitErrorNotification
|
|
9543
9551
|
};
|
|
9544
9552
|
|
|
9545
|
-
function ownKeys$
|
|
9546
|
-
function _objectSpread$
|
|
9553
|
+
function ownKeys$v(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9554
|
+
function _objectSpread$v(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$v(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$v(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9547
9555
|
const PlatformLimitsStatusText = _ref => {
|
|
9548
9556
|
let intlMessage = _ref.intlMessage,
|
|
9549
9557
|
children = _ref.children;
|
|
@@ -9552,7 +9560,7 @@ const PlatformLimitsStatusText = _ref => {
|
|
|
9552
9560
|
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
9553
9561
|
size: "xs",
|
|
9554
9562
|
children: [jsxRuntime.jsx("span", {
|
|
9555
|
-
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9563
|
+
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$v({}, intlMessage))
|
|
9556
9564
|
}), jsxRuntime.jsx("span", {
|
|
9557
9565
|
children: children
|
|
9558
9566
|
})]
|
|
@@ -9653,7 +9661,7 @@ const PlatformLimitsShippingMethodsNotifications = () => {
|
|
|
9653
9661
|
};
|
|
9654
9662
|
PlatformLimitsShippingMethodsNotifications.displayName = 'PlatformLimitsShippingMethodsNotifications';
|
|
9655
9663
|
|
|
9656
|
-
var messages$
|
|
9664
|
+
var messages$l = reactIntl.defineMessages({
|
|
9657
9665
|
shippingMethodsPlatformLimitReached: {
|
|
9658
9666
|
id: 'PlatformLimits.Tooltip.shippingMethodsLimitReached',
|
|
9659
9667
|
description: 'The message for shipping methods platform limit being reached',
|
|
@@ -9661,17 +9669,17 @@ var messages$k = reactIntl.defineMessages({
|
|
|
9661
9669
|
}
|
|
9662
9670
|
});
|
|
9663
9671
|
|
|
9664
|
-
function ownKeys$
|
|
9665
|
-
function _objectSpread$
|
|
9672
|
+
function ownKeys$u(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9673
|
+
function _objectSpread$u(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$u(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$u(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9666
9674
|
const PlatformLimitsShippingMethodsTooltip = props => {
|
|
9667
9675
|
const intl = reactIntl.useIntl();
|
|
9668
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
9669
|
-
title: intl.formatMessage(messages$
|
|
9676
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$u(_objectSpread$u({}, props), {}, {
|
|
9677
|
+
title: intl.formatMessage(messages$l.shippingMethodsPlatformLimitReached)
|
|
9670
9678
|
}));
|
|
9671
9679
|
};
|
|
9672
9680
|
PlatformLimitsShippingMethodsTooltip.displayName = 'PlatformLimitsShippingMethodsTooltip';
|
|
9673
9681
|
|
|
9674
|
-
var messages$
|
|
9682
|
+
var messages$k = reactIntl.defineMessages({
|
|
9675
9683
|
shippingMethodsStatus: {
|
|
9676
9684
|
id: 'PlatformLimits.Status.shippingMethods',
|
|
9677
9685
|
description: 'The message for shipping methods platform limit values',
|
|
@@ -9680,15 +9688,15 @@ var messages$j = reactIntl.defineMessages({
|
|
|
9680
9688
|
});
|
|
9681
9689
|
|
|
9682
9690
|
const PlatformLimitsShippingMethodsStatus = _ref => {
|
|
9683
|
-
var _platformLimits$shipp, _platformLimits$shipp2
|
|
9691
|
+
var _platformLimits$shipp, _platformLimits$shipp2;
|
|
9684
9692
|
let total = _ref.total;
|
|
9685
9693
|
const intl = reactIntl.useIntl();
|
|
9686
9694
|
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
9687
9695
|
platformLimits = _useShippingMethodsPl.platformLimits;
|
|
9688
|
-
const current = platformLimits === null || platformLimits === void 0
|
|
9689
|
-
const limit = platformLimits === null || platformLimits === void 0
|
|
9696
|
+
const current = platformLimits === null || platformLimits === void 0 || (_platformLimits$shipp = platformLimits.shippingMethods) === null || _platformLimits$shipp === void 0 || (_platformLimits$shipp = _platformLimits$shipp.total) === null || _platformLimits$shipp === void 0 ? void 0 : _platformLimits$shipp.current;
|
|
9697
|
+
const limit = platformLimits === null || platformLimits === void 0 || (_platformLimits$shipp2 = platformLimits.shippingMethods) === null || _platformLimits$shipp2 === void 0 || (_platformLimits$shipp2 = _platformLimits$shipp2.total) === null || _platformLimits$shipp2 === void 0 ? void 0 : _platformLimits$shipp2.limit;
|
|
9690
9698
|
return jsxRuntime.jsx(PlatformLimitsStatusText, {
|
|
9691
|
-
intlMessage: messages$
|
|
9699
|
+
intlMessage: messages$k.shippingMethodsStatus,
|
|
9692
9700
|
children: getPlatformLimitsStatus({
|
|
9693
9701
|
limit,
|
|
9694
9702
|
current,
|
|
@@ -9719,15 +9727,15 @@ const useShippingMethodsLimits = () => {
|
|
|
9719
9727
|
};
|
|
9720
9728
|
};
|
|
9721
9729
|
|
|
9722
|
-
function ownKeys$
|
|
9723
|
-
function _objectSpread$
|
|
9730
|
+
function ownKeys$t(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9731
|
+
function _objectSpread$t(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$t(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$t(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9724
9732
|
const injectShippingMethodsPlatformLimits = () => WrappedComponent => {
|
|
9725
9733
|
const WithShippingMethodsPlatformLimits = props => {
|
|
9726
9734
|
const shippingMethodsPlatformLimits = useShippingMethodsLimits();
|
|
9727
9735
|
const shippingMethodsProps = {
|
|
9728
9736
|
platformLimits: shippingMethodsPlatformLimits
|
|
9729
9737
|
};
|
|
9730
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
9738
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$t(_objectSpread$t({}, props), shippingMethodsProps));
|
|
9731
9739
|
};
|
|
9732
9740
|
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
9733
9741
|
return WithShippingMethodsPlatformLimits;
|
|
@@ -9800,7 +9808,7 @@ const PlatformLimitsTaxCategoriesNotifications = () => {
|
|
|
9800
9808
|
};
|
|
9801
9809
|
PlatformLimitsTaxCategoriesNotifications.displayName = 'PlatformLimitsTaxCategoriesNotifications';
|
|
9802
9810
|
|
|
9803
|
-
var messages$
|
|
9811
|
+
var messages$j = reactIntl.defineMessages({
|
|
9804
9812
|
taxCategoriesPlatformLimitReached: {
|
|
9805
9813
|
id: 'PlatformLimits.Tooltip.taxCategoriesLimitReached',
|
|
9806
9814
|
description: 'The message for tax categories platform limit being reached',
|
|
@@ -9808,17 +9816,17 @@ var messages$i = reactIntl.defineMessages({
|
|
|
9808
9816
|
}
|
|
9809
9817
|
});
|
|
9810
9818
|
|
|
9811
|
-
function ownKeys$
|
|
9812
|
-
function _objectSpread$
|
|
9819
|
+
function ownKeys$s(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9820
|
+
function _objectSpread$s(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$s(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$s(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9813
9821
|
const PlatformLimitsTaxCategoriesTooltip = props => {
|
|
9814
9822
|
const intl = reactIntl.useIntl();
|
|
9815
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
9816
|
-
title: intl.formatMessage(messages$
|
|
9823
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$s(_objectSpread$s({}, props), {}, {
|
|
9824
|
+
title: intl.formatMessage(messages$j.taxCategoriesPlatformLimitReached)
|
|
9817
9825
|
}));
|
|
9818
9826
|
};
|
|
9819
9827
|
PlatformLimitsTaxCategoriesTooltip.displayName = 'PlatformLimitsTaxCategoriesTooltip';
|
|
9820
9828
|
|
|
9821
|
-
var messages$
|
|
9829
|
+
var messages$i = reactIntl.defineMessages({
|
|
9822
9830
|
taxCategoriesStatus: {
|
|
9823
9831
|
id: 'PlatformLimits.Status.taxCategories',
|
|
9824
9832
|
description: 'The message for tax categories platform limit values',
|
|
@@ -9827,15 +9835,15 @@ var messages$h = reactIntl.defineMessages({
|
|
|
9827
9835
|
});
|
|
9828
9836
|
|
|
9829
9837
|
const PlatformLimitsTaxCategoriesStatus = _ref => {
|
|
9830
|
-
var _platformLimits$taxCa, _platformLimits$taxCa2
|
|
9838
|
+
var _platformLimits$taxCa, _platformLimits$taxCa2;
|
|
9831
9839
|
let total = _ref.total;
|
|
9832
9840
|
const intl = reactIntl.useIntl();
|
|
9833
9841
|
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
9834
9842
|
platformLimits = _useTaxCategoriesPlat.platformLimits;
|
|
9835
|
-
const current = platformLimits === null || platformLimits === void 0
|
|
9836
|
-
const limit = platformLimits === null || platformLimits === void 0
|
|
9843
|
+
const current = platformLimits === null || platformLimits === void 0 || (_platformLimits$taxCa = platformLimits.taxCategories) === null || _platformLimits$taxCa === void 0 || (_platformLimits$taxCa = _platformLimits$taxCa.total) === null || _platformLimits$taxCa === void 0 ? void 0 : _platformLimits$taxCa.current;
|
|
9844
|
+
const limit = platformLimits === null || platformLimits === void 0 || (_platformLimits$taxCa2 = platformLimits.taxCategories) === null || _platformLimits$taxCa2 === void 0 || (_platformLimits$taxCa2 = _platformLimits$taxCa2.total) === null || _platformLimits$taxCa2 === void 0 ? void 0 : _platformLimits$taxCa2.limit;
|
|
9837
9845
|
return jsxRuntime.jsx(PlatformLimitsStatusText, {
|
|
9838
|
-
intlMessage: messages$
|
|
9846
|
+
intlMessage: messages$i.taxCategoriesStatus,
|
|
9839
9847
|
children: getPlatformLimitsStatus({
|
|
9840
9848
|
limit,
|
|
9841
9849
|
current,
|
|
@@ -9866,15 +9874,15 @@ const useTaxCategoriesLimits = () => {
|
|
|
9866
9874
|
};
|
|
9867
9875
|
};
|
|
9868
9876
|
|
|
9869
|
-
function ownKeys$
|
|
9870
|
-
function _objectSpread$
|
|
9877
|
+
function ownKeys$r(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9878
|
+
function _objectSpread$r(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$r(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$r(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9871
9879
|
const injectTaxCategoriesPlatformLimits = WrappedComponent => {
|
|
9872
9880
|
const WithTaxCategoriesPlatformLimits = props => {
|
|
9873
9881
|
const taxCategoriesPlatformLimits = useTaxCategoriesLimits();
|
|
9874
9882
|
const taxCategoriesProps = {
|
|
9875
9883
|
platformLimits: taxCategoriesPlatformLimits
|
|
9876
9884
|
};
|
|
9877
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
9885
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$r(_objectSpread$r({}, props), taxCategoriesProps));
|
|
9878
9886
|
};
|
|
9879
9887
|
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
9880
9888
|
return WithTaxCategoriesPlatformLimits;
|
|
@@ -9947,7 +9955,7 @@ const PlatformLimitsZonesNotifications = () => {
|
|
|
9947
9955
|
};
|
|
9948
9956
|
PlatformLimitsZonesNotifications.displayName = 'PlatformLimitsZonesNotifications';
|
|
9949
9957
|
|
|
9950
|
-
var messages$
|
|
9958
|
+
var messages$h = reactIntl.defineMessages({
|
|
9951
9959
|
zonesPlatformLimitReached: {
|
|
9952
9960
|
id: 'PlatformLimits.Tooltip.zonesLimitReached',
|
|
9953
9961
|
description: 'The message for zones platform limit being reached',
|
|
@@ -9955,17 +9963,17 @@ var messages$g = reactIntl.defineMessages({
|
|
|
9955
9963
|
}
|
|
9956
9964
|
});
|
|
9957
9965
|
|
|
9958
|
-
function ownKeys$
|
|
9959
|
-
function _objectSpread$
|
|
9966
|
+
function ownKeys$q(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9967
|
+
function _objectSpread$q(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$q(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$q(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9960
9968
|
const PlatformLimitsZonesTooltip = props => {
|
|
9961
9969
|
const intl = reactIntl.useIntl();
|
|
9962
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
9963
|
-
title: intl.formatMessage(messages$
|
|
9970
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$q(_objectSpread$q({}, props), {}, {
|
|
9971
|
+
title: intl.formatMessage(messages$h.zonesPlatformLimitReached)
|
|
9964
9972
|
}));
|
|
9965
9973
|
};
|
|
9966
9974
|
PlatformLimitsZonesTooltip.displayName = 'PlatformLimitsZonesTooltip';
|
|
9967
9975
|
|
|
9968
|
-
var messages$
|
|
9976
|
+
var messages$g = reactIntl.defineMessages({
|
|
9969
9977
|
zonesStatus: {
|
|
9970
9978
|
id: 'PlatformLimits.Status.zones',
|
|
9971
9979
|
description: 'The message for zones platform limit values',
|
|
@@ -9974,15 +9982,15 @@ var messages$f = reactIntl.defineMessages({
|
|
|
9974
9982
|
});
|
|
9975
9983
|
|
|
9976
9984
|
const PlatformLimitsZonesStatus = _ref => {
|
|
9977
|
-
var _platformLimits$zones, _platformLimits$zones2
|
|
9985
|
+
var _platformLimits$zones, _platformLimits$zones2;
|
|
9978
9986
|
let total = _ref.total;
|
|
9979
9987
|
const intl = reactIntl.useIntl();
|
|
9980
9988
|
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
9981
9989
|
platformLimits = _useZonesPlatformLimi.platformLimits;
|
|
9982
|
-
const current = platformLimits === null || platformLimits === void 0
|
|
9983
|
-
const limit = platformLimits === null || platformLimits === void 0
|
|
9990
|
+
const current = platformLimits === null || platformLimits === void 0 || (_platformLimits$zones = platformLimits.zones) === null || _platformLimits$zones === void 0 || (_platformLimits$zones = _platformLimits$zones.total) === null || _platformLimits$zones === void 0 ? void 0 : _platformLimits$zones.current;
|
|
9991
|
+
const limit = platformLimits === null || platformLimits === void 0 || (_platformLimits$zones2 = platformLimits.zones) === null || _platformLimits$zones2 === void 0 || (_platformLimits$zones2 = _platformLimits$zones2.total) === null || _platformLimits$zones2 === void 0 ? void 0 : _platformLimits$zones2.limit;
|
|
9984
9992
|
return jsxRuntime.jsx(PlatformLimitsStatusText, {
|
|
9985
|
-
intlMessage: messages$
|
|
9993
|
+
intlMessage: messages$g.zonesStatus,
|
|
9986
9994
|
children: getPlatformLimitsStatus({
|
|
9987
9995
|
limit,
|
|
9988
9996
|
current,
|
|
@@ -10013,15 +10021,15 @@ const useZonesLimits = () => {
|
|
|
10013
10021
|
};
|
|
10014
10022
|
};
|
|
10015
10023
|
|
|
10016
|
-
function ownKeys$
|
|
10017
|
-
function _objectSpread$
|
|
10024
|
+
function ownKeys$p(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10025
|
+
function _objectSpread$p(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$p(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$p(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10018
10026
|
const injectZonesPlatformLimits = () => WrappedComponent => {
|
|
10019
10027
|
const WithZonesPlatformLimits = props => {
|
|
10020
10028
|
const zonesPlatformLimits = useZonesLimits();
|
|
10021
10029
|
const zonesProps = {
|
|
10022
10030
|
platformLimits: zonesPlatformLimits
|
|
10023
10031
|
};
|
|
10024
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10032
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$p(_objectSpread$p({}, props), zonesProps));
|
|
10025
10033
|
};
|
|
10026
10034
|
WithZonesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithZonesPlatformLimits');
|
|
10027
10035
|
return WithZonesPlatformLimits;
|
|
@@ -10107,7 +10115,7 @@ const PlatformLimitsCustomersNotifications = () => {
|
|
|
10107
10115
|
};
|
|
10108
10116
|
PlatformLimitsCustomersNotifications.displayName = 'PlatformLimitsCustomersNotifications';
|
|
10109
10117
|
|
|
10110
|
-
var messages$
|
|
10118
|
+
var messages$f = reactIntl.defineMessages({
|
|
10111
10119
|
customersPlatformLimitReached: {
|
|
10112
10120
|
id: 'PlatformLimits.Tooltip.customersLimitReached',
|
|
10113
10121
|
description: 'The message for customers platform limit being reached',
|
|
@@ -10115,17 +10123,17 @@ var messages$e = reactIntl.defineMessages({
|
|
|
10115
10123
|
}
|
|
10116
10124
|
});
|
|
10117
10125
|
|
|
10118
|
-
function ownKeys$
|
|
10119
|
-
function _objectSpread$
|
|
10126
|
+
function ownKeys$o(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10127
|
+
function _objectSpread$o(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$o(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$o(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10120
10128
|
const PlatformLimitsCustomersTooltip = props => {
|
|
10121
10129
|
const intl = reactIntl.useIntl();
|
|
10122
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10123
|
-
title: intl.formatMessage(messages$
|
|
10130
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$o(_objectSpread$o({}, props), {}, {
|
|
10131
|
+
title: intl.formatMessage(messages$f.customersPlatformLimitReached)
|
|
10124
10132
|
}));
|
|
10125
10133
|
};
|
|
10126
10134
|
PlatformLimitsCustomersTooltip.displayName = 'PlatformLimitsCustomersTooltip';
|
|
10127
10135
|
|
|
10128
|
-
var messages$
|
|
10136
|
+
var messages$e = reactIntl.defineMessages({
|
|
10129
10137
|
customersStatus: {
|
|
10130
10138
|
id: 'PlatformLimits.Status.customers',
|
|
10131
10139
|
description: 'The message for customers platform limit values',
|
|
@@ -10133,8 +10141,8 @@ var messages$d = reactIntl.defineMessages({
|
|
|
10133
10141
|
}
|
|
10134
10142
|
});
|
|
10135
10143
|
|
|
10136
|
-
function ownKeys$
|
|
10137
|
-
function _objectSpread$
|
|
10144
|
+
function ownKeys$n(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10145
|
+
function _objectSpread$n(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$n(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$n(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10138
10146
|
var styles$b = {
|
|
10139
10147
|
"status": "platform-limits-customers-status-module__status___3rXYM"
|
|
10140
10148
|
};
|
|
@@ -10154,7 +10162,7 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
10154
10162
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
10155
10163
|
tone: "secondary",
|
|
10156
10164
|
isInline: true,
|
|
10157
|
-
intlMessage: _objectSpread$
|
|
10165
|
+
intlMessage: _objectSpread$n(_objectSpread$n({}, messages$e.customersStatus), {}, {
|
|
10158
10166
|
values: {
|
|
10159
10167
|
current: intl.formatNumber(current),
|
|
10160
10168
|
limit: intl.formatNumber(limit)
|
|
@@ -10165,7 +10173,7 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
10165
10173
|
};
|
|
10166
10174
|
PlatformLimitsCustomersStatus.displayName = 'PlatformLimitsCustomersStatus';
|
|
10167
10175
|
|
|
10168
|
-
var messages$
|
|
10176
|
+
var messages$d = reactIntl.defineMessages({
|
|
10169
10177
|
title: {
|
|
10170
10178
|
id: 'PlatformLimits.Customers.modalTitle',
|
|
10171
10179
|
description: 'The modal title for the customer platform limits error',
|
|
@@ -10178,10 +10186,10 @@ var messages$c = reactIntl.defineMessages({
|
|
|
10178
10186
|
}
|
|
10179
10187
|
});
|
|
10180
10188
|
|
|
10181
|
-
function ownKeys$
|
|
10182
|
-
function _objectSpread$
|
|
10189
|
+
function ownKeys$m(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10190
|
+
function _objectSpread$m(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$m(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$m(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10183
10191
|
var LimitsReachedErrorGraphic$1 = function LimitsReachedErrorGraphic(props) {
|
|
10184
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
10192
|
+
return jsxRuntime.jsxs("svg", _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
10185
10193
|
children: [jsxRuntime.jsx("defs", {
|
|
10186
10194
|
children: jsxRuntime.jsx("path", {
|
|
10187
10195
|
id: "a",
|
|
@@ -10289,7 +10297,7 @@ const PlatformLimitsCustomersErrorModal = _ref => {
|
|
|
10289
10297
|
return jsxRuntime.jsx(applicationComponents.InfoDialog, {
|
|
10290
10298
|
isOpen: customersPlatformLimitsModalState.isModalOpen,
|
|
10291
10299
|
onClose: onClose,
|
|
10292
|
-
title: intl.formatMessage(messages$
|
|
10300
|
+
title: intl.formatMessage(messages$d.title),
|
|
10293
10301
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
10294
10302
|
scale: "m",
|
|
10295
10303
|
alignItems: "center",
|
|
@@ -10298,7 +10306,7 @@ const PlatformLimitsCustomersErrorModal = _ref => {
|
|
|
10298
10306
|
alignItems: "center",
|
|
10299
10307
|
children: [jsxRuntime.jsx(PlatformLimitsCustomersNotifications, {}), jsxRuntime.jsx(uiKit.FlatButton, {
|
|
10300
10308
|
onClick: onClose,
|
|
10301
|
-
label: intl.formatMessage(messages$
|
|
10309
|
+
label: intl.formatMessage(messages$d.backToList),
|
|
10302
10310
|
icon: jsxRuntime.jsx(uiKit.ListIcon, {
|
|
10303
10311
|
size: "medium",
|
|
10304
10312
|
color: "primary"
|
|
@@ -10353,15 +10361,15 @@ const useCustomersPlatformLimits = () => {
|
|
|
10353
10361
|
};
|
|
10354
10362
|
};
|
|
10355
10363
|
|
|
10356
|
-
function ownKeys$
|
|
10357
|
-
function _objectSpread$
|
|
10364
|
+
function ownKeys$l(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10365
|
+
function _objectSpread$l(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$l(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$l(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10358
10366
|
const injectCustomersPlatformLimits = () => WrappedComponent => {
|
|
10359
10367
|
const WithCustomersPlatformLimits = props => {
|
|
10360
10368
|
const CustomersPlatformLimits = useCustomersPlatformLimits();
|
|
10361
10369
|
const customersProps = {
|
|
10362
10370
|
platformLimits: CustomersPlatformLimits
|
|
10363
10371
|
};
|
|
10364
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10372
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$l(_objectSpread$l({}, props), customersProps));
|
|
10365
10373
|
};
|
|
10366
10374
|
WithCustomersPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
10367
10375
|
return WithCustomersPlatformLimits;
|
|
@@ -10447,7 +10455,7 @@ const PlatformLimitsCustomerGroupsNotifications = () => {
|
|
|
10447
10455
|
};
|
|
10448
10456
|
PlatformLimitsCustomerGroupsNotifications.displayName = 'PlatformLimitsCustomerGroupsNotifications';
|
|
10449
10457
|
|
|
10450
|
-
var messages$
|
|
10458
|
+
var messages$c = reactIntl.defineMessages({
|
|
10451
10459
|
customerGroupsPlatformLimitReached: {
|
|
10452
10460
|
id: 'PlatformLimits.Tooltip.customerGroupsLimitReached',
|
|
10453
10461
|
description: 'The message for custome groups platform limit being reached',
|
|
@@ -10455,17 +10463,17 @@ var messages$b = reactIntl.defineMessages({
|
|
|
10455
10463
|
}
|
|
10456
10464
|
});
|
|
10457
10465
|
|
|
10458
|
-
function ownKeys$
|
|
10459
|
-
function _objectSpread$
|
|
10466
|
+
function ownKeys$k(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10467
|
+
function _objectSpread$k(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$k(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$k(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10460
10468
|
const PlatformLimitsCustomerGroupsTooltip = props => {
|
|
10461
10469
|
const intl = reactIntl.useIntl();
|
|
10462
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10463
|
-
title: intl.formatMessage(messages$
|
|
10470
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$k(_objectSpread$k({}, props), {}, {
|
|
10471
|
+
title: intl.formatMessage(messages$c.customerGroupsPlatformLimitReached)
|
|
10464
10472
|
}));
|
|
10465
10473
|
};
|
|
10466
10474
|
PlatformLimitsCustomerGroupsTooltip.displayName = 'PlatformLimitsCustomerGroupsTooltip';
|
|
10467
10475
|
|
|
10468
|
-
var messages$
|
|
10476
|
+
var messages$b = reactIntl.defineMessages({
|
|
10469
10477
|
customerGroupsStatus: {
|
|
10470
10478
|
id: 'PlatformLimits.Status.customerGroups',
|
|
10471
10479
|
description: 'The message for customer groups platform limit values',
|
|
@@ -10473,8 +10481,8 @@ var messages$a = reactIntl.defineMessages({
|
|
|
10473
10481
|
}
|
|
10474
10482
|
});
|
|
10475
10483
|
|
|
10476
|
-
function ownKeys$
|
|
10477
|
-
function _objectSpread$
|
|
10484
|
+
function ownKeys$j(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10485
|
+
function _objectSpread$j(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$j(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$j(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10478
10486
|
var styles$9 = {
|
|
10479
10487
|
"status": "platform-limits-customer-groups-status-module__status___6099G"
|
|
10480
10488
|
};
|
|
@@ -10494,7 +10502,7 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
10494
10502
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
10495
10503
|
tone: "secondary",
|
|
10496
10504
|
isInline: true,
|
|
10497
|
-
intlMessage: _objectSpread$
|
|
10505
|
+
intlMessage: _objectSpread$j(_objectSpread$j({}, messages$b.customerGroupsStatus), {}, {
|
|
10498
10506
|
values: {
|
|
10499
10507
|
current: intl.formatNumber(current),
|
|
10500
10508
|
limit: intl.formatNumber(limit)
|
|
@@ -10505,7 +10513,7 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
10505
10513
|
};
|
|
10506
10514
|
PlatformLimitsCustomerGroupsStatus.displayName = 'PlatformLimitsCustomerGroupsStatus';
|
|
10507
10515
|
|
|
10508
|
-
var messages$
|
|
10516
|
+
var messages$a = reactIntl.defineMessages({
|
|
10509
10517
|
title: {
|
|
10510
10518
|
id: 'PlatformLimits.CustomerGroups.modalTitle',
|
|
10511
10519
|
description: 'The modal title for the customer groups platform limits error',
|
|
@@ -10518,10 +10526,10 @@ var messages$9 = reactIntl.defineMessages({
|
|
|
10518
10526
|
}
|
|
10519
10527
|
});
|
|
10520
10528
|
|
|
10521
|
-
function ownKeys$
|
|
10522
|
-
function _objectSpread$
|
|
10529
|
+
function ownKeys$i(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10530
|
+
function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$i(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$i(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10523
10531
|
var LimitsReachedErrorGraphic = function LimitsReachedErrorGraphic(props) {
|
|
10524
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
10532
|
+
return jsxRuntime.jsxs("svg", _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
10525
10533
|
children: [jsxRuntime.jsx("defs", {
|
|
10526
10534
|
children: jsxRuntime.jsx("path", {
|
|
10527
10535
|
id: "a",
|
|
@@ -10629,7 +10637,7 @@ const PlatformLimitsCustomerGroupsErrorModal = _ref => {
|
|
|
10629
10637
|
return jsxRuntime.jsx(applicationComponents.InfoDialog, {
|
|
10630
10638
|
isOpen: customerGroupsPlatformLimitsModalState.isModalOpen,
|
|
10631
10639
|
onClose: onClose,
|
|
10632
|
-
title: intl.formatMessage(messages$
|
|
10640
|
+
title: intl.formatMessage(messages$a.title),
|
|
10633
10641
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
10634
10642
|
scale: "m",
|
|
10635
10643
|
alignItems: "center",
|
|
@@ -10638,7 +10646,7 @@ const PlatformLimitsCustomerGroupsErrorModal = _ref => {
|
|
|
10638
10646
|
alignItems: "center",
|
|
10639
10647
|
children: [jsxRuntime.jsx(PlatformLimitsCustomerGroupsNotifications, {}), jsxRuntime.jsx(uiKit.FlatButton, {
|
|
10640
10648
|
onClick: onClose,
|
|
10641
|
-
label: intl.formatMessage(messages$
|
|
10649
|
+
label: intl.formatMessage(messages$a.backToList),
|
|
10642
10650
|
icon: jsxRuntime.jsx(uiKit.ListIcon, {
|
|
10643
10651
|
size: "medium",
|
|
10644
10652
|
color: "primary"
|
|
@@ -10693,15 +10701,15 @@ const useCustomerGroupsPlatformLimits = () => {
|
|
|
10693
10701
|
};
|
|
10694
10702
|
};
|
|
10695
10703
|
|
|
10696
|
-
function ownKeys$
|
|
10697
|
-
function _objectSpread$
|
|
10704
|
+
function ownKeys$h(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10705
|
+
function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$h(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$h(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10698
10706
|
const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
|
|
10699
10707
|
const WithCustomerGroupsPlatformLimits = props => {
|
|
10700
10708
|
const CustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits();
|
|
10701
10709
|
const customersProps = {
|
|
10702
10710
|
platformLimits: CustomerGroupsPlatformLimits
|
|
10703
10711
|
};
|
|
10704
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10712
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$h(_objectSpread$h({}, props), customersProps));
|
|
10705
10713
|
};
|
|
10706
10714
|
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
10707
10715
|
return WithCustomerGroupsPlatformLimits;
|
|
@@ -10756,7 +10764,7 @@ var fetchPimIndexStatus = ((apolloClient, projectKey) => async dispatch => {
|
|
|
10756
10764
|
}
|
|
10757
10765
|
});
|
|
10758
10766
|
|
|
10759
|
-
var messages$
|
|
10767
|
+
var messages$9 = reactIntl.defineMessages({
|
|
10760
10768
|
indexingSucceed: {
|
|
10761
10769
|
id: 'Products.PimIndexer.Notifications.indexingSucceed',
|
|
10762
10770
|
description: 'Message to be shown to user when PIM successfully finishes initial project indexing.',
|
|
@@ -10794,8 +10802,8 @@ const defaultValue = {
|
|
|
10794
10802
|
*/
|
|
10795
10803
|
const PimIndexerContext = /*#__PURE__*/React.createContext(defaultValue);
|
|
10796
10804
|
|
|
10797
|
-
function ownKeys$
|
|
10798
|
-
function _objectSpread$
|
|
10805
|
+
function ownKeys$g(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10806
|
+
function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$g(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$g(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10799
10807
|
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10800
10808
|
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10801
10809
|
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 } } } };
|
|
@@ -10881,7 +10889,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10881
10889
|
_this.props.notifications.showNotification({
|
|
10882
10890
|
kind: 'error',
|
|
10883
10891
|
domain: constants.DOMAINS.SIDE,
|
|
10884
|
-
text: _this.props.intl.formatMessage(messages$
|
|
10892
|
+
text: _this.props.intl.formatMessage(messages$9.indexingFailed)
|
|
10885
10893
|
});
|
|
10886
10894
|
};
|
|
10887
10895
|
_this.getIndexingProgress = async () => {
|
|
@@ -10922,7 +10930,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10922
10930
|
_this.props.notifications.showNotification({
|
|
10923
10931
|
kind: 'success',
|
|
10924
10932
|
domain: constants.DOMAINS.SIDE,
|
|
10925
|
-
text: _this.props.intl.formatMessage(messages$
|
|
10933
|
+
text: _this.props.intl.formatMessage(messages$9.indexingSucceed)
|
|
10926
10934
|
},
|
|
10927
10935
|
// because the indexing may take so long, the success notification
|
|
10928
10936
|
// may be dismissed without being seen by the user. Set `dismissAfter`
|
|
@@ -10971,7 +10979,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10971
10979
|
shouldIndexProductTypes: isIndexingProductTypes
|
|
10972
10980
|
}
|
|
10973
10981
|
});
|
|
10974
|
-
_this.setState(_objectSpread$
|
|
10982
|
+
_this.setState(_objectSpread$g(_objectSpread$g({
|
|
10975
10983
|
isLoading: false,
|
|
10976
10984
|
isProjectBeingIndexedByPim: true
|
|
10977
10985
|
}, getIndexingJobIds(indexMutationResult)), {}, {
|
|
@@ -10996,7 +11004,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10996
11004
|
key: "render",
|
|
10997
11005
|
value: function render() {
|
|
10998
11006
|
return jsxRuntime.jsx(PimIndexerContext.Provider, {
|
|
10999
|
-
value: _objectSpread$
|
|
11007
|
+
value: _objectSpread$g(_objectSpread$g({}, this.state), {}, {
|
|
11000
11008
|
attemptToRefreshProducts: this.attemptToRefreshProducts,
|
|
11001
11009
|
indexProject: this.indexProject
|
|
11002
11010
|
}),
|
|
@@ -11038,13 +11046,13 @@ let WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
|
11038
11046
|
}(React.PureComponent);
|
|
11039
11047
|
WithPimIndexer.displayName = 'WithPimIndexer';
|
|
11040
11048
|
|
|
11041
|
-
function ownKeys$
|
|
11042
|
-
function _objectSpread$
|
|
11049
|
+
function ownKeys$f(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11050
|
+
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$f(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$f(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11043
11051
|
var injectPimIndexer = (function () {
|
|
11044
11052
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pimIndexer';
|
|
11045
11053
|
return Component => {
|
|
11046
11054
|
const WrappedComponent = props => jsxRuntime.jsx(WithPimIndexer, {
|
|
11047
|
-
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$
|
|
11055
|
+
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$f(_objectSpread$f({}, props), {}, {
|
|
11048
11056
|
[propName]: pimIndexerProps
|
|
11049
11057
|
}))
|
|
11050
11058
|
});
|
|
@@ -11057,7 +11065,7 @@ function usePimIndexer() {
|
|
|
11057
11065
|
return React.useContext(PimIndexerContext);
|
|
11058
11066
|
}
|
|
11059
11067
|
|
|
11060
|
-
var messages$
|
|
11068
|
+
var messages$8 = reactIntl.defineMessages({
|
|
11061
11069
|
yes: {
|
|
11062
11070
|
id: 'BooleanField.yes',
|
|
11063
11071
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -11079,8 +11087,8 @@ const BooleanField = props => {
|
|
|
11079
11087
|
var _context;
|
|
11080
11088
|
let selectedValue;
|
|
11081
11089
|
if (typeof props.value === 'boolean') selectedValue = getBooleanValue(props.value);else if (props.isMulti && _Array$isArray__default["default"](props.value) && props.value.length) selectedValue = props.value.length === 2 ? 'all' : getBooleanValue(props.value[0]);
|
|
11082
|
-
const yesLabel = props.intl.formatMessage(messages$
|
|
11083
|
-
const noLabel = props.intl.formatMessage(messages$
|
|
11090
|
+
const yesLabel = props.intl.formatMessage(messages$8.yes);
|
|
11091
|
+
const noLabel = props.intl.formatMessage(messages$8.no);
|
|
11084
11092
|
const options = [{
|
|
11085
11093
|
value: 'yes',
|
|
11086
11094
|
label: yesLabel
|
|
@@ -11118,7 +11126,7 @@ function getBooleanValue(value) {
|
|
|
11118
11126
|
return value === false ? 'no' : 'yes';
|
|
11119
11127
|
}
|
|
11120
11128
|
|
|
11121
|
-
var messages$
|
|
11129
|
+
var messages$7 = reactIntl.defineMessages({
|
|
11122
11130
|
label: {
|
|
11123
11131
|
id: 'MissingValueField.label',
|
|
11124
11132
|
description: 'The label text for the missing values option',
|
|
@@ -11126,20 +11134,20 @@ var messages$6 = reactIntl.defineMessages({
|
|
|
11126
11134
|
}
|
|
11127
11135
|
});
|
|
11128
11136
|
|
|
11129
|
-
function ownKeys$
|
|
11130
|
-
function _objectSpread$
|
|
11137
|
+
function ownKeys$e(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11138
|
+
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$e(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$e(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11131
11139
|
const MissingValueField = props => jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
11132
11140
|
name: "missing-value",
|
|
11133
11141
|
isChecked: props.isChecked,
|
|
11134
11142
|
onChange: props.onChange,
|
|
11135
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11143
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$e({}, messages$7.label))
|
|
11136
11144
|
});
|
|
11137
11145
|
MissingValueField.defaultProps = {
|
|
11138
11146
|
isChecked: false
|
|
11139
11147
|
};
|
|
11140
11148
|
|
|
11141
|
-
function ownKeys$
|
|
11142
|
-
function _objectSpread$
|
|
11149
|
+
function ownKeys$d(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11150
|
+
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$d(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$d(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11143
11151
|
var styles$7 = {
|
|
11144
11152
|
"button": "button-module__button___1OzVf",
|
|
11145
11153
|
"cancel": "button-module__cancel___1-jYL button-module__button___1OzVf",
|
|
@@ -11173,7 +11181,7 @@ const Button = props => {
|
|
|
11173
11181
|
|
|
11174
11182
|
// Pass only `data-*` props
|
|
11175
11183
|
const dataProps = filterDataAttributes(props);
|
|
11176
|
-
return jsxRuntime.jsx("button", _objectSpread$
|
|
11184
|
+
return jsxRuntime.jsx("button", _objectSpread$d(_objectSpread$d({
|
|
11177
11185
|
onClick: isDisabled ? null : onClick,
|
|
11178
11186
|
type: props.type,
|
|
11179
11187
|
className: classnames__default["default"](styles$7.button, isDisabled ? styles$7.disabled : null, className),
|
|
@@ -11188,7 +11196,7 @@ Button.defaultProps = {
|
|
|
11188
11196
|
type: 'button'
|
|
11189
11197
|
};
|
|
11190
11198
|
|
|
11191
|
-
var messages$
|
|
11199
|
+
var messages$6 = reactIntl.defineMessages({
|
|
11192
11200
|
chooseFile: {
|
|
11193
11201
|
id: 'ButtonFileInput.chooseFile',
|
|
11194
11202
|
description: 'The label text of the field for upload local file',
|
|
@@ -11196,8 +11204,8 @@ var messages$5 = reactIntl.defineMessages({
|
|
|
11196
11204
|
}
|
|
11197
11205
|
});
|
|
11198
11206
|
|
|
11199
|
-
function ownKeys$
|
|
11200
|
-
function _objectSpread$
|
|
11207
|
+
function ownKeys$c(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11208
|
+
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$c(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$c(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11201
11209
|
var styles$6 = {
|
|
11202
11210
|
"button": "file-input-module__button___2KypN",
|
|
11203
11211
|
"input": "file-input-module__input___3MP4D"
|
|
@@ -11217,7 +11225,7 @@ const FileInput = props => jsxRuntime.jsx("label", {
|
|
|
11217
11225
|
});
|
|
11218
11226
|
FileInput.displayName = 'FileInput';
|
|
11219
11227
|
FileInput.defaultProps = {
|
|
11220
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11228
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$c({}, messages$6.chooseFile)),
|
|
11221
11229
|
allowMultiple: false,
|
|
11222
11230
|
acceptTypes: 'image/png,image/jpeg,image/gif'
|
|
11223
11231
|
};
|
|
@@ -11264,7 +11272,7 @@ const ScrollToFieldError = () => {
|
|
|
11264
11272
|
return null;
|
|
11265
11273
|
};
|
|
11266
11274
|
|
|
11267
|
-
var messages$
|
|
11275
|
+
var messages$5 = reactIntl.defineMessages({
|
|
11268
11276
|
buttonLabel: {
|
|
11269
11277
|
id: 'SearchInput.buttonLabel',
|
|
11270
11278
|
description: 'Label for "Search" button.',
|
|
@@ -11319,15 +11327,15 @@ const SelectableFieldSearchInput = props => {
|
|
|
11319
11327
|
});
|
|
11320
11328
|
},
|
|
11321
11329
|
onReset: props.onReset,
|
|
11322
|
-
placeholder: (_props$placeholder = props.placeholder) !== null && _props$placeholder !== void 0 ? _props$placeholder : intl.formatMessage(messages$
|
|
11330
|
+
placeholder: (_props$placeholder = props.placeholder) !== null && _props$placeholder !== void 0 ? _props$placeholder : intl.formatMessage(messages$5.placeholder),
|
|
11323
11331
|
isDisabled: props.disabled
|
|
11324
11332
|
})
|
|
11325
11333
|
});
|
|
11326
11334
|
};
|
|
11327
11335
|
SelectableFieldSearchInput.displayName = 'SelectableFieldSearchInput';
|
|
11328
11336
|
|
|
11329
|
-
function ownKeys$
|
|
11330
|
-
function _objectSpread$
|
|
11337
|
+
function ownKeys$b(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11338
|
+
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$b(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$b(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11331
11339
|
const StoreSelectField = props => {
|
|
11332
11340
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
11333
11341
|
max: props.horizontalConstraint,
|
|
@@ -11341,7 +11349,7 @@ const StoreSelectField = props => {
|
|
|
11341
11349
|
htmlFor: props.id,
|
|
11342
11350
|
hasRequiredIndicator: props.isRequired,
|
|
11343
11351
|
isBold: true
|
|
11344
|
-
}), jsxRuntime.jsx(StoreSelectInput, _objectSpread$
|
|
11352
|
+
}), jsxRuntime.jsx(StoreSelectInput, _objectSpread$b(_objectSpread$b({
|
|
11345
11353
|
projectKey: props.projectKey,
|
|
11346
11354
|
id: props.id,
|
|
11347
11355
|
name: props.name,
|
|
@@ -11381,8 +11389,8 @@ StoreSelectField.defaultProps = {
|
|
|
11381
11389
|
};
|
|
11382
11390
|
|
|
11383
11391
|
var _templateObject;
|
|
11384
|
-
function ownKeys$
|
|
11385
|
-
function _objectSpread$
|
|
11392
|
+
function ownKeys$a(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11393
|
+
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$a(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$a(Object(source))).call(_context6, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11386
11394
|
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11387
11395
|
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11388
11396
|
var styles$3 = {
|
|
@@ -11399,7 +11407,7 @@ const validateRequired = value => {
|
|
|
11399
11407
|
};
|
|
11400
11408
|
const VALIDATOR_REQUIRED = {
|
|
11401
11409
|
name: 'required',
|
|
11402
|
-
message: messages$
|
|
11410
|
+
message: messages$K.required,
|
|
11403
11411
|
permanent: true,
|
|
11404
11412
|
validators: {
|
|
11405
11413
|
change(value) {
|
|
@@ -11413,7 +11421,7 @@ const VALIDATOR_REQUIRED = {
|
|
|
11413
11421
|
};
|
|
11414
11422
|
const VALIDATOR_NUMERIC = {
|
|
11415
11423
|
name: 'numeric',
|
|
11416
|
-
message: messages$
|
|
11424
|
+
message: messages$K.numeric,
|
|
11417
11425
|
permanent: false,
|
|
11418
11426
|
validators: {
|
|
11419
11427
|
change: v => {
|
|
@@ -11428,7 +11436,7 @@ const VALIDATOR_NUMERIC = {
|
|
|
11428
11436
|
};
|
|
11429
11437
|
const VALIDATOR_INTEGER = {
|
|
11430
11438
|
name: 'integer',
|
|
11431
|
-
message: messages$
|
|
11439
|
+
message: messages$K.integer,
|
|
11432
11440
|
permanent: false,
|
|
11433
11441
|
validators: {
|
|
11434
11442
|
change: v => {
|
|
@@ -11443,7 +11451,7 @@ const VALIDATOR_INTEGER = {
|
|
|
11443
11451
|
};
|
|
11444
11452
|
({
|
|
11445
11453
|
name: 'email',
|
|
11446
|
-
message: messages$
|
|
11454
|
+
message: messages$K.email,
|
|
11447
11455
|
permanent: false,
|
|
11448
11456
|
validators: {
|
|
11449
11457
|
// Note: it's a bit weird to validate it on every change,
|
|
@@ -11532,7 +11540,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11532
11540
|
* so it must be an invalid numeric value
|
|
11533
11541
|
*/
|
|
11534
11542
|
_this.handleInvalid = () => {
|
|
11535
|
-
const nextValidStatus = _objectSpread$
|
|
11543
|
+
const nextValidStatus = _objectSpread$a({}, _this.state.validStatus);
|
|
11536
11544
|
if (has__default["default"](nextValidStatus, 'numeric')) {
|
|
11537
11545
|
nextValidStatus.numeric = false;
|
|
11538
11546
|
_this.conditionalSetValidStatus(nextValidStatus);
|
|
@@ -11566,10 +11574,10 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11566
11574
|
process.env.NODE_ENV !== "production" ? warning__default["default"](hasWarned, warningMessage) : void 0;
|
|
11567
11575
|
hasWarned = true;
|
|
11568
11576
|
}
|
|
11569
|
-
// eslint-disable-next-line camelcase
|
|
11570
11577
|
}, {
|
|
11571
|
-
key: "
|
|
11572
|
-
value: function
|
|
11578
|
+
key: "componentDidUpdate",
|
|
11579
|
+
value: function componentDidUpdate() {
|
|
11580
|
+
const nextProps = this.props;
|
|
11573
11581
|
if (nextProps.attribute && nextProps.attribute.value || nextProps.value) {
|
|
11574
11582
|
this.resetValidity();
|
|
11575
11583
|
this.handleChange(nextProps.value, {
|
|
@@ -11584,7 +11592,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11584
11592
|
if (prev) return this.state.validStatus[v.name];
|
|
11585
11593
|
return prev;
|
|
11586
11594
|
}, true);
|
|
11587
|
-
const componentProps = _objectSpread$
|
|
11595
|
+
const componentProps = _objectSpread$a(_objectSpread$a({}, this.props), {}, {
|
|
11588
11596
|
[blurHandler || 'onBlurValue']: this.handleBlur,
|
|
11589
11597
|
[changeHandler || 'onChange']: this.handleChange,
|
|
11590
11598
|
onInvalidValue: this.handleInvalid,
|
|
@@ -11601,7 +11609,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11601
11609
|
components: {
|
|
11602
11610
|
WrapperComponent: ToolTipWrapperComponent
|
|
11603
11611
|
},
|
|
11604
|
-
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$
|
|
11612
|
+
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$a({}, componentProps))
|
|
11605
11613
|
})
|
|
11606
11614
|
});
|
|
11607
11615
|
}
|
|
@@ -11656,7 +11664,7 @@ function simpleInput(type) {
|
|
|
11656
11664
|
}, _class;
|
|
11657
11665
|
}
|
|
11658
11666
|
|
|
11659
|
-
var messages$
|
|
11667
|
+
var messages$4 = reactIntl.defineMessages({
|
|
11660
11668
|
customFieldsError: {
|
|
11661
11669
|
id: 'CustomFieldsError.Error',
|
|
11662
11670
|
description: 'The message when there are errors adding custom fields',
|
|
@@ -11664,14 +11672,14 @@ var messages$3 = reactIntl.defineMessages({
|
|
|
11664
11672
|
}
|
|
11665
11673
|
});
|
|
11666
11674
|
|
|
11667
|
-
function ownKeys$
|
|
11668
|
-
function _objectSpread$
|
|
11675
|
+
function ownKeys$9(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11676
|
+
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$9(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$9(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11669
11677
|
const CustomFieldsErrorTextNotification = props => {
|
|
11670
11678
|
var _context;
|
|
11671
11679
|
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
11672
11680
|
scale: "s",
|
|
11673
11681
|
children: [jsxRuntime.jsx(uiKit.Text.Wrap, {
|
|
11674
|
-
intlMessage: _objectSpread$
|
|
11682
|
+
intlMessage: _objectSpread$9({}, messages$4.customFieldsError)
|
|
11675
11683
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
11676
11684
|
scale: "xs",
|
|
11677
11685
|
children: _mapInstanceProperty__default["default"](_context = props.formErrors).call(_context, formError => jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -11683,7 +11691,7 @@ const CustomFieldsErrorTextNotification = props => {
|
|
|
11683
11691
|
};
|
|
11684
11692
|
CustomFieldsErrorTextNotification.displayName = 'CustomFieldsErrorTextNotification';
|
|
11685
11693
|
|
|
11686
|
-
const messages$
|
|
11694
|
+
const messages$3 = reactIntl.defineMessages({
|
|
11687
11695
|
from: {
|
|
11688
11696
|
id: 'LabelRange.from',
|
|
11689
11697
|
description: 'The label for "from" range',
|
|
@@ -11696,8 +11704,8 @@ const messages$2 = reactIntl.defineMessages({
|
|
|
11696
11704
|
}
|
|
11697
11705
|
});
|
|
11698
11706
|
|
|
11699
|
-
function ownKeys$
|
|
11700
|
-
function _objectSpread$
|
|
11707
|
+
function ownKeys$8(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11708
|
+
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$8(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$8(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11701
11709
|
var styles$2 = {
|
|
11702
11710
|
"label": "label-range-module__label___3Tb0p"
|
|
11703
11711
|
};
|
|
@@ -11705,12 +11713,12 @@ const LabelRange = _ref => {
|
|
|
11705
11713
|
let type = _ref.type;
|
|
11706
11714
|
return jsxRuntime.jsx("label", {
|
|
11707
11715
|
className: styles$2.label,
|
|
11708
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11716
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$8({}, messages$3[type]))
|
|
11709
11717
|
});
|
|
11710
11718
|
};
|
|
11711
11719
|
LabelRange.displayName = 'LabelRange';
|
|
11712
11720
|
|
|
11713
|
-
var messages$
|
|
11721
|
+
var messages$2 = reactIntl.defineMessages({
|
|
11714
11722
|
filterWholeInput: {
|
|
11715
11723
|
id: 'MultiValueSearchInput.buttonLabel',
|
|
11716
11724
|
description: 'Label for "MultiValueSearchInput" filter whole input.',
|
|
@@ -11723,8 +11731,8 @@ var messages$1 = reactIntl.defineMessages({
|
|
|
11723
11731
|
}
|
|
11724
11732
|
});
|
|
11725
11733
|
|
|
11726
|
-
function ownKeys$
|
|
11727
|
-
function _objectSpread$
|
|
11734
|
+
function ownKeys$7(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11735
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$7(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$7(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11728
11736
|
var styles$1 = {
|
|
11729
11737
|
"container": "multi-value-search-input-module__container___2u64d",
|
|
11730
11738
|
"searchInput": "multi-value-search-input-module__searchInput___363nj",
|
|
@@ -11748,7 +11756,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11748
11756
|
}),
|
|
11749
11757
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11750
11758
|
truncate: true,
|
|
11751
|
-
intlMessage: _objectSpread$
|
|
11759
|
+
intlMessage: _objectSpread$7(_objectSpread$7({}, messages$2.filterWholeInput), {}, {
|
|
11752
11760
|
values: {
|
|
11753
11761
|
values: "\"".concat(props.value, "\"")
|
|
11754
11762
|
}
|
|
@@ -11761,7 +11769,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11761
11769
|
}),
|
|
11762
11770
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11763
11771
|
truncate: true,
|
|
11764
|
-
intlMessage: _objectSpread$
|
|
11772
|
+
intlMessage: _objectSpread$7(_objectSpread$7({}, messages$2.filterSeparateValues), {}, {
|
|
11765
11773
|
values: {
|
|
11766
11774
|
values: "\"".concat(props.multiValue.join('", "'), "\"") || props.value
|
|
11767
11775
|
}
|
|
@@ -11872,8 +11880,8 @@ const MultiValueSearchInput = props => {
|
|
|
11872
11880
|
};
|
|
11873
11881
|
MultiValueSearchInput.displayName = 'MultiValueSearchInput';
|
|
11874
11882
|
|
|
11875
|
-
function ownKeys$
|
|
11876
|
-
function _objectSpread$
|
|
11883
|
+
function ownKeys$6(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11884
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$6(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11877
11885
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11878
11886
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11879
11887
|
var styles = {
|
|
@@ -11936,7 +11944,7 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11936
11944
|
value: function render() {
|
|
11937
11945
|
const separators = getSeparatorsForLocale(this.props.numberFormat);
|
|
11938
11946
|
const dataAttributes = filterDataAttributes(this.props);
|
|
11939
|
-
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$
|
|
11947
|
+
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$6({
|
|
11940
11948
|
placeholder: this.props.placeholder,
|
|
11941
11949
|
htmlRef: this.registerInputRef,
|
|
11942
11950
|
options: {
|
|
@@ -12232,8 +12240,8 @@ const createNextSortDefinition = _ref => {
|
|
|
12232
12240
|
}
|
|
12233
12241
|
};
|
|
12234
12242
|
|
|
12235
|
-
function ownKeys$
|
|
12236
|
-
function _objectSpread$
|
|
12243
|
+
function ownKeys$5(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12244
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$5(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$5(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12237
12245
|
/**
|
|
12238
12246
|
* Creates reducer
|
|
12239
12247
|
* @param {Object} initialState
|
|
@@ -12249,13 +12257,13 @@ function createReducer(initialState, actionHandlers) {
|
|
|
12249
12257
|
|
|
12250
12258
|
// In case reducer ignored action, avoid creating new object
|
|
12251
12259
|
const newSubstate = reduce(newState, action);
|
|
12252
|
-
if (newSubstate) return _objectSpread$
|
|
12260
|
+
if (newSubstate) return _objectSpread$5(_objectSpread$5({}, newState), newSubstate);
|
|
12253
12261
|
return newState;
|
|
12254
12262
|
};
|
|
12255
12263
|
}
|
|
12256
12264
|
|
|
12257
|
-
function ownKeys$
|
|
12258
|
-
function _objectSpread$
|
|
12265
|
+
function ownKeys$4(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12266
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12259
12267
|
function updateStatusInList(mergeData) {
|
|
12260
12268
|
return (state, _ref) => {
|
|
12261
12269
|
let payload = _ref.payload;
|
|
@@ -12264,15 +12272,15 @@ function updateStatusInList(mergeData) {
|
|
|
12264
12272
|
results[index] = mergeData(payload, results[index]);
|
|
12265
12273
|
results[index].checked = false;
|
|
12266
12274
|
return {
|
|
12267
|
-
currentQueryResult: _objectSpread$
|
|
12275
|
+
currentQueryResult: _objectSpread$4(_objectSpread$4({}, state.currentQueryResult), {}, {
|
|
12268
12276
|
results
|
|
12269
12277
|
})
|
|
12270
12278
|
};
|
|
12271
12279
|
};
|
|
12272
12280
|
}
|
|
12273
12281
|
|
|
12274
|
-
function ownKeys$
|
|
12275
|
-
function _objectSpread$
|
|
12282
|
+
function ownKeys$3(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12283
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$3(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12276
12284
|
const identity = value => value;
|
|
12277
12285
|
function createResourceReducer(options) {
|
|
12278
12286
|
const _options$constantsPre = options.constantsPrefix,
|
|
@@ -12282,7 +12290,7 @@ function createResourceReducer(options) {
|
|
|
12282
12290
|
_options$initialState = options.initialState,
|
|
12283
12291
|
extendInitialState = _options$initialState === void 0 ? {} : _options$initialState;
|
|
12284
12292
|
const mergeData = options.mergeData || identity;
|
|
12285
|
-
const initialState = _objectSpread$
|
|
12293
|
+
const initialState = _objectSpread$3({
|
|
12286
12294
|
currentQueryResult: {
|
|
12287
12295
|
count: 0,
|
|
12288
12296
|
offset: 0,
|
|
@@ -12302,7 +12310,7 @@ function createResourceReducer(options) {
|
|
|
12302
12310
|
let payload = _ref.payload;
|
|
12303
12311
|
const results = state.currentQueryResult.results;
|
|
12304
12312
|
return {
|
|
12305
|
-
currentQueryResult: _objectSpread$
|
|
12313
|
+
currentQueryResult: _objectSpread$3(_objectSpread$3({}, state.currentQueryResult), {}, {
|
|
12306
12314
|
results: _filterInstanceProperty__default["default"](results).call(results, _ref2 => {
|
|
12307
12315
|
let id = _ref2.id;
|
|
12308
12316
|
return id !== payload.id;
|
|
@@ -12380,17 +12388,17 @@ function isValidISODateTime(_ref3) {
|
|
|
12380
12388
|
}
|
|
12381
12389
|
|
|
12382
12390
|
const validateSingleOptionEnum = (selectedOption, intl) => {
|
|
12383
|
-
if (validateSingleFilter(selectedOption)) return intl.formatMessage(messages$
|
|
12391
|
+
if (validateSingleFilter(selectedOption)) return intl.formatMessage(messages$K.required);
|
|
12384
12392
|
return null;
|
|
12385
12393
|
};
|
|
12386
12394
|
const validateMultiOptionEnum = (selectedOption, intl) => {
|
|
12387
|
-
if (validateSingleFilter(selectedOption) || selectedOption.value.length === 0) return intl.formatMessage(messages$
|
|
12395
|
+
if (validateSingleFilter(selectedOption) || selectedOption.value.length === 0) return intl.formatMessage(messages$K.required);
|
|
12388
12396
|
return null;
|
|
12389
12397
|
};
|
|
12390
12398
|
|
|
12391
12399
|
// eslint-disable-next-line import/prefer-default-export
|
|
12392
12400
|
const validateText = (text, intl) => {
|
|
12393
|
-
if (validateSingleFilter(text)) return intl.formatMessage(messages$
|
|
12401
|
+
if (validateSingleFilter(text)) return intl.formatMessage(messages$K.required);
|
|
12394
12402
|
return null;
|
|
12395
12403
|
};
|
|
12396
12404
|
|
|
@@ -12477,7 +12485,7 @@ const safelyAddFallback = function (string) {
|
|
|
12477
12485
|
return string === '' ? fallback : string !== null && string !== void 0 ? string : fallback;
|
|
12478
12486
|
};
|
|
12479
12487
|
|
|
12480
|
-
var messages = reactIntl.defineMessages({
|
|
12488
|
+
var messages$1 = reactIntl.defineMessages({
|
|
12481
12489
|
booleanAttributeTrue: {
|
|
12482
12490
|
id: 'Products.ProductList.column.booleanTrue',
|
|
12483
12491
|
description: 'The message to show to user for displaying boolean attribute value of true',
|
|
@@ -12670,7 +12678,7 @@ const getAttributeValueByType = _ref12 => {
|
|
|
12670
12678
|
case 'boolean':
|
|
12671
12679
|
{
|
|
12672
12680
|
if (isNil__default["default"](value)) return constants.NO_VALUE_FALLBACK;
|
|
12673
|
-
return value ? intl.formatMessage(messages.booleanAttributeTrue) : intl.formatMessage(messages.booleanAttributeFalse);
|
|
12681
|
+
return value ? intl.formatMessage(messages$1.booleanAttributeTrue) : intl.formatMessage(messages$1.booleanAttributeFalse);
|
|
12674
12682
|
}
|
|
12675
12683
|
case 'reference':
|
|
12676
12684
|
return value.id || constants.NO_VALUE_FALLBACK;
|
|
@@ -12806,8 +12814,8 @@ const getTimeZoneId = memoize__default["default"]((selectedTimeZone, timeZones)
|
|
|
12806
12814
|
} else {
|
|
12807
12815
|
var _context3;
|
|
12808
12816
|
const fallbackTimeZoneId = _findInstanceProperty__default["default"](_context3 = _Object$keys__default["default"](timeZones)).call(_context3, timeZoneId => {
|
|
12809
|
-
var _timeZones$timeZoneId
|
|
12810
|
-
return (_timeZones$timeZoneId = timeZones[timeZoneId]) === null || _timeZones$timeZoneId === void 0
|
|
12817
|
+
var _timeZones$timeZoneId;
|
|
12818
|
+
return (_timeZones$timeZoneId = timeZones[timeZoneId]) === null || _timeZones$timeZoneId === void 0 || (_timeZones$timeZoneId = _timeZones$timeZoneId.translationFor) === null || _timeZones$timeZoneId === void 0 ? void 0 : _someInstanceProperty__default["default"](_timeZones$timeZoneId).call(_timeZones$timeZoneId, fallbackTimeZone => fallbackTimeZone === selectedTimeZone);
|
|
12811
12819
|
});
|
|
12812
12820
|
if (fallbackTimeZoneId !== null && fallbackTimeZoneId !== void 0 && fallbackTimeZoneId.length) {
|
|
12813
12821
|
return fallbackTimeZoneId.toString();
|
|
@@ -12823,8 +12831,8 @@ const getTimeZoneLabel = memoize__default["default"]((selectedTimeZone, timeZone
|
|
|
12823
12831
|
return _concatInstanceProperty__default["default"](_context4 = "(GMT ".concat(timeZoneData.offset, ") ")).call(_context4, timeZoneData.name);
|
|
12824
12832
|
});
|
|
12825
12833
|
|
|
12826
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12827
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12834
|
+
function ownKeys$2(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12835
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$2(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$2(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12828
12836
|
function withPendingRequests() {
|
|
12829
12837
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pendingRequests';
|
|
12830
12838
|
return Component => {
|
|
@@ -12833,13 +12841,184 @@ function withPendingRequests() {
|
|
|
12833
12841
|
const pendingProp = {
|
|
12834
12842
|
[propName]: pendingRequests
|
|
12835
12843
|
};
|
|
12836
|
-
return jsxRuntime.jsx(Component, _objectSpread(_objectSpread({}, props), pendingProp));
|
|
12844
|
+
return jsxRuntime.jsx(Component, _objectSpread$2(_objectSpread$2({}, props), pendingProp));
|
|
12837
12845
|
};
|
|
12838
12846
|
WrappedComponent.displayName = wrapDisplayName(Component, 'withPendingRequests');
|
|
12839
12847
|
return WrappedComponent;
|
|
12840
12848
|
};
|
|
12841
12849
|
}
|
|
12842
12850
|
|
|
12851
|
+
var messages = reactIntl.defineMessages({
|
|
12852
|
+
noCustomFields: {
|
|
12853
|
+
id: 'CustomTypesSubform.noCustomFields',
|
|
12854
|
+
description: 'The label when there are no custom fields defined',
|
|
12855
|
+
defaultMessage: 'There are no custom fields related to this type.'
|
|
12856
|
+
},
|
|
12857
|
+
noCustomType: {
|
|
12858
|
+
id: 'CustomTypesSubform.noCustomType',
|
|
12859
|
+
description: 'The label when there is no custom type selected',
|
|
12860
|
+
defaultMessage: 'No custom type is selected. Please select a custom type from the dropdown.'
|
|
12861
|
+
},
|
|
12862
|
+
noTypes: {
|
|
12863
|
+
id: 'CustomTypesSubform.noTypes',
|
|
12864
|
+
description: 'The label when there is no custom type defined in the project',
|
|
12865
|
+
defaultMessage: 'There are no custom types defined. To extend the information, create custom types through the API first.'
|
|
12866
|
+
},
|
|
12867
|
+
title: {
|
|
12868
|
+
id: 'CustomTypesSubform.title',
|
|
12869
|
+
description: 'Fallback title for the subform',
|
|
12870
|
+
defaultMessage: 'Custom fields'
|
|
12871
|
+
},
|
|
12872
|
+
typesPlaceholder: {
|
|
12873
|
+
id: 'CustomTypesSubform.typesPlaceholder',
|
|
12874
|
+
description: 'The placeholder for the types',
|
|
12875
|
+
defaultMessage: 'Select...'
|
|
12876
|
+
}
|
|
12877
|
+
});
|
|
12878
|
+
|
|
12879
|
+
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12880
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12881
|
+
const typeDefinitionsExist = typeDefinitions => {
|
|
12882
|
+
return typeDefinitions.length > 0;
|
|
12883
|
+
};
|
|
12884
|
+
const typeDefinitionSelected = formValues => {
|
|
12885
|
+
var _formValues$FIELD_NAM, _formValues$FIELD_NAM2;
|
|
12886
|
+
return ((_formValues$FIELD_NAM = formValues[FIELD_NAME]) === null || _formValues$FIELD_NAM === void 0 ? void 0 : _formValues$FIELD_NAM.type) && ((_formValues$FIELD_NAM2 = formValues[FIELD_NAME]) === null || _formValues$FIELD_NAM2 === void 0 || (_formValues$FIELD_NAM2 = _formValues$FIELD_NAM2.type) === null || _formValues$FIELD_NAM2 === void 0 ? void 0 : _formValues$FIELD_NAM2.obj);
|
|
12887
|
+
};
|
|
12888
|
+
const typeDefinitionContainsFieldDefinitions = formValues => {
|
|
12889
|
+
return formValues[FIELD_NAME].type.obj.key && formValues[FIELD_NAME].type.obj.fieldDefinitions.length > 0;
|
|
12890
|
+
};
|
|
12891
|
+
const CustomFieldsInputWrapper = _ref => {
|
|
12892
|
+
let typeDefinitions = _ref.typeDefinitions,
|
|
12893
|
+
isReadOnly = _ref.isReadOnly;
|
|
12894
|
+
const _useFormikContext = formik.useFormikContext(),
|
|
12895
|
+
formValues = _valuesInstanceProperty__default["default"](_useFormikContext);
|
|
12896
|
+
if (!typeDefinitionsExist(typeDefinitions)) {
|
|
12897
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1({}, messages.noTypes));
|
|
12898
|
+
}
|
|
12899
|
+
if (!typeDefinitionSelected(formValues)) {
|
|
12900
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1({}, messages.noCustomType));
|
|
12901
|
+
}
|
|
12902
|
+
if (!typeDefinitionContainsFieldDefinitions(formValues)) {
|
|
12903
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1({}, messages.noCustomFields));
|
|
12904
|
+
}
|
|
12905
|
+
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
12906
|
+
max: "scale",
|
|
12907
|
+
children: jsxRuntime.jsx(CustomFields, {
|
|
12908
|
+
isReadOnly: isReadOnly,
|
|
12909
|
+
name: "".concat(FIELD_NAME, ".fields"),
|
|
12910
|
+
fieldDefinitions: formValues[FIELD_NAME].type.obj.fieldDefinitions
|
|
12911
|
+
})
|
|
12912
|
+
});
|
|
12913
|
+
};
|
|
12914
|
+
CustomFieldsInputWrapper.displayName = 'CustomFieldsInputWrapper';
|
|
12915
|
+
|
|
12916
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12917
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12918
|
+
const FIELD_NAME = 'custom';
|
|
12919
|
+
|
|
12920
|
+
// Creates dropdown options
|
|
12921
|
+
const mapTypeDefinitionsToOptions = (typeDefinitions, language, languages, selectedTypeDefinitionId) => {
|
|
12922
|
+
return _mapInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => ({
|
|
12923
|
+
isDisabled: selectedTypeDefinitionId && selectedTypeDefinitionId === typeDefinition.type.id,
|
|
12924
|
+
value: typeDefinition.type.key,
|
|
12925
|
+
label: l10n.formatLocalizedString(typeDefinition.type, {
|
|
12926
|
+
key: 'name',
|
|
12927
|
+
locale: language,
|
|
12928
|
+
fallbackOrder: languages
|
|
12929
|
+
})
|
|
12930
|
+
}));
|
|
12931
|
+
};
|
|
12932
|
+
|
|
12933
|
+
// Used to generate form state when the user selects a type definition from the dropdown
|
|
12934
|
+
const createFormStateFromTypeDefinition = selectedTypeDefinition => {
|
|
12935
|
+
return {
|
|
12936
|
+
type: {
|
|
12937
|
+
id: selectedTypeDefinition.type.id,
|
|
12938
|
+
obj: {
|
|
12939
|
+
fieldDefinitions: selectedTypeDefinition.type.fieldDefinitions,
|
|
12940
|
+
key: selectedTypeDefinition.type.key
|
|
12941
|
+
}
|
|
12942
|
+
},
|
|
12943
|
+
fields: {}
|
|
12944
|
+
};
|
|
12945
|
+
};
|
|
12946
|
+
const CustomTypeSubform = _ref => {
|
|
12947
|
+
var _formValues$FIELD_NAM, _formValues$FIELD_NAM2;
|
|
12948
|
+
let typeDefinitions = _ref.typeDefinitions,
|
|
12949
|
+
isReadOnly = _ref.isReadOnly;
|
|
12950
|
+
const _useFormikContext = formik.useFormikContext(),
|
|
12951
|
+
formValues = _valuesInstanceProperty__default["default"](_useFormikContext),
|
|
12952
|
+
setFieldValue = _useFormikContext.setFieldValue;
|
|
12953
|
+
const _useIntl = reactIntl.useIntl(),
|
|
12954
|
+
formatMessage = _useIntl.formatMessage;
|
|
12955
|
+
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
12956
|
+
language: applicationContext.dataLocale,
|
|
12957
|
+
languages: applicationContext.project.languages
|
|
12958
|
+
})),
|
|
12959
|
+
language = _useApplicationContex.language,
|
|
12960
|
+
languages = _useApplicationContex.languages;
|
|
12961
|
+
const handleTypeDefinitionSelect = React.useCallback(event => {
|
|
12962
|
+
const selectedTypeDefinition = _findInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => typeDefinition.type.key === event.target.value);
|
|
12963
|
+
if (selectedTypeDefinition) {
|
|
12964
|
+
const nextCustom = createFormStateFromTypeDefinition(selectedTypeDefinition);
|
|
12965
|
+
setFieldValue(FIELD_NAME, nextCustom);
|
|
12966
|
+
} else {
|
|
12967
|
+
// if the dropdown selector is cleared
|
|
12968
|
+
const emptyFormState = CustomFieldTypeDefinitionsConnector$1.createEmptyCustomFields(formValues[FIELD_NAME].type);
|
|
12969
|
+
setFieldValue(FIELD_NAME, emptyFormState);
|
|
12970
|
+
}
|
|
12971
|
+
}, [typeDefinitions, setFieldValue, formValues]);
|
|
12972
|
+
return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
12973
|
+
header: jsxRuntime.jsx(uiKit.CollapsiblePanel.Header, {
|
|
12974
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread({}, messages.title))
|
|
12975
|
+
}),
|
|
12976
|
+
headerControls: typeDefinitions.length > 0 && jsxRuntime.jsx("div", {
|
|
12977
|
+
css: /*#__PURE__*/react$1.css("min-width:", uiKit.designTokens.constraint10, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:CustomTypeSubform;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS10eXBlLXN1YmZvcm0uanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtHb0IiLCJmaWxlIjoiY3VzdG9tLXR5cGUtc3ViZm9ybS5qc3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyB1c2VDYWxsYmFjayB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyB1c2VGb3JtaWtDb250ZXh0IH0gZnJvbSAnZm9ybWlrJztcbmltcG9ydCB7IEZvcm1hdHRlZE1lc3NhZ2UsIHVzZUludGwgfSBmcm9tICdyZWFjdC1pbnRsJztcbmltcG9ydCB7IHVzZUFwcGxpY2F0aW9uQ29udGV4dCB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL2FwcGxpY2F0aW9uLXNoZWxsLWNvbm5lY3RvcnMnO1xuaW1wb3J0IEN1c3RvbUZpZWxkVHlwZURlZmluaXRpb25zQ29ubmVjdG9yIGZyb20gJy4uL2N1c3RvbS1maWVsZC10eXBlLWRlZmluaXRpb25zLWNvbm5lY3Rvcic7XG5pbXBvcnQgeyBmb3JtYXRMb2NhbGl6ZWRTdHJpbmcgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9sMTBuJztcbmltcG9ydCB7XG4gIENvbGxhcHNpYmxlUGFuZWwsXG4gIFNlbGVjdElucHV0LFxuICBkZXNpZ25Ub2tlbnMsXG59IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL3VpLWtpdCc7XG5pbXBvcnQgbWVzc2FnZXMgZnJvbSAnLi9tZXNzYWdlcyc7XG5pbXBvcnQgQ3VzdG9tRmllbGRzSW5wdXRXcmFwcGVyIGZyb20gJy4vY3VzdG9tLWZpZWxkcy1pbnB1dC13cmFwcGVyJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gVE9ETzogbWFrZSBjb25maWd1cmFibGUgYnkgY29uc3VtZXJzP1xuZXhwb3J0IGNvbnN0IEZJRUxEX05BTUUgPSAnY3VzdG9tJztcblxuLy8gQ3JlYXRlcyBkcm9wZG93biBvcHRpb25zXG5leHBvcnQgY29uc3QgbWFwVHlwZURlZmluaXRpb25zVG9PcHRpb25zID0gKFxuICB0eXBlRGVmaW5pdGlvbnMsXG4gIGxhbmd1YWdlLFxuICBsYW5ndWFnZXMsXG4gIHNlbGVjdGVkVHlwZURlZmluaXRpb25JZFxuKSA9PiB7XG4gIHJldHVybiB0eXBlRGVmaW5pdGlvbnMubWFwKCh0eXBlRGVmaW5pdGlvbikgPT4gKHtcbiAgICBpc0Rpc2FibGVkOlxuICAgICAgc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbklkICYmXG4gICAgICBzZWxlY3RlZFR5cGVEZWZpbml0aW9uSWQgPT09IHR5cGVEZWZpbml0aW9uLnR5cGUuaWQsXG4gICAgdmFsdWU6IHR5cGVEZWZpbml0aW9uLnR5cGUua2V5LFxuICAgIGxhYmVsOiBmb3JtYXRMb2NhbGl6ZWRTdHJpbmcodHlwZURlZmluaXRpb24udHlwZSwge1xuICAgICAga2V5OiAnbmFtZScsXG4gICAgICBsb2NhbGU6IGxhbmd1YWdlLFxuICAgICAgZmFsbGJhY2tPcmRlcjogbGFuZ3VhZ2VzLFxuICAgIH0pLFxuICB9KSk7XG59O1xuXG4vLyBVc2VkIHRvIGdlbmVyYXRlIGZvcm0gc3RhdGUgd2hlbiB0aGUgdXNlciBzZWxlY3RzIGEgdHlwZSBkZWZpbml0aW9uIGZyb20gdGhlIGRyb3Bkb3duXG5jb25zdCBjcmVhdGVGb3JtU3RhdGVGcm9tVHlwZURlZmluaXRpb24gPSAoc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbikgPT4ge1xuICByZXR1cm4ge1xuICAgIHR5cGU6IHtcbiAgICAgIGlkOiBzZWxlY3RlZFR5cGVEZWZpbml0aW9uLnR5cGUuaWQsXG4gICAgICBvYmo6IHtcbiAgICAgICAgZmllbGREZWZpbml0aW9uczogc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbi50eXBlLmZpZWxkRGVmaW5pdGlvbnMsXG4gICAgICAgIGtleTogc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbi50eXBlLmtleSxcbiAgICAgIH0sXG4gICAgfSxcbiAgICBmaWVsZHM6IHt9LFxuICB9O1xufTtcblxuY29uc3QgQ3VzdG9tVHlwZVN1YmZvcm0gPSAoeyB0eXBlRGVmaW5pdGlvbnMsIGlzUmVhZE9ubHkgfSkgPT4ge1xuICBjb25zdCB7IHZhbHVlczogZm9ybVZhbHVlcywgc2V0RmllbGRWYWx1ZSB9ID0gdXNlRm9ybWlrQ29udGV4dCgpO1xuICBjb25zdCB7IGZvcm1hdE1lc3NhZ2UgfSA9IHVzZUludGwoKTtcbiAgY29uc3QgeyBsYW5ndWFnZSwgbGFuZ3VhZ2VzIH0gPSB1c2VBcHBsaWNhdGlvbkNvbnRleHQoXG4gICAgKGFwcGxpY2F0aW9uQ29udGV4dCkgPT4gKHtcbiAgICAgIGxhbmd1YWdlOiBhcHBsaWNhdGlvbkNvbnRleHQuZGF0YUxvY2FsZSxcbiAgICAgIGxhbmd1YWdlczogYXBwbGljYXRpb25Db250ZXh0LnByb2plY3QubGFuZ3VhZ2VzLFxuICAgIH0pXG4gICk7XG5cbiAgY29uc3QgaGFuZGxlVHlwZURlZmluaXRpb25TZWxlY3QgPSB1c2VDYWxsYmFjayhcbiAgICAoZXZlbnQpID0+IHtcbiAgICAgIGNvbnN0IHNlbGVjdGVkVHlwZURlZmluaXRpb24gPSB0eXBlRGVmaW5pdGlvbnMuZmluZChcbiAgICAgICAgKHR5cGVEZWZpbml0aW9uKSA9PiB0eXBlRGVmaW5pdGlvbi50eXBlLmtleSA9PT0gZXZlbnQudGFyZ2V0LnZhbHVlXG4gICAgICApO1xuXG4gICAgICBpZiAoc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbikge1xuICAgICAgICBjb25zdCBuZXh0Q3VzdG9tID0gY3JlYXRlRm9ybVN0YXRlRnJvbVR5cGVEZWZpbml0aW9uKFxuICAgICAgICAgIHNlbGVjdGVkVHlwZURlZmluaXRpb25cbiAgICAgICAgKTtcblxuICAgICAgICBzZXRGaWVsZFZhbHVlKEZJRUxEX05BTUUsIG5leHRDdXN0b20pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gaWYgdGhlIGRyb3Bkb3duIHNlbGVjdG9yIGlzIGNsZWFyZWRcbiAgICAgICAgY29uc3QgZW1wdHlGb3JtU3RhdGUgPVxuICAgICAgICAgIEN1c3RvbUZpZWxkVHlwZURlZmluaXRpb25zQ29ubmVjdG9yLmNyZWF0ZUVtcHR5Q3VzdG9tRmllbGRzKFxuICAgICAgICAgICAgZm9ybVZhbHVlc1tGSUVMRF9OQU1FXS50eXBlXG4gICAgICAgICAgKTtcblxuICAgICAgICBzZXRGaWVsZFZhbHVlKEZJRUxEX05BTUUsIGVtcHR5Rm9ybVN0YXRlKTtcbiAgICAgIH1cbiAgICB9LFxuICAgIFt0eXBlRGVmaW5pdGlvbnMsIHNldEZpZWxkVmFsdWUsIGZvcm1WYWx1ZXNdXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8Q29sbGFwc2libGVQYW5lbFxuICAgICAgaGVhZGVyPXtcbiAgICAgICAgPENvbGxhcHNpYmxlUGFuZWwuSGVhZGVyPlxuICAgICAgICAgIDxGb3JtYXR0ZWRNZXNzYWdlIHsuLi5tZXNzYWdlcy50aXRsZX0gLz5cbiAgICAgICAgPC9Db2xsYXBzaWJsZVBhbmVsLkhlYWRlcj5cbiAgICAgIH1cbiAgICAgIGhlYWRlckNvbnRyb2xzPXtcbiAgICAgICAgdHlwZURlZmluaXRpb25zLmxlbmd0aCA+IDAgJiYgKFxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgICAgICBtaW4td2lkdGg6ICR7ZGVzaWduVG9rZW5zLmNvbnN0cmFpbnQxMH07XG4gICAgICAgICAgICBgfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxTZWxlY3RJbnB1dFxuICAgICAgICAgICAgICBpc0NsZWFyYWJsZVxuICAgICAgICAgICAgICBkYXRhLXRlc3RpZD1cImN1c3RvbS10eXBlLXNlbGVjdFwiXG4gICAgICAgICAgICAgIG5hbWU9e2Ake0ZJRUxEX05BTUV9LnR5cGUub2JqLmtleWB9XG4gICAgICAgICAgICAgIG9wdGlvbnM9e21hcFR5cGVEZWZpbml0aW9uc1RvT3B0aW9ucyhcbiAgICAgICAgICAgICAgICB0eXBlRGVmaW5pdGlvbnMsXG4gICAgICAgICAgICAgICAgbGFuZ3VhZ2UsXG4gICAgICAgICAgICAgICAgbGFuZ3VhZ2VzLFxuICAgICAgICAgICAgICAgIGZvcm1WYWx1ZXNbRklFTERfTkFNRV0/LnR5cGU/LmlkXG4gICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgIHZhbHVlPXtmb3JtVmFsdWVzW0ZJRUxEX05BTUVdPy50eXBlPy5vYmo/LmtleX1cbiAgICAgICAgICAgICAgb25DaGFuZ2U9e2hhbmRsZVR5cGVEZWZpbml0aW9uU2VsZWN0fVxuICAgICAgICAgICAgICBwbGFjZWhvbGRlcj17Zm9ybWF0TWVzc2FnZShtZXNzYWdlcy50eXBlc1BsYWNlaG9sZGVyKX1cbiAgICAgICAgICAgICAgaXNSZWFkT25seT17aXNSZWFkT25seX1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIClcbiAgICAgIH1cbiAgICAgIGhlYWRlckNvbnRyb2xzQWxpZ25tZW50PVwibGVmdFwiXG4gICAgPlxuICAgICAgPEN1c3RvbUZpZWxkc0lucHV0V3JhcHBlclxuICAgICAgICB0eXBlRGVmaW5pdGlvbnM9e3R5cGVEZWZpbml0aW9uc31cbiAgICAgICAgaXNSZWFkT25seT17aXNSZWFkT25seX1cbiAgICAgIC8+XG4gICAgPC9Db2xsYXBzaWJsZVBhbmVsPlxuICApO1xufTtcblxuQ3VzdG9tVHlwZVN1YmZvcm0uZGlzcGxheU5hbWUgPSAnQ3VzdG9tVHlwZVN1YmZvcm0nO1xuQ3VzdG9tVHlwZVN1YmZvcm0ucHJvcFR5cGVzID0ge1xuICB0eXBlRGVmaW5pdGlvbnM6IFByb3BUeXBlcy5hcnJheS5pc1JlcXVpcmVkLFxuICBpc1JlYWRPbmx5OiBQcm9wVHlwZXMuYm9vbCxcbn07XG5cbmV4cG9ydCBkZWZhdWx0IEN1c3RvbVR5cGVTdWJmb3JtO1xuIl19 */"),
|
|
12978
|
+
children: jsxRuntime.jsx(uiKit.SelectInput, {
|
|
12979
|
+
isClearable: true,
|
|
12980
|
+
"data-testid": "custom-type-select",
|
|
12981
|
+
name: "".concat(FIELD_NAME, ".type.obj.key"),
|
|
12982
|
+
options: mapTypeDefinitionsToOptions(typeDefinitions, language, languages, (_formValues$FIELD_NAM = formValues[FIELD_NAME]) === null || _formValues$FIELD_NAM === void 0 || (_formValues$FIELD_NAM = _formValues$FIELD_NAM.type) === null || _formValues$FIELD_NAM === void 0 ? void 0 : _formValues$FIELD_NAM.id),
|
|
12983
|
+
value: (_formValues$FIELD_NAM2 = formValues[FIELD_NAME]) === null || _formValues$FIELD_NAM2 === void 0 || (_formValues$FIELD_NAM2 = _formValues$FIELD_NAM2.type) === null || _formValues$FIELD_NAM2 === void 0 || (_formValues$FIELD_NAM2 = _formValues$FIELD_NAM2.obj) === null || _formValues$FIELD_NAM2 === void 0 ? void 0 : _formValues$FIELD_NAM2.key,
|
|
12984
|
+
onChange: handleTypeDefinitionSelect,
|
|
12985
|
+
placeholder: formatMessage(messages.typesPlaceholder),
|
|
12986
|
+
isReadOnly: isReadOnly
|
|
12987
|
+
})
|
|
12988
|
+
}),
|
|
12989
|
+
headerControlsAlignment: "left",
|
|
12990
|
+
children: jsxRuntime.jsx(CustomFieldsInputWrapper, {
|
|
12991
|
+
typeDefinitions: typeDefinitions,
|
|
12992
|
+
isReadOnly: isReadOnly
|
|
12993
|
+
})
|
|
12994
|
+
});
|
|
12995
|
+
};
|
|
12996
|
+
CustomTypeSubform.displayName = 'CustomTypeSubform';
|
|
12997
|
+
|
|
12998
|
+
const CustomFieldsFormField = _ref => {
|
|
12999
|
+
let resources = _ref.resources,
|
|
13000
|
+
isReadOnly = _ref.isReadOnly;
|
|
13001
|
+
const projectKey = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.project.key);
|
|
13002
|
+
return jsxRuntime.jsx(CustomFieldTypeDefinitionsConnector$1, {
|
|
13003
|
+
resources: resources,
|
|
13004
|
+
projectKey: projectKey,
|
|
13005
|
+
children: _ref2 => {
|
|
13006
|
+
var _context;
|
|
13007
|
+
let _ref2$customFieldType = _ref2.customFieldTypeDefinitionsFetcher,
|
|
13008
|
+
isLoading = _ref2$customFieldType.isLoading,
|
|
13009
|
+
customFieldTypeDefinitions = _ref2$customFieldType.customFieldTypeDefinitions;
|
|
13010
|
+
if (isLoading) {
|
|
13011
|
+
return jsxRuntime.jsx(uiKit.LoadingSpinner, {});
|
|
13012
|
+
}
|
|
13013
|
+
const typeDefinitions = _mapInstanceProperty__default["default"](_context = customFieldTypeDefinitions.results).call(_context, CustomFieldTypeDefinitionsConnector$1.graphQlDocToForm);
|
|
13014
|
+
return jsxRuntime.jsx(CustomTypeSubform, {
|
|
13015
|
+
typeDefinitions: typeDefinitions,
|
|
13016
|
+
isReadOnly: isReadOnly
|
|
13017
|
+
});
|
|
13018
|
+
}
|
|
13019
|
+
});
|
|
13020
|
+
};
|
|
13021
|
+
|
|
12843
13022
|
var CategorySearchPickerOptionFragment = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "CategorySearchPickerOptionFragment" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CategorySearch" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "externalId" }, 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: "slugAllLocales" }, 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: "parent" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ 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: "ancestors" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ 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: 685, source: { body: "query SearchCategoryReference($locale: Locale!, $text: String!) {\n categories: categoryAutocomplete(locale: $locale, text: $text) {\n results {\n ...CategorySearchPickerOptionFragment\n }\n }\n}\n\nquery FetchCategoriesByIds($where: String!) {\n categories(where: $where) {\n results {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nfragment CategorySearchPickerOptionFragment on CategorySearch {\n id\n externalId\n nameAllLocales {\n locale\n value\n }\n slugAllLocales {\n locale\n value\n }\n parent {\n nameAllLocales {\n locale\n value\n }\n }\n ancestors {\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
12844
13023
|
|
|
12845
13024
|
exports.BooleanField = booleanField;
|
|
@@ -12851,9 +13030,10 @@ exports.CenteredLoadingSpinner = CenteredLoadingSpinner;
|
|
|
12851
13030
|
exports.ChannelPickerInput = ChannelPickerInput;
|
|
12852
13031
|
exports.CountriesPicker = CountriesPicker;
|
|
12853
13032
|
exports.CustomFieldDefinitionsConnector = customFieldDefinitionsConnector;
|
|
12854
|
-
exports.CustomFieldTypeDefinitionsConnector =
|
|
13033
|
+
exports.CustomFieldTypeDefinitionsConnector = CustomFieldTypeDefinitionsConnector$1;
|
|
12855
13034
|
exports.CustomFields = CustomFields;
|
|
12856
13035
|
exports.CustomFieldsErrorTextNotification = CustomFieldsErrorTextNotification;
|
|
13036
|
+
exports.CustomFieldsFormField = CustomFieldsFormField;
|
|
12857
13037
|
exports.CustomerGroupPickerInput = CustomerGroupPickerInput;
|
|
12858
13038
|
exports.DefaultPageSizes = DefaultPageSizes;
|
|
12859
13039
|
exports.Divider = Divider;
|
|
@@ -12886,10 +13066,10 @@ exports.allowedProperties = allowedProperties;
|
|
|
12886
13066
|
exports.and = and;
|
|
12887
13067
|
exports.attributesMapToNameValuePairs = attributesMapToNameValuePairs;
|
|
12888
13068
|
exports.base64ToString = base64ToString;
|
|
12889
|
-
exports.booleanMessages = messages$
|
|
13069
|
+
exports.booleanMessages = messages$8;
|
|
12890
13070
|
exports.buildSearchQuery = buildSearchQuery;
|
|
12891
13071
|
exports.businessRoleConstants = businessRoleConstants;
|
|
12892
|
-
exports.businessRoleMessages = messages$
|
|
13072
|
+
exports.businessRoleMessages = messages$r;
|
|
12893
13073
|
exports.businessRoles = businessRoleKeys;
|
|
12894
13074
|
exports.capitalizeFirst = capitalizeFirst;
|
|
12895
13075
|
exports.clone = clone;
|
|
@@ -12974,7 +13154,7 @@ exports.keepDisplayName = keepDisplayName;
|
|
|
12974
13154
|
exports.mapStoresToOptions = mapStoresToOptions;
|
|
12975
13155
|
exports.mapTimeZonesToOptions = mapTimeZonesToOptions;
|
|
12976
13156
|
exports.minusify = minusify;
|
|
12977
|
-
exports.missingValueMessages = messages$
|
|
13157
|
+
exports.missingValueMessages = messages$7;
|
|
12978
13158
|
exports.nameValuePairsToMap = nameValuePairsToMap;
|
|
12979
13159
|
exports.normalizeProductSettings = normalizeProductSettings;
|
|
12980
13160
|
exports.not = not;
|
|
@@ -12991,7 +13171,7 @@ exports.resolveStatusType = resolveStatusType;
|
|
|
12991
13171
|
exports.safelyAddFallback = safelyAddFallback;
|
|
12992
13172
|
exports.sanitize = sanitize;
|
|
12993
13173
|
exports.searchCategories = searchCategories;
|
|
12994
|
-
exports.searchInputMessages = messages$
|
|
13174
|
+
exports.searchInputMessages = messages$F;
|
|
12995
13175
|
exports.setDisplayName = setDisplayName;
|
|
12996
13176
|
exports.setToArray = setToArray;
|
|
12997
13177
|
exports.shallowEqual = shallowEqual;
|
|
@@ -13037,7 +13217,7 @@ exports.validateNumber = validateFilter;
|
|
|
13037
13217
|
exports.validateSingleOptionEnum = validateSingleOptionEnum;
|
|
13038
13218
|
exports.validateText = validateText;
|
|
13039
13219
|
exports.validatedInput = validatedInput;
|
|
13040
|
-
exports.validationMessages = messages$
|
|
13220
|
+
exports.validationMessages = messages$K;
|
|
13041
13221
|
exports.withPendingRequests = withPendingRequests;
|
|
13042
13222
|
exports.withProps = withProps;
|
|
13043
13223
|
exports.withRedirectTo = withRedirectTo;
|