@commercetools-frontend/experimental-components 3.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) {
|
|
@@ -3210,7 +3212,8 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3210
3212
|
value = _ref.value,
|
|
3211
3213
|
hasError = _ref.hasError,
|
|
3212
3214
|
onError = _ref.onError,
|
|
3213
|
-
placeholder = _ref.placeholder
|
|
3215
|
+
placeholder = _ref.placeholder,
|
|
3216
|
+
role = _ref.role;
|
|
3214
3217
|
var formatLocalizedFieldToString = useFormatLocalizedFieldToString();
|
|
3215
3218
|
var _useIntl = reactIntl.useIntl(),
|
|
3216
3219
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -3218,10 +3221,12 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3218
3221
|
return applicationContext.dataLocale;
|
|
3219
3222
|
});
|
|
3220
3223
|
var variables = React.useMemo(function () {
|
|
3221
|
-
return {
|
|
3224
|
+
return _objectSpread$1b({
|
|
3222
3225
|
sortByNamePath: "name.".concat(dataLocale)
|
|
3223
|
-
}
|
|
3224
|
-
|
|
3226
|
+
}, role && {
|
|
3227
|
+
where: "roles contains any (\"".concat(role, "\")")
|
|
3228
|
+
});
|
|
3229
|
+
}, [dataLocale, role]);
|
|
3225
3230
|
var _useState = React.useState(),
|
|
3226
3231
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3227
3232
|
loadingError = _useState2[0],
|
|
@@ -13257,7 +13262,6 @@ var MultiValueSelectorDropdown = function MultiValueSelectorDropdown(props) {
|
|
|
13257
13262
|
};
|
|
13258
13263
|
MultiValueSelectorDropdown.displayName = 'MultiValueSelectorDropdown';
|
|
13259
13264
|
var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
13260
|
-
var multiValueSearchInputRef = React.useRef(null);
|
|
13261
13265
|
var _useState = React.useState(''),
|
|
13262
13266
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13263
13267
|
value = _useState2[0],
|
|
@@ -13277,8 +13281,9 @@ var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
|
13277
13281
|
var clearRunningTooltipTimer = function clearRunningTooltipTimer() {
|
|
13278
13282
|
if (tooltipTimeoutHandler) clearTimeout(tooltipTimeoutHandler);
|
|
13279
13283
|
};
|
|
13280
|
-
var handleInputChange = function handleInputChange(
|
|
13281
|
-
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;
|
|
13282
13287
|
setValue(inputValue);
|
|
13283
13288
|
var multiInput = _trimInstanceProperty__default["default"](inputValue).call(inputValue).split(' ');
|
|
13284
13289
|
setMultiValue(multiInput);
|
|
@@ -13299,7 +13304,8 @@ var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
|
13299
13304
|
setValue('');
|
|
13300
13305
|
setMultiValue([]);
|
|
13301
13306
|
};
|
|
13302
|
-
var handleSubmit = function handleSubmit(
|
|
13307
|
+
var handleSubmit = function handleSubmit() {
|
|
13308
|
+
var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
13303
13309
|
clearInputValues();
|
|
13304
13310
|
clearRunningTooltipTimer();
|
|
13305
13311
|
setIsTooltipVisible(false);
|
|
@@ -13332,16 +13338,13 @@ var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
|
13332
13338
|
className: styles$1.container,
|
|
13333
13339
|
children: [jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
13334
13340
|
size: "s",
|
|
13335
|
-
children: jsxRuntime.jsx(
|
|
13336
|
-
|
|
13337
|
-
disabled: props.isDisabled,
|
|
13338
|
-
initialValue: value,
|
|
13339
|
-
throttleMS: 0,
|
|
13341
|
+
children: jsxRuntime.jsx(uiKit.SearchTextInput, {
|
|
13342
|
+
isDisabled: props.isDisabled,
|
|
13340
13343
|
placeholder: props.placeholder,
|
|
13341
|
-
onSubmit: handleSubmit,
|
|
13342
13344
|
onChange: handleInputChange,
|
|
13343
|
-
|
|
13344
|
-
|
|
13345
|
+
onReset: handleClearSearchField,
|
|
13346
|
+
onSubmit: handleSubmit,
|
|
13347
|
+
value: value
|
|
13345
13348
|
})
|
|
13346
13349
|
}), jsxRuntime.jsx(MultiValueSelectorDropdown, {
|
|
13347
13350
|
isOpen: isTooltipVisible,
|