@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.
|
@@ -1707,8 +1707,8 @@ var getFractionDigit = function getFractionDigit(code) {
|
|
|
1707
1707
|
return getData(code, 'fractionDigit');
|
|
1708
1708
|
};
|
|
1709
1709
|
|
|
1710
|
-
function ownKeys$
|
|
1711
|
-
function _objectSpread$
|
|
1710
|
+
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; }
|
|
1711
|
+
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; }
|
|
1712
1712
|
function formatMoneyRangeValue(value, intl) {
|
|
1713
1713
|
var _context;
|
|
1714
1714
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
@@ -1718,7 +1718,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
1718
1718
|
return '';
|
|
1719
1719
|
}
|
|
1720
1720
|
function formatMoneyValue(amount, currency, intl) {
|
|
1721
|
-
return formatMoney$1(_objectSpread$
|
|
1721
|
+
return formatMoney$1(_objectSpread$1p({
|
|
1722
1722
|
centAmount: amount,
|
|
1723
1723
|
fractionDigits: getFractionDigit(currency)
|
|
1724
1724
|
}, currency ? {
|
|
@@ -1735,7 +1735,7 @@ function getFractionedAmount(moneyValue) {
|
|
|
1735
1735
|
}
|
|
1736
1736
|
function formatMoney$1(moneyValue, intl, options) {
|
|
1737
1737
|
var _moneyValue$fractione;
|
|
1738
|
-
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$
|
|
1738
|
+
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$1p({
|
|
1739
1739
|
style: 'currency',
|
|
1740
1740
|
currency: moneyValue.currencyCode,
|
|
1741
1741
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
@@ -1990,8 +1990,8 @@ var wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) {
|
|
|
1990
1990
|
return _concatInstanceProperty__default["default"](_context = "".concat(hocName, "(")).call(_context, getDisplayName(BaseComponent), ")");
|
|
1991
1991
|
};
|
|
1992
1992
|
|
|
1993
|
-
function ownKeys$
|
|
1994
|
-
function _objectSpread$
|
|
1993
|
+
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; }
|
|
1994
|
+
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; }
|
|
1995
1995
|
var injectDataTablePaginationState = function injectDataTablePaginationState(initialValues) {
|
|
1996
1996
|
return function (Component) {
|
|
1997
1997
|
var WithDataTablePaginationState = function WithDataTablePaginationState(props) {
|
|
@@ -2006,7 +2006,7 @@ var injectDataTablePaginationState = function injectDataTablePaginationState(ini
|
|
|
2006
2006
|
key: initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$tableS = initialValues.tableSorting) === null || _initialValues$tableS === void 0 ? void 0 : _initialValues$tableS.key,
|
|
2007
2007
|
order: initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$tableS2 = initialValues.tableSorting) === null || _initialValues$tableS2 === void 0 ? void 0 : _initialValues$tableS2.order
|
|
2008
2008
|
});
|
|
2009
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2009
|
+
return jsxRuntime.jsx(Component, _objectSpread$1o(_objectSpread$1o({}, props), {}, {
|
|
2010
2010
|
dataTablePaginationState: {
|
|
2011
2011
|
page: page,
|
|
2012
2012
|
perPage: perPage,
|
|
@@ -2019,8 +2019,8 @@ var injectDataTablePaginationState = function injectDataTablePaginationState(ini
|
|
|
2019
2019
|
};
|
|
2020
2020
|
};
|
|
2021
2021
|
|
|
2022
|
-
function ownKeys$
|
|
2023
|
-
function _objectSpread$
|
|
2022
|
+
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; }
|
|
2023
|
+
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; }
|
|
2024
2024
|
var injectNotifications = function injectNotifications() {
|
|
2025
2025
|
var propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
2026
2026
|
return function (Component) {
|
|
@@ -2035,31 +2035,31 @@ var injectNotifications = function injectNotifications() {
|
|
|
2035
2035
|
onActionError: onActionError,
|
|
2036
2036
|
hideAllPageNotifications: hideAllPageNotifications
|
|
2037
2037
|
};
|
|
2038
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2038
|
+
return jsxRuntime.jsx(Component, _objectSpread$1n(_objectSpread$1n({}, props), _defineProperty({}, propName, notifications)));
|
|
2039
2039
|
};
|
|
2040
2040
|
WrappedComponent.displayName = "withNotifications(".concat(getDisplayName(Component));
|
|
2041
2041
|
return WrappedComponent;
|
|
2042
2042
|
};
|
|
2043
2043
|
};
|
|
2044
2044
|
|
|
2045
|
-
function ownKeys$
|
|
2046
|
-
function _objectSpread$
|
|
2045
|
+
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; }
|
|
2046
|
+
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; }
|
|
2047
2047
|
function isPropsMapper(mapProps) {
|
|
2048
2048
|
return typeof mapProps === 'function';
|
|
2049
2049
|
}
|
|
2050
2050
|
var withProps = function withProps(mapProps) {
|
|
2051
2051
|
return function (Component) {
|
|
2052
2052
|
var EnhancedWithProps = function EnhancedWithProps(ownProps) {
|
|
2053
|
-
var enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
2054
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2053
|
+
var enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1m(_objectSpread$1m({}, ownProps), mapProps(ownProps)) : _objectSpread$1m(_objectSpread$1m({}, ownProps), mapProps);
|
|
2054
|
+
return jsxRuntime.jsx(Component, _objectSpread$1m({}, enhancedProps));
|
|
2055
2055
|
};
|
|
2056
2056
|
EnhancedWithProps.displayName = wrapDisplayName(Component, 'withProps');
|
|
2057
2057
|
return EnhancedWithProps;
|
|
2058
2058
|
};
|
|
2059
2059
|
};
|
|
2060
2060
|
|
|
2061
|
-
function ownKeys$
|
|
2062
|
-
function _objectSpread$
|
|
2061
|
+
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; }
|
|
2062
|
+
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; }
|
|
2063
2063
|
var useRedirectEffect = function useRedirectEffect(_ref) {
|
|
2064
2064
|
var goTo = _ref.goTo;
|
|
2065
2065
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -2082,58 +2082,58 @@ var defaultOptions$5 = {
|
|
|
2082
2082
|
};
|
|
2083
2083
|
var withRedirectTo = function withRedirectTo(options) {
|
|
2084
2084
|
return function (Component) {
|
|
2085
|
-
var mergedOptions = _objectSpread$
|
|
2085
|
+
var mergedOptions = _objectSpread$1l(_objectSpread$1l({}, defaultOptions$5), options);
|
|
2086
2086
|
var WithRedirectTo = function WithRedirectTo(props) {
|
|
2087
2087
|
if (!mergedOptions.skip(props)) {
|
|
2088
2088
|
return jsxRuntime.jsx(RedirectTo, {
|
|
2089
2089
|
goTo: options.selectGoTo(props)
|
|
2090
2090
|
});
|
|
2091
2091
|
}
|
|
2092
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2092
|
+
return jsxRuntime.jsx(Component, _objectSpread$1l({}, props));
|
|
2093
2093
|
};
|
|
2094
2094
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
2095
2095
|
return WithRedirectTo;
|
|
2096
2096
|
};
|
|
2097
2097
|
};
|
|
2098
2098
|
|
|
2099
|
-
function ownKeys$
|
|
2100
|
-
function _objectSpread$
|
|
2099
|
+
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; }
|
|
2100
|
+
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; }
|
|
2101
2101
|
var defaultOptions$4 = {
|
|
2102
2102
|
propName: 'modalState',
|
|
2103
2103
|
isInitiallyOpen: false
|
|
2104
2104
|
};
|
|
2105
2105
|
var injectModalState$1 = function injectModalState(options) {
|
|
2106
2106
|
return function (Component) {
|
|
2107
|
-
var mergedOptions = _objectSpread$
|
|
2107
|
+
var mergedOptions = _objectSpread$1k(_objectSpread$1k({}, defaultOptions$4), options);
|
|
2108
2108
|
var WithModalState = function WithModalState(props) {
|
|
2109
2109
|
var modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
2110
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2110
|
+
return jsxRuntime.jsx(Component, _objectSpread$1k(_objectSpread$1k({}, props), _defineProperty({}, mergedOptions.propName, modalState)));
|
|
2111
2111
|
};
|
|
2112
2112
|
WithModalState.displayName = wrapDisplayName(WithModalState, 'WithModalState');
|
|
2113
2113
|
return WithModalState;
|
|
2114
2114
|
};
|
|
2115
2115
|
};
|
|
2116
2116
|
|
|
2117
|
-
function ownKeys$
|
|
2118
|
-
function _objectSpread$
|
|
2117
|
+
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; }
|
|
2118
|
+
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; }
|
|
2119
2119
|
var defaultOptions$3 = {
|
|
2120
2120
|
propName: 'toggleState',
|
|
2121
2121
|
isInitiallyOpen: false
|
|
2122
2122
|
};
|
|
2123
2123
|
var injectModalState = function injectModalState(options) {
|
|
2124
2124
|
return function (Component) {
|
|
2125
|
-
var mergedOptions = _objectSpread$
|
|
2125
|
+
var mergedOptions = _objectSpread$1j(_objectSpread$1j({}, defaultOptions$3), options);
|
|
2126
2126
|
var WithToggleState = function WithToggleState(props) {
|
|
2127
2127
|
var toggleState = uiKit.useToggleState(mergedOptions.isInitiallyOpen);
|
|
2128
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2128
|
+
return jsxRuntime.jsx(Component, _objectSpread$1j(_objectSpread$1j({}, props), _defineProperty({}, mergedOptions.propName, toggleState)));
|
|
2129
2129
|
};
|
|
2130
2130
|
WithToggleState.displayName = wrapDisplayName(WithToggleState, 'WithToggleState');
|
|
2131
2131
|
return WithToggleState;
|
|
2132
2132
|
};
|
|
2133
2133
|
};
|
|
2134
2134
|
|
|
2135
|
-
function ownKeys$
|
|
2136
|
-
function _objectSpread$
|
|
2135
|
+
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; }
|
|
2136
|
+
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; }
|
|
2137
2137
|
var defaultOptions$2 = {
|
|
2138
2138
|
storageType: 'local',
|
|
2139
2139
|
segregateByUser: true
|
|
@@ -2157,7 +2157,7 @@ var isNil = function isNil(value) {
|
|
|
2157
2157
|
};
|
|
2158
2158
|
var useStorage = function useStorage(storageKey, initialStorageValue, options) {
|
|
2159
2159
|
var _context;
|
|
2160
|
-
var mergedOptions = _objectSpread$
|
|
2160
|
+
var mergedOptions = _objectSpread$1i(_objectSpread$1i({}, defaultOptions$2), options);
|
|
2161
2161
|
var userId = applicationShellConnectors.useApplicationContext(function (context) {
|
|
2162
2162
|
var _context$user;
|
|
2163
2163
|
return (_context$user = context.user) === null || _context$user === void 0 ? void 0 : _context$user.id;
|
|
@@ -2205,8 +2205,8 @@ var useStorage = function useStorage(storageKey, initialStorageValue, options) {
|
|
|
2205
2205
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
2206
2206
|
};
|
|
2207
2207
|
|
|
2208
|
-
function ownKeys$
|
|
2209
|
-
function _objectSpread$
|
|
2208
|
+
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; }
|
|
2209
|
+
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; }
|
|
2210
2210
|
var defaultOptions$1 = {
|
|
2211
2211
|
propName: 'storage',
|
|
2212
2212
|
storageKey: '',
|
|
@@ -2220,7 +2220,7 @@ var injectStorage = function injectStorage(options) {
|
|
|
2220
2220
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
2221
2221
|
* argument position does not allow passing specification of option(s).
|
|
2222
2222
|
*/
|
|
2223
|
-
var mergedOptions = _objectSpread$
|
|
2223
|
+
var mergedOptions = _objectSpread$1h(_objectSpread$1h({}, defaultOptions$1), options);
|
|
2224
2224
|
var WithStorage = function WithStorage(props) {
|
|
2225
2225
|
var _useStorage = useStorage(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
2226
2226
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -2232,7 +2232,7 @@ var injectStorage = function injectStorage(options) {
|
|
|
2232
2232
|
writeToStorage: writeToStorage,
|
|
2233
2233
|
readFromStorage: readFromStorage
|
|
2234
2234
|
});
|
|
2235
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
2235
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1h(_objectSpread$1h({}, props), storageProp));
|
|
2236
2236
|
};
|
|
2237
2237
|
WithStorage.displayName = wrapDisplayName(WrappedComponent, 'WithStorage');
|
|
2238
2238
|
return WithStorage;
|
|
@@ -2283,8 +2283,8 @@ var usePrevious = function usePrevious(value) {
|
|
|
2283
2283
|
return ref.current;
|
|
2284
2284
|
};
|
|
2285
2285
|
|
|
2286
|
-
function ownKeys$
|
|
2287
|
-
function _objectSpread$
|
|
2286
|
+
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; }
|
|
2287
|
+
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; }
|
|
2288
2288
|
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 } } } };
|
|
2289
2289
|
var filterStoresOutdatedDanglingProductSelections = function filterStoresOutdatedDanglingProductSelections(storesQueryResult) {
|
|
2290
2290
|
var _storesQueryResult$re;
|
|
@@ -2295,7 +2295,7 @@ var filterStoresOutdatedDanglingProductSelections = function filterStoresOutdate
|
|
|
2295
2295
|
offset: storesQueryResult.offset,
|
|
2296
2296
|
results: (_storesQueryResult$re = storesQueryResult.results) === null || _storesQueryResult$re === void 0 ? void 0 : _mapInstanceProperty__default["default"](_storesQueryResult$re).call(_storesQueryResult$re, function (store) {
|
|
2297
2297
|
var _store$productSelecti;
|
|
2298
|
-
return _objectSpread$
|
|
2298
|
+
return _objectSpread$1g(_objectSpread$1g({}, store), {}, {
|
|
2299
2299
|
productSelections: (_store$productSelecti = store.productSelections) === null || _store$productSelecti === void 0 ? void 0 : _filterInstanceProperty__default["default"](_store$productSelecti).call(_store$productSelecti, function (productSelectionRef) {
|
|
2300
2300
|
return Boolean(productSelectionRef.productSelection);
|
|
2301
2301
|
})
|
|
@@ -2305,7 +2305,7 @@ var filterStoresOutdatedDanglingProductSelections = function filterStoresOutdate
|
|
|
2305
2305
|
};
|
|
2306
2306
|
var createQueryVariables$8 = function createQueryVariables(ownProps) {
|
|
2307
2307
|
var _context;
|
|
2308
|
-
return _objectSpread$
|
|
2308
|
+
return _objectSpread$1g(_objectSpread$1g({
|
|
2309
2309
|
limit: ownProps.limit,
|
|
2310
2310
|
offset: ownProps.offset,
|
|
2311
2311
|
sort: _sortInstanceProperty__default["default"](ownProps)
|
|
@@ -2473,8 +2473,8 @@ function useDidFormValidationFail() {
|
|
|
2473
2473
|
return Boolean(didFormValidationFail);
|
|
2474
2474
|
}
|
|
2475
2475
|
|
|
2476
|
-
function ownKeys$
|
|
2477
|
-
function _objectSpread$
|
|
2476
|
+
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; }
|
|
2477
|
+
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; }
|
|
2478
2478
|
var TEN_MINUTES_IN_MS = 600000;
|
|
2479
2479
|
var defaultOptions = {
|
|
2480
2480
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -2502,7 +2502,7 @@ var useHasReminderExpired = function useHasReminderExpired(readReminderInterval)
|
|
|
2502
2502
|
};
|
|
2503
2503
|
var usePersistedReminder = function usePersistedReminder() {
|
|
2504
2504
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2505
|
-
var mergedOptions = _objectSpread$
|
|
2505
|
+
var mergedOptions = _objectSpread$1f(_objectSpread$1f({}, defaultOptions), options);
|
|
2506
2506
|
var _useStorage = useStorage(mergedOptions.storageKey, null),
|
|
2507
2507
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
2508
2508
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -2570,8 +2570,8 @@ var messages$H = reactIntl.defineMessages({
|
|
|
2570
2570
|
}
|
|
2571
2571
|
});
|
|
2572
2572
|
|
|
2573
|
-
function ownKeys$
|
|
2574
|
-
function _objectSpread$
|
|
2573
|
+
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; }
|
|
2574
|
+
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; }
|
|
2575
2575
|
var LinkToProfile = function LinkToProfile(props) {
|
|
2576
2576
|
var _useTrackingShared = useTrackingShared(),
|
|
2577
2577
|
trackClickOnInfoNotification = _useTrackingShared.trackClickOnInfoNotification;
|
|
@@ -2599,7 +2599,7 @@ var NotificationText = function NotificationText() {
|
|
|
2599
2599
|
isBold: true,
|
|
2600
2600
|
intlMessage: messages$H.profileUpdated
|
|
2601
2601
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2602
|
-
intlMessage: _objectSpread$
|
|
2602
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$H.addMoreInformation), {}, {
|
|
2603
2603
|
values: {
|
|
2604
2604
|
newline: getNewLine
|
|
2605
2605
|
}
|
|
@@ -2608,7 +2608,7 @@ var NotificationText = function NotificationText() {
|
|
|
2608
2608
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2609
2609
|
scale: "xs",
|
|
2610
2610
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2611
|
-
intlMessage: _objectSpread$
|
|
2611
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$H.informationAndProfileLink), {}, {
|
|
2612
2612
|
values: {
|
|
2613
2613
|
newline: getNewLine,
|
|
2614
2614
|
link: getLinkToProfile
|
|
@@ -2828,8 +2828,8 @@ var useDebouncedPromiseCallback = function useDebouncedPromiseCallback(promiseCa
|
|
|
2828
2828
|
);
|
|
2829
2829
|
};
|
|
2830
2830
|
|
|
2831
|
-
function ownKeys$
|
|
2832
|
-
function _objectSpread$
|
|
2831
|
+
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; }
|
|
2832
|
+
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; }
|
|
2833
2833
|
var prepareMutableColumnProps = function prepareMutableColumnProps(columnConfig, mutableColumnProps) {
|
|
2834
2834
|
var updatedColumnProps = {};
|
|
2835
2835
|
_forEachInstanceProperty__default["default"](mutableColumnProps).call(mutableColumnProps, function (columnProp) {
|
|
@@ -2855,14 +2855,14 @@ var retrieveColumnsWithCachedConfiguration = function retrieveColumnsWithCachedC
|
|
|
2855
2855
|
var initialColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, function (initialConfig) {
|
|
2856
2856
|
return initialConfig.key === cachedConfig.key;
|
|
2857
2857
|
});
|
|
2858
|
-
return _objectSpread$
|
|
2858
|
+
return _objectSpread$1d(_objectSpread$1d({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2859
2859
|
});
|
|
2860
2860
|
};
|
|
2861
2861
|
var handleCacheUpdate = function handleCacheUpdate(_ref2) {
|
|
2862
2862
|
var update = _ref2.update,
|
|
2863
2863
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2864
2864
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2865
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2865
|
+
return updateCachedTableConfiguration(_objectSpread$1d(_objectSpread$1d({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2866
2866
|
};
|
|
2867
2867
|
|
|
2868
2868
|
// Signature:
|
|
@@ -2893,7 +2893,7 @@ var usePersistedTableConfiguration = function usePersistedTableConfiguration(pro
|
|
|
2893
2893
|
var visibleColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, function (columnConfig) {
|
|
2894
2894
|
return columnConfig.key === visibleColumnKey;
|
|
2895
2895
|
});
|
|
2896
|
-
return _objectSpread$
|
|
2896
|
+
return _objectSpread$1d({
|
|
2897
2897
|
key: visibleColumnKey
|
|
2898
2898
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2899
2899
|
}),
|
|
@@ -2972,15 +2972,15 @@ var handlers$6 = {
|
|
|
2972
2972
|
}
|
|
2973
2973
|
};
|
|
2974
2974
|
|
|
2975
|
-
function ownKeys$
|
|
2976
|
-
function _objectSpread$
|
|
2975
|
+
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; }
|
|
2976
|
+
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; }
|
|
2977
2977
|
|
|
2978
2978
|
// eslint-disable-next-line import/prefer-default-export
|
|
2979
2979
|
var convertProductSelectionsFromGraphQl = function convertProductSelectionsFromGraphQl(productSelections) {
|
|
2980
2980
|
var _context;
|
|
2981
|
-
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$
|
|
2981
|
+
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$1c(_objectSpread$1c({}, productSelections), {}, {
|
|
2982
2982
|
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, function (productSelection) {
|
|
2983
|
-
return _objectSpread$
|
|
2983
|
+
return _objectSpread$1c({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
2984
2984
|
from: 'nameAllLocales',
|
|
2985
2985
|
to: 'name'
|
|
2986
2986
|
}]));
|
|
@@ -3190,6 +3190,8 @@ var trackingEvents$4 = {
|
|
|
3190
3190
|
}
|
|
3191
3191
|
};
|
|
3192
3192
|
|
|
3193
|
+
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; }
|
|
3194
|
+
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; }
|
|
3193
3195
|
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 } } } };
|
|
3194
3196
|
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 } } } };
|
|
3195
3197
|
var getTrackingEvent$4 = function getTrackingEvent(inputValue, selectedValue) {
|
|
@@ -3209,7 +3211,9 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3209
3211
|
onBlur = _ref.onBlur,
|
|
3210
3212
|
value = _ref.value,
|
|
3211
3213
|
hasError = _ref.hasError,
|
|
3212
|
-
onError = _ref.onError
|
|
3214
|
+
onError = _ref.onError,
|
|
3215
|
+
placeholder = _ref.placeholder,
|
|
3216
|
+
role = _ref.role;
|
|
3213
3217
|
var formatLocalizedFieldToString = useFormatLocalizedFieldToString();
|
|
3214
3218
|
var _useIntl = reactIntl.useIntl(),
|
|
3215
3219
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -3217,10 +3221,12 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3217
3221
|
return applicationContext.dataLocale;
|
|
3218
3222
|
});
|
|
3219
3223
|
var variables = React.useMemo(function () {
|
|
3220
|
-
return {
|
|
3224
|
+
return _objectSpread$1b({
|
|
3221
3225
|
sortByNamePath: "name.".concat(dataLocale)
|
|
3222
|
-
}
|
|
3223
|
-
|
|
3226
|
+
}, role && {
|
|
3227
|
+
where: "roles contains any (\"".concat(role, "\")")
|
|
3228
|
+
});
|
|
3229
|
+
}, [dataLocale, role]);
|
|
3224
3230
|
var _useState = React.useState(),
|
|
3225
3231
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3226
3232
|
loadingError = _useState2[0],
|
|
@@ -3291,7 +3297,7 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3291
3297
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
3292
3298
|
id: name,
|
|
3293
3299
|
name: name,
|
|
3294
|
-
placeholder: formatMessage(messages$F.placeholder),
|
|
3300
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$F.placeholder),
|
|
3295
3301
|
loadOptions: loadOptionsDebounced,
|
|
3296
3302
|
defaultOptions: true,
|
|
3297
3303
|
showOptionGroupDivider: true,
|
|
@@ -3317,11 +3323,11 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3317
3323
|
};
|
|
3318
3324
|
ChannelPickerInput.displayName = 'ChannelPickerInput';
|
|
3319
3325
|
|
|
3320
|
-
function _createSuper$
|
|
3321
|
-
function _isNativeReflectConstruct$
|
|
3326
|
+
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); }; }
|
|
3327
|
+
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; } }
|
|
3322
3328
|
var FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
3323
3329
|
_inherits(FormattedDateTime, _PureComponent);
|
|
3324
|
-
var _super = _createSuper$
|
|
3330
|
+
var _super = _createSuper$9(FormattedDateTime);
|
|
3325
3331
|
function FormattedDateTime() {
|
|
3326
3332
|
_classCallCheck(this, FormattedDateTime);
|
|
3327
3333
|
return _super.apply(this, arguments);
|
|
@@ -3353,12 +3359,12 @@ var keepDisplayName = function keepDisplayName(component) {
|
|
|
3353
3359
|
|
|
3354
3360
|
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; }
|
|
3355
3361
|
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; }
|
|
3356
|
-
function _createSuper$
|
|
3357
|
-
function _isNativeReflectConstruct$
|
|
3362
|
+
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); }; }
|
|
3363
|
+
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; } }
|
|
3358
3364
|
var withMouseOverState = function withMouseOverState(BaseComponent) {
|
|
3359
3365
|
var WithMouseOverState = /*#__PURE__*/function (_Component) {
|
|
3360
3366
|
_inherits(WithMouseOverState, _Component);
|
|
3361
|
-
var _super = _createSuper$
|
|
3367
|
+
var _super = _createSuper$8(WithMouseOverState);
|
|
3362
3368
|
function WithMouseOverState() {
|
|
3363
3369
|
var _context;
|
|
3364
3370
|
var _this;
|
|
@@ -3402,8 +3408,8 @@ var withMouseOverState = function withMouseOverState(BaseComponent) {
|
|
|
3402
3408
|
|
|
3403
3409
|
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; }
|
|
3404
3410
|
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; }
|
|
3405
|
-
function _createSuper$
|
|
3406
|
-
function _isNativeReflectConstruct$
|
|
3411
|
+
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); }; }
|
|
3412
|
+
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; } }
|
|
3407
3413
|
var styles$i = {
|
|
3408
3414
|
"size": "throttled-field-module__size___324jx",
|
|
3409
3415
|
"input-text": "throttled-field-module__input-text___3zFFp",
|
|
@@ -3418,7 +3424,7 @@ var styles$i = {
|
|
|
3418
3424
|
};
|
|
3419
3425
|
var ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
3420
3426
|
_inherits(ThrottledField, _PureComponent);
|
|
3421
|
-
var _super = _createSuper$
|
|
3427
|
+
var _super = _createSuper$7(ThrottledField);
|
|
3422
3428
|
function ThrottledField() {
|
|
3423
3429
|
var _context;
|
|
3424
3430
|
var _this;
|
|
@@ -3577,8 +3583,8 @@ var messages$E = reactIntl.defineMessages({
|
|
|
3577
3583
|
}
|
|
3578
3584
|
});
|
|
3579
3585
|
|
|
3580
|
-
function _createSuper$
|
|
3581
|
-
function _isNativeReflectConstruct$
|
|
3586
|
+
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); }; }
|
|
3587
|
+
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; } }
|
|
3582
3588
|
var styles$h = {
|
|
3583
3589
|
"block": "search-input-module__block___1uM-y",
|
|
3584
3590
|
"container": "search-input-module__container___9u6if",
|
|
@@ -3596,7 +3602,7 @@ var styles$h = {
|
|
|
3596
3602
|
};
|
|
3597
3603
|
var SearchInput = /*#__PURE__*/function (_Component) {
|
|
3598
3604
|
_inherits(SearchInput, _Component);
|
|
3599
|
-
var _super = _createSuper$
|
|
3605
|
+
var _super = _createSuper$6(SearchInput);
|
|
3600
3606
|
function SearchInput() {
|
|
3601
3607
|
var _context;
|
|
3602
3608
|
var _this;
|
|
@@ -5208,13 +5214,13 @@ var GetProductTypesQuery = { kind: "Document", definitions: [{ kind: "OperationD
|
|
|
5208
5214
|
|
|
5209
5215
|
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; }
|
|
5210
5216
|
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; }
|
|
5211
|
-
function _createSuper$
|
|
5212
|
-
function _isNativeReflectConstruct$
|
|
5217
|
+
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); }; }
|
|
5218
|
+
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; } }
|
|
5213
5219
|
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 } } } };
|
|
5214
5220
|
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'];
|
|
5215
5221
|
var CustomFieldDefinitionsConnector = /*#__PURE__*/function (_Component) {
|
|
5216
5222
|
_inherits(CustomFieldDefinitionsConnector, _Component);
|
|
5217
|
-
var _super = _createSuper$
|
|
5223
|
+
var _super = _createSuper$5(CustomFieldDefinitionsConnector);
|
|
5218
5224
|
function CustomFieldDefinitionsConnector() {
|
|
5219
5225
|
_classCallCheck(this, CustomFieldDefinitionsConnector);
|
|
5220
5226
|
return _super.apply(this, arguments);
|
|
@@ -5389,8 +5395,8 @@ var createEmptyCustomFields = function createEmptyCustomFields(typeDefinition) {
|
|
|
5389
5395
|
};
|
|
5390
5396
|
};
|
|
5391
5397
|
|
|
5392
|
-
function _createSuper$
|
|
5393
|
-
function _isNativeReflectConstruct$
|
|
5398
|
+
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); }; }
|
|
5399
|
+
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; } }
|
|
5394
5400
|
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 } } } };
|
|
5395
5401
|
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'];
|
|
5396
5402
|
var emptyTypeDefinitions = {
|
|
@@ -5400,7 +5406,7 @@ var emptyTypeDefinitions = {
|
|
|
5400
5406
|
};
|
|
5401
5407
|
var CustomFieldTypeDefinitionsConnector = /*#__PURE__*/function (_Component) {
|
|
5402
5408
|
_inherits(CustomFieldTypeDefinitionsConnector, _Component);
|
|
5403
|
-
var _super = _createSuper$
|
|
5409
|
+
var _super = _createSuper$4(CustomFieldTypeDefinitionsConnector);
|
|
5404
5410
|
function CustomFieldTypeDefinitionsConnector() {
|
|
5405
5411
|
_classCallCheck(this, CustomFieldTypeDefinitionsConnector);
|
|
5406
5412
|
return _super.apply(this, arguments);
|
|
@@ -7358,84 +7364,6 @@ function CustomNestedFieldInput(props) {
|
|
|
7358
7364
|
}
|
|
7359
7365
|
CustomNestedFieldInput.displayName = 'CustomNestedFieldInput';
|
|
7360
7366
|
|
|
7361
|
-
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); }; }
|
|
7362
|
-
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; } }
|
|
7363
|
-
var isEmptyChildren = function isEmptyChildren(children) {
|
|
7364
|
-
return React.Children.count(children) === 0;
|
|
7365
|
-
};
|
|
7366
|
-
var Match = /*#__PURE__*/function (_PureComponent) {
|
|
7367
|
-
_inherits(Match, _PureComponent);
|
|
7368
|
-
var _super = _createSuper$5(Match);
|
|
7369
|
-
function Match() {
|
|
7370
|
-
_classCallCheck(this, Match);
|
|
7371
|
-
return _super.apply(this, arguments);
|
|
7372
|
-
}
|
|
7373
|
-
_createClass(Match, [{
|
|
7374
|
-
key: "render",
|
|
7375
|
-
value: function render() {
|
|
7376
|
-
if (this.props.isTouched && this.props.hasError) {
|
|
7377
|
-
if (this.props.component) return /*#__PURE__*/React.createElement(this.props.component);
|
|
7378
|
-
if (this.props.children && !isEmptyChildren(this.props.children)) return React.Children.only(this.props.children);
|
|
7379
|
-
}
|
|
7380
|
-
return null;
|
|
7381
|
-
}
|
|
7382
|
-
}]);
|
|
7383
|
-
return Match;
|
|
7384
|
-
}(React.PureComponent);
|
|
7385
|
-
Match.displayName = 'ValidationErrorMatch';
|
|
7386
|
-
|
|
7387
|
-
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); }; }
|
|
7388
|
-
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; } }
|
|
7389
|
-
var hasUnknownChildren = function hasUnknownChildren(children) {
|
|
7390
|
-
var _context;
|
|
7391
|
-
return _someInstanceProperty__default["default"](_context = React.Children.toArray(children)).call(_context, function (child) {
|
|
7392
|
-
return child.type.displayName !== Match.displayName;
|
|
7393
|
-
});
|
|
7394
|
-
};
|
|
7395
|
-
var hasError = function hasError(errors, rule) {
|
|
7396
|
-
return Boolean(errors[rule]);
|
|
7397
|
-
};
|
|
7398
|
-
var Switch = /*#__PURE__*/function (_PureComponent) {
|
|
7399
|
-
_inherits(Switch, _PureComponent);
|
|
7400
|
-
var _super = _createSuper$4(Switch);
|
|
7401
|
-
function Switch() {
|
|
7402
|
-
_classCallCheck(this, Switch);
|
|
7403
|
-
return _super.apply(this, arguments);
|
|
7404
|
-
}
|
|
7405
|
-
_createClass(Switch, [{
|
|
7406
|
-
key: "componentDidMount",
|
|
7407
|
-
value: function componentDidMount() {
|
|
7408
|
-
/**
|
|
7409
|
-
* NOTE:
|
|
7410
|
-
* The `<ValidationError.Switch>` only works with `<ValidationError.Match>` as its children.
|
|
7411
|
-
*/
|
|
7412
|
-
!!hasUnknownChildren(this.props.children) ? invariant__default["default"](false) : void 0;
|
|
7413
|
-
}
|
|
7414
|
-
}, {
|
|
7415
|
-
key: "render",
|
|
7416
|
-
value: function render() {
|
|
7417
|
-
var _this = this;
|
|
7418
|
-
return _mapInstanceProperty__default["default"](React.Children).call(React.Children, this.props.children, function (child) {
|
|
7419
|
-
return /*#__PURE__*/React.cloneElement(child, {
|
|
7420
|
-
isTouched: _this.props.isTouched,
|
|
7421
|
-
hasError: hasError(_this.props.errors, child.props.rule)
|
|
7422
|
-
});
|
|
7423
|
-
});
|
|
7424
|
-
}
|
|
7425
|
-
}]);
|
|
7426
|
-
return Switch;
|
|
7427
|
-
}(React.PureComponent);
|
|
7428
|
-
Switch.displayName = 'ValidationErrorSwitch';
|
|
7429
|
-
Switch.defaultProps = {
|
|
7430
|
-
errors: {},
|
|
7431
|
-
isTouched: false
|
|
7432
|
-
};
|
|
7433
|
-
|
|
7434
|
-
var ValidationError = {
|
|
7435
|
-
Switch: Switch,
|
|
7436
|
-
Match: Match
|
|
7437
|
-
};
|
|
7438
|
-
|
|
7439
7367
|
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; }
|
|
7440
7368
|
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; }
|
|
7441
7369
|
var mergeSetItemsErrors = function mergeSetItemsErrors(errors) {
|
|
@@ -7451,19 +7379,11 @@ var CustomFieldErrors = function CustomFieldErrors(props) {
|
|
|
7451
7379
|
// but also after manually triggered form validation.
|
|
7452
7380
|
var didFormValidationFail = useDidFormValidationFail();
|
|
7453
7381
|
var errors = _Array$isArray__default["default"](props.errors) ? mergeSetItemsErrors(props.errors) : props.errors;
|
|
7454
|
-
return jsxRuntime.jsxs(
|
|
7455
|
-
errors: errors,
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
children: jsxRuntime.jsx(_.ErrorMessage, {
|
|
7460
|
-
intlMessage: messages$J.required
|
|
7461
|
-
})
|
|
7462
|
-
}), jsxRuntime.jsx(ValidationError.Match, {
|
|
7463
|
-
rule: "duplicated",
|
|
7464
|
-
children: jsxRuntime.jsx(_.ErrorMessage, {
|
|
7465
|
-
intlMessage: messages$J.unique
|
|
7466
|
-
})
|
|
7382
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7383
|
+
children: [props.isTouched || didFormValidationFail && (errors === null || errors === void 0 ? void 0 : errors.missing) && jsxRuntime.jsx(_.ErrorMessage, {
|
|
7384
|
+
intlMessage: messages$J.required
|
|
7385
|
+
}), props.isTouched || didFormValidationFail && (errors === null || errors === void 0 ? void 0 : errors.duplicated) && jsxRuntime.jsx(_.ErrorMessage, {
|
|
7386
|
+
intlMessage: messages$J.unique
|
|
7467
7387
|
})]
|
|
7468
7388
|
});
|
|
7469
7389
|
};
|
|
@@ -7980,6 +7900,8 @@ var NestedAttributeModalPage = function NestedAttributeModalPage(props) {
|
|
|
7980
7900
|
var _useIntl3 = reactIntl.useIntl(),
|
|
7981
7901
|
formatMessage = _useIntl3.formatMessage;
|
|
7982
7902
|
var formik$1 = formik.useFormikContext();
|
|
7903
|
+
var _useTheme = designSystem.useTheme(),
|
|
7904
|
+
isNewTheme = _useTheme.isNewTheme;
|
|
7983
7905
|
var confirmationModal = applicationComponents.useModalState();
|
|
7984
7906
|
var nestingLevel = React.useContext(NestingLevelContext);
|
|
7985
7907
|
var handleClose = function handleClose() {
|
|
@@ -7990,7 +7912,7 @@ var NestedAttributeModalPage = function NestedAttributeModalPage(props) {
|
|
|
7990
7912
|
confirmationModal.closeModal();
|
|
7991
7913
|
props.onClose();
|
|
7992
7914
|
};
|
|
7993
|
-
var columnsTemplate = nestingLevel === 1 ? "repeat(2, ".concat(uiKit.customProperties.constraint11, ")") : nestingLevel === 5 ? "".concat(uiKit.customProperties.constraint10) : "repeat(2, ".concat(uiKit.customProperties.constraint10, ")");
|
|
7915
|
+
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, ")");
|
|
7994
7916
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7995
7917
|
children: [jsxRuntime.jsx(applicationComponents.CustomFormModalPage, {
|
|
7996
7918
|
isOpen: props.isOpen,
|
|
@@ -8009,13 +7931,15 @@ var NestedAttributeModalPage = function NestedAttributeModalPage(props) {
|
|
|
8009
7931
|
onClose: handleClose,
|
|
8010
7932
|
shouldDelayOnClose: false,
|
|
8011
7933
|
title: props.title,
|
|
8012
|
-
children:
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
7934
|
+
children: jsxRuntime.jsx(applicationComponents.PageContentNarrow, {
|
|
7935
|
+
children: props.isOpen && jsxRuntime.jsx(uiKit.Grid, {
|
|
7936
|
+
gridTemplateColumns: columnsTemplate,
|
|
7937
|
+
gridGap: uiKit.customProperties.spacingM,
|
|
7938
|
+
children: jsxRuntime.jsx(ProductAttributes, {
|
|
7939
|
+
isDisabled: props.isDisabled,
|
|
7940
|
+
isReadOnly: props.isReadOnly,
|
|
7941
|
+
attributeDefinitions: props.productType.attributeDefinitions
|
|
7942
|
+
})
|
|
8019
7943
|
})
|
|
8020
7944
|
})
|
|
8021
7945
|
}), jsxRuntime.jsx(DropChangesConfirmation, {
|
|
@@ -8816,7 +8740,8 @@ var CustomerGroupPickerInput = function CustomerGroupPickerInput(_ref) {
|
|
|
8816
8740
|
onBlur = _ref.onBlur,
|
|
8817
8741
|
value = _ref.value,
|
|
8818
8742
|
hasError = _ref.hasError,
|
|
8819
|
-
onError = _ref.onError
|
|
8743
|
+
onError = _ref.onError,
|
|
8744
|
+
placeholder = _ref.placeholder;
|
|
8820
8745
|
var _useIntl = reactIntl.useIntl(),
|
|
8821
8746
|
formatMessage = _useIntl.formatMessage;
|
|
8822
8747
|
var variables = React.useMemo(function () {
|
|
@@ -8896,7 +8821,7 @@ var CustomerGroupPickerInput = function CustomerGroupPickerInput(_ref) {
|
|
|
8896
8821
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
8897
8822
|
id: name,
|
|
8898
8823
|
name: name,
|
|
8899
|
-
placeholder: formatMessage(messages$t.placeholder),
|
|
8824
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$t.placeholder),
|
|
8900
8825
|
loadOptions: loadOptionsDebounced,
|
|
8901
8826
|
defaultOptions: true,
|
|
8902
8827
|
showOptionGroupDivider: true,
|
|
@@ -10566,7 +10491,6 @@ var RESOURCES_WITH_PLATFORM_LIMITS = {
|
|
|
10566
10491
|
shippingMethods: 'shippingMethods',
|
|
10567
10492
|
carts: 'carts'
|
|
10568
10493
|
};
|
|
10569
|
-
var CUSTOMER_SUPPORT_LINK = 'https://jira.commercetools.com/servicedesk/customer/portal/1';
|
|
10570
10494
|
|
|
10571
10495
|
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; }
|
|
10572
10496
|
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; }
|
|
@@ -10680,26 +10604,26 @@ function _objectSpread$z(target) { for (var i = 1; i < arguments.length; i++) {
|
|
|
10680
10604
|
var getCustomerSupportLink$1 = function getCustomerSupportLink(msg) {
|
|
10681
10605
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
10682
10606
|
isExternal: true,
|
|
10683
|
-
to:
|
|
10607
|
+
to: constants.SUPPORT_PORTAL_URL,
|
|
10684
10608
|
children: msg
|
|
10685
10609
|
});
|
|
10686
10610
|
};
|
|
10687
10611
|
var PlatformLimitWarningNotification = function PlatformLimitWarningNotification(_ref) {
|
|
10688
10612
|
var resource = _ref.resource,
|
|
10689
10613
|
limit = _ref.limit;
|
|
10690
|
-
return jsxRuntime.
|
|
10691
|
-
|
|
10692
|
-
children:
|
|
10693
|
-
|
|
10694
|
-
|
|
10695
|
-
|
|
10696
|
-
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
|
|
10700
|
-
}
|
|
10701
|
-
}
|
|
10702
|
-
})
|
|
10614
|
+
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
10615
|
+
type: "warning",
|
|
10616
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$z(_objectSpread$z({}, messages$m[resource]), {}, {
|
|
10617
|
+
values: {
|
|
10618
|
+
limit: limit,
|
|
10619
|
+
customersupport: getCustomerSupportLink$1
|
|
10620
|
+
},
|
|
10621
|
+
children: function children(message) {
|
|
10622
|
+
return jsxRuntime.jsx("div", {
|
|
10623
|
+
children: message
|
|
10624
|
+
});
|
|
10625
|
+
}
|
|
10626
|
+
}))
|
|
10703
10627
|
});
|
|
10704
10628
|
};
|
|
10705
10629
|
PlatformLimitWarningNotification.displayName = 'PlatformLimitWarningNotification';
|
|
@@ -10737,7 +10661,7 @@ function _objectSpread$y(target) { for (var i = 1; i < arguments.length; i++) {
|
|
|
10737
10661
|
var getCustomerSupportLink = function getCustomerSupportLink(msg) {
|
|
10738
10662
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
10739
10663
|
isExternal: true,
|
|
10740
|
-
to:
|
|
10664
|
+
to: constants.SUPPORT_PORTAL_URL,
|
|
10741
10665
|
children: msg
|
|
10742
10666
|
}, msg);
|
|
10743
10667
|
};
|
|
@@ -13096,6 +13020,10 @@ function validatedInput(InnerComponent, validators) {
|
|
|
13096
13020
|
if (onChange && triggerUpdate) onChange(event);
|
|
13097
13021
|
_this.conditionalSetValidStatus(nextValidStatus);
|
|
13098
13022
|
};
|
|
13023
|
+
/**
|
|
13024
|
+
* Only triggers when there is a value, but its not valid
|
|
13025
|
+
* so it must be an invalid numeric value
|
|
13026
|
+
*/
|
|
13099
13027
|
_this.handleInvalid = function () {
|
|
13100
13028
|
var nextValidStatus = _objectSpread$8({}, _this.state.validStatus);
|
|
13101
13029
|
if (has__default["default"](nextValidStatus, 'numeric')) {
|
|
@@ -13334,7 +13262,6 @@ var MultiValueSelectorDropdown = function MultiValueSelectorDropdown(props) {
|
|
|
13334
13262
|
};
|
|
13335
13263
|
MultiValueSelectorDropdown.displayName = 'MultiValueSelectorDropdown';
|
|
13336
13264
|
var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
13337
|
-
var multiValueSearchInputRef = React.useRef(null);
|
|
13338
13265
|
var _useState = React.useState(''),
|
|
13339
13266
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13340
13267
|
value = _useState2[0],
|
|
@@ -13354,8 +13281,9 @@ var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
|
13354
13281
|
var clearRunningTooltipTimer = function clearRunningTooltipTimer() {
|
|
13355
13282
|
if (tooltipTimeoutHandler) clearTimeout(tooltipTimeoutHandler);
|
|
13356
13283
|
};
|
|
13357
|
-
var handleInputChange = function handleInputChange(
|
|
13358
|
-
var
|
|
13284
|
+
var handleInputChange = function handleInputChange(event) {
|
|
13285
|
+
var _event$target$value = event.target.value,
|
|
13286
|
+
inputValue = _event$target$value === void 0 ? '' : _event$target$value;
|
|
13359
13287
|
setValue(inputValue);
|
|
13360
13288
|
var multiInput = _trimInstanceProperty__default["default"](inputValue).call(inputValue).split(' ');
|
|
13361
13289
|
setMultiValue(multiInput);
|
|
@@ -13376,7 +13304,8 @@ var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
|
13376
13304
|
setValue('');
|
|
13377
13305
|
setMultiValue([]);
|
|
13378
13306
|
};
|
|
13379
|
-
var handleSubmit = function handleSubmit(
|
|
13307
|
+
var handleSubmit = function handleSubmit() {
|
|
13308
|
+
var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
13380
13309
|
clearInputValues();
|
|
13381
13310
|
clearRunningTooltipTimer();
|
|
13382
13311
|
setIsTooltipVisible(false);
|
|
@@ -13409,16 +13338,13 @@ var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
|
13409
13338
|
className: styles$1.container,
|
|
13410
13339
|
children: [jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
13411
13340
|
size: "s",
|
|
13412
|
-
children: jsxRuntime.jsx(
|
|
13413
|
-
|
|
13414
|
-
disabled: props.isDisabled,
|
|
13415
|
-
initialValue: value,
|
|
13416
|
-
throttleMS: 0,
|
|
13341
|
+
children: jsxRuntime.jsx(uiKit.SearchTextInput, {
|
|
13342
|
+
isDisabled: props.isDisabled,
|
|
13417
13343
|
placeholder: props.placeholder,
|
|
13418
|
-
onSubmit: handleSubmit,
|
|
13419
13344
|
onChange: handleInputChange,
|
|
13420
|
-
|
|
13421
|
-
|
|
13345
|
+
onReset: handleClearSearchField,
|
|
13346
|
+
onSubmit: handleSubmit,
|
|
13347
|
+
value: value
|
|
13422
13348
|
})
|
|
13423
13349
|
}), jsxRuntime.jsx(MultiValueSelectorDropdown, {
|
|
13424
13350
|
isOpen: isTooltipVisible,
|
|
@@ -14516,7 +14442,6 @@ exports.ThrottledField = ThrottledField;
|
|
|
14516
14442
|
exports.VALIDATOR_INTEGER = VALIDATOR_INTEGER;
|
|
14517
14443
|
exports.VALIDATOR_NUMERIC = VALIDATOR_NUMERIC;
|
|
14518
14444
|
exports.VALIDATOR_REQUIRED = VALIDATOR_REQUIRED;
|
|
14519
|
-
exports.ValidationError = ValidationError;
|
|
14520
14445
|
exports.WithPimIndexer = WithPimIndexer;
|
|
14521
14446
|
exports.allowedProperties = allowedProperties;
|
|
14522
14447
|
exports.and = and;
|
|
@@ -14658,9 +14583,11 @@ exports.usePrevious = usePrevious;
|
|
|
14658
14583
|
exports.useProductSelectionsFetcher = useProductSelectionsFetcher;
|
|
14659
14584
|
exports.useProductSelectionsTotalFetcher = useProductSelectionsTotalFetcher;
|
|
14660
14585
|
exports.useRoleNotificationEffect = useRoleNotificationEffect;
|
|
14586
|
+
exports.useShippingMethodsPlatformLimits = useShippingMethodsLimits;
|
|
14661
14587
|
exports.useStorage = useStorage;
|
|
14662
14588
|
exports.useStoreKeysInDataFences = useStoreKeysInDataFences;
|
|
14663
14589
|
exports.useStoresListFetcher = useStoresListFetcher;
|
|
14590
|
+
exports.useTaxCategoriesPlatformLimits = useTaxCategoriesLimits;
|
|
14664
14591
|
exports.useTotalNumberOfBusinessUnitsFetcherHandlers = handlers$1;
|
|
14665
14592
|
exports.useTotalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher;
|
|
14666
14593
|
exports.useTotalNumberOfStoresFetcherHandlers = handlers$3;
|