@commercetools-frontend/experimental-components 2.0.0 → 3.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.
|
@@ -1708,8 +1708,8 @@ var getFractionDigit = function getFractionDigit(code) {
|
|
|
1708
1708
|
return getData(code, 'fractionDigit');
|
|
1709
1709
|
};
|
|
1710
1710
|
|
|
1711
|
-
function ownKeys$
|
|
1712
|
-
function _objectSpread$
|
|
1711
|
+
function ownKeys$1p(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; }
|
|
1712
|
+
function _objectSpread$1p(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$1p(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$1p(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1713
1713
|
function formatMoneyRangeValue(value, intl) {
|
|
1714
1714
|
var _context;
|
|
1715
1715
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
@@ -1719,7 +1719,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
1719
1719
|
return '';
|
|
1720
1720
|
}
|
|
1721
1721
|
function formatMoneyValue(amount, currency, intl) {
|
|
1722
|
-
return formatMoney$1(_objectSpread$
|
|
1722
|
+
return formatMoney$1(_objectSpread$1p({
|
|
1723
1723
|
centAmount: amount,
|
|
1724
1724
|
fractionDigits: getFractionDigit(currency)
|
|
1725
1725
|
}, currency ? {
|
|
@@ -1736,7 +1736,7 @@ function getFractionedAmount(moneyValue) {
|
|
|
1736
1736
|
}
|
|
1737
1737
|
function formatMoney$1(moneyValue, intl, options) {
|
|
1738
1738
|
var _moneyValue$fractione;
|
|
1739
|
-
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$
|
|
1739
|
+
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$1p({
|
|
1740
1740
|
style: 'currency',
|
|
1741
1741
|
currency: moneyValue.currencyCode,
|
|
1742
1742
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
@@ -1991,8 +1991,8 @@ var wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) {
|
|
|
1991
1991
|
return _concatInstanceProperty__default["default"](_context = "".concat(hocName, "(")).call(_context, getDisplayName(BaseComponent), ")");
|
|
1992
1992
|
};
|
|
1993
1993
|
|
|
1994
|
-
function ownKeys$
|
|
1995
|
-
function _objectSpread$
|
|
1994
|
+
function ownKeys$1o(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; }
|
|
1995
|
+
function _objectSpread$1o(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$1o(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$1o(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1996
1996
|
var injectDataTablePaginationState = function injectDataTablePaginationState(initialValues) {
|
|
1997
1997
|
return function (Component) {
|
|
1998
1998
|
var WithDataTablePaginationState = function WithDataTablePaginationState(props) {
|
|
@@ -2007,7 +2007,7 @@ var injectDataTablePaginationState = function injectDataTablePaginationState(ini
|
|
|
2007
2007
|
key: initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$tableS = initialValues.tableSorting) === null || _initialValues$tableS === void 0 ? void 0 : _initialValues$tableS.key,
|
|
2008
2008
|
order: initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$tableS2 = initialValues.tableSorting) === null || _initialValues$tableS2 === void 0 ? void 0 : _initialValues$tableS2.order
|
|
2009
2009
|
});
|
|
2010
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2010
|
+
return jsxRuntime.jsx(Component, _objectSpread$1o(_objectSpread$1o({}, props), {}, {
|
|
2011
2011
|
dataTablePaginationState: {
|
|
2012
2012
|
page: page,
|
|
2013
2013
|
perPage: perPage,
|
|
@@ -2020,8 +2020,8 @@ var injectDataTablePaginationState = function injectDataTablePaginationState(ini
|
|
|
2020
2020
|
};
|
|
2021
2021
|
};
|
|
2022
2022
|
|
|
2023
|
-
function ownKeys$
|
|
2024
|
-
function _objectSpread$
|
|
2023
|
+
function ownKeys$1n(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; }
|
|
2024
|
+
function _objectSpread$1n(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$1n(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$1n(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2025
2025
|
var injectNotifications = function injectNotifications() {
|
|
2026
2026
|
var propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
2027
2027
|
return function (Component) {
|
|
@@ -2036,31 +2036,31 @@ var injectNotifications = function injectNotifications() {
|
|
|
2036
2036
|
onActionError: onActionError,
|
|
2037
2037
|
hideAllPageNotifications: hideAllPageNotifications
|
|
2038
2038
|
};
|
|
2039
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2039
|
+
return jsxRuntime.jsx(Component, _objectSpread$1n(_objectSpread$1n({}, props), _defineProperty({}, propName, notifications)));
|
|
2040
2040
|
};
|
|
2041
2041
|
WrappedComponent.displayName = "withNotifications(".concat(getDisplayName(Component));
|
|
2042
2042
|
return WrappedComponent;
|
|
2043
2043
|
};
|
|
2044
2044
|
};
|
|
2045
2045
|
|
|
2046
|
-
function ownKeys$
|
|
2047
|
-
function _objectSpread$
|
|
2046
|
+
function ownKeys$1m(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; }
|
|
2047
|
+
function _objectSpread$1m(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$1m(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$1m(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2048
2048
|
function isPropsMapper(mapProps) {
|
|
2049
2049
|
return typeof mapProps === 'function';
|
|
2050
2050
|
}
|
|
2051
2051
|
var withProps = function withProps(mapProps) {
|
|
2052
2052
|
return function (Component) {
|
|
2053
2053
|
var EnhancedWithProps = function EnhancedWithProps(ownProps) {
|
|
2054
|
-
var enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
2055
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2054
|
+
var enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1m(_objectSpread$1m({}, ownProps), mapProps(ownProps)) : _objectSpread$1m(_objectSpread$1m({}, ownProps), mapProps);
|
|
2055
|
+
return jsxRuntime.jsx(Component, _objectSpread$1m({}, enhancedProps));
|
|
2056
2056
|
};
|
|
2057
2057
|
EnhancedWithProps.displayName = wrapDisplayName(Component, 'withProps');
|
|
2058
2058
|
return EnhancedWithProps;
|
|
2059
2059
|
};
|
|
2060
2060
|
};
|
|
2061
2061
|
|
|
2062
|
-
function ownKeys$
|
|
2063
|
-
function _objectSpread$
|
|
2062
|
+
function ownKeys$1l(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; }
|
|
2063
|
+
function _objectSpread$1l(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$1l(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$1l(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2064
2064
|
var useRedirectEffect = function useRedirectEffect(_ref) {
|
|
2065
2065
|
var goTo = _ref.goTo;
|
|
2066
2066
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -2083,58 +2083,58 @@ var defaultOptions$5 = {
|
|
|
2083
2083
|
};
|
|
2084
2084
|
var withRedirectTo = function withRedirectTo(options) {
|
|
2085
2085
|
return function (Component) {
|
|
2086
|
-
var mergedOptions = _objectSpread$
|
|
2086
|
+
var mergedOptions = _objectSpread$1l(_objectSpread$1l({}, defaultOptions$5), options);
|
|
2087
2087
|
var WithRedirectTo = function WithRedirectTo(props) {
|
|
2088
2088
|
if (!mergedOptions.skip(props)) {
|
|
2089
2089
|
return jsxRuntime.jsx(RedirectTo, {
|
|
2090
2090
|
goTo: options.selectGoTo(props)
|
|
2091
2091
|
});
|
|
2092
2092
|
}
|
|
2093
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2093
|
+
return jsxRuntime.jsx(Component, _objectSpread$1l({}, props));
|
|
2094
2094
|
};
|
|
2095
2095
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
2096
2096
|
return WithRedirectTo;
|
|
2097
2097
|
};
|
|
2098
2098
|
};
|
|
2099
2099
|
|
|
2100
|
-
function ownKeys$
|
|
2101
|
-
function _objectSpread$
|
|
2100
|
+
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; }
|
|
2101
|
+
function _objectSpread$1k(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$1k(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$1k(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2102
2102
|
var defaultOptions$4 = {
|
|
2103
2103
|
propName: 'modalState',
|
|
2104
2104
|
isInitiallyOpen: false
|
|
2105
2105
|
};
|
|
2106
2106
|
var injectModalState$1 = function injectModalState(options) {
|
|
2107
2107
|
return function (Component) {
|
|
2108
|
-
var mergedOptions = _objectSpread$
|
|
2108
|
+
var mergedOptions = _objectSpread$1k(_objectSpread$1k({}, defaultOptions$4), options);
|
|
2109
2109
|
var WithModalState = function WithModalState(props) {
|
|
2110
2110
|
var modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
2111
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2111
|
+
return jsxRuntime.jsx(Component, _objectSpread$1k(_objectSpread$1k({}, props), _defineProperty({}, mergedOptions.propName, modalState)));
|
|
2112
2112
|
};
|
|
2113
2113
|
WithModalState.displayName = wrapDisplayName(WithModalState, 'WithModalState');
|
|
2114
2114
|
return WithModalState;
|
|
2115
2115
|
};
|
|
2116
2116
|
};
|
|
2117
2117
|
|
|
2118
|
-
function ownKeys$
|
|
2119
|
-
function _objectSpread$
|
|
2118
|
+
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; }
|
|
2119
|
+
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; }
|
|
2120
2120
|
var defaultOptions$3 = {
|
|
2121
2121
|
propName: 'toggleState',
|
|
2122
2122
|
isInitiallyOpen: false
|
|
2123
2123
|
};
|
|
2124
2124
|
var injectModalState = function injectModalState(options) {
|
|
2125
2125
|
return function (Component) {
|
|
2126
|
-
var mergedOptions = _objectSpread$
|
|
2126
|
+
var mergedOptions = _objectSpread$1j(_objectSpread$1j({}, defaultOptions$3), options);
|
|
2127
2127
|
var WithToggleState = function WithToggleState(props) {
|
|
2128
2128
|
var toggleState = uiKit.useToggleState(mergedOptions.isInitiallyOpen);
|
|
2129
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2129
|
+
return jsxRuntime.jsx(Component, _objectSpread$1j(_objectSpread$1j({}, props), _defineProperty({}, mergedOptions.propName, toggleState)));
|
|
2130
2130
|
};
|
|
2131
2131
|
WithToggleState.displayName = wrapDisplayName(WithToggleState, 'WithToggleState');
|
|
2132
2132
|
return WithToggleState;
|
|
2133
2133
|
};
|
|
2134
2134
|
};
|
|
2135
2135
|
|
|
2136
|
-
function ownKeys$
|
|
2137
|
-
function _objectSpread$
|
|
2136
|
+
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; }
|
|
2137
|
+
function _objectSpread$1i(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$1i(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$1i(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2138
2138
|
var defaultOptions$2 = {
|
|
2139
2139
|
storageType: 'local',
|
|
2140
2140
|
segregateByUser: true
|
|
@@ -2158,7 +2158,7 @@ var isNil = function isNil(value) {
|
|
|
2158
2158
|
};
|
|
2159
2159
|
var useStorage = function useStorage(storageKey, initialStorageValue, options) {
|
|
2160
2160
|
var _context;
|
|
2161
|
-
var mergedOptions = _objectSpread$
|
|
2161
|
+
var mergedOptions = _objectSpread$1i(_objectSpread$1i({}, defaultOptions$2), options);
|
|
2162
2162
|
var userId = applicationShellConnectors.useApplicationContext(function (context) {
|
|
2163
2163
|
var _context$user;
|
|
2164
2164
|
return (_context$user = context.user) === null || _context$user === void 0 ? void 0 : _context$user.id;
|
|
@@ -2206,8 +2206,8 @@ var useStorage = function useStorage(storageKey, initialStorageValue, options) {
|
|
|
2206
2206
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
2207
2207
|
};
|
|
2208
2208
|
|
|
2209
|
-
function ownKeys$
|
|
2210
|
-
function _objectSpread$
|
|
2209
|
+
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; }
|
|
2210
|
+
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; }
|
|
2211
2211
|
var defaultOptions$1 = {
|
|
2212
2212
|
propName: 'storage',
|
|
2213
2213
|
storageKey: '',
|
|
@@ -2221,7 +2221,7 @@ var injectStorage = function injectStorage(options) {
|
|
|
2221
2221
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
2222
2222
|
* argument position does not allow passing specification of option(s).
|
|
2223
2223
|
*/
|
|
2224
|
-
var mergedOptions = _objectSpread$
|
|
2224
|
+
var mergedOptions = _objectSpread$1h(_objectSpread$1h({}, defaultOptions$1), options);
|
|
2225
2225
|
var WithStorage = function WithStorage(props) {
|
|
2226
2226
|
var _useStorage = useStorage(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
2227
2227
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -2233,7 +2233,7 @@ var injectStorage = function injectStorage(options) {
|
|
|
2233
2233
|
writeToStorage: writeToStorage,
|
|
2234
2234
|
readFromStorage: readFromStorage
|
|
2235
2235
|
});
|
|
2236
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
2236
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1h(_objectSpread$1h({}, props), storageProp));
|
|
2237
2237
|
};
|
|
2238
2238
|
WithStorage.displayName = wrapDisplayName(WrappedComponent, 'WithStorage');
|
|
2239
2239
|
return WithStorage;
|
|
@@ -2284,8 +2284,8 @@ var usePrevious = function usePrevious(value) {
|
|
|
2284
2284
|
return ref.current;
|
|
2285
2285
|
};
|
|
2286
2286
|
|
|
2287
|
-
function ownKeys$
|
|
2288
|
-
function _objectSpread$
|
|
2287
|
+
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; }
|
|
2288
|
+
function _objectSpread$1g(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$1g(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$1g(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2289
2289
|
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: "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: 1074, 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 nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
2290
2290
|
var filterStoresOutdatedDanglingProductSelections = function filterStoresOutdatedDanglingProductSelections(storesQueryResult) {
|
|
2291
2291
|
var _storesQueryResult$re;
|
|
@@ -2296,7 +2296,7 @@ var filterStoresOutdatedDanglingProductSelections = function filterStoresOutdate
|
|
|
2296
2296
|
offset: storesQueryResult.offset,
|
|
2297
2297
|
results: (_storesQueryResult$re = storesQueryResult.results) === null || _storesQueryResult$re === void 0 ? void 0 : _mapInstanceProperty__default["default"](_storesQueryResult$re).call(_storesQueryResult$re, function (store) {
|
|
2298
2298
|
var _store$productSelecti;
|
|
2299
|
-
return _objectSpread$
|
|
2299
|
+
return _objectSpread$1g(_objectSpread$1g({}, store), {}, {
|
|
2300
2300
|
productSelections: (_store$productSelecti = store.productSelections) === null || _store$productSelecti === void 0 ? void 0 : _filterInstanceProperty__default["default"](_store$productSelecti).call(_store$productSelecti, function (productSelectionRef) {
|
|
2301
2301
|
return Boolean(productSelectionRef.productSelection);
|
|
2302
2302
|
})
|
|
@@ -2306,7 +2306,7 @@ var filterStoresOutdatedDanglingProductSelections = function filterStoresOutdate
|
|
|
2306
2306
|
};
|
|
2307
2307
|
var createQueryVariables$8 = function createQueryVariables(ownProps) {
|
|
2308
2308
|
var _context;
|
|
2309
|
-
return _objectSpread$
|
|
2309
|
+
return _objectSpread$1g(_objectSpread$1g({
|
|
2310
2310
|
limit: ownProps.limit,
|
|
2311
2311
|
offset: ownProps.offset,
|
|
2312
2312
|
sort: _sortInstanceProperty__default["default"](ownProps)
|
|
@@ -2474,8 +2474,8 @@ function useDidFormValidationFail() {
|
|
|
2474
2474
|
return Boolean(didFormValidationFail);
|
|
2475
2475
|
}
|
|
2476
2476
|
|
|
2477
|
-
function ownKeys$
|
|
2478
|
-
function _objectSpread$
|
|
2477
|
+
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; }
|
|
2478
|
+
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; }
|
|
2479
2479
|
var TEN_MINUTES_IN_MS = 600000;
|
|
2480
2480
|
var defaultOptions = {
|
|
2481
2481
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -2503,7 +2503,7 @@ var useHasReminderExpired = function useHasReminderExpired(readReminderInterval)
|
|
|
2503
2503
|
};
|
|
2504
2504
|
var usePersistedReminder = function usePersistedReminder() {
|
|
2505
2505
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2506
|
-
var mergedOptions = _objectSpread$
|
|
2506
|
+
var mergedOptions = _objectSpread$1f(_objectSpread$1f({}, defaultOptions), options);
|
|
2507
2507
|
var _useStorage = useStorage(mergedOptions.storageKey, null),
|
|
2508
2508
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
2509
2509
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -2571,8 +2571,8 @@ var messages$H = reactIntl.defineMessages({
|
|
|
2571
2571
|
}
|
|
2572
2572
|
});
|
|
2573
2573
|
|
|
2574
|
-
function ownKeys$
|
|
2575
|
-
function _objectSpread$
|
|
2574
|
+
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; }
|
|
2575
|
+
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; }
|
|
2576
2576
|
var LinkToProfile = function LinkToProfile(props) {
|
|
2577
2577
|
var _useTrackingShared = useTrackingShared(),
|
|
2578
2578
|
trackClickOnInfoNotification = _useTrackingShared.trackClickOnInfoNotification;
|
|
@@ -2600,7 +2600,7 @@ var NotificationText = function NotificationText() {
|
|
|
2600
2600
|
isBold: true,
|
|
2601
2601
|
intlMessage: messages$H.profileUpdated
|
|
2602
2602
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2603
|
-
intlMessage: _objectSpread$
|
|
2603
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$H.addMoreInformation), {}, {
|
|
2604
2604
|
values: {
|
|
2605
2605
|
newline: getNewLine
|
|
2606
2606
|
}
|
|
@@ -2609,7 +2609,7 @@ var NotificationText = function NotificationText() {
|
|
|
2609
2609
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2610
2610
|
scale: "xs",
|
|
2611
2611
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2612
|
-
intlMessage: _objectSpread$
|
|
2612
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$H.informationAndProfileLink), {}, {
|
|
2613
2613
|
values: {
|
|
2614
2614
|
newline: getNewLine,
|
|
2615
2615
|
link: getLinkToProfile
|
|
@@ -2829,8 +2829,8 @@ var useDebouncedPromiseCallback = function useDebouncedPromiseCallback(promiseCa
|
|
|
2829
2829
|
);
|
|
2830
2830
|
};
|
|
2831
2831
|
|
|
2832
|
-
function ownKeys$
|
|
2833
|
-
function _objectSpread$
|
|
2832
|
+
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; }
|
|
2833
|
+
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; }
|
|
2834
2834
|
var prepareMutableColumnProps = function prepareMutableColumnProps(columnConfig, mutableColumnProps) {
|
|
2835
2835
|
var updatedColumnProps = {};
|
|
2836
2836
|
_forEachInstanceProperty__default["default"](mutableColumnProps).call(mutableColumnProps, function (columnProp) {
|
|
@@ -2856,14 +2856,14 @@ var retrieveColumnsWithCachedConfiguration = function retrieveColumnsWithCachedC
|
|
|
2856
2856
|
var initialColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, function (initialConfig) {
|
|
2857
2857
|
return initialConfig.key === cachedConfig.key;
|
|
2858
2858
|
});
|
|
2859
|
-
return _objectSpread$
|
|
2859
|
+
return _objectSpread$1d(_objectSpread$1d({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2860
2860
|
});
|
|
2861
2861
|
};
|
|
2862
2862
|
var handleCacheUpdate = function handleCacheUpdate(_ref2) {
|
|
2863
2863
|
var update = _ref2.update,
|
|
2864
2864
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2865
2865
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2866
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2866
|
+
return updateCachedTableConfiguration(_objectSpread$1d(_objectSpread$1d({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2867
2867
|
};
|
|
2868
2868
|
|
|
2869
2869
|
// Signature:
|
|
@@ -2894,7 +2894,7 @@ var usePersistedTableConfiguration = function usePersistedTableConfiguration(pro
|
|
|
2894
2894
|
var visibleColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, function (columnConfig) {
|
|
2895
2895
|
return columnConfig.key === visibleColumnKey;
|
|
2896
2896
|
});
|
|
2897
|
-
return _objectSpread$
|
|
2897
|
+
return _objectSpread$1d({
|
|
2898
2898
|
key: visibleColumnKey
|
|
2899
2899
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2900
2900
|
}),
|
|
@@ -2973,15 +2973,15 @@ var handlers$6 = {
|
|
|
2973
2973
|
}
|
|
2974
2974
|
};
|
|
2975
2975
|
|
|
2976
|
-
function ownKeys$
|
|
2977
|
-
function _objectSpread$
|
|
2976
|
+
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; }
|
|
2977
|
+
function _objectSpread$1c(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$1c(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$1c(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2978
2978
|
|
|
2979
2979
|
// eslint-disable-next-line import/prefer-default-export
|
|
2980
2980
|
var convertProductSelectionsFromGraphQl = function convertProductSelectionsFromGraphQl(productSelections) {
|
|
2981
2981
|
var _context;
|
|
2982
|
-
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$
|
|
2982
|
+
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$1c(_objectSpread$1c({}, productSelections), {}, {
|
|
2983
2983
|
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, function (productSelection) {
|
|
2984
|
-
return _objectSpread$
|
|
2984
|
+
return _objectSpread$1c({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
2985
2985
|
from: 'nameAllLocales',
|
|
2986
2986
|
to: 'name'
|
|
2987
2987
|
}]));
|
|
@@ -3191,6 +3191,8 @@ var trackingEvents$4 = {
|
|
|
3191
3191
|
}
|
|
3192
3192
|
};
|
|
3193
3193
|
|
|
3194
|
+
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; }
|
|
3195
|
+
function _objectSpread$1b(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$1b(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$1b(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3194
3196
|
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: "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: 385, source: { body: "query GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
3195
3197
|
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: "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: 385, source: { body: "query GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
3196
3198
|
var getTrackingEvent$4 = function getTrackingEvent(inputValue, selectedValue) {
|
|
@@ -3210,7 +3212,9 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3210
3212
|
onBlur = _ref.onBlur,
|
|
3211
3213
|
value = _ref.value,
|
|
3212
3214
|
hasError = _ref.hasError,
|
|
3213
|
-
onError = _ref.onError
|
|
3215
|
+
onError = _ref.onError,
|
|
3216
|
+
placeholder = _ref.placeholder,
|
|
3217
|
+
role = _ref.role;
|
|
3214
3218
|
var formatLocalizedFieldToString = useFormatLocalizedFieldToString();
|
|
3215
3219
|
var _useIntl = reactIntl.useIntl(),
|
|
3216
3220
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -3218,10 +3222,12 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3218
3222
|
return applicationContext.dataLocale;
|
|
3219
3223
|
});
|
|
3220
3224
|
var variables = React.useMemo(function () {
|
|
3221
|
-
return {
|
|
3225
|
+
return _objectSpread$1b({
|
|
3222
3226
|
sortByNamePath: "name.".concat(dataLocale)
|
|
3223
|
-
}
|
|
3224
|
-
|
|
3227
|
+
}, role && {
|
|
3228
|
+
where: "roles contains any (\"".concat(role, "\")")
|
|
3229
|
+
});
|
|
3230
|
+
}, [dataLocale, role]);
|
|
3225
3231
|
var _useState = React.useState(),
|
|
3226
3232
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3227
3233
|
loadingError = _useState2[0],
|
|
@@ -3292,7 +3298,7 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3292
3298
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
3293
3299
|
id: name,
|
|
3294
3300
|
name: name,
|
|
3295
|
-
placeholder: formatMessage(messages$F.placeholder),
|
|
3301
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$F.placeholder),
|
|
3296
3302
|
loadOptions: loadOptionsDebounced,
|
|
3297
3303
|
defaultOptions: true,
|
|
3298
3304
|
showOptionGroupDivider: true,
|
|
@@ -3318,11 +3324,11 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3318
3324
|
};
|
|
3319
3325
|
ChannelPickerInput.displayName = 'ChannelPickerInput';
|
|
3320
3326
|
|
|
3321
|
-
function _createSuper$
|
|
3322
|
-
function _isNativeReflectConstruct$
|
|
3327
|
+
function _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); 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); }; }
|
|
3328
|
+
function _isNativeReflectConstruct$9() { 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; } }
|
|
3323
3329
|
var FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
3324
3330
|
_inherits(FormattedDateTime, _PureComponent);
|
|
3325
|
-
var _super = _createSuper$
|
|
3331
|
+
var _super = _createSuper$9(FormattedDateTime);
|
|
3326
3332
|
function FormattedDateTime() {
|
|
3327
3333
|
_classCallCheck(this, FormattedDateTime);
|
|
3328
3334
|
return _super.apply(this, arguments);
|
|
@@ -3354,12 +3360,12 @@ var keepDisplayName = function keepDisplayName(component) {
|
|
|
3354
3360
|
|
|
3355
3361
|
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; }
|
|
3356
3362
|
function _objectSpread$1a(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$1a(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$1a(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3357
|
-
function _createSuper$
|
|
3358
|
-
function _isNativeReflectConstruct$
|
|
3363
|
+
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); }; }
|
|
3364
|
+
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; } }
|
|
3359
3365
|
var withMouseOverState = function withMouseOverState(BaseComponent) {
|
|
3360
3366
|
var WithMouseOverState = /*#__PURE__*/function (_Component) {
|
|
3361
3367
|
_inherits(WithMouseOverState, _Component);
|
|
3362
|
-
var _super = _createSuper$
|
|
3368
|
+
var _super = _createSuper$8(WithMouseOverState);
|
|
3363
3369
|
function WithMouseOverState() {
|
|
3364
3370
|
var _context;
|
|
3365
3371
|
var _this;
|
|
@@ -3403,8 +3409,8 @@ var withMouseOverState = function withMouseOverState(BaseComponent) {
|
|
|
3403
3409
|
|
|
3404
3410
|
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; }
|
|
3405
3411
|
function _objectSpread$19(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$19(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$19(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3406
|
-
function _createSuper$
|
|
3407
|
-
function _isNativeReflectConstruct$
|
|
3412
|
+
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); }; }
|
|
3413
|
+
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; } }
|
|
3408
3414
|
var styles$i = {
|
|
3409
3415
|
"size": "throttled-field-module__size___324jx",
|
|
3410
3416
|
"input-text": "throttled-field-module__input-text___3zFFp",
|
|
@@ -3419,7 +3425,7 @@ var styles$i = {
|
|
|
3419
3425
|
};
|
|
3420
3426
|
var ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
3421
3427
|
_inherits(ThrottledField, _PureComponent);
|
|
3422
|
-
var _super = _createSuper$
|
|
3428
|
+
var _super = _createSuper$7(ThrottledField);
|
|
3423
3429
|
function ThrottledField() {
|
|
3424
3430
|
var _context;
|
|
3425
3431
|
var _this;
|
|
@@ -3578,8 +3584,8 @@ var messages$E = reactIntl.defineMessages({
|
|
|
3578
3584
|
}
|
|
3579
3585
|
});
|
|
3580
3586
|
|
|
3581
|
-
function _createSuper$
|
|
3582
|
-
function _isNativeReflectConstruct$
|
|
3587
|
+
function _createSuper$6(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$6(); 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); }; }
|
|
3588
|
+
function _isNativeReflectConstruct$6() { 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; } }
|
|
3583
3589
|
var styles$h = {
|
|
3584
3590
|
"block": "search-input-module__block___1uM-y",
|
|
3585
3591
|
"container": "search-input-module__container___9u6if",
|
|
@@ -3597,7 +3603,7 @@ var styles$h = {
|
|
|
3597
3603
|
};
|
|
3598
3604
|
var SearchInput = /*#__PURE__*/function (_Component) {
|
|
3599
3605
|
_inherits(SearchInput, _Component);
|
|
3600
|
-
var _super = _createSuper$
|
|
3606
|
+
var _super = _createSuper$6(SearchInput);
|
|
3601
3607
|
function SearchInput() {
|
|
3602
3608
|
var _context;
|
|
3603
3609
|
var _this;
|
|
@@ -5209,13 +5215,13 @@ var GetProductTypesQuery = { kind: "Document", definitions: [{ kind: "OperationD
|
|
|
5209
5215
|
|
|
5210
5216
|
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; }
|
|
5211
5217
|
function _objectSpread$10(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$10(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$10(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5212
|
-
function _createSuper$
|
|
5213
|
-
function _isNativeReflectConstruct$
|
|
5218
|
+
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); }; }
|
|
5219
|
+
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; } }
|
|
5214
5220
|
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 } } } };
|
|
5215
5221
|
var customizableResources$1 = ['asset', 'category', 'channel', 'customer', 'order', 'discount-code', 'cart-discount', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review'];
|
|
5216
5222
|
var CustomFieldDefinitionsConnector = /*#__PURE__*/function (_Component) {
|
|
5217
5223
|
_inherits(CustomFieldDefinitionsConnector, _Component);
|
|
5218
|
-
var _super = _createSuper$
|
|
5224
|
+
var _super = _createSuper$5(CustomFieldDefinitionsConnector);
|
|
5219
5225
|
function CustomFieldDefinitionsConnector() {
|
|
5220
5226
|
_classCallCheck(this, CustomFieldDefinitionsConnector);
|
|
5221
5227
|
return _super.apply(this, arguments);
|
|
@@ -5390,8 +5396,8 @@ var createEmptyCustomFields = function createEmptyCustomFields(typeDefinition) {
|
|
|
5390
5396
|
};
|
|
5391
5397
|
};
|
|
5392
5398
|
|
|
5393
|
-
function _createSuper$
|
|
5394
|
-
function _isNativeReflectConstruct$
|
|
5399
|
+
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); }; }
|
|
5400
|
+
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; } }
|
|
5395
5401
|
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 } } } };
|
|
5396
5402
|
var customizableResources = ['asset', 'address', 'business-unit', 'category', 'channel', 'customer', 'order', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection'];
|
|
5397
5403
|
var emptyTypeDefinitions = {
|
|
@@ -5401,7 +5407,7 @@ var emptyTypeDefinitions = {
|
|
|
5401
5407
|
};
|
|
5402
5408
|
var CustomFieldTypeDefinitionsConnector = /*#__PURE__*/function (_Component) {
|
|
5403
5409
|
_inherits(CustomFieldTypeDefinitionsConnector, _Component);
|
|
5404
|
-
var _super = _createSuper$
|
|
5410
|
+
var _super = _createSuper$4(CustomFieldTypeDefinitionsConnector);
|
|
5405
5411
|
function CustomFieldTypeDefinitionsConnector() {
|
|
5406
5412
|
_classCallCheck(this, CustomFieldTypeDefinitionsConnector);
|
|
5407
5413
|
return _super.apply(this, arguments);
|
|
@@ -7359,84 +7365,6 @@ function CustomNestedFieldInput(props) {
|
|
|
7359
7365
|
}
|
|
7360
7366
|
CustomNestedFieldInput.displayName = 'CustomNestedFieldInput';
|
|
7361
7367
|
|
|
7362
|
-
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); }; }
|
|
7363
|
-
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; } }
|
|
7364
|
-
var isEmptyChildren = function isEmptyChildren(children) {
|
|
7365
|
-
return React.Children.count(children) === 0;
|
|
7366
|
-
};
|
|
7367
|
-
var Match = /*#__PURE__*/function (_PureComponent) {
|
|
7368
|
-
_inherits(Match, _PureComponent);
|
|
7369
|
-
var _super = _createSuper$5(Match);
|
|
7370
|
-
function Match() {
|
|
7371
|
-
_classCallCheck(this, Match);
|
|
7372
|
-
return _super.apply(this, arguments);
|
|
7373
|
-
}
|
|
7374
|
-
_createClass(Match, [{
|
|
7375
|
-
key: "render",
|
|
7376
|
-
value: function render() {
|
|
7377
|
-
if (this.props.isTouched && this.props.hasError) {
|
|
7378
|
-
if (this.props.component) return /*#__PURE__*/React.createElement(this.props.component);
|
|
7379
|
-
if (this.props.children && !isEmptyChildren(this.props.children)) return React.Children.only(this.props.children);
|
|
7380
|
-
}
|
|
7381
|
-
return null;
|
|
7382
|
-
}
|
|
7383
|
-
}]);
|
|
7384
|
-
return Match;
|
|
7385
|
-
}(React.PureComponent);
|
|
7386
|
-
Match.displayName = 'ValidationErrorMatch';
|
|
7387
|
-
|
|
7388
|
-
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); }; }
|
|
7389
|
-
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; } }
|
|
7390
|
-
var hasUnknownChildren = function hasUnknownChildren(children) {
|
|
7391
|
-
var _context;
|
|
7392
|
-
return _someInstanceProperty__default["default"](_context = React.Children.toArray(children)).call(_context, function (child) {
|
|
7393
|
-
return child.type.displayName !== Match.displayName;
|
|
7394
|
-
});
|
|
7395
|
-
};
|
|
7396
|
-
var hasError = function hasError(errors, rule) {
|
|
7397
|
-
return Boolean(errors[rule]);
|
|
7398
|
-
};
|
|
7399
|
-
var Switch = /*#__PURE__*/function (_PureComponent) {
|
|
7400
|
-
_inherits(Switch, _PureComponent);
|
|
7401
|
-
var _super = _createSuper$4(Switch);
|
|
7402
|
-
function Switch() {
|
|
7403
|
-
_classCallCheck(this, Switch);
|
|
7404
|
-
return _super.apply(this, arguments);
|
|
7405
|
-
}
|
|
7406
|
-
_createClass(Switch, [{
|
|
7407
|
-
key: "componentDidMount",
|
|
7408
|
-
value: function componentDidMount() {
|
|
7409
|
-
/**
|
|
7410
|
-
* NOTE:
|
|
7411
|
-
* The `<ValidationError.Switch>` only works with `<ValidationError.Match>` as its children.
|
|
7412
|
-
*/
|
|
7413
|
-
!!hasUnknownChildren(this.props.children) ? process.env.NODE_ENV !== "production" ? invariant__default["default"](false, '@commercetools-local/core/src/validation-error/validation-error-switch: children can only be of type <ValidationError.Match>') : invariant__default["default"](false) : void 0;
|
|
7414
|
-
}
|
|
7415
|
-
}, {
|
|
7416
|
-
key: "render",
|
|
7417
|
-
value: function render() {
|
|
7418
|
-
var _this = this;
|
|
7419
|
-
return _mapInstanceProperty__default["default"](React.Children).call(React.Children, this.props.children, function (child) {
|
|
7420
|
-
return /*#__PURE__*/React.cloneElement(child, {
|
|
7421
|
-
isTouched: _this.props.isTouched,
|
|
7422
|
-
hasError: hasError(_this.props.errors, child.props.rule)
|
|
7423
|
-
});
|
|
7424
|
-
});
|
|
7425
|
-
}
|
|
7426
|
-
}]);
|
|
7427
|
-
return Switch;
|
|
7428
|
-
}(React.PureComponent);
|
|
7429
|
-
Switch.displayName = 'ValidationErrorSwitch';
|
|
7430
|
-
Switch.defaultProps = {
|
|
7431
|
-
errors: {},
|
|
7432
|
-
isTouched: false
|
|
7433
|
-
};
|
|
7434
|
-
|
|
7435
|
-
var ValidationError = {
|
|
7436
|
-
Switch: Switch,
|
|
7437
|
-
Match: Match
|
|
7438
|
-
};
|
|
7439
|
-
|
|
7440
7368
|
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; }
|
|
7441
7369
|
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; }
|
|
7442
7370
|
var mergeSetItemsErrors = function mergeSetItemsErrors(errors) {
|
|
@@ -7452,19 +7380,11 @@ var CustomFieldErrors = function CustomFieldErrors(props) {
|
|
|
7452
7380
|
// but also after manually triggered form validation.
|
|
7453
7381
|
var didFormValidationFail = useDidFormValidationFail();
|
|
7454
7382
|
var errors = _Array$isArray__default["default"](props.errors) ? mergeSetItemsErrors(props.errors) : props.errors;
|
|
7455
|
-
return jsxRuntime.jsxs(
|
|
7456
|
-
errors: errors,
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
children: jsxRuntime.jsx(_.ErrorMessage, {
|
|
7461
|
-
intlMessage: messages$J.required
|
|
7462
|
-
})
|
|
7463
|
-
}), jsxRuntime.jsx(ValidationError.Match, {
|
|
7464
|
-
rule: "duplicated",
|
|
7465
|
-
children: jsxRuntime.jsx(_.ErrorMessage, {
|
|
7466
|
-
intlMessage: messages$J.unique
|
|
7467
|
-
})
|
|
7383
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7384
|
+
children: [props.isTouched || didFormValidationFail && (errors === null || errors === void 0 ? void 0 : errors.missing) && jsxRuntime.jsx(_.ErrorMessage, {
|
|
7385
|
+
intlMessage: messages$J.required
|
|
7386
|
+
}), props.isTouched || didFormValidationFail && (errors === null || errors === void 0 ? void 0 : errors.duplicated) && jsxRuntime.jsx(_.ErrorMessage, {
|
|
7387
|
+
intlMessage: messages$J.unique
|
|
7468
7388
|
})]
|
|
7469
7389
|
});
|
|
7470
7390
|
};
|
|
@@ -7981,6 +7901,8 @@ var NestedAttributeModalPage = function NestedAttributeModalPage(props) {
|
|
|
7981
7901
|
var _useIntl3 = reactIntl.useIntl(),
|
|
7982
7902
|
formatMessage = _useIntl3.formatMessage;
|
|
7983
7903
|
var formik$1 = formik.useFormikContext();
|
|
7904
|
+
var _useTheme = designSystem.useTheme(),
|
|
7905
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
7984
7906
|
var confirmationModal = applicationComponents.useModalState();
|
|
7985
7907
|
var nestingLevel = React.useContext(NestingLevelContext);
|
|
7986
7908
|
var handleClose = function handleClose() {
|
|
@@ -7991,7 +7913,7 @@ var NestedAttributeModalPage = function NestedAttributeModalPage(props) {
|
|
|
7991
7913
|
confirmationModal.closeModal();
|
|
7992
7914
|
props.onClose();
|
|
7993
7915
|
};
|
|
7994
|
-
var columnsTemplate = nestingLevel === 1 ? "repeat(2, ".concat(uiKit.customProperties.constraint11, ")") : nestingLevel === 5 ? "".concat(uiKit.customProperties.constraint10) : "repeat(2, ".concat(uiKit.customProperties.constraint10, ")");
|
|
7916
|
+
var columnsTemplate = isNewTheme ? "".concat(uiKit.customProperties.constraint15) : nestingLevel === 1 ? "repeat(2, ".concat(uiKit.customProperties.constraint11, ")") : nestingLevel === 5 ? "".concat(uiKit.customProperties.constraint10) : "repeat(2, ".concat(uiKit.customProperties.constraint10, ")");
|
|
7995
7917
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7996
7918
|
children: [jsxRuntime.jsx(applicationComponents.CustomFormModalPage, {
|
|
7997
7919
|
isOpen: props.isOpen,
|
|
@@ -8010,13 +7932,15 @@ var NestedAttributeModalPage = function NestedAttributeModalPage(props) {
|
|
|
8010
7932
|
onClose: handleClose,
|
|
8011
7933
|
shouldDelayOnClose: false,
|
|
8012
7934
|
title: props.title,
|
|
8013
|
-
children:
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
7935
|
+
children: jsxRuntime.jsx(applicationComponents.PageContentNarrow, {
|
|
7936
|
+
children: props.isOpen && jsxRuntime.jsx(uiKit.Grid, {
|
|
7937
|
+
gridTemplateColumns: columnsTemplate,
|
|
7938
|
+
gridGap: uiKit.customProperties.spacingM,
|
|
7939
|
+
children: jsxRuntime.jsx(ProductAttributes, {
|
|
7940
|
+
isDisabled: props.isDisabled,
|
|
7941
|
+
isReadOnly: props.isReadOnly,
|
|
7942
|
+
attributeDefinitions: props.productType.attributeDefinitions
|
|
7943
|
+
})
|
|
8020
7944
|
})
|
|
8021
7945
|
})
|
|
8022
7946
|
}), jsxRuntime.jsx(DropChangesConfirmation, {
|
|
@@ -8817,7 +8741,8 @@ var CustomerGroupPickerInput = function CustomerGroupPickerInput(_ref) {
|
|
|
8817
8741
|
onBlur = _ref.onBlur,
|
|
8818
8742
|
value = _ref.value,
|
|
8819
8743
|
hasError = _ref.hasError,
|
|
8820
|
-
onError = _ref.onError
|
|
8744
|
+
onError = _ref.onError,
|
|
8745
|
+
placeholder = _ref.placeholder;
|
|
8821
8746
|
var _useIntl = reactIntl.useIntl(),
|
|
8822
8747
|
formatMessage = _useIntl.formatMessage;
|
|
8823
8748
|
var variables = React.useMemo(function () {
|
|
@@ -8897,7 +8822,7 @@ var CustomerGroupPickerInput = function CustomerGroupPickerInput(_ref) {
|
|
|
8897
8822
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
8898
8823
|
id: name,
|
|
8899
8824
|
name: name,
|
|
8900
|
-
placeholder: formatMessage(messages$t.placeholder),
|
|
8825
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$t.placeholder),
|
|
8901
8826
|
loadOptions: loadOptionsDebounced,
|
|
8902
8827
|
defaultOptions: true,
|
|
8903
8828
|
showOptionGroupDivider: true,
|
|
@@ -10567,7 +10492,6 @@ var RESOURCES_WITH_PLATFORM_LIMITS = {
|
|
|
10567
10492
|
shippingMethods: 'shippingMethods',
|
|
10568
10493
|
carts: 'carts'
|
|
10569
10494
|
};
|
|
10570
|
-
var CUSTOMER_SUPPORT_LINK = 'https://jira.commercetools.com/servicedesk/customer/portal/1';
|
|
10571
10495
|
|
|
10572
10496
|
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; }
|
|
10573
10497
|
function _objectSpread$A(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$A(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$A(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
@@ -10681,26 +10605,26 @@ function _objectSpread$z(target) { for (var i = 1; i < arguments.length; i++) {
|
|
|
10681
10605
|
var getCustomerSupportLink$1 = function getCustomerSupportLink(msg) {
|
|
10682
10606
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
10683
10607
|
isExternal: true,
|
|
10684
|
-
to:
|
|
10608
|
+
to: constants.SUPPORT_PORTAL_URL,
|
|
10685
10609
|
children: msg
|
|
10686
10610
|
});
|
|
10687
10611
|
};
|
|
10688
10612
|
var PlatformLimitWarningNotification = function PlatformLimitWarningNotification(_ref) {
|
|
10689
10613
|
var resource = _ref.resource,
|
|
10690
10614
|
limit = _ref.limit;
|
|
10691
|
-
return jsxRuntime.
|
|
10692
|
-
|
|
10693
|
-
children:
|
|
10694
|
-
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
}
|
|
10702
|
-
}
|
|
10703
|
-
})
|
|
10615
|
+
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
10616
|
+
type: "warning",
|
|
10617
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$z(_objectSpread$z({}, messages$m[resource]), {}, {
|
|
10618
|
+
values: {
|
|
10619
|
+
limit: limit,
|
|
10620
|
+
customersupport: getCustomerSupportLink$1
|
|
10621
|
+
},
|
|
10622
|
+
children: function children(message) {
|
|
10623
|
+
return jsxRuntime.jsx("div", {
|
|
10624
|
+
children: message
|
|
10625
|
+
});
|
|
10626
|
+
}
|
|
10627
|
+
}))
|
|
10704
10628
|
});
|
|
10705
10629
|
};
|
|
10706
10630
|
PlatformLimitWarningNotification.displayName = 'PlatformLimitWarningNotification';
|
|
@@ -10738,7 +10662,7 @@ function _objectSpread$y(target) { for (var i = 1; i < arguments.length; i++) {
|
|
|
10738
10662
|
var getCustomerSupportLink = function getCustomerSupportLink(msg) {
|
|
10739
10663
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
10740
10664
|
isExternal: true,
|
|
10741
|
-
to:
|
|
10665
|
+
to: constants.SUPPORT_PORTAL_URL,
|
|
10742
10666
|
children: msg
|
|
10743
10667
|
}, msg);
|
|
10744
10668
|
};
|
|
@@ -13103,6 +13027,10 @@ function validatedInput(InnerComponent, validators) {
|
|
|
13103
13027
|
if (onChange && triggerUpdate) onChange(event);
|
|
13104
13028
|
_this.conditionalSetValidStatus(nextValidStatus);
|
|
13105
13029
|
};
|
|
13030
|
+
/**
|
|
13031
|
+
* Only triggers when there is a value, but its not valid
|
|
13032
|
+
* so it must be an invalid numeric value
|
|
13033
|
+
*/
|
|
13106
13034
|
_this.handleInvalid = function () {
|
|
13107
13035
|
var nextValidStatus = _objectSpread$8({}, _this.state.validStatus);
|
|
13108
13036
|
if (has__default["default"](nextValidStatus, 'numeric')) {
|
|
@@ -13343,7 +13271,6 @@ var MultiValueSelectorDropdown = function MultiValueSelectorDropdown(props) {
|
|
|
13343
13271
|
};
|
|
13344
13272
|
MultiValueSelectorDropdown.displayName = 'MultiValueSelectorDropdown';
|
|
13345
13273
|
var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
13346
|
-
var multiValueSearchInputRef = React.useRef(null);
|
|
13347
13274
|
var _useState = React.useState(''),
|
|
13348
13275
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13349
13276
|
value = _useState2[0],
|
|
@@ -13363,8 +13290,9 @@ var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
|
13363
13290
|
var clearRunningTooltipTimer = function clearRunningTooltipTimer() {
|
|
13364
13291
|
if (tooltipTimeoutHandler) clearTimeout(tooltipTimeoutHandler);
|
|
13365
13292
|
};
|
|
13366
|
-
var handleInputChange = function handleInputChange(
|
|
13367
|
-
var
|
|
13293
|
+
var handleInputChange = function handleInputChange(event) {
|
|
13294
|
+
var _event$target$value = event.target.value,
|
|
13295
|
+
inputValue = _event$target$value === void 0 ? '' : _event$target$value;
|
|
13368
13296
|
setValue(inputValue);
|
|
13369
13297
|
var multiInput = _trimInstanceProperty__default["default"](inputValue).call(inputValue).split(' ');
|
|
13370
13298
|
setMultiValue(multiInput);
|
|
@@ -13385,7 +13313,8 @@ var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
|
13385
13313
|
setValue('');
|
|
13386
13314
|
setMultiValue([]);
|
|
13387
13315
|
};
|
|
13388
|
-
var handleSubmit = function handleSubmit(
|
|
13316
|
+
var handleSubmit = function handleSubmit() {
|
|
13317
|
+
var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
13389
13318
|
clearInputValues();
|
|
13390
13319
|
clearRunningTooltipTimer();
|
|
13391
13320
|
setIsTooltipVisible(false);
|
|
@@ -13418,16 +13347,13 @@ var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
|
13418
13347
|
className: styles$1.container,
|
|
13419
13348
|
children: [jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
13420
13349
|
size: "s",
|
|
13421
|
-
children: jsxRuntime.jsx(
|
|
13422
|
-
|
|
13423
|
-
disabled: props.isDisabled,
|
|
13424
|
-
initialValue: value,
|
|
13425
|
-
throttleMS: 0,
|
|
13350
|
+
children: jsxRuntime.jsx(uiKit.SearchTextInput, {
|
|
13351
|
+
isDisabled: props.isDisabled,
|
|
13426
13352
|
placeholder: props.placeholder,
|
|
13427
|
-
onSubmit: handleSubmit,
|
|
13428
13353
|
onChange: handleInputChange,
|
|
13429
|
-
|
|
13430
|
-
|
|
13354
|
+
onReset: handleClearSearchField,
|
|
13355
|
+
onSubmit: handleSubmit,
|
|
13356
|
+
value: value
|
|
13431
13357
|
})
|
|
13432
13358
|
}), jsxRuntime.jsx(MultiValueSelectorDropdown, {
|
|
13433
13359
|
isOpen: isTooltipVisible,
|
|
@@ -14525,7 +14451,6 @@ exports.ThrottledField = ThrottledField;
|
|
|
14525
14451
|
exports.VALIDATOR_INTEGER = VALIDATOR_INTEGER;
|
|
14526
14452
|
exports.VALIDATOR_NUMERIC = VALIDATOR_NUMERIC;
|
|
14527
14453
|
exports.VALIDATOR_REQUIRED = VALIDATOR_REQUIRED;
|
|
14528
|
-
exports.ValidationError = ValidationError;
|
|
14529
14454
|
exports.WithPimIndexer = WithPimIndexer;
|
|
14530
14455
|
exports.allowedProperties = allowedProperties;
|
|
14531
14456
|
exports.and = and;
|
|
@@ -14667,9 +14592,11 @@ exports.usePrevious = usePrevious;
|
|
|
14667
14592
|
exports.useProductSelectionsFetcher = useProductSelectionsFetcher;
|
|
14668
14593
|
exports.useProductSelectionsTotalFetcher = useProductSelectionsTotalFetcher;
|
|
14669
14594
|
exports.useRoleNotificationEffect = useRoleNotificationEffect;
|
|
14595
|
+
exports.useShippingMethodsPlatformLimits = useShippingMethodsLimits;
|
|
14670
14596
|
exports.useStorage = useStorage;
|
|
14671
14597
|
exports.useStoreKeysInDataFences = useStoreKeysInDataFences;
|
|
14672
14598
|
exports.useStoresListFetcher = useStoresListFetcher;
|
|
14599
|
+
exports.useTaxCategoriesPlatformLimits = useTaxCategoriesLimits;
|
|
14673
14600
|
exports.useTotalNumberOfBusinessUnitsFetcherHandlers = handlers$1;
|
|
14674
14601
|
exports.useTotalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher;
|
|
14675
14602
|
exports.useTotalNumberOfStoresFetcherHandlers = handlers$3;
|