@commercetools-frontend/experimental-components 3.0.0 → 3.1.1
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.
|
@@ -68,6 +68,7 @@ var moment$1 = require('moment');
|
|
|
68
68
|
var _startsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/starts-with');
|
|
69
69
|
var classnames = require('classnames');
|
|
70
70
|
require('react-required-if');
|
|
71
|
+
var designSystem = require('@commercetools-uikit/design-system');
|
|
71
72
|
var _assertThisInitialized = require('@babel/runtime-corejs3/helpers/assertThisInitialized');
|
|
72
73
|
var Textarea = require('react-textarea-autosize');
|
|
73
74
|
var has = require('lodash.has');
|
|
@@ -91,7 +92,6 @@ var omitBy = require('lodash.omitby');
|
|
|
91
92
|
var _everyInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/every');
|
|
92
93
|
var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
|
|
93
94
|
var react$1 = require('@emotion/react');
|
|
94
|
-
var designSystem = require('@commercetools-uikit/design-system');
|
|
95
95
|
var _endsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/ends-with');
|
|
96
96
|
var reselect = require('reselect');
|
|
97
97
|
var _Map = require('@babel/runtime-corejs3/core-js-stable/map');
|
|
@@ -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,8 +3190,11 @@ var trackingEvents$4 = {
|
|
|
3190
3190
|
}
|
|
3191
3191
|
};
|
|
3192
3192
|
|
|
3193
|
-
|
|
3194
|
-
|
|
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; }
|
|
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: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
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: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
3197
|
+
var PickerInputChannel = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
3195
3198
|
var getTrackingEvent$4 = function getTrackingEvent(inputValue, selectedValue) {
|
|
3196
3199
|
var id = selectedValue.value,
|
|
3197
3200
|
key = selectedValue.key,
|
|
@@ -3210,7 +3213,8 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3210
3213
|
value = _ref.value,
|
|
3211
3214
|
hasError = _ref.hasError,
|
|
3212
3215
|
onError = _ref.onError,
|
|
3213
|
-
placeholder = _ref.placeholder
|
|
3216
|
+
placeholder = _ref.placeholder,
|
|
3217
|
+
role = _ref.role;
|
|
3214
3218
|
var formatLocalizedFieldToString = useFormatLocalizedFieldToString();
|
|
3215
3219
|
var _useIntl = reactIntl.useIntl(),
|
|
3216
3220
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -3218,10 +3222,12 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3218
3222
|
return applicationContext.dataLocale;
|
|
3219
3223
|
});
|
|
3220
3224
|
var variables = React.useMemo(function () {
|
|
3221
|
-
return {
|
|
3225
|
+
return _objectSpread$1b({
|
|
3222
3226
|
sortByNamePath: "name.".concat(dataLocale)
|
|
3223
|
-
}
|
|
3224
|
-
|
|
3227
|
+
}, role && {
|
|
3228
|
+
where: "roles contains any (\"".concat(role, "\")")
|
|
3229
|
+
});
|
|
3230
|
+
}, [dataLocale, role]);
|
|
3225
3231
|
var _useState = React.useState(),
|
|
3226
3232
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3227
3233
|
loadingError = _useState2[0],
|
|
@@ -3249,10 +3255,13 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3249
3255
|
var currentOption = useCurrentOption({
|
|
3250
3256
|
query: GetChannelQuery,
|
|
3251
3257
|
id: value,
|
|
3252
|
-
|
|
3258
|
+
queryDataToItem: function queryDataToItem(_ref2) {
|
|
3253
3259
|
var channel = _ref2.channel;
|
|
3254
|
-
return
|
|
3255
|
-
}
|
|
3260
|
+
return channel;
|
|
3261
|
+
},
|
|
3262
|
+
itemToOption: convertChannelToOption,
|
|
3263
|
+
typename: 'Channel',
|
|
3264
|
+
fragment: PickerInputChannel
|
|
3256
3265
|
});
|
|
3257
3266
|
var handleLoadOptions = React.useCallback(function (inputValue) {
|
|
3258
3267
|
return loadOptions(inputValue).then(function (_ref3) {
|
|
@@ -3285,7 +3294,7 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3285
3294
|
var tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0 ? void 0 : (_currentOption$data = currentOption.data) === null || _currentOption$data === void 0 ? void 0 : _currentOption$data.label) !== null && _currentOption$data$l !== void 0 ? _currentOption$data$l : '';
|
|
3286
3295
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
3287
3296
|
max: "scale",
|
|
3288
|
-
children:
|
|
3297
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
3289
3298
|
scale: "xs",
|
|
3290
3299
|
children: [jsxRuntime.jsx(CustomFieldTooltip, {
|
|
3291
3300
|
title: tooltipTitle,
|
|
@@ -3297,7 +3306,7 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3297
3306
|
defaultOptions: true,
|
|
3298
3307
|
showOptionGroupDivider: true,
|
|
3299
3308
|
isClearable: isClearable,
|
|
3300
|
-
isReadOnly: isReadOnly,
|
|
3309
|
+
isReadOnly: isReadOnly || currentOption.loading,
|
|
3301
3310
|
isDisabled: isDisabled,
|
|
3302
3311
|
components: {
|
|
3303
3312
|
Option: Option$2
|
|
@@ -3699,7 +3708,7 @@ var SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3699
3708
|
onMouseOver: this.props.handleMouseOver,
|
|
3700
3709
|
onMouseOut: this.props.handleMouseOut,
|
|
3701
3710
|
children: jsxRuntime.jsx(uiKit.SearchIcon, {
|
|
3702
|
-
color: this.props.iconColor || this.props.isMouseOver && !this.props.disabled ? 'primary' : this.props.enableDisabledStyle ? 'neutral60' : 'solid',
|
|
3711
|
+
color: this.props.iconColor || this.props.isMouseOver && !this.props.disabled ? 'primary' : this.props.themedValue(this.props.enableDisabledStyle ? 'neutral60' : 'solid', 'neutral60'),
|
|
3703
3712
|
size: "big"
|
|
3704
3713
|
})
|
|
3705
3714
|
})]
|
|
@@ -3731,7 +3740,7 @@ SearchInput.defaultProps = {
|
|
|
3731
3740
|
return null;
|
|
3732
3741
|
}
|
|
3733
3742
|
};
|
|
3734
|
-
var SearchInput$1 = flowRight__default["default"](keepDisplayName(SearchInput), withMouseOverState, reactIntl.injectIntl)(SearchInput);
|
|
3743
|
+
var SearchInput$1 = flowRight__default["default"](keepDisplayName(SearchInput), withMouseOverState, reactIntl.injectIntl, designSystem.withThemeContext)(SearchInput);
|
|
3735
3744
|
|
|
3736
3745
|
var FetchIndicesExist$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchIndicesExist" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indicesExist" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "products" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 191, source: { body: "query FetchIndicesExist {\n indicesExist {\n products {\n searchableIndexExists\n newInProgress\n }\n productTypes {\n searchableIndexExists\n newInProgress\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
3737
3746
|
var useExecuteGraphQLRequest = function useExecuteGraphQLRequest() {
|
|
@@ -4027,22 +4036,44 @@ var useLoadOptions = function useLoadOptions(_ref) {
|
|
|
4027
4036
|
};
|
|
4028
4037
|
|
|
4029
4038
|
function useCurrentOption(_ref) {
|
|
4039
|
+
var _context;
|
|
4030
4040
|
var id = _ref.id,
|
|
4041
|
+
typename = _ref.typename,
|
|
4031
4042
|
query = _ref.query,
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4043
|
+
fragment = _ref.fragment,
|
|
4044
|
+
queryDataToItem = _ref.queryDataToItem,
|
|
4045
|
+
itemToOption = _ref.itemToOption;
|
|
4046
|
+
var apolloClient = client.useApolloClient();
|
|
4047
|
+
|
|
4048
|
+
// load from cache when possible to speed up initial render
|
|
4049
|
+
var canReadFromCache = id && typename && fragment;
|
|
4050
|
+
var cacheItem = canReadFromCache ? apolloClient.readFragment({
|
|
4051
|
+
id: _concatInstanceProperty__default["default"](_context = "".concat(typename, ":")).call(_context, id),
|
|
4052
|
+
fragment: fragment
|
|
4053
|
+
}) : undefined;
|
|
4054
|
+
|
|
4055
|
+
// load with the query as a fallback
|
|
4056
|
+
var _useQuery = client.useQuery(query, {
|
|
4057
|
+
context: {
|
|
4058
|
+
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
4059
|
+
},
|
|
4060
|
+
variables: {
|
|
4061
|
+
id: id
|
|
4062
|
+
},
|
|
4063
|
+
skip: !id || cacheItem
|
|
4064
|
+
}),
|
|
4065
|
+
queryLoading = _useQuery.loading,
|
|
4066
|
+
queryData = _useQuery.data,
|
|
4067
|
+
queryError = _useQuery.error;
|
|
4068
|
+
var queryItem = queryData && queryDataToItem(queryData);
|
|
4069
|
+
var item = queryItem !== null && queryItem !== void 0 ? queryItem : cacheItem;
|
|
4070
|
+
var loading = item ? false : queryLoading;
|
|
4071
|
+
var error = item ? undefined : queryError;
|
|
4072
|
+
var data = item && itemToOption(item);
|
|
4042
4073
|
return {
|
|
4043
|
-
loading:
|
|
4044
|
-
data:
|
|
4045
|
-
error:
|
|
4074
|
+
loading: loading,
|
|
4075
|
+
data: data,
|
|
4076
|
+
error: error
|
|
4046
4077
|
};
|
|
4047
4078
|
}
|
|
4048
4079
|
|
|
@@ -4121,10 +4152,11 @@ var ProductTypePickerInput = function ProductTypePickerInput(_ref) {
|
|
|
4121
4152
|
var currentOption = useCurrentOption({
|
|
4122
4153
|
query: GetProductTypeQuery,
|
|
4123
4154
|
id: value,
|
|
4124
|
-
|
|
4155
|
+
queryDataToItem: function queryDataToItem(_ref2) {
|
|
4125
4156
|
var productType = _ref2.productType;
|
|
4126
|
-
return
|
|
4127
|
-
}
|
|
4157
|
+
return productType;
|
|
4158
|
+
},
|
|
4159
|
+
itemToOption: convertProductTypeToOption
|
|
4128
4160
|
});
|
|
4129
4161
|
var handleLoadOptions = React.useCallback(function (inputValue) {
|
|
4130
4162
|
return loadProductTypes(inputValue).then(function (_ref3) {
|
|
@@ -4280,10 +4312,11 @@ var StatePickerInput = function StatePickerInput(_ref) {
|
|
|
4280
4312
|
var currentOption = useCurrentOption({
|
|
4281
4313
|
query: GetStateQuery,
|
|
4282
4314
|
id: value,
|
|
4283
|
-
|
|
4315
|
+
queryDataToItem: function queryDataToItem(_ref2) {
|
|
4284
4316
|
var state = _ref2.state;
|
|
4285
|
-
return
|
|
4286
|
-
}
|
|
4317
|
+
return state;
|
|
4318
|
+
},
|
|
4319
|
+
itemToOption: convertStateToOption
|
|
4287
4320
|
});
|
|
4288
4321
|
var handleLoadOptions = React.useCallback(function (inputValue) {
|
|
4289
4322
|
return loadOptions(inputValue).then(function (_ref3) {
|
|
@@ -6646,10 +6679,11 @@ var ProductPickerInput = function ProductPickerInput(_ref) {
|
|
|
6646
6679
|
var currentOption = useCurrentOption({
|
|
6647
6680
|
query: GetProductQuery,
|
|
6648
6681
|
id: value,
|
|
6649
|
-
|
|
6682
|
+
queryDataToItem: function queryDataToItem(_ref2) {
|
|
6650
6683
|
var product = _ref2.product;
|
|
6651
|
-
return
|
|
6652
|
-
}
|
|
6684
|
+
return product;
|
|
6685
|
+
},
|
|
6686
|
+
itemToOption: convertProductToOption
|
|
6653
6687
|
});
|
|
6654
6688
|
var handleLoadOptions = React.useCallback(function (inputValue) {
|
|
6655
6689
|
return loadOptions(inputValue).then(function (_ref3) {
|
|
@@ -7184,7 +7218,7 @@ function CustomInputSet(props) {
|
|
|
7184
7218
|
// type is selected.
|
|
7185
7219
|
var type = getType(props.fieldDefinition);
|
|
7186
7220
|
var typeName = type.name.toLowerCase();
|
|
7187
|
-
var areButtonsTopAligned = _includesInstanceProperty__default["default"](_context5 = [CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.localizedenum, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.string, CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.reference]).call(_context5, typeName);
|
|
7221
|
+
var areButtonsTopAligned = _includesInstanceProperty__default["default"](_context5 = [CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.localizedenum, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.string, CUSTOM_FIELD_TYPES.text, CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.reference]).call(_context5, typeName);
|
|
7188
7222
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7189
7223
|
children: [jsxRuntime.jsx(uiKit.AccessibleHidden, {
|
|
7190
7224
|
children: jsxRuntime.jsx("label", {
|
|
@@ -8712,8 +8746,9 @@ var trackingEvents = {
|
|
|
8712
8746
|
}
|
|
8713
8747
|
};
|
|
8714
8748
|
|
|
8715
|
-
var GetCustomerGroupsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetCustomerGroupsQuery" }, 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: "customerGroups" }, 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: "
|
|
8716
|
-
var GetCustomerGroupQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetCustomerGroupQuery" }, 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: "customerGroup" }, 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: "name" }, arguments: [], directives: [] }] } }]
|
|
8749
|
+
var GetCustomerGroupsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetCustomerGroupsQuery" }, 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: "customerGroups" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "ListValue", values: [{ kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, { kind: "StringValue", value: "key", block: false }] } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "60" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputCustomerGroups" }, directives: [] }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputCustomerGroups" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CustomerGroup" } }, 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: "name" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 406, source: { body: "fragment PickerInputCustomerGroups on CustomerGroup {\n id\n key\n name\n}\n\nquery GetCustomerGroupsQuery($where: String, $sortByNamePath: String!) {\n customerGroups(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputCustomerGroups\n }\n }\n}\n\nquery GetCustomerGroupQuery($id: String) {\n customerGroup(id: $id) {\n ...PickerInputCustomerGroups\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8750
|
+
var GetCustomerGroupQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetCustomerGroupQuery" }, 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: "customerGroup" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputCustomerGroups" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputCustomerGroups" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CustomerGroup" } }, 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: "name" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 406, source: { body: "fragment PickerInputCustomerGroups on CustomerGroup {\n id\n key\n name\n}\n\nquery GetCustomerGroupsQuery($where: String, $sortByNamePath: String!) {\n customerGroups(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputCustomerGroups\n }\n }\n}\n\nquery GetCustomerGroupQuery($id: String) {\n customerGroup(id: $id) {\n ...PickerInputCustomerGroups\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8751
|
+
var PickerInputCustomerGroups = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputCustomerGroups" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CustomerGroup" } }, 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: "name" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 406, source: { body: "fragment PickerInputCustomerGroups on CustomerGroup {\n id\n key\n name\n}\n\nquery GetCustomerGroupsQuery($where: String, $sortByNamePath: String!) {\n customerGroups(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputCustomerGroups\n }\n }\n}\n\nquery GetCustomerGroupQuery($id: String) {\n customerGroup(id: $id) {\n ...PickerInputCustomerGroups\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8717
8752
|
var getTrackingEvent = function getTrackingEvent(inputValue, selectedValue) {
|
|
8718
8753
|
var id = selectedValue.value,
|
|
8719
8754
|
key = selectedValue.key,
|
|
@@ -8773,10 +8808,13 @@ var CustomerGroupPickerInput = function CustomerGroupPickerInput(_ref) {
|
|
|
8773
8808
|
var currentOption = useCurrentOption({
|
|
8774
8809
|
query: GetCustomerGroupQuery,
|
|
8775
8810
|
id: value,
|
|
8776
|
-
|
|
8811
|
+
queryDataToItem: function queryDataToItem(_ref2) {
|
|
8777
8812
|
var customerGroup = _ref2.customerGroup;
|
|
8778
|
-
return
|
|
8779
|
-
}
|
|
8813
|
+
return customerGroup;
|
|
8814
|
+
},
|
|
8815
|
+
itemToOption: convertCustomerGroupToOption,
|
|
8816
|
+
typename: 'CustomerGroup',
|
|
8817
|
+
fragment: PickerInputCustomerGroups
|
|
8780
8818
|
});
|
|
8781
8819
|
var handleLoadOptions = React.useCallback(function (inputValue) {
|
|
8782
8820
|
return loadOptions(inputValue).then(function (_ref3) {
|
|
@@ -8809,7 +8847,7 @@ var CustomerGroupPickerInput = function CustomerGroupPickerInput(_ref) {
|
|
|
8809
8847
|
var tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0 ? void 0 : (_currentOption$data = currentOption.data) === null || _currentOption$data === void 0 ? void 0 : _currentOption$data.label) !== null && _currentOption$data$l !== void 0 ? _currentOption$data$l : '';
|
|
8810
8848
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
8811
8849
|
max: "scale",
|
|
8812
|
-
children:
|
|
8850
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
8813
8851
|
scale: "xs",
|
|
8814
8852
|
children: [jsxRuntime.jsx(CustomFieldTooltip, {
|
|
8815
8853
|
title: tooltipTitle,
|
|
@@ -8821,7 +8859,7 @@ var CustomerGroupPickerInput = function CustomerGroupPickerInput(_ref) {
|
|
|
8821
8859
|
defaultOptions: true,
|
|
8822
8860
|
showOptionGroupDivider: true,
|
|
8823
8861
|
isClearable: isClearable,
|
|
8824
|
-
isReadOnly: isReadOnly,
|
|
8862
|
+
isReadOnly: isReadOnly || currentOption.loading,
|
|
8825
8863
|
isDisabled: isDisabled,
|
|
8826
8864
|
components: {
|
|
8827
8865
|
Option: Option$2
|
|
@@ -12792,7 +12830,7 @@ var StoreSelectField = function StoreSelectField(props) {
|
|
|
12792
12830
|
hintIcon: props.hintIcon,
|
|
12793
12831
|
htmlFor: props.id,
|
|
12794
12832
|
hasRequiredIndicator: props.isRequired,
|
|
12795
|
-
isBold:
|
|
12833
|
+
isBold: true
|
|
12796
12834
|
}), jsxRuntime.jsx(StoreSelectInput, _objectSpread$a(_objectSpread$a({
|
|
12797
12835
|
projectKey: props.projectKey,
|
|
12798
12836
|
id: props.id,
|
|
@@ -13257,7 +13295,6 @@ var MultiValueSelectorDropdown = function MultiValueSelectorDropdown(props) {
|
|
|
13257
13295
|
};
|
|
13258
13296
|
MultiValueSelectorDropdown.displayName = 'MultiValueSelectorDropdown';
|
|
13259
13297
|
var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
13260
|
-
var multiValueSearchInputRef = React.useRef(null);
|
|
13261
13298
|
var _useState = React.useState(''),
|
|
13262
13299
|
_useState2 = _slicedToArray(_useState, 2),
|
|
13263
13300
|
value = _useState2[0],
|
|
@@ -13277,8 +13314,9 @@ var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
|
13277
13314
|
var clearRunningTooltipTimer = function clearRunningTooltipTimer() {
|
|
13278
13315
|
if (tooltipTimeoutHandler) clearTimeout(tooltipTimeoutHandler);
|
|
13279
13316
|
};
|
|
13280
|
-
var handleInputChange = function handleInputChange(
|
|
13281
|
-
var
|
|
13317
|
+
var handleInputChange = function handleInputChange(event) {
|
|
13318
|
+
var _event$target$value = event.target.value,
|
|
13319
|
+
inputValue = _event$target$value === void 0 ? '' : _event$target$value;
|
|
13282
13320
|
setValue(inputValue);
|
|
13283
13321
|
var multiInput = _trimInstanceProperty__default["default"](inputValue).call(inputValue).split(' ');
|
|
13284
13322
|
setMultiValue(multiInput);
|
|
@@ -13299,7 +13337,8 @@ var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
|
13299
13337
|
setValue('');
|
|
13300
13338
|
setMultiValue([]);
|
|
13301
13339
|
};
|
|
13302
|
-
var handleSubmit = function handleSubmit(
|
|
13340
|
+
var handleSubmit = function handleSubmit() {
|
|
13341
|
+
var inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
13303
13342
|
clearInputValues();
|
|
13304
13343
|
clearRunningTooltipTimer();
|
|
13305
13344
|
setIsTooltipVisible(false);
|
|
@@ -13332,16 +13371,13 @@ var MultiValueSearchInput = function MultiValueSearchInput(props) {
|
|
|
13332
13371
|
className: styles$1.container,
|
|
13333
13372
|
children: [jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
13334
13373
|
size: "s",
|
|
13335
|
-
children: jsxRuntime.jsx(
|
|
13336
|
-
|
|
13337
|
-
disabled: props.isDisabled,
|
|
13338
|
-
initialValue: value,
|
|
13339
|
-
throttleMS: 0,
|
|
13374
|
+
children: jsxRuntime.jsx(uiKit.SearchTextInput, {
|
|
13375
|
+
isDisabled: props.isDisabled,
|
|
13340
13376
|
placeholder: props.placeholder,
|
|
13341
|
-
onSubmit: handleSubmit,
|
|
13342
13377
|
onChange: handleInputChange,
|
|
13343
|
-
|
|
13344
|
-
|
|
13378
|
+
onReset: handleClearSearchField,
|
|
13379
|
+
onSubmit: handleSubmit,
|
|
13380
|
+
value: value
|
|
13345
13381
|
})
|
|
13346
13382
|
}), jsxRuntime.jsx(MultiValueSelectorDropdown, {
|
|
13347
13383
|
isOpen: isTooltipVisible,
|