@commercetools-frontend/experimental-components 3.2.0 → 3.2.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.
- package/dist/commercetools-frontend-experimental-components.cjs.dev.js +889 -312
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +889 -312
- package/dist/commercetools-frontend-experimental-components.esm.js +884 -311
- package/dist/styles.css +47 -47
- package/package.json +13 -13
|
@@ -76,7 +76,6 @@ var _reverseInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/in
|
|
|
76
76
|
var sdk = require('@commercetools-frontend/sdk');
|
|
77
77
|
var client = require('@apollo/client');
|
|
78
78
|
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
79
|
-
var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
80
79
|
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
81
80
|
var omit = require('lodash/omit');
|
|
82
81
|
var isEmpty$3 = require('lodash/isEmpty');
|
|
@@ -84,6 +83,7 @@ var _Object$freeze = require('@babel/runtime-corejs3/core-js-stable/object/freez
|
|
|
84
83
|
var originalOmitDeep = require('omit-deep');
|
|
85
84
|
var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/values');
|
|
86
85
|
var _parseInt = require('@babel/runtime-corejs3/core-js-stable/parse-int');
|
|
86
|
+
var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
87
87
|
var hoistNonReactStatics = require('hoist-non-react-statics');
|
|
88
88
|
var omitBy = require('lodash/omitBy');
|
|
89
89
|
var _everyInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/every');
|
|
@@ -102,6 +102,8 @@ var _ = require('@commercetools-frontend/ui-kit/');
|
|
|
102
102
|
var selectUtils = require('@commercetools-uikit/select-utils');
|
|
103
103
|
var memoize = require('memoize-one');
|
|
104
104
|
var utils = require('@commercetools-uikit/utils');
|
|
105
|
+
var differenceBy = require('lodash/differenceBy');
|
|
106
|
+
var intersectionBy = require('lodash/intersectionBy');
|
|
105
107
|
var _parseFloat = require('@babel/runtime-corejs3/core-js-stable/parse-float');
|
|
106
108
|
var flatMap = require('lodash/flatMap');
|
|
107
109
|
var reactRedux = require('react-redux');
|
|
@@ -166,7 +168,6 @@ var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
|
166
168
|
var Textarea__default = /*#__PURE__*/_interopDefault(Textarea);
|
|
167
169
|
var has__default = /*#__PURE__*/_interopDefault(has);
|
|
168
170
|
var _reverseInstanceProperty__default = /*#__PURE__*/_interopDefault(_reverseInstanceProperty);
|
|
169
|
-
var _Array$isArray__default = /*#__PURE__*/_interopDefault(_Array$isArray);
|
|
170
171
|
var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
171
172
|
var omit__default = /*#__PURE__*/_interopDefault(omit);
|
|
172
173
|
var isEmpty__default = /*#__PURE__*/_interopDefault(isEmpty$3);
|
|
@@ -174,6 +175,7 @@ var _Object$freeze__default = /*#__PURE__*/_interopDefault(_Object$freeze);
|
|
|
174
175
|
var originalOmitDeep__default = /*#__PURE__*/_interopDefault(originalOmitDeep);
|
|
175
176
|
var _Object$values__default = /*#__PURE__*/_interopDefault(_Object$values);
|
|
176
177
|
var _parseInt__default = /*#__PURE__*/_interopDefault(_parseInt);
|
|
178
|
+
var _Array$isArray__default = /*#__PURE__*/_interopDefault(_Array$isArray);
|
|
177
179
|
var hoistNonReactStatics__default = /*#__PURE__*/_interopDefault(hoistNonReactStatics);
|
|
178
180
|
var omitBy__default = /*#__PURE__*/_interopDefault(omitBy);
|
|
179
181
|
var _everyInstanceProperty__default = /*#__PURE__*/_interopDefault(_everyInstanceProperty);
|
|
@@ -186,6 +188,8 @@ var times__default = /*#__PURE__*/_interopDefault(times);
|
|
|
186
188
|
var merge__default = /*#__PURE__*/_interopDefault(merge);
|
|
187
189
|
var set__default = /*#__PURE__*/_interopDefault(set);
|
|
188
190
|
var memoize__default = /*#__PURE__*/_interopDefault(memoize);
|
|
191
|
+
var differenceBy__default = /*#__PURE__*/_interopDefault(differenceBy);
|
|
192
|
+
var intersectionBy__default = /*#__PURE__*/_interopDefault(intersectionBy);
|
|
189
193
|
var _parseFloat__default = /*#__PURE__*/_interopDefault(_parseFloat);
|
|
190
194
|
var flatMap__default = /*#__PURE__*/_interopDefault(flatMap);
|
|
191
195
|
var warning__default = /*#__PURE__*/_interopDefault(warning);
|
|
@@ -301,7 +305,7 @@ function filterDataAttributes(obj) {
|
|
|
301
305
|
}, {});
|
|
302
306
|
}
|
|
303
307
|
|
|
304
|
-
const messages$
|
|
308
|
+
const messages$O = reactIntl.defineMessages({
|
|
305
309
|
unique: {
|
|
306
310
|
id: 'Validation.unique',
|
|
307
311
|
description: 'An error message to show if the field must be unique',
|
|
@@ -1698,8 +1702,8 @@ const getData = (code, field) => {
|
|
|
1698
1702
|
};
|
|
1699
1703
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
1700
1704
|
|
|
1701
|
-
function ownKeys$
|
|
1702
|
-
function _objectSpread$
|
|
1705
|
+
function ownKeys$1q(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; }
|
|
1706
|
+
function _objectSpread$1q(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$1q(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$1q(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1703
1707
|
function formatMoneyRangeValue(value, intl) {
|
|
1704
1708
|
var _context;
|
|
1705
1709
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
@@ -1709,7 +1713,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
1709
1713
|
return '';
|
|
1710
1714
|
}
|
|
1711
1715
|
function formatMoneyValue(amount, currency, intl) {
|
|
1712
|
-
return formatMoney$1(_objectSpread$
|
|
1716
|
+
return formatMoney$1(_objectSpread$1q({
|
|
1713
1717
|
centAmount: amount,
|
|
1714
1718
|
fractionDigits: getFractionDigit(currency)
|
|
1715
1719
|
}, currency ? {
|
|
@@ -1726,14 +1730,14 @@ function getFractionedAmount(moneyValue) {
|
|
|
1726
1730
|
}
|
|
1727
1731
|
function formatMoney$1(moneyValue, intl, options) {
|
|
1728
1732
|
var _moneyValue$fractione;
|
|
1729
|
-
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$
|
|
1733
|
+
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$1q({
|
|
1730
1734
|
style: 'currency',
|
|
1731
1735
|
currency: moneyValue.currencyCode,
|
|
1732
1736
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
1733
1737
|
}, options));
|
|
1734
1738
|
}
|
|
1735
1739
|
|
|
1736
|
-
var messages$
|
|
1740
|
+
var messages$N = reactIntl.defineMessages({
|
|
1737
1741
|
booleanYes: {
|
|
1738
1742
|
id: 'AttributeTypeFormats.boolean.yes',
|
|
1739
1743
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -1816,7 +1820,7 @@ const formatDateTime = _ref7 => {
|
|
|
1816
1820
|
const formatBoolean = _ref8 => {
|
|
1817
1821
|
let value = _ref8.value,
|
|
1818
1822
|
intl = _ref8.intl;
|
|
1819
|
-
return value ? intl.formatMessage(messages$
|
|
1823
|
+
return value ? intl.formatMessage(messages$N.booleanYes) : intl.formatMessage(messages$N.booleanNo);
|
|
1820
1824
|
};
|
|
1821
1825
|
const formatNilType = _ref9 => {
|
|
1822
1826
|
let value = _ref9.value,
|
|
@@ -1978,8 +1982,8 @@ const wrapDisplayName = (BaseComponent, hocName) => {
|
|
|
1978
1982
|
return _concatInstanceProperty__default["default"](_context = "".concat(hocName, "(")).call(_context, getDisplayName(BaseComponent), ")");
|
|
1979
1983
|
};
|
|
1980
1984
|
|
|
1981
|
-
function ownKeys$
|
|
1982
|
-
function _objectSpread$
|
|
1985
|
+
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; }
|
|
1986
|
+
function _objectSpread$1p(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$1p(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$1p(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
1983
1987
|
const injectDataTablePaginationState = initialValues => Component => {
|
|
1984
1988
|
const WithDataTablePaginationState = props => {
|
|
1985
1989
|
var _initialValues$tableS, _initialValues$tableS2;
|
|
@@ -1993,7 +1997,7 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1993
1997
|
key: initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$tableS = initialValues.tableSorting) === null || _initialValues$tableS === void 0 ? void 0 : _initialValues$tableS.key,
|
|
1994
1998
|
order: initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$tableS2 = initialValues.tableSorting) === null || _initialValues$tableS2 === void 0 ? void 0 : _initialValues$tableS2.order
|
|
1995
1999
|
});
|
|
1996
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2000
|
+
return jsxRuntime.jsx(Component, _objectSpread$1p(_objectSpread$1p({}, props), {}, {
|
|
1997
2001
|
dataTablePaginationState: {
|
|
1998
2002
|
page,
|
|
1999
2003
|
perPage,
|
|
@@ -2005,8 +2009,8 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
2005
2009
|
return WithDataTablePaginationState;
|
|
2006
2010
|
};
|
|
2007
2011
|
|
|
2008
|
-
function ownKeys$
|
|
2009
|
-
function _objectSpread$
|
|
2012
|
+
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; }
|
|
2013
|
+
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; }
|
|
2010
2014
|
const injectNotifications = function () {
|
|
2011
2015
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
2012
2016
|
return Component => {
|
|
@@ -2021,7 +2025,7 @@ const injectNotifications = function () {
|
|
|
2021
2025
|
onActionError,
|
|
2022
2026
|
hideAllPageNotifications
|
|
2023
2027
|
};
|
|
2024
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2028
|
+
return jsxRuntime.jsx(Component, _objectSpread$1o(_objectSpread$1o({}, props), {}, {
|
|
2025
2029
|
[propName]: notifications
|
|
2026
2030
|
}));
|
|
2027
2031
|
};
|
|
@@ -2030,22 +2034,22 @@ const injectNotifications = function () {
|
|
|
2030
2034
|
};
|
|
2031
2035
|
};
|
|
2032
2036
|
|
|
2033
|
-
function ownKeys$
|
|
2034
|
-
function _objectSpread$
|
|
2037
|
+
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; }
|
|
2038
|
+
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; }
|
|
2035
2039
|
function isPropsMapper(mapProps) {
|
|
2036
2040
|
return typeof mapProps === 'function';
|
|
2037
2041
|
}
|
|
2038
2042
|
const withProps = mapProps => Component => {
|
|
2039
2043
|
const EnhancedWithProps = ownProps => {
|
|
2040
|
-
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
2041
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2044
|
+
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1n(_objectSpread$1n({}, ownProps), mapProps(ownProps)) : _objectSpread$1n(_objectSpread$1n({}, ownProps), mapProps);
|
|
2045
|
+
return jsxRuntime.jsx(Component, _objectSpread$1n({}, enhancedProps));
|
|
2042
2046
|
};
|
|
2043
2047
|
EnhancedWithProps.displayName = wrapDisplayName(Component, 'withProps');
|
|
2044
2048
|
return EnhancedWithProps;
|
|
2045
2049
|
};
|
|
2046
2050
|
|
|
2047
|
-
function ownKeys$
|
|
2048
|
-
function _objectSpread$
|
|
2051
|
+
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; }
|
|
2052
|
+
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; }
|
|
2049
2053
|
const useRedirectEffect = _ref => {
|
|
2050
2054
|
let goTo = _ref.goTo;
|
|
2051
2055
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -2065,30 +2069,30 @@ const defaultOptions$5 = {
|
|
|
2065
2069
|
skip: () => false
|
|
2066
2070
|
};
|
|
2067
2071
|
const withRedirectTo = options => Component => {
|
|
2068
|
-
const mergedOptions = _objectSpread$
|
|
2072
|
+
const mergedOptions = _objectSpread$1m(_objectSpread$1m({}, defaultOptions$5), options);
|
|
2069
2073
|
const WithRedirectTo = props => {
|
|
2070
2074
|
if (!mergedOptions.skip(props)) {
|
|
2071
2075
|
return jsxRuntime.jsx(RedirectTo, {
|
|
2072
2076
|
goTo: options.selectGoTo(props)
|
|
2073
2077
|
});
|
|
2074
2078
|
}
|
|
2075
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2079
|
+
return jsxRuntime.jsx(Component, _objectSpread$1m({}, props));
|
|
2076
2080
|
};
|
|
2077
2081
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
2078
2082
|
return WithRedirectTo;
|
|
2079
2083
|
};
|
|
2080
2084
|
|
|
2081
|
-
function ownKeys$
|
|
2082
|
-
function _objectSpread$
|
|
2085
|
+
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; }
|
|
2086
|
+
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; }
|
|
2083
2087
|
const defaultOptions$4 = {
|
|
2084
2088
|
propName: 'modalState',
|
|
2085
2089
|
isInitiallyOpen: false
|
|
2086
2090
|
};
|
|
2087
2091
|
const injectModalState$1 = options => Component => {
|
|
2088
|
-
const mergedOptions = _objectSpread$
|
|
2092
|
+
const mergedOptions = _objectSpread$1l(_objectSpread$1l({}, defaultOptions$4), options);
|
|
2089
2093
|
const WithModalState = props => {
|
|
2090
2094
|
const modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
2091
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2095
|
+
return jsxRuntime.jsx(Component, _objectSpread$1l(_objectSpread$1l({}, props), {}, {
|
|
2092
2096
|
[mergedOptions.propName]: modalState
|
|
2093
2097
|
}));
|
|
2094
2098
|
};
|
|
@@ -2096,17 +2100,17 @@ const injectModalState$1 = options => Component => {
|
|
|
2096
2100
|
return WithModalState;
|
|
2097
2101
|
};
|
|
2098
2102
|
|
|
2099
|
-
function ownKeys$
|
|
2100
|
-
function _objectSpread$
|
|
2103
|
+
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; }
|
|
2104
|
+
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
2105
|
const defaultOptions$3 = {
|
|
2102
2106
|
propName: 'toggleState',
|
|
2103
2107
|
isInitiallyOpen: false
|
|
2104
2108
|
};
|
|
2105
2109
|
const injectModalState = options => Component => {
|
|
2106
|
-
const mergedOptions = _objectSpread$
|
|
2110
|
+
const mergedOptions = _objectSpread$1k(_objectSpread$1k({}, defaultOptions$3), options);
|
|
2107
2111
|
const WithToggleState = props => {
|
|
2108
2112
|
const toggleState = uiKit.useToggleState(mergedOptions.isInitiallyOpen);
|
|
2109
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2113
|
+
return jsxRuntime.jsx(Component, _objectSpread$1k(_objectSpread$1k({}, props), {}, {
|
|
2110
2114
|
[mergedOptions.propName]: toggleState
|
|
2111
2115
|
}));
|
|
2112
2116
|
};
|
|
@@ -2114,8 +2118,8 @@ const injectModalState = options => Component => {
|
|
|
2114
2118
|
return WithToggleState;
|
|
2115
2119
|
};
|
|
2116
2120
|
|
|
2117
|
-
function ownKeys$
|
|
2118
|
-
function _objectSpread$
|
|
2121
|
+
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; }
|
|
2122
|
+
function _objectSpread$1j(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$1j(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$1j(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2119
2123
|
const defaultOptions$2 = {
|
|
2120
2124
|
storageType: 'local',
|
|
2121
2125
|
segregateByUser: true
|
|
@@ -2133,7 +2137,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
|
|
|
2133
2137
|
const isNil = value => typeof value === 'undefined' || value === null;
|
|
2134
2138
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
2135
2139
|
var _context;
|
|
2136
|
-
const mergedOptions = _objectSpread$
|
|
2140
|
+
const mergedOptions = _objectSpread$1j(_objectSpread$1j({}, defaultOptions$2), options);
|
|
2137
2141
|
const userId = applicationShellConnectors.useApplicationContext(context => {
|
|
2138
2142
|
var _context$user;
|
|
2139
2143
|
return (_context$user = context.user) === null || _context$user === void 0 ? void 0 : _context$user.id;
|
|
@@ -2181,8 +2185,8 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
2181
2185
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
2182
2186
|
};
|
|
2183
2187
|
|
|
2184
|
-
function ownKeys$
|
|
2185
|
-
function _objectSpread$
|
|
2188
|
+
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; }
|
|
2189
|
+
function _objectSpread$1i(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1i(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1i(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2186
2190
|
const defaultOptions$1 = {
|
|
2187
2191
|
propName: 'storage',
|
|
2188
2192
|
storageKey: '',
|
|
@@ -2195,7 +2199,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
2195
2199
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
2196
2200
|
* argument position does not allow passing specification of option(s).
|
|
2197
2201
|
*/
|
|
2198
|
-
const mergedOptions = _objectSpread$
|
|
2202
|
+
const mergedOptions = _objectSpread$1i(_objectSpread$1i({}, defaultOptions$1), options);
|
|
2199
2203
|
const WithStorage = props => {
|
|
2200
2204
|
const _useStorage = useStorage(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
2201
2205
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -2209,7 +2213,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
2209
2213
|
readFromStorage
|
|
2210
2214
|
}
|
|
2211
2215
|
};
|
|
2212
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
2216
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1i(_objectSpread$1i({}, props), storageProp));
|
|
2213
2217
|
};
|
|
2214
2218
|
WithStorage.displayName = wrapDisplayName(WrappedComponent, 'WithStorage');
|
|
2215
2219
|
return WithStorage;
|
|
@@ -2255,8 +2259,8 @@ const usePrevious = value => {
|
|
|
2255
2259
|
return ref.current;
|
|
2256
2260
|
};
|
|
2257
2261
|
|
|
2258
|
-
function ownKeys$
|
|
2259
|
-
function _objectSpread$
|
|
2262
|
+
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; }
|
|
2263
|
+
function _objectSpread$1h(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$1h(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$1h(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2260
2264
|
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 } } } };
|
|
2261
2265
|
const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
2262
2266
|
var _storesQueryResult$re;
|
|
@@ -2267,7 +2271,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
2267
2271
|
offset: storesQueryResult.offset,
|
|
2268
2272
|
results: (_storesQueryResult$re = storesQueryResult.results) === null || _storesQueryResult$re === void 0 ? void 0 : _mapInstanceProperty__default["default"](_storesQueryResult$re).call(_storesQueryResult$re, store => {
|
|
2269
2273
|
var _store$productSelecti;
|
|
2270
|
-
return _objectSpread$
|
|
2274
|
+
return _objectSpread$1h(_objectSpread$1h({}, store), {}, {
|
|
2271
2275
|
productSelections: (_store$productSelecti = store.productSelections) === null || _store$productSelecti === void 0 ? void 0 : _filterInstanceProperty__default["default"](_store$productSelecti).call(_store$productSelecti, productSelectionRef => Boolean(productSelectionRef.productSelection))
|
|
2272
2276
|
});
|
|
2273
2277
|
})
|
|
@@ -2275,7 +2279,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
2275
2279
|
};
|
|
2276
2280
|
const createQueryVariables$8 = ownProps => {
|
|
2277
2281
|
var _context;
|
|
2278
|
-
return _objectSpread$
|
|
2282
|
+
return _objectSpread$1h(_objectSpread$1h({
|
|
2279
2283
|
limit: ownProps.limit,
|
|
2280
2284
|
offset: ownProps.offset,
|
|
2281
2285
|
sort: _sortInstanceProperty__default["default"](ownProps)
|
|
@@ -2430,8 +2434,8 @@ function useDidFormValidationFail() {
|
|
|
2430
2434
|
return Boolean(didFormValidationFail);
|
|
2431
2435
|
}
|
|
2432
2436
|
|
|
2433
|
-
function ownKeys$
|
|
2434
|
-
function _objectSpread$
|
|
2437
|
+
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; }
|
|
2438
|
+
function _objectSpread$1g(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1g(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1g(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2435
2439
|
const TEN_MINUTES_IN_MS = 600000;
|
|
2436
2440
|
const defaultOptions = {
|
|
2437
2441
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -2459,7 +2463,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
2459
2463
|
};
|
|
2460
2464
|
const usePersistedReminder = function () {
|
|
2461
2465
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2462
|
-
const mergedOptions = _objectSpread$
|
|
2466
|
+
const mergedOptions = _objectSpread$1g(_objectSpread$1g({}, defaultOptions), options);
|
|
2463
2467
|
const _useStorage = useStorage(mergedOptions.storageKey, null),
|
|
2464
2468
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
2465
2469
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -2505,7 +2509,7 @@ const usePersistedReminder = function () {
|
|
|
2505
2509
|
return [hasReminderExpired, hasChosenReminderRef, scheduleReminder];
|
|
2506
2510
|
};
|
|
2507
2511
|
|
|
2508
|
-
var messages$
|
|
2512
|
+
var messages$M = reactIntl.defineMessages({
|
|
2509
2513
|
profileUpdated: {
|
|
2510
2514
|
id: 'NotificationText.profileUpdated',
|
|
2511
2515
|
description: 'Label for the notification header',
|
|
@@ -2523,8 +2527,8 @@ var messages$I = reactIntl.defineMessages({
|
|
|
2523
2527
|
}
|
|
2524
2528
|
});
|
|
2525
2529
|
|
|
2526
|
-
function ownKeys$
|
|
2527
|
-
function _objectSpread$
|
|
2530
|
+
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; }
|
|
2531
|
+
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; }
|
|
2528
2532
|
const LinkToProfile = props => {
|
|
2529
2533
|
const _useTrackingShared = useTrackingShared(),
|
|
2530
2534
|
trackClickOnInfoNotification = _useTrackingShared.trackClickOnInfoNotification;
|
|
@@ -2545,9 +2549,9 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2545
2549
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2546
2550
|
as: "p",
|
|
2547
2551
|
isBold: true,
|
|
2548
|
-
intlMessage: messages$
|
|
2552
|
+
intlMessage: messages$M.profileUpdated
|
|
2549
2553
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2550
|
-
intlMessage: _objectSpread$
|
|
2554
|
+
intlMessage: _objectSpread$1f(_objectSpread$1f({}, messages$M.addMoreInformation), {}, {
|
|
2551
2555
|
values: {
|
|
2552
2556
|
newline: getNewLine
|
|
2553
2557
|
}
|
|
@@ -2556,7 +2560,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2556
2560
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2557
2561
|
scale: "xs",
|
|
2558
2562
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2559
|
-
intlMessage: _objectSpread$
|
|
2563
|
+
intlMessage: _objectSpread$1f(_objectSpread$1f({}, messages$M.informationAndProfileLink), {}, {
|
|
2560
2564
|
values: {
|
|
2561
2565
|
newline: getNewLine,
|
|
2562
2566
|
link: getLinkToProfile
|
|
@@ -2718,7 +2722,7 @@ const useEventCallback = (fn, dependencies) => {
|
|
|
2718
2722
|
}, [ref]);
|
|
2719
2723
|
};
|
|
2720
2724
|
|
|
2721
|
-
var messages$
|
|
2725
|
+
var messages$L = reactIntl.defineMessages({
|
|
2722
2726
|
fallbackHint: {
|
|
2723
2727
|
id: 'KeyFallback.fallbackHint',
|
|
2724
2728
|
description: 'key fallback for a specified resource key (e.g name)',
|
|
@@ -2742,7 +2746,7 @@ const useLocalizedKeyFallback = () => {
|
|
|
2742
2746
|
return values => {
|
|
2743
2747
|
if (!values.resource) return null;
|
|
2744
2748
|
const localizedString = values.resource[values.localizedStringFieldName];
|
|
2745
|
-
const fallbackHintWithKey = intl.formatMessage(messages$
|
|
2749
|
+
const fallbackHintWithKey = intl.formatMessage(messages$L.fallbackHint, {
|
|
2746
2750
|
key: values.resource.key
|
|
2747
2751
|
});
|
|
2748
2752
|
if (!localizedString) return fallbackHintWithKey;
|
|
@@ -2754,8 +2758,8 @@ const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
|
2754
2758
|
// eslint-disable-next-line testing-library/await-async-utils
|
|
2755
2759
|
React.useCallback(debounce__default["default"](promiseCallback, wait), [promiseCallback]);
|
|
2756
2760
|
|
|
2757
|
-
function ownKeys$
|
|
2758
|
-
function _objectSpread$
|
|
2761
|
+
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; }
|
|
2762
|
+
function _objectSpread$1e(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$1e(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$1e(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
2759
2763
|
const prepareMutableColumnProps = (columnConfig, mutableColumnProps) => {
|
|
2760
2764
|
const updatedColumnProps = {};
|
|
2761
2765
|
_forEachInstanceProperty__default["default"](mutableColumnProps).call(mutableColumnProps, columnProp => {
|
|
@@ -2775,14 +2779,14 @@ const retrieveColumnsWithCachedConfiguration = _ref => {
|
|
|
2775
2779
|
mutableColumnProps = _ref.mutableColumnProps;
|
|
2776
2780
|
return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](cachedVisibleTableConfiguration).call(cachedVisibleTableConfiguration, cachedColumn => _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedColumn.key))).call(_context, cachedConfig => {
|
|
2777
2781
|
const initialColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedConfig.key);
|
|
2778
|
-
return _objectSpread$
|
|
2782
|
+
return _objectSpread$1e(_objectSpread$1e({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2779
2783
|
});
|
|
2780
2784
|
};
|
|
2781
2785
|
const handleCacheUpdate = _ref2 => {
|
|
2782
2786
|
let update = _ref2.update,
|
|
2783
2787
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2784
2788
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2785
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2789
|
+
return updateCachedTableConfiguration(_objectSpread$1e(_objectSpread$1e({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2786
2790
|
};
|
|
2787
2791
|
|
|
2788
2792
|
// Signature:
|
|
@@ -2811,7 +2815,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2811
2815
|
return {
|
|
2812
2816
|
columnsConfig: _mapInstanceProperty__default["default"](initialVisibleColumnKeys).call(initialVisibleColumnKeys, visibleColumnKey => {
|
|
2813
2817
|
const visibleColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, columnConfig => columnConfig.key === visibleColumnKey);
|
|
2814
|
-
return _objectSpread$
|
|
2818
|
+
return _objectSpread$1e({
|
|
2815
2819
|
key: visibleColumnKey
|
|
2816
2820
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2817
2821
|
}),
|
|
@@ -2882,14 +2886,14 @@ const handlers$6 = {
|
|
|
2882
2886
|
}
|
|
2883
2887
|
};
|
|
2884
2888
|
|
|
2885
|
-
function ownKeys$
|
|
2886
|
-
function _objectSpread$
|
|
2889
|
+
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; }
|
|
2890
|
+
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; }
|
|
2887
2891
|
|
|
2888
2892
|
// eslint-disable-next-line import/prefer-default-export
|
|
2889
2893
|
const convertProductSelectionsFromGraphQl = productSelections => {
|
|
2890
2894
|
var _context;
|
|
2891
|
-
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$
|
|
2892
|
-
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$
|
|
2895
|
+
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$1d(_objectSpread$1d({}, productSelections), {}, {
|
|
2896
|
+
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$1d({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
2893
2897
|
from: 'nameAllLocales',
|
|
2894
2898
|
to: 'name'
|
|
2895
2899
|
}])))
|
|
@@ -3039,7 +3043,7 @@ const CenteredLoadingSpinner = () => jsxRuntime.jsx("div", {
|
|
|
3039
3043
|
});
|
|
3040
3044
|
CenteredLoadingSpinner.displayName = 'CenteredLoadingSpinner';
|
|
3041
3045
|
|
|
3042
|
-
var messages$
|
|
3046
|
+
var messages$K = reactIntl.defineMessages({
|
|
3043
3047
|
noChannelsFound: {
|
|
3044
3048
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
3045
3049
|
description: 'The message to display when no channels were found',
|
|
@@ -3088,8 +3092,8 @@ const trackingEvents$4 = {
|
|
|
3088
3092
|
}
|
|
3089
3093
|
};
|
|
3090
3094
|
|
|
3091
|
-
function ownKeys$
|
|
3092
|
-
function _objectSpread$
|
|
3095
|
+
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; }
|
|
3096
|
+
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; }
|
|
3093
3097
|
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 } } } };
|
|
3094
3098
|
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 } } } };
|
|
3095
3099
|
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 } } } };
|
|
@@ -3117,7 +3121,7 @@ const ChannelPickerInput = _ref => {
|
|
|
3117
3121
|
const _useIntl = reactIntl.useIntl(),
|
|
3118
3122
|
formatMessage = _useIntl.formatMessage;
|
|
3119
3123
|
const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
|
|
3120
|
-
const variables = React.useMemo(() => _objectSpread$
|
|
3124
|
+
const variables = React.useMemo(() => _objectSpread$1c({
|
|
3121
3125
|
sortByNamePath: "name.".concat(dataLocale)
|
|
3122
3126
|
}, role && {
|
|
3123
3127
|
where: "roles contains any (\"".concat(role, "\")")
|
|
@@ -3178,7 +3182,7 @@ const ChannelPickerInput = _ref => {
|
|
|
3178
3182
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
3179
3183
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
3180
3184
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
3181
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
3185
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$K.noChannelsFound), [loadingError, formatMessage]);
|
|
3182
3186
|
const 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 : '';
|
|
3183
3187
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
3184
3188
|
max: "scale",
|
|
@@ -3189,7 +3193,7 @@ const ChannelPickerInput = _ref => {
|
|
|
3189
3193
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
3190
3194
|
id: name,
|
|
3191
3195
|
name: name,
|
|
3192
|
-
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$
|
|
3196
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$K.placeholder),
|
|
3193
3197
|
loadOptions: loadOptionsDebounced,
|
|
3194
3198
|
defaultOptions: true,
|
|
3195
3199
|
showOptionGroupDivider: true,
|
|
@@ -3246,8 +3250,8 @@ var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
|
3246
3250
|
|
|
3247
3251
|
const keepDisplayName = component => setDisplayName(getDisplayName(component));
|
|
3248
3252
|
|
|
3249
|
-
function ownKeys$
|
|
3250
|
-
function _objectSpread$
|
|
3253
|
+
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; }
|
|
3254
|
+
function _objectSpread$1b(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$1b(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$1b(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3251
3255
|
function _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3252
3256
|
function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3253
3257
|
const withMouseOverState = BaseComponent => {
|
|
@@ -3279,7 +3283,7 @@ const withMouseOverState = BaseComponent => {
|
|
|
3279
3283
|
handleMouseOver: this.handleMouseOver,
|
|
3280
3284
|
handleMouseOut: this.handleMouseOut
|
|
3281
3285
|
};
|
|
3282
|
-
return jsxRuntime.jsx(BaseComponent, _objectSpread$
|
|
3286
|
+
return jsxRuntime.jsx(BaseComponent, _objectSpread$1b({}, _objectSpread$1b(_objectSpread$1b({}, this.props), injectedProps)));
|
|
3283
3287
|
}
|
|
3284
3288
|
}]);
|
|
3285
3289
|
return WithMouseOverState;
|
|
@@ -3288,8 +3292,8 @@ const withMouseOverState = BaseComponent => {
|
|
|
3288
3292
|
return WithMouseOverState;
|
|
3289
3293
|
};
|
|
3290
3294
|
|
|
3291
|
-
function ownKeys$
|
|
3292
|
-
function _objectSpread$
|
|
3295
|
+
function ownKeys$1a(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3296
|
+
function _objectSpread$1a(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1a(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3293
3297
|
function _createSuper$7(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$7(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3294
3298
|
function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3295
3299
|
var styles$i = {
|
|
@@ -3400,7 +3404,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3400
3404
|
}, {
|
|
3401
3405
|
key: "render",
|
|
3402
3406
|
value: function render() {
|
|
3403
|
-
const commonProps = _objectSpread$
|
|
3407
|
+
const commonProps = _objectSpread$1a(_objectSpread$1a({
|
|
3404
3408
|
value: this.state.draftValue,
|
|
3405
3409
|
autoComplete: this.props.autoComplete,
|
|
3406
3410
|
onChange: this.handleChange,
|
|
@@ -3419,7 +3423,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3419
3423
|
htmlFor: inputId,
|
|
3420
3424
|
children: this.props.label
|
|
3421
3425
|
})
|
|
3422
|
-
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$
|
|
3426
|
+
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$1a(_objectSpread$1a({}, commonProps), {}, {
|
|
3423
3427
|
id: inputId,
|
|
3424
3428
|
className: classnames__default["default"](styles$i.textarea, styles$i["textarea-".concat(this.props.style)], {
|
|
3425
3429
|
[styles$i.invalid]: !this.props.isValid,
|
|
@@ -3428,7 +3432,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3428
3432
|
rows: 1,
|
|
3429
3433
|
maxRows: this.props.autoSize ? undefined : 1,
|
|
3430
3434
|
cacheMeasurements: true
|
|
3431
|
-
})) : jsxRuntime.jsx("input", _objectSpread$
|
|
3435
|
+
})) : jsxRuntime.jsx("input", _objectSpread$1a(_objectSpread$1a({}, commonProps), {}, {
|
|
3432
3436
|
id: inputId,
|
|
3433
3437
|
ref: this.props.inputRef,
|
|
3434
3438
|
type: this.props.as,
|
|
@@ -3455,7 +3459,7 @@ ThrottledField.defaultProps = {
|
|
|
3455
3459
|
label: 'Throttled field'
|
|
3456
3460
|
};
|
|
3457
3461
|
|
|
3458
|
-
var messages$
|
|
3462
|
+
var messages$J = reactIntl.defineMessages({
|
|
3459
3463
|
buttonLabel: {
|
|
3460
3464
|
id: 'SearchInput.buttonLabel',
|
|
3461
3465
|
description: 'Label for "Search" button.',
|
|
@@ -3563,7 +3567,7 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3563
3567
|
"data-testid": this.props.testId || 'search-input',
|
|
3564
3568
|
value: this.state.text,
|
|
3565
3569
|
label: this.props.label,
|
|
3566
|
-
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$
|
|
3570
|
+
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$J.placeholder),
|
|
3567
3571
|
inputRef: this.props.inputRef || this.setInputRef,
|
|
3568
3572
|
"data-track-component": "Text",
|
|
3569
3573
|
"data-track-event": "change",
|
|
@@ -3782,7 +3786,7 @@ const useProductTypeOptions = _ref3 => {
|
|
|
3782
3786
|
};
|
|
3783
3787
|
};
|
|
3784
3788
|
|
|
3785
|
-
var messages$
|
|
3789
|
+
var messages$I = reactIntl.defineMessages({
|
|
3786
3790
|
bottomOption: {
|
|
3787
3791
|
id: 'Products.Pickers.bottomOption',
|
|
3788
3792
|
description: 'The message to display at the end of the options menu',
|
|
@@ -3790,11 +3794,11 @@ var messages$E = reactIntl.defineMessages({
|
|
|
3790
3794
|
}
|
|
3791
3795
|
});
|
|
3792
3796
|
|
|
3793
|
-
function ownKeys$
|
|
3794
|
-
function _objectSpread$
|
|
3797
|
+
function ownKeys$19(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3798
|
+
function _objectSpread$19(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$19(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$19(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3795
3799
|
const getBottomOption = () => ({
|
|
3796
3800
|
options: [{
|
|
3797
|
-
label: messages$
|
|
3801
|
+
label: messages$I.bottomOption,
|
|
3798
3802
|
isBottomOption: true,
|
|
3799
3803
|
isDisabled: true
|
|
3800
3804
|
}]
|
|
@@ -3802,7 +3806,7 @@ const getBottomOption = () => ({
|
|
|
3802
3806
|
const Option$2 = props => {
|
|
3803
3807
|
const _useIntl = reactIntl.useIntl(),
|
|
3804
3808
|
formatMessage = _useIntl.formatMessage;
|
|
3805
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
3809
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$19(_objectSpread$19({}, props), {}, {
|
|
3806
3810
|
children: props.data.isBottomOption ? jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
3807
3811
|
tone: "secondary",
|
|
3808
3812
|
children: formatMessage(props.data.label)
|
|
@@ -3819,8 +3823,8 @@ const Option$2 = props => {
|
|
|
3819
3823
|
};
|
|
3820
3824
|
Option$2.displayName = 'Option';
|
|
3821
3825
|
|
|
3822
|
-
function ownKeys$
|
|
3823
|
-
function _objectSpread$
|
|
3826
|
+
function ownKeys$18(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3827
|
+
function _objectSpread$18(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$18(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$18(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3824
3828
|
const useHandlers = (onChange, getTrackingEvent) => {
|
|
3825
3829
|
const _useTracking = useTracking(),
|
|
3826
3830
|
track = _useTracking.track;
|
|
@@ -3845,8 +3849,8 @@ const useHandlers = (onChange, getTrackingEvent) => {
|
|
|
3845
3849
|
if (event.target.value) {
|
|
3846
3850
|
doTrack();
|
|
3847
3851
|
}
|
|
3848
|
-
const eventWithExtractedValue = _objectSpread$
|
|
3849
|
-
target: _objectSpread$
|
|
3852
|
+
const eventWithExtractedValue = _objectSpread$18(_objectSpread$18({}, event), {}, {
|
|
3853
|
+
target: _objectSpread$18(_objectSpread$18({}, event.target), {}, {
|
|
3850
3854
|
value: (_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.value
|
|
3851
3855
|
})
|
|
3852
3856
|
});
|
|
@@ -3855,8 +3859,8 @@ const useHandlers = (onChange, getTrackingEvent) => {
|
|
|
3855
3859
|
return [handleInputChange, handleChange];
|
|
3856
3860
|
};
|
|
3857
3861
|
|
|
3858
|
-
function ownKeys$
|
|
3859
|
-
function _objectSpread$
|
|
3862
|
+
function ownKeys$17(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3863
|
+
function _objectSpread$17(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$17(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$17(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
3860
3864
|
const constructPrefixSearchPredicate = function () {
|
|
3861
3865
|
let prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
3862
3866
|
let lowerBound = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -3899,7 +3903,7 @@ const useLoadOptions = _ref => {
|
|
|
3899
3903
|
}();
|
|
3900
3904
|
return client$1.query({
|
|
3901
3905
|
query,
|
|
3902
|
-
variables: _objectSpread$
|
|
3906
|
+
variables: _objectSpread$17({
|
|
3903
3907
|
where
|
|
3904
3908
|
}, variables),
|
|
3905
3909
|
context: {
|
|
@@ -3953,7 +3957,7 @@ function useCurrentOption(_ref) {
|
|
|
3953
3957
|
};
|
|
3954
3958
|
}
|
|
3955
3959
|
|
|
3956
|
-
var messages$
|
|
3960
|
+
var messages$H = reactIntl.defineMessages({
|
|
3957
3961
|
noProductTypesFound: {
|
|
3958
3962
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
3959
3963
|
description: 'The message to display when no product types were found',
|
|
@@ -4062,7 +4066,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
4062
4066
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
4063
4067
|
id: name,
|
|
4064
4068
|
name: name,
|
|
4065
|
-
placeholder: formatMessage(messages$
|
|
4069
|
+
placeholder: formatMessage(messages$H.placeholder),
|
|
4066
4070
|
loadOptions: loadOptionsDebounced,
|
|
4067
4071
|
defaultOptions: [],
|
|
4068
4072
|
isClearable: isClearable,
|
|
@@ -4075,7 +4079,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
4075
4079
|
onInputChange: handleInputChange,
|
|
4076
4080
|
onBlur: onBlur,
|
|
4077
4081
|
value: currentOption.data,
|
|
4078
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
4082
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$H.noProductTypesFound),
|
|
4079
4083
|
hasError: hasError || isLoadingFailed
|
|
4080
4084
|
})
|
|
4081
4085
|
}), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -4087,7 +4091,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
4087
4091
|
};
|
|
4088
4092
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
4089
4093
|
|
|
4090
|
-
var messages$
|
|
4094
|
+
var messages$G = reactIntl.defineMessages({
|
|
4091
4095
|
noStatesFound: {
|
|
4092
4096
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
4093
4097
|
description: 'The message to display when no states were found',
|
|
@@ -4201,7 +4205,7 @@ const StatePickerInput = _ref => {
|
|
|
4201
4205
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
4202
4206
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
4203
4207
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
4204
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
4208
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$G.noStatesFound), [loadingError, formatMessage]);
|
|
4205
4209
|
const 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 : '';
|
|
4206
4210
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
4207
4211
|
max: "scale",
|
|
@@ -4213,7 +4217,7 @@ const StatePickerInput = _ref => {
|
|
|
4213
4217
|
id: name,
|
|
4214
4218
|
name: name,
|
|
4215
4219
|
horizontalConstraint: "scale",
|
|
4216
|
-
placeholder: formatMessage(messages$
|
|
4220
|
+
placeholder: formatMessage(messages$G.placeholder),
|
|
4217
4221
|
loadOptions: loadOptionsDebounced,
|
|
4218
4222
|
defaultOptions: true,
|
|
4219
4223
|
showOptionGroupDivider: true,
|
|
@@ -4239,9 +4243,9 @@ const StatePickerInput = _ref => {
|
|
|
4239
4243
|
};
|
|
4240
4244
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
4241
4245
|
|
|
4242
|
-
function ownKeys$
|
|
4243
|
-
function _objectSpread$
|
|
4244
|
-
const TooltipWrapper = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$
|
|
4246
|
+
function ownKeys$16(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4247
|
+
function _objectSpread$16(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$16(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$16(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
4248
|
+
const TooltipWrapper = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$16({
|
|
4245
4249
|
ref: ref,
|
|
4246
4250
|
style: {
|
|
4247
4251
|
display: 'block',
|
|
@@ -4379,8 +4383,8 @@ const getPrefixSearchBounds = input => {
|
|
|
4379
4383
|
};
|
|
4380
4384
|
|
|
4381
4385
|
const _excluded = ["action"];
|
|
4382
|
-
function ownKeys$
|
|
4383
|
-
function _objectSpread$
|
|
4386
|
+
function ownKeys$15(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4387
|
+
function _objectSpread$15(target) { for (var i = 1; i < arguments.length; i++) { var _context8, _context9; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$15(Object(source), !0)).call(_context8, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$15(Object(source))).call(_context9, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
4384
4388
|
|
|
4385
4389
|
/**
|
|
4386
4390
|
* Checks if a value is a LocalizedString
|
|
@@ -4402,7 +4406,7 @@ const getIsLocalizedString = maybeLocalizedString => {
|
|
|
4402
4406
|
*/
|
|
4403
4407
|
const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
|
|
4404
4408
|
if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
|
|
4405
|
-
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$
|
|
4409
|
+
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$15(_objectSpread$15({}, customFields), {}, {
|
|
4406
4410
|
[customField.name]: customField.value
|
|
4407
4411
|
}), {});
|
|
4408
4412
|
};
|
|
@@ -4426,7 +4430,7 @@ function transformLocalizedFieldsForCategory(category) {
|
|
|
4426
4430
|
const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
|
|
4427
4431
|
const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
|
|
4428
4432
|
const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
|
|
4429
|
-
return _objectSpread$
|
|
4433
|
+
return _objectSpread$15(_objectSpread$15(_objectSpread$15({}, transformedData), parent ? {
|
|
4430
4434
|
parent
|
|
4431
4435
|
} : {}), ancestors ? {
|
|
4432
4436
|
ancestors
|
|
@@ -4568,9 +4572,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4568
4572
|
};
|
|
4569
4573
|
case 'setName':
|
|
4570
4574
|
return {
|
|
4571
|
-
[actionName]:
|
|
4572
|
-
name: _Array$isArray__default["default"](actionPayload.name) ? actionPayload.name : l10n.transformLocalizedStringToLocalizedField(actionPayload.name)
|
|
4573
|
-
}
|
|
4575
|
+
[actionName]: getNameFromPayload(actionPayload)
|
|
4574
4576
|
};
|
|
4575
4577
|
case 'setLocalizedName':
|
|
4576
4578
|
return {
|
|
@@ -4642,7 +4644,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4642
4644
|
case 'addAttributeDefinition':
|
|
4643
4645
|
return {
|
|
4644
4646
|
[actionName]: {
|
|
4645
|
-
attributeDefinition: _objectSpread$
|
|
4647
|
+
attributeDefinition: _objectSpread$15(_objectSpread$15({}, actionPayload.attribute), {}, {
|
|
4646
4648
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
|
|
4647
4649
|
inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
|
|
4648
4650
|
type: createAttributeTypeValue(actionPayload.attribute)
|
|
@@ -4658,6 +4660,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4658
4660
|
includedInPrice: actionPayload.taxRate.includedInPrice,
|
|
4659
4661
|
amount: actionPayload.taxRate.amount,
|
|
4660
4662
|
state: actionPayload.taxRate.state,
|
|
4663
|
+
key: actionPayload.taxRate.key,
|
|
4661
4664
|
subRates: actionPayload.taxRate.subRates
|
|
4662
4665
|
},
|
|
4663
4666
|
taxRateId: actionPayload.taxRateId
|
|
@@ -4737,7 +4740,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4737
4740
|
return {
|
|
4738
4741
|
[actionName]: {
|
|
4739
4742
|
attributeName: actionPayload.attributeName,
|
|
4740
|
-
value: _objectSpread$
|
|
4743
|
+
value: _objectSpread$15(_objectSpread$15({}, actionPayload.value), {}, {
|
|
4741
4744
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
|
|
4742
4745
|
})
|
|
4743
4746
|
}
|
|
@@ -4746,7 +4749,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4746
4749
|
return {
|
|
4747
4750
|
[actionName]: {
|
|
4748
4751
|
attributeName: actionPayload.attributeName,
|
|
4749
|
-
newValue: _objectSpread$
|
|
4752
|
+
newValue: _objectSpread$15(_objectSpread$15({}, actionPayload.newValue), {}, {
|
|
4750
4753
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
|
|
4751
4754
|
})
|
|
4752
4755
|
}
|
|
@@ -4773,7 +4776,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4773
4776
|
name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
|
|
4774
4777
|
taxCategory: actionPayload.taxCategory,
|
|
4775
4778
|
money: {
|
|
4776
|
-
[actionPayload.money.type]: _objectSpread$
|
|
4779
|
+
[actionPayload.money.type]: _objectSpread$15({
|
|
4777
4780
|
centAmount: actionPayload.money.centAmount,
|
|
4778
4781
|
currencyCode: actionPayload.money.currencyCode
|
|
4779
4782
|
}, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4828,8 +4831,8 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4828
4831
|
fields: customFields
|
|
4829
4832
|
} : null;
|
|
4830
4833
|
return {
|
|
4831
|
-
[actionName]: _objectSpread$
|
|
4832
|
-
address: _objectSpread$
|
|
4834
|
+
[actionName]: _objectSpread$15(_objectSpread$15({}, actionPayload), {}, {
|
|
4835
|
+
address: _objectSpread$15(_objectSpread$15({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
|
|
4833
4836
|
custom
|
|
4834
4837
|
})
|
|
4835
4838
|
})
|
|
@@ -4905,8 +4908,8 @@ function omitDeep(obj, fieldsToOmit) {
|
|
|
4905
4908
|
return originalOmitDeep__default["default"](obj, fieldsToOmit);
|
|
4906
4909
|
}
|
|
4907
4910
|
|
|
4908
|
-
function ownKeys$
|
|
4909
|
-
function _objectSpread$
|
|
4911
|
+
function ownKeys$14(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4912
|
+
function _objectSpread$14(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$14(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$14(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
4910
4913
|
function getPriceChannelName(price) {
|
|
4911
4914
|
var _ref, _price$channel$name, _price$channel, _price$channel2;
|
|
4912
4915
|
return (_ref = (_price$channel$name = (_price$channel = price.channel) === null || _price$channel === void 0 ? void 0 : _price$channel.name) !== null && _price$channel$name !== void 0 ? _price$channel$name : (_price$channel2 = price.channel) === null || _price$channel2 === void 0 ? void 0 : _price$channel2.key) !== null && _ref !== void 0 ? _ref : null;
|
|
@@ -4920,11 +4923,11 @@ function getDiscountValue(price) {
|
|
|
4920
4923
|
} else if (((_price$value2 = price.value) === null || _price$value2 === void 0 ? void 0 : _price$value2.type) === PRECISION_TYPES.highPrecision && ((_price$discounted = price.discounted) === null || _price$discounted === void 0 ? void 0 : (_price$discounted$val = _price$discounted.value) === null || _price$discounted$val === void 0 ? void 0 : _price$discounted$val.type) === PRECISION_TYPES.centPrecision) {
|
|
4921
4924
|
fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
|
|
4922
4925
|
}
|
|
4923
|
-
return price.discounted ? _objectSpread$
|
|
4926
|
+
return price.discounted ? _objectSpread$14(_objectSpread$14({}, price.value), {}, {
|
|
4924
4927
|
fractionedAmount,
|
|
4925
4928
|
centAmount: price.value.centAmount - price.discounted.value.centAmount,
|
|
4926
4929
|
preciseAmount
|
|
4927
|
-
}) : _objectSpread$
|
|
4930
|
+
}) : _objectSpread$14(_objectSpread$14({}, price.value), {}, {
|
|
4928
4931
|
centAmount: 0
|
|
4929
4932
|
});
|
|
4930
4933
|
}
|
|
@@ -4945,7 +4948,7 @@ function getNetUnitPrice(_ref2) {
|
|
|
4945
4948
|
}
|
|
4946
4949
|
let preciseAmount;
|
|
4947
4950
|
if (((_price$value4 = price.value) === null || _price$value4 === void 0 ? void 0 : _price$value4.type) === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + lineItem.taxRate.amount);
|
|
4948
|
-
return _objectSpread$
|
|
4951
|
+
return _objectSpread$14(_objectSpread$14({}, price.value), {}, {
|
|
4949
4952
|
centAmount,
|
|
4950
4953
|
preciseAmount
|
|
4951
4954
|
});
|
|
@@ -4957,7 +4960,7 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4957
4960
|
const currencyCode = price.value.currencyCode;
|
|
4958
4961
|
const fractionedAmount = getFractionedAmount(price.value);
|
|
4959
4962
|
if (currencyCode && !isNil__default["default"](fractionedAmount)) {
|
|
4960
|
-
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$
|
|
4963
|
+
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$14(_objectSpread$14({}, minPrices), {}, {
|
|
4961
4964
|
[currencyCode]: price.value
|
|
4962
4965
|
});
|
|
4963
4966
|
}
|
|
@@ -4966,8 +4969,8 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4966
4969
|
return _Object$values__default["default"](minPricesByCurrency);
|
|
4967
4970
|
}
|
|
4968
4971
|
|
|
4969
|
-
function ownKeys$
|
|
4970
|
-
function _objectSpread$
|
|
4972
|
+
function ownKeys$13(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4973
|
+
function _objectSpread$13(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$13(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$13(Object(source))).call(_context6, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
4971
4974
|
const transformCustomFieldFromGraphQLResponse = resource => {
|
|
4972
4975
|
var _context, _context4;
|
|
4973
4976
|
return {
|
|
@@ -4982,14 +4985,14 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4982
4985
|
return {
|
|
4983
4986
|
name: fieldDefinition.name,
|
|
4984
4987
|
required: fieldDefinition.required,
|
|
4985
|
-
type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0 ? void 0 : (_fieldDefinition$type2 = _fieldDefinition$type.elementType) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$
|
|
4986
|
-
elementType: _objectSpread$
|
|
4988
|
+
type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0 ? void 0 : (_fieldDefinition$type2 = _fieldDefinition$type.elementType) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$13(_objectSpread$13({}, fieldDefinition.type), {}, {
|
|
4989
|
+
elementType: _objectSpread$13(_objectSpread$13({}, fieldDefinition.type.elementType), {}, {
|
|
4987
4990
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
4988
4991
|
key: value.key,
|
|
4989
4992
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
4990
4993
|
}))
|
|
4991
4994
|
})
|
|
4992
|
-
}) : ((_fieldDefinition$type3 = fieldDefinition.type) === null || _fieldDefinition$type3 === void 0 ? void 0 : _fieldDefinition$type3.name) === 'LocalizedEnum' ? _objectSpread$
|
|
4995
|
+
}) : ((_fieldDefinition$type3 = fieldDefinition.type) === null || _fieldDefinition$type3 === void 0 ? void 0 : _fieldDefinition$type3.name) === 'LocalizedEnum' ? _objectSpread$13(_objectSpread$13({}, fieldDefinition.type), {}, {
|
|
4993
4996
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
4994
4997
|
key: value.key,
|
|
4995
4998
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -5000,7 +5003,7 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
5000
5003
|
})
|
|
5001
5004
|
}
|
|
5002
5005
|
},
|
|
5003
|
-
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$
|
|
5006
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$13(_objectSpread$13({}, fields), {}, {
|
|
5004
5007
|
[customField.name]: customField.value
|
|
5005
5008
|
}), {})
|
|
5006
5009
|
};
|
|
@@ -5012,7 +5015,7 @@ const convertProductSelectionFromGraphQl = productSelection => {
|
|
|
5012
5015
|
// Incase the product selection is not missing or if the current project dose not yet have access to the feature,
|
|
5013
5016
|
// in either case we return null
|
|
5014
5017
|
if (!productSelection) return null;
|
|
5015
|
-
return _objectSpread$
|
|
5018
|
+
return _objectSpread$13(_objectSpread$13({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
5016
5019
|
from: 'nameAllLocales',
|
|
5017
5020
|
to: 'name'
|
|
5018
5021
|
}])), {}, {
|
|
@@ -5035,8 +5038,8 @@ const transformAllToProperNounCase = text => {
|
|
|
5035
5038
|
return _mapInstanceProperty__default["default"](_context = text.split(' ')).call(_context, term => transformToProperNounCase(term)).join(' ');
|
|
5036
5039
|
};
|
|
5037
5040
|
|
|
5038
|
-
function ownKeys$
|
|
5039
|
-
function _objectSpread$
|
|
5041
|
+
function ownKeys$12(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5042
|
+
function _objectSpread$12(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$12(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$12(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5040
5043
|
const REGEX_ISO8601 = /(\d{4}-\d{2}-\d{2}[T]\d{2}:\d{2}:\d{2}(\.\d{3}[Z]?))/;
|
|
5041
5044
|
const REGEX_TIME = /\d{2}:\d{2}/;
|
|
5042
5045
|
const REGEX_DATE = /\d{4}-\d{2}-\d{2}/;
|
|
@@ -5053,7 +5056,7 @@ function filterCustomTypeUpdateActionValues() {
|
|
|
5053
5056
|
if (updateAction.action === 'setCustomField' && _Array$isArray__default["default"](updateAction.value)) {
|
|
5054
5057
|
const definition = _findInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, field => field.name === updateAction.name);
|
|
5055
5058
|
const definitionName = definition.type.elementType.name;
|
|
5056
|
-
return _objectSpread$
|
|
5059
|
+
return _objectSpread$12(_objectSpread$12({}, updateAction), {}, {
|
|
5057
5060
|
value: filterNotDefinedValues(updateAction.value, definitionName)
|
|
5058
5061
|
});
|
|
5059
5062
|
}
|
|
@@ -5127,8 +5130,8 @@ function omitSetsOfSets() {
|
|
|
5127
5130
|
|
|
5128
5131
|
var GetProductTypesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetProductTypesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 212, source: { body: "query GetProductTypesQuery($where: String) {\n productTypes(where: $where) {\n results {\n id\n name\n }\n }\n}\n\nquery GetProductTypeQuery($id: String) {\n productType(id: $id) {\n id\n name\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
5129
5132
|
|
|
5130
|
-
function ownKeys
|
|
5131
|
-
function _objectSpread
|
|
5133
|
+
function ownKeys$11(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5134
|
+
function _objectSpread$11(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$11(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$11(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5132
5135
|
function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5133
5136
|
function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5134
5137
|
var FetchTypeDefinitionsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1172, source: { body: "query FetchTypeDefinitionsQuery($where: String, $limit: Int, $offset: Int) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n fieldDefinitions {\n type {\n name\n ... on SetType {\n elementType {\n name\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n ... on ReferenceType {\n referenceTypeId\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -5188,7 +5191,7 @@ const mapDataToProps = _ref => {
|
|
|
5188
5191
|
return {
|
|
5189
5192
|
fetchTypeDefinitionsQuery: {
|
|
5190
5193
|
loading: fetchTypeDefinitionsQuery.loading,
|
|
5191
|
-
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread
|
|
5194
|
+
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$11({}, l10n.applyTransformedLocalizedFields(omitDeep(fieldDefinition, ['__typename'], {
|
|
5192
5195
|
isImmutable: true
|
|
5193
5196
|
}), [{
|
|
5194
5197
|
from: 'labelAllLocales',
|
|
@@ -5216,12 +5219,12 @@ const handlers$4 = {
|
|
|
5216
5219
|
}
|
|
5217
5220
|
};
|
|
5218
5221
|
|
|
5219
|
-
function ownKeys$
|
|
5220
|
-
function _objectSpread$
|
|
5222
|
+
function ownKeys$10(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5223
|
+
function _objectSpread$10(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$10(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$10(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5221
5224
|
const restDocToForm = customFieldsFromRestResponse => {
|
|
5222
5225
|
return {
|
|
5223
5226
|
fields: customFieldsFromRestResponse.fields,
|
|
5224
|
-
type: _objectSpread$
|
|
5227
|
+
type: _objectSpread$10({
|
|
5225
5228
|
id: customFieldsFromRestResponse.type.id
|
|
5226
5229
|
}, customFieldsFromRestResponse.type.obj)
|
|
5227
5230
|
};
|
|
@@ -5240,14 +5243,14 @@ const graphQlDocToForm = typeDefinition => {
|
|
|
5240
5243
|
name: fieldDefinition.name,
|
|
5241
5244
|
required: fieldDefinition.required,
|
|
5242
5245
|
inputHint: fieldDefinition.inputHint,
|
|
5243
|
-
type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0 ? void 0 : (_fieldDefinition$type2 = _fieldDefinition$type.elementType) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$
|
|
5244
|
-
elementType: _objectSpread$
|
|
5246
|
+
type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0 ? void 0 : (_fieldDefinition$type2 = _fieldDefinition$type.elementType) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$10(_objectSpread$10({}, fieldDefinition.type), {}, {
|
|
5247
|
+
elementType: _objectSpread$10(_objectSpread$10({}, fieldDefinition.type.elementType), {}, {
|
|
5245
5248
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
5246
5249
|
key: value.key,
|
|
5247
5250
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
5248
5251
|
}))
|
|
5249
5252
|
})
|
|
5250
|
-
}) : ((_fieldDefinition$type3 = fieldDefinition.type) === null || _fieldDefinition$type3 === void 0 ? void 0 : _fieldDefinition$type3.name) === 'LocalizedEnum' ? _objectSpread$
|
|
5253
|
+
}) : ((_fieldDefinition$type3 = fieldDefinition.type) === null || _fieldDefinition$type3 === void 0 ? void 0 : _fieldDefinition$type3.name) === 'LocalizedEnum' ? _objectSpread$10(_objectSpread$10({}, fieldDefinition.type), {}, {
|
|
5251
5254
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
5252
5255
|
key: value.key,
|
|
5253
5256
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -5263,7 +5266,7 @@ const formToRestDoc = formCustomFields => ({
|
|
|
5263
5266
|
type: {
|
|
5264
5267
|
id: formCustomFields.type.id,
|
|
5265
5268
|
typeId: 'type',
|
|
5266
|
-
obj: _objectSpread$
|
|
5269
|
+
obj: _objectSpread$10({}, formCustomFields.type)
|
|
5267
5270
|
},
|
|
5268
5271
|
fields: formCustomFields.fields
|
|
5269
5272
|
});
|
|
@@ -5271,7 +5274,7 @@ const formToGraphQlDoc = formCustomFields => ({
|
|
|
5271
5274
|
type: {
|
|
5272
5275
|
id: formCustomFields.type.id,
|
|
5273
5276
|
typeId: 'type',
|
|
5274
|
-
obj: _objectSpread$
|
|
5277
|
+
obj: _objectSpread$10({}, omit__default["default"](formCustomFields.type, ['id']))
|
|
5275
5278
|
},
|
|
5276
5279
|
fields: omitBy__default["default"](formCustomFields.fields || {}, isNil__default["default"])
|
|
5277
5280
|
});
|
|
@@ -5402,8 +5405,8 @@ const REFERENCED_TYPES = {
|
|
|
5402
5405
|
zone: 'zone'
|
|
5403
5406
|
};
|
|
5404
5407
|
|
|
5405
|
-
function ownKeys
|
|
5406
|
-
function _objectSpread
|
|
5408
|
+
function ownKeys$$(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5409
|
+
function _objectSpread$$(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$$(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$$(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5407
5410
|
const extractDuplicatedValues = (values, type, language, languages) => {
|
|
5408
5411
|
let validatedValues = [];
|
|
5409
5412
|
if (type.name.toLowerCase() === 'money') {
|
|
@@ -5470,8 +5473,8 @@ function validations (formValues, language, languages) {
|
|
|
5470
5473
|
var _context2;
|
|
5471
5474
|
// Collect all required and set type fields
|
|
5472
5475
|
const fieldDefinitionsToValidate = _filterInstanceProperty__default["default"](_context2 = formValues.custom.type.fieldDefinitions).call(_context2, fieldDefinition => fieldDefinition.required || fieldDefinition.type.name.toLowerCase() === 'set');
|
|
5473
|
-
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread
|
|
5474
|
-
[fieldDefinition.name]: _objectSpread
|
|
5476
|
+
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$$(_objectSpread$$({}, acc), {}, {
|
|
5477
|
+
[fieldDefinition.name]: _objectSpread$$(_objectSpread$$({}, setMissingIfRequired(formValues, fieldDefinition)), setDuplicatedIfSet(formValues, fieldDefinition, language, languages))
|
|
5475
5478
|
}), {});
|
|
5476
5479
|
return withoutEmptyErrorsByField(errors);
|
|
5477
5480
|
}
|
|
@@ -5498,8 +5501,8 @@ function CustomTextInput(props) {
|
|
|
5498
5501
|
}
|
|
5499
5502
|
CustomTextInput.displayName = 'CustomTextInput';
|
|
5500
5503
|
|
|
5501
|
-
function ownKeys$
|
|
5502
|
-
function _objectSpread$
|
|
5504
|
+
function ownKeys$_(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5505
|
+
function _objectSpread$_(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$_(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$_(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5503
5506
|
const getSubfieldLanguage = subfieldName => {
|
|
5504
5507
|
const lastDotIndex = _lastIndexOfInstanceProperty__default["default"](subfieldName).call(subfieldName, '.');
|
|
5505
5508
|
return subfieldName.substring(lastDotIndex + 1);
|
|
@@ -5523,7 +5526,7 @@ function CustomLocalizedTextInput(props) {
|
|
|
5523
5526
|
// as a whole.
|
|
5524
5527
|
|
|
5525
5528
|
const fieldLanguage = getSubfieldLanguage(subfieldName);
|
|
5526
|
-
const newValue = _objectSpread$
|
|
5529
|
+
const newValue = _objectSpread$_(_objectSpread$_({}, props.value), {}, {
|
|
5527
5530
|
[fieldLanguage]: rawValue
|
|
5528
5531
|
});
|
|
5529
5532
|
const nullifiedIfNeeded = uiKit.LocalizedTextInput.isEmpty(newValue) ? undefined : newValue;
|
|
@@ -5590,21 +5593,21 @@ function CustomNumberInput(props) {
|
|
|
5590
5593
|
}
|
|
5591
5594
|
CustomNumberInput.displayName = 'CustomNumberInput';
|
|
5592
5595
|
|
|
5593
|
-
function ownKeys$
|
|
5594
|
-
function _objectSpread$
|
|
5596
|
+
function ownKeys$Z(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5597
|
+
function _objectSpread$Z(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Z(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Z(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5595
5598
|
var styles$g = {
|
|
5596
5599
|
"container": "custom-money-input-module__container___1fdO2"
|
|
5597
5600
|
};
|
|
5598
5601
|
const fixCurrencyCode = (value, currencies) => {
|
|
5599
5602
|
if (value.currencyCode) return value;
|
|
5600
5603
|
const firstCurrency = currencies[0];
|
|
5601
|
-
return _objectSpread$
|
|
5604
|
+
return _objectSpread$Z(_objectSpread$Z({}, value), {}, {
|
|
5602
5605
|
currencyCode: firstCurrency
|
|
5603
5606
|
});
|
|
5604
5607
|
};
|
|
5605
5608
|
const fixAmount = value => {
|
|
5606
5609
|
if (!value.amount) {
|
|
5607
|
-
return _objectSpread$
|
|
5610
|
+
return _objectSpread$Z(_objectSpread$Z({}, value), {}, {
|
|
5608
5611
|
amount: '0'
|
|
5609
5612
|
});
|
|
5610
5613
|
}
|
|
@@ -5646,7 +5649,7 @@ function CustomMoneyInput(props) {
|
|
|
5646
5649
|
}
|
|
5647
5650
|
const handleChange = makeChangeHandler((rawValue, subfieldName) => {
|
|
5648
5651
|
const isAmount = _endsWithInstanceProperty__default["default"](subfieldName).call(subfieldName, 'amount');
|
|
5649
|
-
const newValue = _objectSpread$
|
|
5652
|
+
const newValue = _objectSpread$Z({}, internalValue.current);
|
|
5650
5653
|
if (isAmount) newValue.amount = rawValue;else newValue.currencyCode = rawValue;
|
|
5651
5654
|
const fixedValue = fixEnteredValue(newValue, internalValue.current, currencies);
|
|
5652
5655
|
internalValue.current = fixedValue;
|
|
@@ -5927,7 +5930,7 @@ function ReferenceSearch(props) {
|
|
|
5927
5930
|
});
|
|
5928
5931
|
}
|
|
5929
5932
|
|
|
5930
|
-
const messages$
|
|
5933
|
+
const messages$F = reactIntl.defineMessages({
|
|
5931
5934
|
placeholder: {
|
|
5932
5935
|
id: 'CategoryReferenceSearch.placeholder',
|
|
5933
5936
|
description: 'Placeholder for search for a category',
|
|
@@ -5960,8 +5963,8 @@ const messages$B = reactIntl.defineMessages({
|
|
|
5960
5963
|
}
|
|
5961
5964
|
});
|
|
5962
5965
|
|
|
5963
|
-
function ownKeys$
|
|
5964
|
-
function _objectSpread$
|
|
5966
|
+
function ownKeys$Y(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5967
|
+
function _objectSpread$Y(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$Y(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$Y(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
5965
5968
|
function Option$1(props) {
|
|
5966
5969
|
var _context, _context2;
|
|
5967
5970
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -5973,7 +5976,7 @@ function Option$1(props) {
|
|
|
5973
5976
|
const _useIntl = reactIntl.useIntl(),
|
|
5974
5977
|
formatMessage = _useIntl.formatMessage;
|
|
5975
5978
|
const category = props.data;
|
|
5976
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
5979
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$Y(_objectSpread$Y({}, props), {}, {
|
|
5977
5980
|
children: jsxRuntime.jsxs("div", {
|
|
5978
5981
|
"data-testid": "category-option",
|
|
5979
5982
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -5984,7 +5987,7 @@ function Option$1(props) {
|
|
|
5984
5987
|
fallbackOrder: languages
|
|
5985
5988
|
})
|
|
5986
5989
|
}), category.parent && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5987
|
-
children: _concatInstanceProperty__default["default"](_context = "".concat(formatMessage(messages$
|
|
5990
|
+
children: _concatInstanceProperty__default["default"](_context = "".concat(formatMessage(messages$F.parentCategory), ": ")).call(_context, l10n.formatLocalizedString(category.parent, {
|
|
5988
5991
|
key: 'name',
|
|
5989
5992
|
locale: language,
|
|
5990
5993
|
fallbackOrder: languages
|
|
@@ -5996,14 +5999,14 @@ function Option$1(props) {
|
|
|
5996
5999
|
fallbackOrder: languages
|
|
5997
6000
|
}))
|
|
5998
6001
|
}), category.externalId && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5999
|
-
children: _concatInstanceProperty__default["default"](_context2 = "".concat(formatMessage(messages$
|
|
6002
|
+
children: _concatInstanceProperty__default["default"](_context2 = "".concat(formatMessage(messages$F.externalId), ": ")).call(_context2, category.externalId || constants.NO_VALUE_FALLBACK)
|
|
6000
6003
|
})]
|
|
6001
6004
|
})
|
|
6002
6005
|
}));
|
|
6003
6006
|
}
|
|
6004
6007
|
|
|
6005
|
-
function ownKeys$
|
|
6006
|
-
function _objectSpread$
|
|
6008
|
+
function ownKeys$X(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6009
|
+
function _objectSpread$X(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$X(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$X(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
6007
6010
|
const filterOption$1 = () => true;
|
|
6008
6011
|
function CategoryReferenceSearch(props) {
|
|
6009
6012
|
const _useIntl = reactIntl.useIntl(),
|
|
@@ -6015,7 +6018,7 @@ function CategoryReferenceSearch(props) {
|
|
|
6015
6018
|
})),
|
|
6016
6019
|
language = _useApplicationContex.language,
|
|
6017
6020
|
languages = _useApplicationContex.languages;
|
|
6018
|
-
const mapItemToOption = React.useCallback(category => _objectSpread$
|
|
6021
|
+
const mapItemToOption = React.useCallback(category => _objectSpread$X(_objectSpread$X({}, category), {}, {
|
|
6019
6022
|
value: category.id,
|
|
6020
6023
|
label: l10n.formatLocalizedString(category, {
|
|
6021
6024
|
key: 'name',
|
|
@@ -6033,7 +6036,7 @@ function CategoryReferenceSearch(props) {
|
|
|
6033
6036
|
}), [apolloClient]);
|
|
6034
6037
|
return jsxRuntime.jsx(ReferenceSearch, {
|
|
6035
6038
|
id: props.id,
|
|
6036
|
-
components: _objectSpread$
|
|
6039
|
+
components: _objectSpread$X({
|
|
6037
6040
|
Option: Option$1
|
|
6038
6041
|
}, props.components),
|
|
6039
6042
|
isClearable: props.isClearable,
|
|
@@ -6044,10 +6047,10 @@ function CategoryReferenceSearch(props) {
|
|
|
6044
6047
|
onBlur: props.onBlur,
|
|
6045
6048
|
onChange: props.onChange,
|
|
6046
6049
|
value: props.value,
|
|
6047
|
-
placeholderLabel: formatMessage(messages$
|
|
6048
|
-
searchPromptLabel: formatMessage(messages$
|
|
6049
|
-
noResultsLabel: formatMessage(messages$
|
|
6050
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
6050
|
+
placeholderLabel: formatMessage(messages$F.placeholder),
|
|
6051
|
+
searchPromptLabel: formatMessage(messages$F.searchPrompt),
|
|
6052
|
+
noResultsLabel: formatMessage(messages$F.noResults),
|
|
6053
|
+
referenceIsMissingLabel: formatMessage(messages$F.isMissing),
|
|
6051
6054
|
mapItemToOption: mapItemToOption,
|
|
6052
6055
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
6053
6056
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -6123,7 +6126,7 @@ function getCartDiscountById(apolloClient, options) {
|
|
|
6123
6126
|
});
|
|
6124
6127
|
}
|
|
6125
6128
|
|
|
6126
|
-
const messages$
|
|
6129
|
+
const messages$E = reactIntl.defineMessages({
|
|
6127
6130
|
placeholder: {
|
|
6128
6131
|
id: 'CartDiscountReferenceSearch.placeholder',
|
|
6129
6132
|
description: 'Placeholder for search for a cart discount',
|
|
@@ -6151,8 +6154,8 @@ const messages$A = reactIntl.defineMessages({
|
|
|
6151
6154
|
}
|
|
6152
6155
|
});
|
|
6153
6156
|
|
|
6154
|
-
function ownKeys$
|
|
6155
|
-
function _objectSpread$
|
|
6157
|
+
function ownKeys$W(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6158
|
+
function _objectSpread$W(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$W(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$W(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
6156
6159
|
function Option(props) {
|
|
6157
6160
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
6158
6161
|
language: applicationContext.dataLocale,
|
|
@@ -6163,7 +6166,7 @@ function Option(props) {
|
|
|
6163
6166
|
const _useIntl = reactIntl.useIntl(),
|
|
6164
6167
|
formatMessage = _useIntl.formatMessage;
|
|
6165
6168
|
const cartDiscount = props.data;
|
|
6166
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
6169
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$W(_objectSpread$W({}, props), {}, {
|
|
6167
6170
|
children: jsxRuntime.jsxs("div", {
|
|
6168
6171
|
"data-testid": "cart-discount-option",
|
|
6169
6172
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -6174,14 +6177,14 @@ function Option(props) {
|
|
|
6174
6177
|
fallbackOrder: languages
|
|
6175
6178
|
})
|
|
6176
6179
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
6177
|
-
children: [formatMessage(messages$
|
|
6180
|
+
children: [formatMessage(messages$E.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
|
|
6178
6181
|
})]
|
|
6179
6182
|
})
|
|
6180
6183
|
}));
|
|
6181
6184
|
}
|
|
6182
6185
|
|
|
6183
|
-
function ownKeys$
|
|
6184
|
-
function _objectSpread$
|
|
6186
|
+
function ownKeys$V(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6187
|
+
function _objectSpread$V(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$V(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$V(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
6185
6188
|
var CartDiscountsCount$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "CartDiscountsCount" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 425, source: { body: "query SearchCartDiscount($where: String) {\n cartDiscounts(limit: 500, where: $where) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n\nquery FetchCartDiscountById($cartDiscountId: String!) {\n cartDiscount(id: $cartDiscountId) {\n id\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
6186
6189
|
const returnNullIfEmpty = value => value && value.id === '' ? null : value;
|
|
6187
6190
|
const filterOption = (option, text) => {
|
|
@@ -6207,7 +6210,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
6207
6210
|
})),
|
|
6208
6211
|
language = _useApplicationContex.language,
|
|
6209
6212
|
languages = _useApplicationContex.languages;
|
|
6210
|
-
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$
|
|
6213
|
+
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$V(_objectSpread$V({}, cartDiscount), {}, {
|
|
6211
6214
|
value: cartDiscount.id,
|
|
6212
6215
|
key: cartDiscount.key,
|
|
6213
6216
|
label: l10n.formatLocalizedString(cartDiscount, {
|
|
@@ -6250,10 +6253,10 @@ function CartDiscountReferenceSearch(props) {
|
|
|
6250
6253
|
onBlur: props.onBlur,
|
|
6251
6254
|
onChange: props.onChange,
|
|
6252
6255
|
value: returnNullIfEmpty(props.value),
|
|
6253
|
-
placeholderLabel: formatMessage(messages$
|
|
6254
|
-
searchPromptLabel: formatMessage(messages$
|
|
6255
|
-
noResultsLabel: formatMessage(messages$
|
|
6256
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
6256
|
+
placeholderLabel: formatMessage(messages$E.placeholder),
|
|
6257
|
+
searchPromptLabel: formatMessage(messages$E.searchPrompt),
|
|
6258
|
+
noResultsLabel: formatMessage(messages$E.noResults),
|
|
6259
|
+
referenceIsMissingLabel: formatMessage(messages$E.isMissing),
|
|
6257
6260
|
mapItemToOption: mapItemToOption,
|
|
6258
6261
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
6259
6262
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -6314,7 +6317,7 @@ function CustomCartDiscountReferenceInput(props) {
|
|
|
6314
6317
|
});
|
|
6315
6318
|
}
|
|
6316
6319
|
|
|
6317
|
-
var messages$
|
|
6320
|
+
var messages$D = reactIntl.defineMessages({
|
|
6318
6321
|
noProductsFound: {
|
|
6319
6322
|
id: 'Shared.ProductPickerInput.noProductsFound',
|
|
6320
6323
|
description: 'The message to display when no products were found',
|
|
@@ -6438,7 +6441,7 @@ const ProductPickerInput = _ref => {
|
|
|
6438
6441
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
6439
6442
|
id: name,
|
|
6440
6443
|
name: name,
|
|
6441
|
-
placeholder: formatMessage(messages$
|
|
6444
|
+
placeholder: formatMessage(messages$D.placeholder),
|
|
6442
6445
|
loadOptions: loadOptionsDebounced,
|
|
6443
6446
|
defaultOptions: [],
|
|
6444
6447
|
isClearable: isClearable,
|
|
@@ -6452,7 +6455,7 @@ const ProductPickerInput = _ref => {
|
|
|
6452
6455
|
onInputChange: handleInputChange,
|
|
6453
6456
|
onBlur: onBlur,
|
|
6454
6457
|
value: currentOption.data,
|
|
6455
|
-
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$
|
|
6458
|
+
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$D.noProductsFound),
|
|
6456
6459
|
hasError: hasError || isLoadingFailed
|
|
6457
6460
|
})
|
|
6458
6461
|
}), isLoadingFailed && showLoadingErrorMessage && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -6770,8 +6773,8 @@ const SetButtons = props => {
|
|
|
6770
6773
|
};
|
|
6771
6774
|
SetButtons.displayName = 'SetButtons';
|
|
6772
6775
|
|
|
6773
|
-
function ownKeys$
|
|
6774
|
-
function _objectSpread$
|
|
6776
|
+
function ownKeys$U(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6777
|
+
function _objectSpread$U(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$U(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$U(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
6775
6778
|
const getDuplicateErrors = setValues => {
|
|
6776
6779
|
/* eslint-disable no-plusplus */
|
|
6777
6780
|
const result = [];
|
|
@@ -6828,7 +6831,7 @@ function CustomInputSet(props) {
|
|
|
6828
6831
|
touched = _useFormikContext.touched,
|
|
6829
6832
|
isSubmitting = _useFormikContext.isSubmitting,
|
|
6830
6833
|
dirty = _useFormikContext.dirty;
|
|
6831
|
-
const itemFieldDefintion = _objectSpread$
|
|
6834
|
+
const itemFieldDefintion = _objectSpread$U(_objectSpread$U({}, props.fieldDefinition), {}, {
|
|
6832
6835
|
type: props.fieldDefinition.type.elementType
|
|
6833
6836
|
});
|
|
6834
6837
|
const value = React.useMemo(() => props.value || [undefined], [props.value]);
|
|
@@ -6941,7 +6944,7 @@ function CustomInputSet(props) {
|
|
|
6941
6944
|
}
|
|
6942
6945
|
CustomInputSet.displayName = 'CustomInputSet';
|
|
6943
6946
|
|
|
6944
|
-
var messages$
|
|
6947
|
+
var messages$C = reactIntl.defineMessages({
|
|
6945
6948
|
referencedProductType: {
|
|
6946
6949
|
id: 'NestedAttributes.referencedProductType',
|
|
6947
6950
|
description: 'Product type referenced hint',
|
|
@@ -6949,10 +6952,10 @@ var messages$y = reactIntl.defineMessages({
|
|
|
6949
6952
|
}
|
|
6950
6953
|
});
|
|
6951
6954
|
|
|
6952
|
-
function ownKeys$
|
|
6953
|
-
function _objectSpread$
|
|
6955
|
+
function ownKeys$T(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6956
|
+
function _objectSpread$T(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$T(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$T(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
6954
6957
|
function ProductTypeReference(props) {
|
|
6955
|
-
const productTypeMessage = _objectSpread$
|
|
6958
|
+
const productTypeMessage = _objectSpread$T(_objectSpread$T({}, messages$C.referencedProductType), {}, {
|
|
6956
6959
|
values: {
|
|
6957
6960
|
productTypeName: props.productType.name
|
|
6958
6961
|
}
|
|
@@ -6963,23 +6966,23 @@ function ProductTypeReference(props) {
|
|
|
6963
6966
|
}
|
|
6964
6967
|
ProductTypeReference.displayName = 'ProductTypeReference';
|
|
6965
6968
|
|
|
6966
|
-
function ownKeys$
|
|
6967
|
-
function _objectSpread$
|
|
6969
|
+
function ownKeys$S(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6970
|
+
function _objectSpread$S(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$S(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$S(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
6968
6971
|
var FetchProductTypeQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductTypeQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productType" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "attributeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "100" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "isRequired" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputTipAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "NestedAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizableEnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "NestedAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizableEnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1905, source: { body: "query FetchProductTypeQuery($id: String!) {\n productType(id: $id) {\n name\n attributeDefinitions(limit: 100) {\n results {\n name\n isRequired\n inputHint\n inputTipAllLocales {\n value\n locale\n }\n labelAllLocales {\n value\n locale\n }\n type {\n name\n ... on SetAttributeDefinitionType {\n elementType {\n name\n ... on NestedAttributeDefinitionType {\n typeRef {\n id\n }\n }\n ... on EnumAttributeDefinitionType {\n values {\n results {\n key\n label\n }\n }\n }\n ... on LocalizableEnumAttributeDefinitionType {\n values {\n results {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n ... on ReferenceAttributeDefinitionType {\n referenceTypeId\n }\n }\n }\n ... on ReferenceAttributeDefinitionType {\n referenceTypeId\n }\n ... on NestedAttributeDefinitionType {\n typeRef {\n id\n }\n }\n ... on EnumAttributeDefinitionType {\n values {\n results {\n key\n label\n }\n }\n }\n ... on LocalizableEnumAttributeDefinitionType {\n values {\n results {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
6969
6972
|
const mapAttributeDefinition = definition => {
|
|
6970
6973
|
var _context, _definition$type, _definition$type$elem, _context2, _context3, _definition$type2, _context4;
|
|
6971
|
-
return _objectSpread$
|
|
6974
|
+
return _objectSpread$S(_objectSpread$S({}, definition), {}, {
|
|
6972
6975
|
required: definition.isRequired,
|
|
6973
6976
|
inputTip: l10n.transformLocalizedFieldToLocalizedString(definition.inputTipAllLocales),
|
|
6974
6977
|
label: l10n.transformLocalizedFieldToLocalizedString(definition.labelAllLocales),
|
|
6975
|
-
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, (_definition$type = definition.type) === null || _definition$type === void 0 ? void 0 : (_definition$type$elem = _definition$type.elementType) === null || _definition$type$elem === void 0 ? void 0 : _definition$type$elem.name) ? _objectSpread$
|
|
6976
|
-
elementType: _objectSpread$
|
|
6978
|
+
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, (_definition$type = definition.type) === null || _definition$type === void 0 ? void 0 : (_definition$type$elem = _definition$type.elementType) === null || _definition$type$elem === void 0 ? void 0 : _definition$type$elem.name) ? _objectSpread$S(_objectSpread$S({}, definition.type), {}, {
|
|
6979
|
+
elementType: _objectSpread$S(_objectSpread$S({}, definition.type.elementType), {}, {
|
|
6977
6980
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](definition.type.elementType).results).call(_context2, value => ({
|
|
6978
6981
|
key: value.key,
|
|
6979
6982
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
6980
6983
|
}))
|
|
6981
6984
|
})
|
|
6982
|
-
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, (_definition$type2 = definition.type) === null || _definition$type2 === void 0 ? void 0 : _definition$type2.name) ? _objectSpread$
|
|
6985
|
+
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, (_definition$type2 = definition.type) === null || _definition$type2 === void 0 ? void 0 : _definition$type2.name) ? _objectSpread$S(_objectSpread$S({}, definition.type), {}, {
|
|
6983
6986
|
values: _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](definition.type).results).call(_context4, value => ({
|
|
6984
6987
|
key: value.key,
|
|
6985
6988
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -7055,9 +7058,9 @@ function CustomNestedFieldInput(props) {
|
|
|
7055
7058
|
}
|
|
7056
7059
|
CustomNestedFieldInput.displayName = 'CustomNestedFieldInput';
|
|
7057
7060
|
|
|
7058
|
-
function ownKeys$
|
|
7059
|
-
function _objectSpread$
|
|
7060
|
-
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$
|
|
7061
|
+
function ownKeys$R(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7062
|
+
function _objectSpread$R(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$R(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$R(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
7063
|
+
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$R(_objectSpread$R({}, result), itemErrors), {});
|
|
7061
7064
|
|
|
7062
7065
|
// TODO(pa3): worth splitting in two components: one of set errors and one for
|
|
7063
7066
|
// all the other types of fields. So that there will be no isArray check.
|
|
@@ -7068,15 +7071,15 @@ const CustomFieldErrors = props => {
|
|
|
7068
7071
|
const errors = _Array$isArray__default["default"](props.errors) ? mergeSetItemsErrors(props.errors) : props.errors;
|
|
7069
7072
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7070
7073
|
children: [props.isTouched || didFormValidationFail && (errors === null || errors === void 0 ? void 0 : errors.missing) && jsxRuntime.jsx(_.ErrorMessage, {
|
|
7071
|
-
intlMessage: messages$
|
|
7074
|
+
intlMessage: messages$O.required
|
|
7072
7075
|
}), props.isTouched || didFormValidationFail && (errors === null || errors === void 0 ? void 0 : errors.duplicated) && jsxRuntime.jsx(_.ErrorMessage, {
|
|
7073
|
-
intlMessage: messages$
|
|
7076
|
+
intlMessage: messages$O.unique
|
|
7074
7077
|
})]
|
|
7075
7078
|
});
|
|
7076
7079
|
};
|
|
7077
7080
|
CustomFieldErrors.displayName = 'CustomFieldErrors';
|
|
7078
7081
|
|
|
7079
|
-
var messages$
|
|
7082
|
+
var messages$B = reactIntl.defineMessages({
|
|
7080
7083
|
productReferenceLabel: {
|
|
7081
7084
|
id: 'CustomFieldsLabel.productReferenceLabel',
|
|
7082
7085
|
description: 'Label shown above the product picker input.',
|
|
@@ -7109,8 +7112,8 @@ var messages$x = reactIntl.defineMessages({
|
|
|
7109
7112
|
}
|
|
7110
7113
|
});
|
|
7111
7114
|
|
|
7112
|
-
function ownKeys$
|
|
7113
|
-
function _objectSpread$
|
|
7115
|
+
function ownKeys$Q(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7116
|
+
function _objectSpread$Q(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$Q(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$Q(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
7114
7117
|
var CartDiscountsCount = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "CartDiscountsCount" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 61, source: { body: "query CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
7115
7118
|
const CustomFieldsLabelHint = _ref => {
|
|
7116
7119
|
var _type$name;
|
|
@@ -7142,14 +7145,14 @@ const CustomFieldsLabelHint = _ref => {
|
|
|
7142
7145
|
children: [jsxRuntime.jsx(uiKit.WarningIcon, {
|
|
7143
7146
|
size: "medium",
|
|
7144
7147
|
color: "warning"
|
|
7145
|
-
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
7148
|
+
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Q({}, messages$B.cartDiscountMoreThan500))]
|
|
7146
7149
|
}) : jsxRuntime.jsx(uiKit.Spacings.Inset, {
|
|
7147
7150
|
scale: "xs",
|
|
7148
7151
|
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
7149
7152
|
alignItems: "flex-start",
|
|
7150
7153
|
children: [jsxRuntime.jsx(uiKit.InformationIcon, {
|
|
7151
7154
|
size: "medium"
|
|
7152
|
-
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
7155
|
+
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Q({}, messages$B.cartDiscountMoreThan500))]
|
|
7153
7156
|
})
|
|
7154
7157
|
});
|
|
7155
7158
|
}
|
|
@@ -7164,8 +7167,8 @@ function CustomFieldsProductTypeReferenceSubtitle() {
|
|
|
7164
7167
|
formatMessage = _useIntl.formatMessage;
|
|
7165
7168
|
const _usePimStatus = usePimStatus(),
|
|
7166
7169
|
isProjectIndexed = _usePimStatus.isProjectIndexed;
|
|
7167
|
-
if (isProjectIndexed) return formatMessage(messages$
|
|
7168
|
-
return formatMessage(messages$
|
|
7170
|
+
if (isProjectIndexed) return formatMessage(messages$B.productTypeReferenceLabelI);
|
|
7171
|
+
return formatMessage(messages$B.productTypeReferenceLabel);
|
|
7169
7172
|
}
|
|
7170
7173
|
|
|
7171
7174
|
// TODO(pa3): this logic may be misplaced and probably
|
|
@@ -7181,7 +7184,7 @@ function CustomFieldsLabelSubtitle(_ref2) {
|
|
|
7181
7184
|
const referenceTypeId = type.referenceTypeId;
|
|
7182
7185
|
const referenceTypeName = capitalizeFirst(referenceTypeId);
|
|
7183
7186
|
if (_includesInstanceProperty__default["default"](_context = [SEARCHABLE_REFERENCES.category, SEARCHABLE_REFERENCES.cartDiscount]).call(_context, referenceTypeId)) return referenceTypeName;
|
|
7184
|
-
return referenceTypeId === SEARCHABLE_REFERENCES.product ? formatMessage(messages$
|
|
7187
|
+
return referenceTypeId === SEARCHABLE_REFERENCES.product ? formatMessage(messages$B.productReferenceLabel) : referenceTypeId === SEARCHABLE_REFERENCES.productType ? jsxRuntime.jsx(CustomFieldsProductTypeReferenceSubtitle, {}) : referenceTypeId === SEARCHABLE_REFERENCES.channel ? formatMessage(messages$B.channelReferenceLabel) : referenceTypeId === SEARCHABLE_REFERENCES.state ? formatMessage(messages$B.stateReferenceLabel) : "".concat(referenceTypeName, " ID");
|
|
7185
7188
|
}
|
|
7186
7189
|
const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref3 => {
|
|
7187
7190
|
let name = _ref3.name,
|
|
@@ -7289,8 +7292,8 @@ const ThemedCustomFieldsInternal = props => {
|
|
|
7289
7292
|
};
|
|
7290
7293
|
ThemedCustomFieldsInternal.displayName = 'ThemedCustomFieldsInternal';
|
|
7291
7294
|
|
|
7292
|
-
function ownKeys$
|
|
7293
|
-
function _objectSpread$
|
|
7295
|
+
function ownKeys$P(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7296
|
+
function _objectSpread$P(target) { for (var i = 1; i < arguments.length; i++) { var _context7, _context8; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys$P(Object(source), !0)).call(_context7, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys$P(Object(source))).call(_context8, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
7294
7297
|
const getTypeName = type => type.name.toLowerCase();
|
|
7295
7298
|
const findLabel = (enumType, key) => {
|
|
7296
7299
|
var _enumType$values$find, _enumType$values$find2, _context;
|
|
@@ -7339,7 +7342,7 @@ const attributeDefinitionToFieldDefinition = attributeDefinition => ({
|
|
|
7339
7342
|
const nameValuePairsToMap = pairs => _reduceInstanceProperty__default["default"](pairs).call(pairs, (result, _ref2) => {
|
|
7340
7343
|
let name = _ref2.name,
|
|
7341
7344
|
value = _ref2.value;
|
|
7342
|
-
return _objectSpread$
|
|
7345
|
+
return _objectSpread$P(_objectSpread$P({}, result), {}, {
|
|
7343
7346
|
[name]: value
|
|
7344
7347
|
});
|
|
7345
7348
|
}, {});
|
|
@@ -7446,7 +7449,7 @@ const customFieldsMessages = reactIntl.defineMessages({
|
|
|
7446
7449
|
}
|
|
7447
7450
|
});
|
|
7448
7451
|
|
|
7449
|
-
var messages$
|
|
7452
|
+
var messages$A = reactIntl.defineMessages({
|
|
7450
7453
|
updateButton: {
|
|
7451
7454
|
id: 'NestedAttributes.Details.updateButton',
|
|
7452
7455
|
description: 'Update button label',
|
|
@@ -7526,14 +7529,14 @@ var messages$w = reactIntl.defineMessages({
|
|
|
7526
7529
|
|
|
7527
7530
|
const NestingLevelContext = /*#__PURE__*/React.createContext(0);
|
|
7528
7531
|
|
|
7529
|
-
function ownKeys$
|
|
7530
|
-
function _objectSpread$
|
|
7532
|
+
function ownKeys$O(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7533
|
+
function _objectSpread$O(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$O(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$O(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
7531
7534
|
const EditButton = props => {
|
|
7532
7535
|
const _useIntl = reactIntl.useIntl(),
|
|
7533
7536
|
formatMessage = _useIntl.formatMessage;
|
|
7534
7537
|
return jsxRuntime.jsx(uiKit.Tooltip, {
|
|
7535
7538
|
placement: "top",
|
|
7536
|
-
title: formatMessage(messages$
|
|
7539
|
+
title: formatMessage(messages$A.editTooltip),
|
|
7537
7540
|
children: jsxRuntime.jsx(uiKit.IconButton, {
|
|
7538
7541
|
label: "Edit",
|
|
7539
7542
|
isDisabled: props.isDisabled,
|
|
@@ -7549,12 +7552,12 @@ const DropChangesConfirmation = props => {
|
|
|
7549
7552
|
formatMessage = _useIntl2.formatMessage;
|
|
7550
7553
|
return jsxRuntime.jsx(applicationComponents.ConfirmationDialog, {
|
|
7551
7554
|
isOpen: props.isOpen || false,
|
|
7552
|
-
title: formatMessage(messages$
|
|
7553
|
-
labelPrimary: formatMessage(messages$
|
|
7555
|
+
title: formatMessage(messages$A.confirmationDialogTitle),
|
|
7556
|
+
labelPrimary: formatMessage(messages$A.nestedAttributesConfirmLabel),
|
|
7554
7557
|
onConfirm: props.onConfirm,
|
|
7555
7558
|
onCancel: props.onCancel,
|
|
7556
7559
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
7557
|
-
intlMessage: messages$
|
|
7560
|
+
intlMessage: messages$A.confirmationDialogBody
|
|
7558
7561
|
})
|
|
7559
7562
|
});
|
|
7560
7563
|
};
|
|
@@ -7583,11 +7586,11 @@ const NestedAttributeModalPage = props => {
|
|
|
7583
7586
|
children: [jsxRuntime.jsx(uiKit.SecondaryButton, {
|
|
7584
7587
|
isDisabled: !formik$1.dirty,
|
|
7585
7588
|
iconLeft: jsxRuntime.jsx(uiKit.RevertIcon, {}),
|
|
7586
|
-
label: formatMessage(messages$
|
|
7589
|
+
label: formatMessage(messages$A.cancelButton),
|
|
7587
7590
|
onClick: formik$1.resetForm
|
|
7588
7591
|
}), jsxRuntime.jsx(applicationComponents.CustomFormModalPage.FormPrimaryButton, {
|
|
7589
7592
|
isDisabled: !formik$1.dirty,
|
|
7590
|
-
label: formatMessage(messages$
|
|
7593
|
+
label: formatMessage(messages$A.updateButton),
|
|
7591
7594
|
onClick: formik$1.handleSubmit
|
|
7592
7595
|
})]
|
|
7593
7596
|
}),
|
|
@@ -7628,7 +7631,7 @@ const NestedInputControls = props => {
|
|
|
7628
7631
|
if (nextNestingLevel >= 6) return jsxRuntime.jsx(MaxNestingLevelReached, {});
|
|
7629
7632
|
const hasAttributes = props.productType.attributeDefinitions.length > 0;
|
|
7630
7633
|
if (!hasAttributes) return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
7631
|
-
intlMessage: messages$
|
|
7634
|
+
intlMessage: messages$A.emptyProductType,
|
|
7632
7635
|
tone: "secondary"
|
|
7633
7636
|
});
|
|
7634
7637
|
return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
@@ -7678,13 +7681,13 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
7678
7681
|
const valuesAsMap = nameValuePairsToMap(value);
|
|
7679
7682
|
const initialValues = omitUnknownValues(valuesAsMap, attributeDefinitionsAsMap);
|
|
7680
7683
|
const openNestedAttributesForm = () => {
|
|
7681
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
7684
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$O(_objectSpread$O({}, parentFormik.status), {}, {
|
|
7682
7685
|
hideSaveToolbar: true
|
|
7683
7686
|
}));
|
|
7684
7687
|
attributesForm.openModal();
|
|
7685
7688
|
};
|
|
7686
7689
|
const closeNestedAttributesForm = () => {
|
|
7687
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
7690
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$O(_objectSpread$O({}, parentFormik.status), {}, {
|
|
7688
7691
|
hideSaveToolbar: false
|
|
7689
7692
|
}));
|
|
7690
7693
|
attributesForm.closeModal();
|
|
@@ -7704,7 +7707,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
7704
7707
|
if (nestingLevel !== 0) parentFormik.submitForm();else showNotification({
|
|
7705
7708
|
kind: 'success',
|
|
7706
7709
|
domain: constants.DOMAINS.SIDE,
|
|
7707
|
-
text: formatMessage(messages$
|
|
7710
|
+
text: formatMessage(messages$A.attributeUpdateSucceeded)
|
|
7708
7711
|
});
|
|
7709
7712
|
setSubmitting(false);
|
|
7710
7713
|
},
|
|
@@ -8135,8 +8138,8 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
8135
8138
|
});
|
|
8136
8139
|
}
|
|
8137
8140
|
|
|
8138
|
-
function ownKeys$
|
|
8139
|
-
function _objectSpread$
|
|
8141
|
+
function ownKeys$N(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8142
|
+
function _objectSpread$N(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$N(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$N(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8140
8143
|
const components = {
|
|
8141
8144
|
// eslint-disable-next-line react/display-name
|
|
8142
8145
|
Option: optionInnerProps => jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
@@ -8149,7 +8152,7 @@ function ProductSelectionsPicker(props) {
|
|
|
8149
8152
|
if (productSelectionsTotalFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8150
8153
|
const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= props.lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= props.upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
|
|
8151
8154
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8152
|
-
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$
|
|
8155
|
+
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$N(_objectSpread$N({}, props), {}, {
|
|
8153
8156
|
components: components
|
|
8154
8157
|
}))
|
|
8155
8158
|
});
|
|
@@ -8166,7 +8169,7 @@ ProductSelectionsPicker.defaultProps = {
|
|
|
8166
8169
|
|
|
8167
8170
|
const COUNTRIES_ASYNC_LOADING_LIMIT = 60;
|
|
8168
8171
|
|
|
8169
|
-
var messages$
|
|
8172
|
+
var messages$z = reactIntl.defineMessages({
|
|
8170
8173
|
countriesBasicSelectPlaceholder: {
|
|
8171
8174
|
id: 'CountriesPicker.countriesBasicSelectPlaceholder',
|
|
8172
8175
|
description: 'Placeholder of the basic field for countries',
|
|
@@ -8194,7 +8197,7 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
8194
8197
|
value: props.value,
|
|
8195
8198
|
isRequired: props.isRequired,
|
|
8196
8199
|
description: props.description,
|
|
8197
|
-
placeholder: intl.formatMessage(messages$
|
|
8200
|
+
placeholder: intl.formatMessage(messages$z.countriesBasicSelectPlaceholder),
|
|
8198
8201
|
options: props.options,
|
|
8199
8202
|
onChange: props.onChange,
|
|
8200
8203
|
isDisabled: props.isDisabled,
|
|
@@ -8204,10 +8207,10 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
8204
8207
|
});
|
|
8205
8208
|
}
|
|
8206
8209
|
|
|
8207
|
-
function ownKeys$
|
|
8208
|
-
function _objectSpread$
|
|
8210
|
+
function ownKeys$M(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8211
|
+
function _objectSpread$M(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$M(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$M(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8209
8212
|
const emptyCountryOption = intl => [{
|
|
8210
|
-
label: intl.formatMessage(messages$
|
|
8213
|
+
label: intl.formatMessage(messages$z.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
8211
8214
|
value: undefined,
|
|
8212
8215
|
isDisabled: true
|
|
8213
8216
|
}];
|
|
@@ -8232,7 +8235,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8232
8235
|
const onOptionChange = event => {
|
|
8233
8236
|
const countries = event.target.value;
|
|
8234
8237
|
props.onChange({
|
|
8235
|
-
target: _objectSpread$
|
|
8238
|
+
target: _objectSpread$M(_objectSpread$M({}, event.target), {}, {
|
|
8236
8239
|
value: _mapInstanceProperty__default["default"](countries).call(countries, country => {
|
|
8237
8240
|
var _country$value;
|
|
8238
8241
|
return (_country$value = country === null || country === void 0 ? void 0 : country.value) !== null && _country$value !== void 0 ? _country$value : country;
|
|
@@ -8253,7 +8256,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8253
8256
|
var _context3;
|
|
8254
8257
|
return _findInstanceProperty__default["default"](_context3 = props.options).call(_context3, country => country.value === countryCode);
|
|
8255
8258
|
}),
|
|
8256
|
-
placeholder: intl.formatMessage(messages$
|
|
8259
|
+
placeholder: intl.formatMessage(messages$z.countriesAsyncSelectPlaceholder),
|
|
8257
8260
|
loadOptions: handleLoadOptions,
|
|
8258
8261
|
onChange: onOptionChange,
|
|
8259
8262
|
isDisabled: props.isDisabled,
|
|
@@ -8263,13 +8266,13 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8263
8266
|
});
|
|
8264
8267
|
}
|
|
8265
8268
|
|
|
8266
|
-
function ownKeys$
|
|
8267
|
-
function _objectSpread$
|
|
8269
|
+
function ownKeys$L(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8270
|
+
function _objectSpread$L(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$L(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$L(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8268
8271
|
function CountriesPicker(props) {
|
|
8269
8272
|
var _props$options;
|
|
8270
8273
|
const CustomCountriesPicker = ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.length) <= props.countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
|
|
8271
8274
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8272
|
-
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$
|
|
8275
|
+
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$L({}, props))
|
|
8273
8276
|
});
|
|
8274
8277
|
}
|
|
8275
8278
|
CountriesPicker.defaultProps = {
|
|
@@ -8279,7 +8282,7 @@ CountriesPicker.defaultProps = {
|
|
|
8279
8282
|
hasWarning: false
|
|
8280
8283
|
};
|
|
8281
8284
|
|
|
8282
|
-
var messages$
|
|
8285
|
+
var messages$y = reactIntl.defineMessages({
|
|
8283
8286
|
noCustomerGroupsFound: {
|
|
8284
8287
|
id: 'Prices.CustomerGroupPickerInput.noCustomerGroupsFound',
|
|
8285
8288
|
description: 'The message to display when no customer groups were found',
|
|
@@ -8404,7 +8407,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
8404
8407
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
8405
8408
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
8406
8409
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
8407
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
8410
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$y.noCustomerGroupsFound), [loadingError, formatMessage]);
|
|
8408
8411
|
const 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 : '';
|
|
8409
8412
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
8410
8413
|
max: "scale",
|
|
@@ -8415,7 +8418,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
8415
8418
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
8416
8419
|
id: name,
|
|
8417
8420
|
name: name,
|
|
8418
|
-
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$
|
|
8421
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$y.placeholder),
|
|
8419
8422
|
loadOptions: loadOptionsDebounced,
|
|
8420
8423
|
defaultOptions: true,
|
|
8421
8424
|
showOptionGroupDivider: true,
|
|
@@ -8485,7 +8488,7 @@ const getFirst60Options$1 = (storesOptions, currentValues) => {
|
|
|
8485
8488
|
return _sliceInstanceProperty__default["default"](storesOptions).call(storesOptions, 0, LOWER_STORES_LIMIT + currentValuesLength);
|
|
8486
8489
|
};
|
|
8487
8490
|
|
|
8488
|
-
var messages$
|
|
8491
|
+
var messages$x = reactIntl.defineMessages({
|
|
8489
8492
|
basicSelectInputPlaceholder: {
|
|
8490
8493
|
id: 'Shared.StoreSelectInput.basicSelectInputPlaceholder',
|
|
8491
8494
|
description: 'The placeholder shown for basic select input',
|
|
@@ -8518,8 +8521,8 @@ var messages$t = reactIntl.defineMessages({
|
|
|
8518
8521
|
}
|
|
8519
8522
|
});
|
|
8520
8523
|
|
|
8521
|
-
function ownKeys$
|
|
8522
|
-
function _objectSpread$
|
|
8524
|
+
function ownKeys$K(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8525
|
+
function _objectSpread$K(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$K(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$K(Object(source))).call(_context6, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8523
8526
|
const hasErrors$5 = errors => {
|
|
8524
8527
|
var _context;
|
|
8525
8528
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8544,7 +8547,7 @@ const getValueFromOptions$1 = _ref => {
|
|
|
8544
8547
|
return _findInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, store => currentlySelectedStores === store.value);
|
|
8545
8548
|
};
|
|
8546
8549
|
const emptyStoreOption = intl => [{
|
|
8547
|
-
label: intl.formatMessage(messages$
|
|
8550
|
+
label: intl.formatMessage(messages$x.asyncSelectDropdownTypeAheadPrompt),
|
|
8548
8551
|
value: undefined,
|
|
8549
8552
|
isDisabled: true
|
|
8550
8553
|
}];
|
|
@@ -8591,10 +8594,10 @@ const StoresAsyncSelectInput = props => {
|
|
|
8591
8594
|
};
|
|
8592
8595
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8593
8596
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8594
|
-
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$
|
|
8597
|
+
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$K(_objectSpread$K({
|
|
8595
8598
|
id: props.id,
|
|
8596
8599
|
name: props.name,
|
|
8597
|
-
placeholder: intl.formatMessage(messages$
|
|
8600
|
+
placeholder: intl.formatMessage(messages$x.basicSelectInputPlaceholder),
|
|
8598
8601
|
horizontalConstraint: props.horizontalConstraint,
|
|
8599
8602
|
loadOptions: handleLoadOptions,
|
|
8600
8603
|
defaultOptions: true,
|
|
@@ -8633,8 +8636,8 @@ StoresAsyncSelectInput.defaultProps = {
|
|
|
8633
8636
|
shouldFetchProductSelections: false
|
|
8634
8637
|
};
|
|
8635
8638
|
|
|
8636
|
-
function ownKeys$
|
|
8637
|
-
function _objectSpread$
|
|
8639
|
+
function ownKeys$J(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8640
|
+
function _objectSpread$J(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$J(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$J(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8638
8641
|
const hasErrors$4 = errors => {
|
|
8639
8642
|
var _context;
|
|
8640
8643
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8682,10 +8685,10 @@ const StoresBasicSelectInput = props => {
|
|
|
8682
8685
|
};
|
|
8683
8686
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8684
8687
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8685
|
-
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$
|
|
8688
|
+
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$J(_objectSpread$J({
|
|
8686
8689
|
id: props.id,
|
|
8687
8690
|
name: props.name,
|
|
8688
|
-
placeholder: intl.formatMessage(messages$
|
|
8691
|
+
placeholder: intl.formatMessage(messages$x.basicSelectInputPlaceholder),
|
|
8689
8692
|
horizontalConstraint: props.horizontalConstraint,
|
|
8690
8693
|
options: mappedStoresListOptions,
|
|
8691
8694
|
isMulti: props.isMulti,
|
|
@@ -8777,8 +8780,8 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
8777
8780
|
};
|
|
8778
8781
|
};
|
|
8779
8782
|
|
|
8780
|
-
function ownKeys$
|
|
8781
|
-
function _objectSpread$
|
|
8783
|
+
function ownKeys$I(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8784
|
+
function _objectSpread$I(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$I(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$I(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8782
8785
|
var FetchStoresByWherePredicate = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresByWherePredicate" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "storesByWherePredicate" }, name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelection" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 525, source: { body: "query FetchStoresByWherePredicate(\n $where: String!\n $skipFetchingStores: Boolean!\n $excludeProductSelections: Boolean!\n) {\n storesByWherePredicate: stores(where: $where) @skip(if: $skipFetchingStores) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n productSelections @skip(if: $excludeProductSelections) {\n active\n productSelection {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8783
8786
|
const hasErrors$3 = errors => {
|
|
8784
8787
|
var _context;
|
|
@@ -8880,10 +8883,10 @@ const StoresSearchSelectInput = props => {
|
|
|
8880
8883
|
const loadOptionsDebounced = debounce__default["default"](handleLoadOptions, 500);
|
|
8881
8884
|
if (storesByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8882
8885
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8883
|
-
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$
|
|
8886
|
+
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$I(_objectSpread$I({
|
|
8884
8887
|
id: props.id,
|
|
8885
8888
|
name: props.name,
|
|
8886
|
-
placeholder: intl.formatMessage(messages$
|
|
8889
|
+
placeholder: intl.formatMessage(messages$x.searchSelectInputPlaceholder),
|
|
8887
8890
|
horizontalConstraint: props.horizontalConstraint,
|
|
8888
8891
|
loadOptions: loadOptionsDebounced,
|
|
8889
8892
|
defaultOptions: false,
|
|
@@ -8897,8 +8900,8 @@ const StoresSearchSelectInput = props => {
|
|
|
8897
8900
|
}),
|
|
8898
8901
|
onChange: props.onChange,
|
|
8899
8902
|
onBlur: props.onBlur,
|
|
8900
|
-
loadingMessage: intl.formatMessage(messages$
|
|
8901
|
-
noOptionsMessage: () => intl.formatMessage(messages$
|
|
8903
|
+
loadingMessage: intl.formatMessage(messages$x.searchSelectInputLoadingMessage),
|
|
8904
|
+
noOptionsMessage: () => intl.formatMessage(messages$x.searchSelectInputNoOptionsFoundMessage),
|
|
8902
8905
|
isDisabled: props.isDisabled || storesByFieldFetcher.isLoading,
|
|
8903
8906
|
isReadOnly: props.isReadOnly,
|
|
8904
8907
|
isClearable: props.isClearable,
|
|
@@ -8925,8 +8928,8 @@ StoresSearchSelectInput.defaultProps = {
|
|
|
8925
8928
|
shouldFetchProductSelections: false
|
|
8926
8929
|
};
|
|
8927
8930
|
|
|
8928
|
-
function ownKeys$
|
|
8929
|
-
function _objectSpread$
|
|
8931
|
+
function ownKeys$H(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8932
|
+
function _objectSpread$H(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$H(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$H(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8930
8933
|
const StoreSelectInput = props => {
|
|
8931
8934
|
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher(props.projectKey);
|
|
8932
8935
|
const components = React.useMemo(() => {
|
|
@@ -8934,7 +8937,7 @@ const StoreSelectInput = props => {
|
|
|
8934
8937
|
// eslint-disable-next-line react/display-name
|
|
8935
8938
|
Option: optionInnerProps => {
|
|
8936
8939
|
if (optionInnerProps.isDisabled) {
|
|
8937
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8940
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$H({}, optionInnerProps));
|
|
8938
8941
|
}
|
|
8939
8942
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8940
8943
|
optionType: props.optionType,
|
|
@@ -8945,7 +8948,7 @@ const StoreSelectInput = props => {
|
|
|
8945
8948
|
}, [props.optionType]);
|
|
8946
8949
|
if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8947
8950
|
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput : StoresSearchSelectInput;
|
|
8948
|
-
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$
|
|
8951
|
+
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$H(_objectSpread$H({
|
|
8949
8952
|
projectKey: props.projectKey,
|
|
8950
8953
|
id: props.id,
|
|
8951
8954
|
name: props.name,
|
|
@@ -8984,12 +8987,12 @@ StoreSelectInput.defaultProps = {
|
|
|
8984
8987
|
shouldFetchProductSelections: false
|
|
8985
8988
|
};
|
|
8986
8989
|
|
|
8987
|
-
function ownKeys$
|
|
8988
|
-
function _objectSpread$
|
|
8990
|
+
function ownKeys$G(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8991
|
+
function _objectSpread$G(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$G(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$G(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8989
8992
|
var FetchBusinessUnitsListQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchBusinessUnitsListQuery" }, 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: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "businessUnits" }, 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: "BusinessUnitBasicInfo" }, directives: [] }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "BusinessUnitBasicInfo" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "BusinessUnit" } }, 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: 340, source: { body: "query FetchBusinessUnitsListQuery(\n $limit: Int\n $offset: Int\n $sort: [String!]\n $where: String\n) {\n businessUnits(limit: $limit, offset: $offset, sort: $sort, where: $where) {\n total\n count\n offset\n results {\n ...BusinessUnitBasicInfo\n }\n }\n}\n\nfragment BusinessUnitBasicInfo on BusinessUnit {\n id\n key\n name\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8990
8993
|
const createQueryVariables$3 = ownProps => {
|
|
8991
8994
|
var _context;
|
|
8992
|
-
return _objectSpread$
|
|
8995
|
+
return _objectSpread$G(_objectSpread$G({
|
|
8993
8996
|
limit: ownProps.limit,
|
|
8994
8997
|
offset: ownProps.offset,
|
|
8995
8998
|
sort: _sortInstanceProperty__default["default"](ownProps)
|
|
@@ -9062,7 +9065,7 @@ const getFirst60Options = (businessUnitOptions, currentValues) => {
|
|
|
9062
9065
|
return _sliceInstanceProperty__default["default"](businessUnitOptions).call(businessUnitOptions, 0, LOWER_BUSINESS_UNITS_LIMIT + currentValuesLength);
|
|
9063
9066
|
};
|
|
9064
9067
|
|
|
9065
|
-
var messages$
|
|
9068
|
+
var messages$w = reactIntl.defineMessages({
|
|
9066
9069
|
asyncSelectInputPlaceholder: {
|
|
9067
9070
|
id: 'Shared.BusinessUnitSelectInput.asyncSelectInputPlaceholder',
|
|
9068
9071
|
description: 'The placeholder shown for async select input',
|
|
@@ -9090,8 +9093,8 @@ var messages$s = reactIntl.defineMessages({
|
|
|
9090
9093
|
}
|
|
9091
9094
|
});
|
|
9092
9095
|
|
|
9093
|
-
function ownKeys$
|
|
9094
|
-
function _objectSpread$
|
|
9096
|
+
function ownKeys$F(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9097
|
+
function _objectSpread$F(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$F(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$F(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9095
9098
|
const hasErrors$2 = errors => {
|
|
9096
9099
|
var _context;
|
|
9097
9100
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -9133,10 +9136,10 @@ const BusinessUnitAsyncSelectInput = props => {
|
|
|
9133
9136
|
};
|
|
9134
9137
|
if (businessUnitsListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
9135
9138
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9136
|
-
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$
|
|
9139
|
+
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$F(_objectSpread$F({
|
|
9137
9140
|
id: props.id,
|
|
9138
9141
|
name: props.name,
|
|
9139
|
-
placeholder: props.placeholder || intl.formatMessage(messages$
|
|
9142
|
+
placeholder: props.placeholder || intl.formatMessage(messages$w.asyncSelectInputPlaceholder),
|
|
9140
9143
|
horizontalConstraint: props.horizontalConstraint,
|
|
9141
9144
|
loadOptions: handleLoadOptions,
|
|
9142
9145
|
defaultOptions: getDefaultOptions(),
|
|
@@ -9169,8 +9172,8 @@ BusinessUnitAsyncSelectInput.defaultProps = {
|
|
|
9169
9172
|
shouldFetchProductSelections: false
|
|
9170
9173
|
};
|
|
9171
9174
|
|
|
9172
|
-
function ownKeys$
|
|
9173
|
-
function _objectSpread$
|
|
9175
|
+
function ownKeys$E(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9176
|
+
function _objectSpread$E(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$E(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$E(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9174
9177
|
const hasErrors$1 = errors => {
|
|
9175
9178
|
var _context;
|
|
9176
9179
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -9197,10 +9200,10 @@ const BusinessUnitBasicSelectInput = props => {
|
|
|
9197
9200
|
};
|
|
9198
9201
|
if (businessUnitsListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
9199
9202
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9200
|
-
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$
|
|
9203
|
+
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$E(_objectSpread$E({
|
|
9201
9204
|
id: props.id,
|
|
9202
9205
|
name: props.name,
|
|
9203
|
-
placeholder: props.placeholder || intl.formatMessage(messages$
|
|
9206
|
+
placeholder: props.placeholder || intl.formatMessage(messages$w.basicSelectInputPlaceholder),
|
|
9204
9207
|
horizontalConstraint: props.horizontalConstraint,
|
|
9205
9208
|
options: mappedBusinessUnitsOptions,
|
|
9206
9209
|
value: (_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.value,
|
|
@@ -9284,8 +9287,8 @@ const handlers$1 = {
|
|
|
9284
9287
|
}
|
|
9285
9288
|
};
|
|
9286
9289
|
|
|
9287
|
-
function ownKeys$
|
|
9288
|
-
function _objectSpread$
|
|
9290
|
+
function ownKeys$D(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9291
|
+
function _objectSpread$D(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$D(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$D(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9289
9292
|
var FetchBusinessUnitsByWherePredicate = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchBusinessUnitsByWherePredicate" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "businessUnitsByWherePredicate" }, name: { kind: "Name", value: "businessUnits" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 180, source: { body: "query FetchBusinessUnitsByWherePredicate($where: String!) {\n businessUnitsByWherePredicate: businessUnits(where: $where) {\n results {\n id\n key\n name\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
9290
9293
|
const hasErrors = errors => {
|
|
9291
9294
|
var _context;
|
|
@@ -9334,18 +9337,18 @@ const BusinessUnitSearchSelectInput = props => {
|
|
|
9334
9337
|
const loadOptionsDebounced = debounce__default["default"](handleLoadOptions, 500);
|
|
9335
9338
|
if (businessUnitsByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
9336
9339
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9337
|
-
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$
|
|
9340
|
+
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$D(_objectSpread$D({
|
|
9338
9341
|
id: props.id,
|
|
9339
9342
|
name: props.name,
|
|
9340
|
-
placeholder: props.placeholder || intl.formatMessage(messages$
|
|
9343
|
+
placeholder: props.placeholder || intl.formatMessage(messages$w.searchSelectInputPlaceholder),
|
|
9341
9344
|
horizontalConstraint: props.horizontalConstraint,
|
|
9342
9345
|
loadOptions: loadOptionsDebounced,
|
|
9343
9346
|
defaultOptions: false,
|
|
9344
9347
|
value: props.value,
|
|
9345
9348
|
onChange: handleChange,
|
|
9346
9349
|
onBlur: props.onBlur,
|
|
9347
|
-
loadingMessage: intl.formatMessage(messages$
|
|
9348
|
-
noOptionsMessage: () => intl.formatMessage(messages$
|
|
9350
|
+
loadingMessage: intl.formatMessage(messages$w.searchSelectInputLoadingMessage),
|
|
9351
|
+
noOptionsMessage: () => intl.formatMessage(messages$w.searchSelectInputNoOptionsFoundMessage),
|
|
9349
9352
|
isDisabled: props.isDisabled || businessUnitsByFieldFetcher.isLoading,
|
|
9350
9353
|
isReadOnly: props.isReadOnly,
|
|
9351
9354
|
isClearable: props.isClearable,
|
|
@@ -9372,8 +9375,8 @@ BusinessUnitSearchSelectInput.defaultProps = {
|
|
|
9372
9375
|
shouldFetchProductSelections: false
|
|
9373
9376
|
};
|
|
9374
9377
|
|
|
9375
|
-
function ownKeys$
|
|
9376
|
-
function _objectSpread$
|
|
9378
|
+
function ownKeys$C(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9379
|
+
function _objectSpread$C(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$C(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$C(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9377
9380
|
const BusinessUnitSelectInput = props => {
|
|
9378
9381
|
const totalNumberOfBusinessUnitsFetcher = useTotalNumberOfBusinessUnitsFetcher();
|
|
9379
9382
|
const components = React.useMemo(() => {
|
|
@@ -9381,7 +9384,7 @@ const BusinessUnitSelectInput = props => {
|
|
|
9381
9384
|
// eslint-disable-next-line react/display-name
|
|
9382
9385
|
Option: optionInnerProps => {
|
|
9383
9386
|
if (optionInnerProps.isDisabled) {
|
|
9384
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
9387
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$C({}, optionInnerProps));
|
|
9385
9388
|
}
|
|
9386
9389
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
9387
9390
|
optionType: props.optionType,
|
|
@@ -9392,7 +9395,7 @@ const BusinessUnitSelectInput = props => {
|
|
|
9392
9395
|
}, [props.optionType]);
|
|
9393
9396
|
if (totalNumberOfBusinessUnitsFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
9394
9397
|
const CustomSelectInput = totalNumberOfBusinessUnitsFetcher.total <= props.lowerBusinessUnitsLimit ? BusinessUnitBasicSelectInput : totalNumberOfBusinessUnitsFetcher.total <= props.upperBusinessUnitsLimit ? BusinessUnitAsyncSelectInput : BusinessUnitSearchSelectInput;
|
|
9395
|
-
return jsxRuntime.jsx(CustomSelectInput, _objectSpread$
|
|
9398
|
+
return jsxRuntime.jsx(CustomSelectInput, _objectSpread$C(_objectSpread$C({
|
|
9396
9399
|
id: props.id,
|
|
9397
9400
|
name: props.name,
|
|
9398
9401
|
components: components,
|
|
@@ -9433,7 +9436,7 @@ BusinessUnitSelectInput.defaultProps = {
|
|
|
9433
9436
|
// https://github.com/sphereio/sphere-backend/blob/master/ws/core/users.md#-businessrole
|
|
9434
9437
|
const businessRoleKeys = ['ExecutiveManagement', 'BusinessIntelligence', 'BuyingPlanningAndInventoryManagement', 'DataQualityAndContentManagement', 'CustomerService', 'FinanceAndAccounting', 'LegalAndPeople', 'LogisticsAndSupplyChain', 'FulfillmentAndOperationsManagement', 'OfflineRetailStore', 'Marketing', 'BusinessDevSalesAndAccountManagement', 'UXUIDesign', 'TechProductManagement', 'TechProjectAndProgramManagement', 'SoftwareDevelopmentAndSolutionsArchitect', 'OperationsITAndSupportEngineering', 'Other'];
|
|
9435
9438
|
|
|
9436
|
-
var messages$
|
|
9439
|
+
var messages$v = reactIntl.defineMessages({
|
|
9437
9440
|
ExecutiveManagement: {
|
|
9438
9441
|
id: 'Shared.businessRoles.executiveManagement',
|
|
9439
9442
|
description: 'The label for one of the selectable business roles',
|
|
@@ -9526,6 +9529,573 @@ var messages$r = reactIntl.defineMessages({
|
|
|
9526
9529
|
}
|
|
9527
9530
|
});
|
|
9528
9531
|
|
|
9532
|
+
const safelyAddFallback = function (string) {
|
|
9533
|
+
let fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : constants.NO_VALUE_FALLBACK;
|
|
9534
|
+
return string === '' ? fallback : string !== null && string !== void 0 ? string : fallback;
|
|
9535
|
+
};
|
|
9536
|
+
|
|
9537
|
+
const ENABLE_BUSINESS_UNITS_ASSOCIATE_ROLES = 'businessUnitsAssociateRoles';
|
|
9538
|
+
|
|
9539
|
+
const ASSOCIATE_ROLE_SOURCES = {
|
|
9540
|
+
EXPLICIT: 'Explicit',
|
|
9541
|
+
INHERITED: 'Inherited'
|
|
9542
|
+
};
|
|
9543
|
+
const SEARCH_FIELDS = {
|
|
9544
|
+
ALL_FIELDS: 'allFields',
|
|
9545
|
+
NAME: 'name',
|
|
9546
|
+
EMAIL: 'email'
|
|
9547
|
+
};
|
|
9548
|
+
|
|
9549
|
+
var messages$u = reactIntl.defineMessages({
|
|
9550
|
+
allFieldsFilterOption: {
|
|
9551
|
+
id: 'BusinessUnitAssociatesListSearch.filterOption.allFields',
|
|
9552
|
+
description: 'Label for the filter option all fields',
|
|
9553
|
+
defaultMessage: 'All fields'
|
|
9554
|
+
},
|
|
9555
|
+
allFieldsFilterPlaceholder: {
|
|
9556
|
+
id: 'BusinessUnitAssociatesListSearch.filterPlaceholder.allFields',
|
|
9557
|
+
description: 'Label for the searchbar placeholder for all fields option',
|
|
9558
|
+
defaultMessage: 'Search by name or email'
|
|
9559
|
+
},
|
|
9560
|
+
emailFilterOption: {
|
|
9561
|
+
id: 'BusinessUnitAssociatesListSearch.filterOption.email',
|
|
9562
|
+
description: 'Label for the filter option email',
|
|
9563
|
+
defaultMessage: 'Email'
|
|
9564
|
+
},
|
|
9565
|
+
emailFilterPlaceholder: {
|
|
9566
|
+
id: 'BusinessUnitAssociatesListSearch.filterPlaceholder.email',
|
|
9567
|
+
description: 'Label for the searchbar placeholder for all fields option',
|
|
9568
|
+
defaultMessage: 'Search by email'
|
|
9569
|
+
},
|
|
9570
|
+
nameFilterOption: {
|
|
9571
|
+
id: 'BusinessUnitAssociatesListSearch.filterOption.name',
|
|
9572
|
+
description: 'Label for the filter option name',
|
|
9573
|
+
defaultMessage: 'Name'
|
|
9574
|
+
},
|
|
9575
|
+
nameFilterPlaceholder: {
|
|
9576
|
+
id: 'BusinessUnitAssociatesListSearch.filterPlaceholder.name',
|
|
9577
|
+
description: 'Label for the searchbar placeholder for name option',
|
|
9578
|
+
defaultMessage: 'Search by name'
|
|
9579
|
+
}
|
|
9580
|
+
});
|
|
9581
|
+
|
|
9582
|
+
function ownKeys$B(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9583
|
+
function _objectSpread$B(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$B(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$B(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9584
|
+
const BusinessUnitAssociatesSearchbar = props => {
|
|
9585
|
+
const intl = reactIntl.useIntl();
|
|
9586
|
+
const searchOptions = React.useMemo(() => [{
|
|
9587
|
+
value: SEARCH_FIELDS.ALL_FIELDS,
|
|
9588
|
+
label: intl.formatMessage(messages$u["".concat(SEARCH_FIELDS.ALL_FIELDS, "FilterOption")])
|
|
9589
|
+
}, {
|
|
9590
|
+
value: SEARCH_FIELDS.NAME,
|
|
9591
|
+
label: intl.formatMessage(messages$u["".concat(SEARCH_FIELDS.NAME, "FilterOption")])
|
|
9592
|
+
}, {
|
|
9593
|
+
value: SEARCH_FIELDS.EMAIL,
|
|
9594
|
+
label: intl.formatMessage(messages$u["".concat(SEARCH_FIELDS.EMAIL, "FilterOption")])
|
|
9595
|
+
}], [intl]);
|
|
9596
|
+
const seachPlaceholderMessages = React.useMemo(() => ({
|
|
9597
|
+
[SEARCH_FIELDS.ALL_FIELDS]: intl.formatMessage(messages$u["".concat(SEARCH_FIELDS.ALL_FIELDS, "FilterPlaceholder")]),
|
|
9598
|
+
[SEARCH_FIELDS.EMAIL]: intl.formatMessage(messages$u["".concat(SEARCH_FIELDS.EMAIL, "FilterPlaceholder")]),
|
|
9599
|
+
[SEARCH_FIELDS.NAME]: intl.formatMessage(messages$u["".concat(SEARCH_FIELDS.NAME, "FilterPlaceholder")])
|
|
9600
|
+
}), [intl]);
|
|
9601
|
+
const _useState = React.useState({
|
|
9602
|
+
option: SEARCH_FIELDS.ALL_FIELDS,
|
|
9603
|
+
text: ''
|
|
9604
|
+
}),
|
|
9605
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
9606
|
+
searchValue = _useState2[0],
|
|
9607
|
+
setSearchValue = _useState2[1];
|
|
9608
|
+
return jsxRuntime.jsx(uiKit.SelectableSearchInput, {
|
|
9609
|
+
horizontalConstraint: 15,
|
|
9610
|
+
isDisabled: props.isDisabled,
|
|
9611
|
+
onChange: event => {
|
|
9612
|
+
var _context;
|
|
9613
|
+
if (_endsWithInstanceProperty__default["default"](_context = event.target.id).call(_context, 'dropdown')) {
|
|
9614
|
+
setSearchValue(_objectSpread$B(_objectSpread$B({}, searchValue), {}, {
|
|
9615
|
+
option: event.target.value
|
|
9616
|
+
}));
|
|
9617
|
+
} else {
|
|
9618
|
+
setSearchValue(_objectSpread$B(_objectSpread$B({}, searchValue), {}, {
|
|
9619
|
+
text: event.target.value
|
|
9620
|
+
}));
|
|
9621
|
+
}
|
|
9622
|
+
},
|
|
9623
|
+
onReset: () => {
|
|
9624
|
+
setSearchValue({
|
|
9625
|
+
option: SEARCH_FIELDS.ALL_FIELDS,
|
|
9626
|
+
text: ''
|
|
9627
|
+
});
|
|
9628
|
+
props.onSubmit({
|
|
9629
|
+
option: SEARCH_FIELDS.ALL_FIELDS,
|
|
9630
|
+
text: ''
|
|
9631
|
+
});
|
|
9632
|
+
},
|
|
9633
|
+
onSubmit: props.onSubmit,
|
|
9634
|
+
options: searchOptions,
|
|
9635
|
+
placeholder: seachPlaceholderMessages[searchValue.option],
|
|
9636
|
+
value: searchValue
|
|
9637
|
+
});
|
|
9638
|
+
};
|
|
9639
|
+
BusinessUnitAssociatesSearchbar.displayName = 'BusinessUnitAssociatesSearchbar';
|
|
9640
|
+
|
|
9641
|
+
var messages$t = reactIntl.defineMessages({
|
|
9642
|
+
addAnAssociate: {
|
|
9643
|
+
id: 'Shared.BusinessUnitAssociates.EmptyListMessage.addAnAssociate',
|
|
9644
|
+
description: 'The label for add an associate link button',
|
|
9645
|
+
defaultMessage: 'Add an associate'
|
|
9646
|
+
},
|
|
9647
|
+
noAssociates: {
|
|
9648
|
+
id: 'Shared.BusinessUnitAssociates.EmptyListMessage.noAssociates',
|
|
9649
|
+
description: 'The message displayed when there are no associates available',
|
|
9650
|
+
defaultMessage: 'There are no associates.'
|
|
9651
|
+
}
|
|
9652
|
+
});
|
|
9653
|
+
|
|
9654
|
+
const EmptyListMessage = props => {
|
|
9655
|
+
const intl = reactIntl.useIntl();
|
|
9656
|
+
return jsxRuntime.jsxs(uiKit.Spacings.Inset, {
|
|
9657
|
+
scale: "xs",
|
|
9658
|
+
children: [jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
9659
|
+
scale: "l",
|
|
9660
|
+
children: [jsxRuntime.jsx(Divider, {
|
|
9661
|
+
size: "m"
|
|
9662
|
+
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
9663
|
+
intlMessage: messages$t.noAssociates
|
|
9664
|
+
})]
|
|
9665
|
+
}), jsxRuntime.jsx(uiKit.FlatButton, {
|
|
9666
|
+
isDisabled: !props.canManageBusinessUnits,
|
|
9667
|
+
label: intl.formatMessage(messages$t.addAnAssociate),
|
|
9668
|
+
onClick: props.onAddAssociateClick,
|
|
9669
|
+
tone: "primary"
|
|
9670
|
+
})]
|
|
9671
|
+
});
|
|
9672
|
+
};
|
|
9673
|
+
EmptyListMessage.displayName = 'EmptyListMessage';
|
|
9674
|
+
|
|
9675
|
+
var messages$s = reactIntl.defineMessages({
|
|
9676
|
+
noResultsTitle: {
|
|
9677
|
+
id: 'Shared.BusinessUnitAssociates.emptySearchResultsMessage.noResultsTitle',
|
|
9678
|
+
description: 'Message for no search result for customers.',
|
|
9679
|
+
defaultMessage: 'There are no results that match your search and/or filter combination.'
|
|
9680
|
+
},
|
|
9681
|
+
noResultsSuggestionsTitle: {
|
|
9682
|
+
id: 'Shared.BusinessUnitAssociates.emptySearchResultsMessage.noResultsSuggestionsTitle',
|
|
9683
|
+
description: 'Suggestions title',
|
|
9684
|
+
defaultMessage: 'Suggestions:'
|
|
9685
|
+
},
|
|
9686
|
+
noResultsSuggestion1: {
|
|
9687
|
+
id: 'Shared.BusinessUnitAssociates.emptySearchResultsMessage.noResultsSuggestion1',
|
|
9688
|
+
description: 'One of suggestions when no results are found.',
|
|
9689
|
+
defaultMessage: 'Make sure to select the search field in the dropdown next to the search input.'
|
|
9690
|
+
},
|
|
9691
|
+
noResultsSuggestion2: {
|
|
9692
|
+
id: 'Shared.BusinessUnitAssociates.emptySearchResultsMessage.noResultsSuggestion2',
|
|
9693
|
+
description: 'One of suggestions when no results are found.',
|
|
9694
|
+
defaultMessage: 'Check the spelling, search by entering the exact value.'
|
|
9695
|
+
},
|
|
9696
|
+
noResultsSuggestion3: {
|
|
9697
|
+
id: 'Shared.BusinessUnitAssociates.emptySearchResultsMessage.noResultsSuggestion3',
|
|
9698
|
+
description: 'One of suggestions when no results are found.',
|
|
9699
|
+
defaultMessage: 'Use the filter to search for further values.'
|
|
9700
|
+
}
|
|
9701
|
+
});
|
|
9702
|
+
|
|
9703
|
+
const EmptySearchResultsMessage = () => jsxRuntime.jsx(uiKit.Spacings.Inset, {
|
|
9704
|
+
scale: "xs",
|
|
9705
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
9706
|
+
scale: "s",
|
|
9707
|
+
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
9708
|
+
tone: "secondary",
|
|
9709
|
+
intlMessage: messages$s.noResultsTitle,
|
|
9710
|
+
isBold: true
|
|
9711
|
+
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
9712
|
+
tone: "secondary",
|
|
9713
|
+
intlMessage: messages$s.noResultsSuggestionsTitle
|
|
9714
|
+
}), jsxRuntime.jsxs("ul", {
|
|
9715
|
+
children: [jsxRuntime.jsx("li", {
|
|
9716
|
+
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
9717
|
+
intlMessage: messages$s.noResultsSuggestion1,
|
|
9718
|
+
tone: "secondary"
|
|
9719
|
+
})
|
|
9720
|
+
}), jsxRuntime.jsx("li", {
|
|
9721
|
+
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
9722
|
+
intlMessage: messages$s.noResultsSuggestion2,
|
|
9723
|
+
tone: "secondary"
|
|
9724
|
+
})
|
|
9725
|
+
}), jsxRuntime.jsx("li", {
|
|
9726
|
+
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
9727
|
+
intlMessage: messages$s.noResultsSuggestion3,
|
|
9728
|
+
tone: "secondary"
|
|
9729
|
+
})
|
|
9730
|
+
})]
|
|
9731
|
+
})]
|
|
9732
|
+
})
|
|
9733
|
+
});
|
|
9734
|
+
EmptySearchResultsMessage.displayName = 'EmptySearchResultsMessage';
|
|
9735
|
+
|
|
9736
|
+
const filterByAllFields = (associates, searchValue) => {
|
|
9737
|
+
const searchTextTerms = searchValue.text.toLowerCase().split(' ');
|
|
9738
|
+
return _filterInstanceProperty__default["default"](associates).call(associates, associate => {
|
|
9739
|
+
return _someInstanceProperty__default["default"](searchTextTerms).call(searchTextTerms, term => {
|
|
9740
|
+
var _context, _context2, _context3;
|
|
9741
|
+
return _includesInstanceProperty__default["default"](_context = associate.customer.firstName.toLowerCase()).call(_context, term) || _includesInstanceProperty__default["default"](_context2 = associate.customer.lastName.toLowerCase()).call(_context2, term) || _includesInstanceProperty__default["default"](_context3 = associate.customer.email.toLowerCase()).call(_context3, term);
|
|
9742
|
+
});
|
|
9743
|
+
});
|
|
9744
|
+
};
|
|
9745
|
+
const filterByEmail = (associates, searchValue) => {
|
|
9746
|
+
const searchTextTerms = searchValue.text.toLowerCase().split(' ');
|
|
9747
|
+
return _filterInstanceProperty__default["default"](associates).call(associates, associate => _someInstanceProperty__default["default"](searchTextTerms).call(searchTextTerms, term => {
|
|
9748
|
+
var _context4;
|
|
9749
|
+
return _includesInstanceProperty__default["default"](_context4 = associate.customer.email.toLowerCase()).call(_context4, term);
|
|
9750
|
+
}));
|
|
9751
|
+
};
|
|
9752
|
+
const filterByName = (associates, searchValue) => {
|
|
9753
|
+
const searchTextTerms = searchValue.text.toLowerCase().split(' ');
|
|
9754
|
+
return _filterInstanceProperty__default["default"](associates).call(associates, associate => {
|
|
9755
|
+
return _someInstanceProperty__default["default"](searchTextTerms).call(searchTextTerms, term => {
|
|
9756
|
+
var _context5, _context6;
|
|
9757
|
+
return _includesInstanceProperty__default["default"](_context5 = associate.customer.firstName.toLowerCase()).call(_context5, term) || _includesInstanceProperty__default["default"](_context6 = associate.customer.lastName.toLowerCase()).call(_context6, term);
|
|
9758
|
+
});
|
|
9759
|
+
});
|
|
9760
|
+
};
|
|
9761
|
+
const FILTER_FUNCTIONS = {
|
|
9762
|
+
[SEARCH_FIELDS.ALL_FIELDS]: filterByAllFields,
|
|
9763
|
+
[SEARCH_FIELDS.EMAIL]: filterByEmail,
|
|
9764
|
+
[SEARCH_FIELDS.NAME]: filterByName
|
|
9765
|
+
};
|
|
9766
|
+
const filterAssociates = (associates, searchValue) => FILTER_FUNCTIONS[searchValue.option](associates, searchValue);
|
|
9767
|
+
|
|
9768
|
+
const mergeOverwritten = (inherited, explicit) => {
|
|
9769
|
+
var _context;
|
|
9770
|
+
const onlyExplicit = differenceBy__default["default"](explicit.associateRoleAssignments, inherited.associateRoleAssignments, 'associateRole.key') || [];
|
|
9771
|
+
const onlyInherited = differenceBy__default["default"](inherited.associateRoleAssignments, explicit.associateRoleAssignments, 'associateRole.key') || [];
|
|
9772
|
+
const overwritten = intersectionBy__default["default"](inherited.associateRoleAssignments, explicit.associateRoleAssignments, 'associateRole.key') || [];
|
|
9773
|
+
const allExplicit = _mapInstanceProperty__default["default"](_context = _concatInstanceProperty__default["default"](onlyExplicit).call(onlyExplicit, overwritten)).call(_context, _ref => {
|
|
9774
|
+
let associateRole = _ref.associateRole;
|
|
9775
|
+
return {
|
|
9776
|
+
name: associateRole.name || associateRole.key,
|
|
9777
|
+
source: ASSOCIATE_ROLE_SOURCES.EXPLICIT
|
|
9778
|
+
};
|
|
9779
|
+
});
|
|
9780
|
+
const allInherited = _mapInstanceProperty__default["default"](onlyInherited).call(onlyInherited, _ref2 => {
|
|
9781
|
+
let associateRole = _ref2.associateRole;
|
|
9782
|
+
return {
|
|
9783
|
+
name: associateRole.name || associateRole.key,
|
|
9784
|
+
source: ASSOCIATE_ROLE_SOURCES.INHERITED
|
|
9785
|
+
};
|
|
9786
|
+
});
|
|
9787
|
+
return {
|
|
9788
|
+
id: inherited.customer.id,
|
|
9789
|
+
customer: inherited.customer,
|
|
9790
|
+
roles: _concatInstanceProperty__default["default"](allExplicit).call(allExplicit, allInherited)
|
|
9791
|
+
};
|
|
9792
|
+
};
|
|
9793
|
+
const mergeAssociates = businessUnit => {
|
|
9794
|
+
var _context2;
|
|
9795
|
+
const _businessUnit$associa = businessUnit.associates,
|
|
9796
|
+
associates = _businessUnit$associa === void 0 ? [] : _businessUnit$associa,
|
|
9797
|
+
_businessUnit$inherit = businessUnit.inheritedAssociates,
|
|
9798
|
+
inheritedAssociates = _businessUnit$inherit === void 0 ? [] : _businessUnit$inherit;
|
|
9799
|
+
const overwrittenOnExplicit = intersectionBy__default["default"](associates, inheritedAssociates, 'customer.id') || [];
|
|
9800
|
+
const overwrittenOnInherited = intersectionBy__default["default"](inheritedAssociates, associates, 'customer.id') || [];
|
|
9801
|
+
const onlyExplicit = differenceBy__default["default"](associates, inheritedAssociates, 'customer.id') || [];
|
|
9802
|
+
const onlyInherited = differenceBy__default["default"](inheritedAssociates, associates, 'customer.id') || [];
|
|
9803
|
+
const explicit = _mapInstanceProperty__default["default"](onlyExplicit).call(onlyExplicit, associate => {
|
|
9804
|
+
var _associate$associateR;
|
|
9805
|
+
return {
|
|
9806
|
+
id: associate.customer.id,
|
|
9807
|
+
customer: associate.customer,
|
|
9808
|
+
roles: (_associate$associateR = associate.associateRoleAssignments) === null || _associate$associateR === void 0 ? void 0 : _mapInstanceProperty__default["default"](_associate$associateR).call(_associate$associateR, _ref3 => {
|
|
9809
|
+
let associateRole = _ref3.associateRole;
|
|
9810
|
+
return {
|
|
9811
|
+
name: associateRole.name || associateRole.key,
|
|
9812
|
+
source: ASSOCIATE_ROLE_SOURCES.EXPLICIT
|
|
9813
|
+
};
|
|
9814
|
+
})
|
|
9815
|
+
};
|
|
9816
|
+
});
|
|
9817
|
+
const inherited = _mapInstanceProperty__default["default"](onlyInherited).call(onlyInherited, associate => {
|
|
9818
|
+
var _associate$associateR2;
|
|
9819
|
+
return {
|
|
9820
|
+
id: associate.customer.id,
|
|
9821
|
+
customer: associate.customer,
|
|
9822
|
+
roles: (_associate$associateR2 = associate.associateRoleAssignments) === null || _associate$associateR2 === void 0 ? void 0 : _mapInstanceProperty__default["default"](_associate$associateR2).call(_associate$associateR2, _ref4 => {
|
|
9823
|
+
let associateRole = _ref4.associateRole;
|
|
9824
|
+
return {
|
|
9825
|
+
name: associateRole.name || associateRole.key,
|
|
9826
|
+
source: ASSOCIATE_ROLE_SOURCES.INHERITED
|
|
9827
|
+
};
|
|
9828
|
+
})
|
|
9829
|
+
};
|
|
9830
|
+
});
|
|
9831
|
+
const overwritten = _mapInstanceProperty__default["default"](overwrittenOnInherited).call(overwrittenOnInherited, inherited => {
|
|
9832
|
+
const explicit = _findInstanceProperty__default["default"](overwrittenOnExplicit).call(overwrittenOnExplicit, explicitAssociate => explicitAssociate.customer.id === inherited.customer.id);
|
|
9833
|
+
return mergeOverwritten(inherited, explicit);
|
|
9834
|
+
});
|
|
9835
|
+
return _concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](explicit).call(explicit, inherited)).call(_context2, overwritten);
|
|
9836
|
+
};
|
|
9837
|
+
|
|
9838
|
+
var messages$r = reactIntl.defineMessages({
|
|
9839
|
+
columnFirstName: {
|
|
9840
|
+
id: 'Shared.BusinessUnitAssociates.columnFirstName',
|
|
9841
|
+
description: 'The column label (First name)',
|
|
9842
|
+
defaultMessage: 'First name'
|
|
9843
|
+
},
|
|
9844
|
+
columnLastName: {
|
|
9845
|
+
id: 'Shared.BusinessUnitAssociates.columnLastName',
|
|
9846
|
+
description: 'The column label (Last name)',
|
|
9847
|
+
defaultMessage: 'Last name'
|
|
9848
|
+
},
|
|
9849
|
+
columnRole: {
|
|
9850
|
+
id: 'Shared.BusinessUnitAssociates.columnRole',
|
|
9851
|
+
description: 'The column label (Role)',
|
|
9852
|
+
defaultMessage: 'Role'
|
|
9853
|
+
},
|
|
9854
|
+
columnEmail: {
|
|
9855
|
+
id: 'Shared.BusinessUnitAssociates.columnEmail',
|
|
9856
|
+
description: 'The column label (Email)',
|
|
9857
|
+
defaultMessage: 'Email'
|
|
9858
|
+
},
|
|
9859
|
+
companyUnitType: {
|
|
9860
|
+
id: 'Shared.BusinessUnitAssociates.unitType.company',
|
|
9861
|
+
description: 'Label for the business unit type company',
|
|
9862
|
+
defaultMessage: 'Company'
|
|
9863
|
+
},
|
|
9864
|
+
divisionUnitType: {
|
|
9865
|
+
id: 'Shared.BusinessUnitAssociates.unitType.division',
|
|
9866
|
+
description: 'Label for the business unit type division',
|
|
9867
|
+
defaultMessage: 'Division'
|
|
9868
|
+
},
|
|
9869
|
+
labelExplicit: {
|
|
9870
|
+
id: 'Shared.BusinessUnitAssociates.labelExplicit',
|
|
9871
|
+
description: 'Label for explicit roles',
|
|
9872
|
+
defaultMessage: 'Explicit'
|
|
9873
|
+
},
|
|
9874
|
+
labelInherited: {
|
|
9875
|
+
id: 'Shared.BusinessUnitAssociates.labelInherited',
|
|
9876
|
+
description: 'Label for explicit roles',
|
|
9877
|
+
defaultMessage: 'Inherited'
|
|
9878
|
+
},
|
|
9879
|
+
roleEnumAdmin: {
|
|
9880
|
+
id: 'Shared.BusinessUnitAssociates.associateRole.admin',
|
|
9881
|
+
description: 'Label for the business unit associate rol Admin',
|
|
9882
|
+
defaultMessage: 'Admin'
|
|
9883
|
+
},
|
|
9884
|
+
roleEnumBuyer: {
|
|
9885
|
+
id: 'Shared.BusinessUnitAssociates.associateRole.buyer',
|
|
9886
|
+
description: 'Label for the business unit associate rol Buyer',
|
|
9887
|
+
defaultMessage: 'Buyer'
|
|
9888
|
+
},
|
|
9889
|
+
searchResultsCount: {
|
|
9890
|
+
id: 'Shared.BusinessUnitAssociates.searchResultsCount',
|
|
9891
|
+
description: 'Total results coming from search',
|
|
9892
|
+
defaultMessage: '{totalResults} results'
|
|
9893
|
+
}
|
|
9894
|
+
});
|
|
9895
|
+
|
|
9896
|
+
function ownKeys$A(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9897
|
+
function _objectSpread$A(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$A(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$A(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9898
|
+
const BusinessUnitAssociatesListView = props => {
|
|
9899
|
+
var _props$values, _props$values$associa;
|
|
9900
|
+
const intl = reactIntl.useIntl();
|
|
9901
|
+
const businessUnitsAssociateRolesFeatureEnabled = applicationShell.useFeatureToggle(ENABLE_BUSINESS_UNITS_ASSOCIATE_ROLES);
|
|
9902
|
+
const totalAssociates = (_props$values = _valuesInstanceProperty__default["default"](props)) === null || _props$values === void 0 ? void 0 : (_props$values$associa = _props$values.associates) === null || _props$values$associa === void 0 ? void 0 : _props$values$associa.length;
|
|
9903
|
+
const isBusinessUnitCreation = !isUUID(props.businessUnitId);
|
|
9904
|
+
const _usePaginationState = uiKit.usePaginationState({
|
|
9905
|
+
perPage: 20
|
|
9906
|
+
}),
|
|
9907
|
+
page = _usePaginationState.page,
|
|
9908
|
+
perPage = _usePaginationState.perPage;
|
|
9909
|
+
const _useState = React.useState({
|
|
9910
|
+
option: SEARCH_FIELDS.ALL_FIELDS,
|
|
9911
|
+
text: ''
|
|
9912
|
+
}),
|
|
9913
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
9914
|
+
searchValue = _useState2[0],
|
|
9915
|
+
setSearchValue = _useState2[1];
|
|
9916
|
+
const associates = React.useMemo(() => {
|
|
9917
|
+
var _props$values2, _context, _context2;
|
|
9918
|
+
return businessUnitsAssociateRolesFeatureEnabled ? mergeAssociates(_valuesInstanceProperty__default["default"](props)) : (_props$values2 = _valuesInstanceProperty__default["default"](props)) === null || _props$values2 === void 0 ? void 0 : _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](_context2 = _props$values2.associates).call(_context2, associate => associate === null || associate === void 0 ? void 0 : associate.customer)).call(_context, associate => _objectSpread$A(_objectSpread$A({}, associate), {}, {
|
|
9919
|
+
id: associate.customer.id
|
|
9920
|
+
}));
|
|
9921
|
+
}, [_valuesInstanceProperty__default["default"](props), businessUnitsAssociateRolesFeatureEnabled]);
|
|
9922
|
+
const tableColumns = React.useMemo(() => [{
|
|
9923
|
+
key: 'firstName',
|
|
9924
|
+
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$A({}, messages$r.columnFirstName)),
|
|
9925
|
+
shouldIgnoreRowClick: isBusinessUnitCreation
|
|
9926
|
+
}, {
|
|
9927
|
+
key: 'lastName',
|
|
9928
|
+
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$A({}, messages$r.columnLastName)),
|
|
9929
|
+
shouldIgnoreRowClick: isBusinessUnitCreation
|
|
9930
|
+
}, {
|
|
9931
|
+
key: 'roles',
|
|
9932
|
+
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$A({}, messages$r.columnRole)),
|
|
9933
|
+
shouldIgnoreRowClick: isBusinessUnitCreation,
|
|
9934
|
+
width: 'max-content'
|
|
9935
|
+
}, {
|
|
9936
|
+
key: 'email',
|
|
9937
|
+
label: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$A({}, messages$r.columnEmail)),
|
|
9938
|
+
shouldIgnoreRowClick: isBusinessUnitCreation
|
|
9939
|
+
}], [isBusinessUnitCreation]);
|
|
9940
|
+
const filteredAssociates = React.useMemo(() => {
|
|
9941
|
+
return filterAssociates(associates, searchValue);
|
|
9942
|
+
}, [associates, searchValue]);
|
|
9943
|
+
const associatesToShow = React.useMemo(() => {
|
|
9944
|
+
const from = (page.value - 1) * perPage.value;
|
|
9945
|
+
const to = from + perPage.value;
|
|
9946
|
+
return _sliceInstanceProperty__default["default"](filteredAssociates).call(filteredAssociates, from, to);
|
|
9947
|
+
}, [filteredAssociates, perPage.value, page.value]);
|
|
9948
|
+
const renderAssociate = (associate, _ref) => {
|
|
9949
|
+
let columnKey = _ref.key;
|
|
9950
|
+
let formattedValue;
|
|
9951
|
+
if (!(associate !== null && associate !== void 0 && associate.customer)) return null;
|
|
9952
|
+
switch (columnKey) {
|
|
9953
|
+
case 'roles':
|
|
9954
|
+
const roles = associate[columnKey];
|
|
9955
|
+
formattedValue = jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
9956
|
+
children: (roles === null || roles === void 0 ? void 0 : roles.length) > 0 ? businessUnitsAssociateRolesFeatureEnabled ? jsxRuntime.jsx(uiKit.Grid, {
|
|
9957
|
+
gridGap: uiKit.customProperties.spacingM,
|
|
9958
|
+
gridTemplateColumns: "repeat(2, 1fr)",
|
|
9959
|
+
children: roles === null || roles === void 0 ? void 0 : _mapInstanceProperty__default["default"](roles).call(roles, (associateRole, index) => {
|
|
9960
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9961
|
+
children: [jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
9962
|
+
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
9963
|
+
children: associateRole.name
|
|
9964
|
+
}, associateRole.name)
|
|
9965
|
+
}, "role-grid-item-".concat(index)), jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
9966
|
+
children: jsxRuntime.jsx(uiKit.Stamp, {
|
|
9967
|
+
isCondensed: true,
|
|
9968
|
+
label: intl.formatMessage(messages$r["label".concat(associateRole.source)]),
|
|
9969
|
+
tone: associateRole.source === ASSOCIATE_ROLE_SOURCES.EXPLICIT ? 'information' : 'secondary'
|
|
9970
|
+
})
|
|
9971
|
+
}, "".concat(associateRole.name, "-source"))]
|
|
9972
|
+
});
|
|
9973
|
+
})
|
|
9974
|
+
}) : jsxRuntime.jsx(uiKit.Spacings.Inline, {
|
|
9975
|
+
children: roles === null || roles === void 0 ? void 0 : _mapInstanceProperty__default["default"](roles).call(roles, role => jsxRuntime.jsx(uiKit.Stamp, {
|
|
9976
|
+
isCondensed: true,
|
|
9977
|
+
label: intl.formatMessage(messages$r["roleEnum".concat(role)]),
|
|
9978
|
+
tone: "primary"
|
|
9979
|
+
}, role))
|
|
9980
|
+
}) : constants.NO_VALUE_FALLBACK
|
|
9981
|
+
});
|
|
9982
|
+
break;
|
|
9983
|
+
default:
|
|
9984
|
+
formattedValue = associate.customer[columnKey] || constants.NO_VALUE_FALLBACK;
|
|
9985
|
+
}
|
|
9986
|
+
return safelyAddFallback(formattedValue);
|
|
9987
|
+
};
|
|
9988
|
+
return jsxRuntime.jsx(applicationComponents.PageContentFull, {
|
|
9989
|
+
children: jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
9990
|
+
scale: "m",
|
|
9991
|
+
children: totalAssociates ? jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
9992
|
+
scale: "s",
|
|
9993
|
+
children: [jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
9994
|
+
alignItems: "center",
|
|
9995
|
+
scale: "l",
|
|
9996
|
+
children: [jsxRuntime.jsx(BusinessUnitAssociatesSearchbar, {
|
|
9997
|
+
onSubmit: setSearchValue
|
|
9998
|
+
}), searchValue.text.length > 0 && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
9999
|
+
intlMessage: _objectSpread$A(_objectSpread$A({}, messages$r.searchResultsCount), {}, {
|
|
10000
|
+
values: {
|
|
10001
|
+
totalResults: filteredAssociates.length
|
|
10002
|
+
}
|
|
10003
|
+
})
|
|
10004
|
+
})]
|
|
10005
|
+
}), filteredAssociates.length ? jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
10006
|
+
scale: "xxxl",
|
|
10007
|
+
children: [jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
10008
|
+
max: "scale",
|
|
10009
|
+
children: jsxRuntime.jsx(uiKit.DataTable, {
|
|
10010
|
+
columns: tableColumns,
|
|
10011
|
+
itemRenderer: renderAssociate,
|
|
10012
|
+
maxHeight: "calc(100vh - (".concat(uiKit.customProperties.constraint7, " + 240px))"),
|
|
10013
|
+
onRowClick: (_, rowIndex) => {
|
|
10014
|
+
var _associate$customer;
|
|
10015
|
+
const associate = associates[rowIndex];
|
|
10016
|
+
if (isBusinessUnitCreation || !(associate !== null && associate !== void 0 && associate.id) || !(associate !== null && associate !== void 0 && (_associate$customer = associate.customer) !== null && _associate$customer !== void 0 && _associate$customer.id)) return;
|
|
10017
|
+
props.onAssociateRowClick({
|
|
10018
|
+
customerId: associate.customer.id
|
|
10019
|
+
});
|
|
10020
|
+
},
|
|
10021
|
+
rows: associatesToShow,
|
|
10022
|
+
wrapHeaderLabels: false
|
|
10023
|
+
})
|
|
10024
|
+
}), jsxRuntime.jsx(uiKit.Pagination, {
|
|
10025
|
+
onPageChange: page.onChange,
|
|
10026
|
+
onPerPageChange: perPage.onChange,
|
|
10027
|
+
page: page.value,
|
|
10028
|
+
perPage: perPage.value,
|
|
10029
|
+
perPageRange: "m",
|
|
10030
|
+
totalItems: filteredAssociates.length
|
|
10031
|
+
})]
|
|
10032
|
+
}) : jsxRuntime.jsx(EmptySearchResultsMessage, {})]
|
|
10033
|
+
}) : jsxRuntime.jsx(EmptyListMessage, {
|
|
10034
|
+
canManageBusinessUnits: props.canManageBusinessUnits,
|
|
10035
|
+
onAddAssociateClick: props.onAddAssociateClick
|
|
10036
|
+
})
|
|
10037
|
+
})
|
|
10038
|
+
});
|
|
10039
|
+
};
|
|
10040
|
+
BusinessUnitAssociatesListView.displayName = 'BusinessUnitAssociatesListView';
|
|
10041
|
+
|
|
10042
|
+
var BusinessUnitAssociatesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "BusinessUnitAssociatesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeRoles" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeAssociateRoleAssignmentsRoles" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "businessUnit" }, 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: "BusinessUnitAssociatesFragment" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "BusinessUnitAssociatesFragment" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "BusinessUnit" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "associates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "roles" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeRoles" } } }] }] }, { kind: "Field", name: { kind: "Name", value: "associateRoleAssignments" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldExcludeAssociateRoleAssignmentsRoles" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "associateRole" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customer" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "email" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "firstName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastName" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "__typename" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 577, source: { body: "fragment BusinessUnitAssociatesFragment on BusinessUnit {\n id\n associates {\n roles @skip(if: $shouldExcludeRoles)\n associateRoleAssignments\n @skip(if: $shouldExcludeAssociateRoleAssignmentsRoles) {\n associateRole {\n name\n key\n }\n }\n customer {\n id\n email\n firstName\n lastName\n }\n }\n __typename\n}\n\nquery BusinessUnitAssociatesQuery(\n $id: String!\n $shouldExcludeRoles: Boolean!\n $shouldExcludeAssociateRoleAssignmentsRoles: Boolean!\n) {\n businessUnit(id: $id) {\n ...BusinessUnitAssociatesFragment\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10043
|
+
const useBusinessUnitAssociatesFetcher = _ref => {
|
|
10044
|
+
let id = _ref.id,
|
|
10045
|
+
shouldExcludeRoles = _ref.shouldExcludeRoles,
|
|
10046
|
+
shouldExcludeAssociateRoleAssignmentsRoles = _ref.shouldExcludeAssociateRoleAssignmentsRoles;
|
|
10047
|
+
const _useQuery = hooks.useQuery(BusinessUnitAssociatesQuery, {
|
|
10048
|
+
context: {
|
|
10049
|
+
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
10050
|
+
},
|
|
10051
|
+
variables: {
|
|
10052
|
+
id,
|
|
10053
|
+
shouldExcludeRoles,
|
|
10054
|
+
shouldExcludeAssociateRoleAssignmentsRoles
|
|
10055
|
+
}
|
|
10056
|
+
}),
|
|
10057
|
+
loading = _useQuery.loading,
|
|
10058
|
+
data = _useQuery.data;
|
|
10059
|
+
return {
|
|
10060
|
+
isLoading: loading,
|
|
10061
|
+
businessUnit: data === null || data === void 0 ? void 0 : data.businessUnit
|
|
10062
|
+
};
|
|
10063
|
+
};
|
|
10064
|
+
|
|
10065
|
+
const useBusinessUnitAssociates = _ref => {
|
|
10066
|
+
let businessUnitId = _ref.businessUnitId,
|
|
10067
|
+
businessUnitsAssociateRolesFeatureEnabled = _ref.businessUnitsAssociateRolesFeatureEnabled;
|
|
10068
|
+
const businessUnitAssociatesFetcher = useBusinessUnitAssociatesFetcher({
|
|
10069
|
+
id: businessUnitId,
|
|
10070
|
+
shouldExcludeRoles: businessUnitsAssociateRolesFeatureEnabled,
|
|
10071
|
+
shouldExcludeAssociateRoleAssignmentsRoles: !businessUnitsAssociateRolesFeatureEnabled
|
|
10072
|
+
});
|
|
10073
|
+
return {
|
|
10074
|
+
businessUnitAssociatesFetcher: {
|
|
10075
|
+
isLoading: businessUnitAssociatesFetcher.isLoading,
|
|
10076
|
+
businessUnit: businessUnitAssociatesFetcher.businessUnit
|
|
10077
|
+
}
|
|
10078
|
+
};
|
|
10079
|
+
};
|
|
10080
|
+
|
|
10081
|
+
const BusinessUnitAssociatesList = props => {
|
|
10082
|
+
const businessUnitsAssociateRolesFeatureEnabled = applicationShell.useFeatureToggle(ENABLE_BUSINESS_UNITS_ASSOCIATE_ROLES);
|
|
10083
|
+
const _useBusinessUnitAssoc = useBusinessUnitAssociates({
|
|
10084
|
+
businessUnitId: props.businessUnitId,
|
|
10085
|
+
businessUnitsAssociateRolesFeatureEnabled
|
|
10086
|
+
}),
|
|
10087
|
+
businessUnitAssociatesFetcher = _useBusinessUnitAssoc.businessUnitAssociatesFetcher;
|
|
10088
|
+
if (businessUnitAssociatesFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
10089
|
+
return jsxRuntime.jsx(BusinessUnitAssociatesListView, {
|
|
10090
|
+
businessUnitId: props.businessUnitId,
|
|
10091
|
+
canManageBusinessUnits: props.canManageBusinessUnits,
|
|
10092
|
+
onAddAssociateClick: props.onAddAssociateClick,
|
|
10093
|
+
onAssociateRowClick: props.onAssociateRowClick,
|
|
10094
|
+
values: businessUnitAssociatesFetcher === null || businessUnitAssociatesFetcher === void 0 ? void 0 : businessUnitAssociatesFetcher.businessUnit
|
|
10095
|
+
});
|
|
10096
|
+
};
|
|
10097
|
+
BusinessUnitAssociatesList.displayName = 'BusinessUnitAssociatesList';
|
|
10098
|
+
|
|
9529
10099
|
function formatDiscount(discount, currencyCode, intl) {
|
|
9530
10100
|
var _context;
|
|
9531
10101
|
if (discount.type === 'relative') return "".concat(discount.permyriad / 100, "%");
|
|
@@ -9663,17 +10233,17 @@ function validateFilter(_ref, intl) {
|
|
|
9663
10233
|
_ref$allowFloat = _ref.allowFloat,
|
|
9664
10234
|
allowFloat = _ref$allowFloat === void 0 ? true : _ref$allowFloat;
|
|
9665
10235
|
if (type !== 'range') {
|
|
9666
|
-
if (!allowFloat && !isInteger(value)) return intl.formatMessage(messages$
|
|
10236
|
+
if (!allowFloat && !isInteger(value)) return intl.formatMessage(messages$O.integer);
|
|
9667
10237
|
return null;
|
|
9668
10238
|
}
|
|
9669
10239
|
|
|
9670
10240
|
// only range types from here
|
|
9671
10241
|
|
|
9672
10242
|
if (!allowFloat && !isInteger(value.from)) return {
|
|
9673
|
-
from: intl.formatMessage(messages$
|
|
10243
|
+
from: intl.formatMessage(messages$O.integer)
|
|
9674
10244
|
};
|
|
9675
10245
|
if (!allowFloat && !isInteger(value.to)) return {
|
|
9676
|
-
to: intl.formatMessage(messages$
|
|
10246
|
+
to: intl.formatMessage(messages$O.integer)
|
|
9677
10247
|
};
|
|
9678
10248
|
if (validateSingleFilter({
|
|
9679
10249
|
value: value.from
|
|
@@ -10161,9 +10731,16 @@ function _objectSpread$w(target) { for (var i = 1; i < arguments.length; i++) {
|
|
|
10161
10731
|
const PlatformLimitsStatusText = _ref => {
|
|
10162
10732
|
let intlMessage = _ref.intlMessage,
|
|
10163
10733
|
children = _ref.children;
|
|
10164
|
-
return jsxRuntime.
|
|
10165
|
-
as: "
|
|
10166
|
-
children:
|
|
10734
|
+
return jsxRuntime.jsx(uiKit.Text.Headline, {
|
|
10735
|
+
as: "h2",
|
|
10736
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
10737
|
+
size: "xs",
|
|
10738
|
+
children: [jsxRuntime.jsx("span", {
|
|
10739
|
+
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$w({}, intlMessage))
|
|
10740
|
+
}), jsxRuntime.jsx("span", {
|
|
10741
|
+
children: children
|
|
10742
|
+
})]
|
|
10743
|
+
})
|
|
10167
10744
|
});
|
|
10168
10745
|
};
|
|
10169
10746
|
PlatformLimitsStatusText.displayName = 'PlatformLimitsStatusText';
|
|
@@ -10287,7 +10864,7 @@ var messages$k = reactIntl.defineMessages({
|
|
|
10287
10864
|
});
|
|
10288
10865
|
|
|
10289
10866
|
const PlatformLimitsShippingMethodsStatus = _ref => {
|
|
10290
|
-
var _platformLimits$shipp, _platformLimits$shipp2, _platformLimits$shipp3, _platformLimits$shipp4
|
|
10867
|
+
var _platformLimits$shipp, _platformLimits$shipp2, _platformLimits$shipp3, _platformLimits$shipp4;
|
|
10291
10868
|
let total = _ref.total;
|
|
10292
10869
|
const intl = reactIntl.useIntl();
|
|
10293
10870
|
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
@@ -10295,12 +10872,13 @@ const PlatformLimitsShippingMethodsStatus = _ref => {
|
|
|
10295
10872
|
const current = platformLimits === null || platformLimits === void 0 ? void 0 : (_platformLimits$shipp = platformLimits.shippingMethods) === null || _platformLimits$shipp === void 0 ? void 0 : (_platformLimits$shipp2 = _platformLimits$shipp.total) === null || _platformLimits$shipp2 === void 0 ? void 0 : _platformLimits$shipp2.current;
|
|
10296
10873
|
const limit = platformLimits === null || platformLimits === void 0 ? void 0 : (_platformLimits$shipp3 = platformLimits.shippingMethods) === null || _platformLimits$shipp3 === void 0 ? void 0 : (_platformLimits$shipp4 = _platformLimits$shipp3.total) === null || _platformLimits$shipp4 === void 0 ? void 0 : _platformLimits$shipp4.limit;
|
|
10297
10874
|
return jsxRuntime.jsx(PlatformLimitsStatusText, {
|
|
10298
|
-
|
|
10875
|
+
intlMessage: messages$k.shippingMethodsStatus,
|
|
10876
|
+
children: getPlatformLimitsStatus({
|
|
10299
10877
|
limit,
|
|
10300
10878
|
current,
|
|
10301
10879
|
total,
|
|
10302
10880
|
intl
|
|
10303
|
-
})
|
|
10881
|
+
})
|
|
10304
10882
|
});
|
|
10305
10883
|
};
|
|
10306
10884
|
PlatformLimitsShippingMethodsStatus.displayName = 'PlatformLimitsShippingMethodsStatus';
|
|
@@ -10433,7 +11011,7 @@ var messages$i = reactIntl.defineMessages({
|
|
|
10433
11011
|
});
|
|
10434
11012
|
|
|
10435
11013
|
const PlatformLimitsTaxCategoriesStatus = _ref => {
|
|
10436
|
-
var _platformLimits$taxCa, _platformLimits$taxCa2, _platformLimits$taxCa3, _platformLimits$taxCa4
|
|
11014
|
+
var _platformLimits$taxCa, _platformLimits$taxCa2, _platformLimits$taxCa3, _platformLimits$taxCa4;
|
|
10437
11015
|
let total = _ref.total;
|
|
10438
11016
|
const intl = reactIntl.useIntl();
|
|
10439
11017
|
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
@@ -10441,12 +11019,13 @@ const PlatformLimitsTaxCategoriesStatus = _ref => {
|
|
|
10441
11019
|
const current = platformLimits === null || platformLimits === void 0 ? void 0 : (_platformLimits$taxCa = platformLimits.taxCategories) === null || _platformLimits$taxCa === void 0 ? void 0 : (_platformLimits$taxCa2 = _platformLimits$taxCa.total) === null || _platformLimits$taxCa2 === void 0 ? void 0 : _platformLimits$taxCa2.current;
|
|
10442
11020
|
const limit = platformLimits === null || platformLimits === void 0 ? void 0 : (_platformLimits$taxCa3 = platformLimits.taxCategories) === null || _platformLimits$taxCa3 === void 0 ? void 0 : (_platformLimits$taxCa4 = _platformLimits$taxCa3.total) === null || _platformLimits$taxCa4 === void 0 ? void 0 : _platformLimits$taxCa4.limit;
|
|
10443
11021
|
return jsxRuntime.jsx(PlatformLimitsStatusText, {
|
|
10444
|
-
|
|
11022
|
+
intlMessage: messages$i.taxCategoriesStatus,
|
|
11023
|
+
children: getPlatformLimitsStatus({
|
|
10445
11024
|
limit,
|
|
10446
11025
|
current,
|
|
10447
11026
|
total,
|
|
10448
11027
|
intl
|
|
10449
|
-
})
|
|
11028
|
+
})
|
|
10450
11029
|
});
|
|
10451
11030
|
};
|
|
10452
11031
|
PlatformLimitsTaxCategoriesStatus.displayName = 'PlatformLimitsTaxCategoriesStatus';
|
|
@@ -10574,12 +11153,12 @@ var messages$g = reactIntl.defineMessages({
|
|
|
10574
11153
|
zonesStatus: {
|
|
10575
11154
|
id: 'PlatformLimits.Status.zones',
|
|
10576
11155
|
description: 'The message for zones platform limit values',
|
|
10577
|
-
defaultMessage: 'Zones
|
|
11156
|
+
defaultMessage: 'Zones'
|
|
10578
11157
|
}
|
|
10579
11158
|
});
|
|
10580
11159
|
|
|
10581
11160
|
const PlatformLimitsZonesStatus = _ref => {
|
|
10582
|
-
var _platformLimits$zones, _platformLimits$zones2, _platformLimits$zones3, _platformLimits$zones4
|
|
11161
|
+
var _platformLimits$zones, _platformLimits$zones2, _platformLimits$zones3, _platformLimits$zones4;
|
|
10583
11162
|
let total = _ref.total;
|
|
10584
11163
|
const intl = reactIntl.useIntl();
|
|
10585
11164
|
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
@@ -10587,12 +11166,13 @@ const PlatformLimitsZonesStatus = _ref => {
|
|
|
10587
11166
|
const current = platformLimits === null || platformLimits === void 0 ? void 0 : (_platformLimits$zones = platformLimits.zones) === null || _platformLimits$zones === void 0 ? void 0 : (_platformLimits$zones2 = _platformLimits$zones.total) === null || _platformLimits$zones2 === void 0 ? void 0 : _platformLimits$zones2.current;
|
|
10588
11167
|
const limit = platformLimits === null || platformLimits === void 0 ? void 0 : (_platformLimits$zones3 = platformLimits.zones) === null || _platformLimits$zones3 === void 0 ? void 0 : (_platformLimits$zones4 = _platformLimits$zones3.total) === null || _platformLimits$zones4 === void 0 ? void 0 : _platformLimits$zones4.limit;
|
|
10589
11168
|
return jsxRuntime.jsx(PlatformLimitsStatusText, {
|
|
10590
|
-
|
|
11169
|
+
intlMessage: messages$g.zonesStatus,
|
|
11170
|
+
children: getPlatformLimitsStatus({
|
|
10591
11171
|
limit,
|
|
10592
11172
|
current,
|
|
10593
11173
|
total,
|
|
10594
11174
|
intl
|
|
10595
|
-
})
|
|
11175
|
+
})
|
|
10596
11176
|
});
|
|
10597
11177
|
};
|
|
10598
11178
|
PlatformLimitsZonesStatus.displayName = 'PlatformLimitsZonesStatus';
|
|
@@ -12195,7 +12775,7 @@ const validateRequired = value => {
|
|
|
12195
12775
|
};
|
|
12196
12776
|
const VALIDATOR_REQUIRED = {
|
|
12197
12777
|
name: 'required',
|
|
12198
|
-
message: messages$
|
|
12778
|
+
message: messages$O.required,
|
|
12199
12779
|
permanent: true,
|
|
12200
12780
|
validators: {
|
|
12201
12781
|
change(value) {
|
|
@@ -12209,7 +12789,7 @@ const VALIDATOR_REQUIRED = {
|
|
|
12209
12789
|
};
|
|
12210
12790
|
const VALIDATOR_NUMERIC = {
|
|
12211
12791
|
name: 'numeric',
|
|
12212
|
-
message: messages$
|
|
12792
|
+
message: messages$O.numeric,
|
|
12213
12793
|
permanent: false,
|
|
12214
12794
|
validators: {
|
|
12215
12795
|
change: v => {
|
|
@@ -12224,7 +12804,7 @@ const VALIDATOR_NUMERIC = {
|
|
|
12224
12804
|
};
|
|
12225
12805
|
const VALIDATOR_INTEGER = {
|
|
12226
12806
|
name: 'integer',
|
|
12227
|
-
message: messages$
|
|
12807
|
+
message: messages$O.integer,
|
|
12228
12808
|
permanent: false,
|
|
12229
12809
|
validators: {
|
|
12230
12810
|
change: v => {
|
|
@@ -12239,7 +12819,7 @@ const VALIDATOR_INTEGER = {
|
|
|
12239
12819
|
};
|
|
12240
12820
|
({
|
|
12241
12821
|
name: 'email',
|
|
12242
|
-
message: messages$
|
|
12822
|
+
message: messages$O.email,
|
|
12243
12823
|
permanent: false,
|
|
12244
12824
|
validators: {
|
|
12245
12825
|
// Note: it's a bit weird to validate it on every change,
|
|
@@ -13175,17 +13755,17 @@ function isValidISODateTime(_ref3) {
|
|
|
13175
13755
|
}
|
|
13176
13756
|
|
|
13177
13757
|
const validateSingleOptionEnum = (selectedOption, intl) => {
|
|
13178
|
-
if (validateSingleFilter(selectedOption)) return intl.formatMessage(messages$
|
|
13758
|
+
if (validateSingleFilter(selectedOption)) return intl.formatMessage(messages$O.required);
|
|
13179
13759
|
return null;
|
|
13180
13760
|
};
|
|
13181
13761
|
const validateMultiOptionEnum = (selectedOption, intl) => {
|
|
13182
|
-
if (validateSingleFilter(selectedOption) || selectedOption.value.length === 0) return intl.formatMessage(messages$
|
|
13762
|
+
if (validateSingleFilter(selectedOption) || selectedOption.value.length === 0) return intl.formatMessage(messages$O.required);
|
|
13183
13763
|
return null;
|
|
13184
13764
|
};
|
|
13185
13765
|
|
|
13186
13766
|
// eslint-disable-next-line import/prefer-default-export
|
|
13187
13767
|
const validateText = (text, intl) => {
|
|
13188
|
-
if (validateSingleFilter(text)) return intl.formatMessage(messages$
|
|
13768
|
+
if (validateSingleFilter(text)) return intl.formatMessage(messages$O.required);
|
|
13189
13769
|
return null;
|
|
13190
13770
|
};
|
|
13191
13771
|
|
|
@@ -13267,11 +13847,6 @@ const not = function () {
|
|
|
13267
13847
|
};
|
|
13268
13848
|
};
|
|
13269
13849
|
|
|
13270
|
-
const safelyAddFallback = function (string) {
|
|
13271
|
-
let fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : constants.NO_VALUE_FALLBACK;
|
|
13272
|
-
return string === '' ? fallback : string !== null && string !== void 0 ? string : fallback;
|
|
13273
|
-
};
|
|
13274
|
-
|
|
13275
13850
|
var messages = reactIntl.defineMessages({
|
|
13276
13851
|
booleanAttributeTrue: {
|
|
13277
13852
|
id: 'Products.ProductList.column.booleanTrue',
|
|
@@ -13662,6 +14237,8 @@ function withPendingRequests() {
|
|
|
13662
14237
|
var CategorySearchPickerOptionFragment = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "CategorySearchPickerOptionFragment" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CategorySearch" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "externalId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "slugAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "parent" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "ancestors" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 685, source: { body: "query SearchCategoryReference($locale: Locale!, $text: String!) {\n categories: categoryAutocomplete(locale: $locale, text: $text) {\n results {\n ...CategorySearchPickerOptionFragment\n }\n }\n}\n\nquery FetchCategoriesByIds($where: String!) {\n categories(where: $where) {\n results {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nfragment CategorySearchPickerOptionFragment on CategorySearch {\n id\n externalId\n nameAllLocales {\n locale\n value\n }\n slugAllLocales {\n locale\n value\n }\n parent {\n nameAllLocales {\n locale\n value\n }\n }\n ancestors {\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
13663
14238
|
|
|
13664
14239
|
exports.BooleanField = booleanField;
|
|
14240
|
+
exports.BusinessUnitAssociatesList = BusinessUnitAssociatesList;
|
|
14241
|
+
exports.BusinessUnitAssociatesListView = BusinessUnitAssociatesListView;
|
|
13665
14242
|
exports.BusinessUnitSelectField = BusinessUnitSelectField;
|
|
13666
14243
|
exports.BusinessUnitSelectInput = BusinessUnitSelectInput;
|
|
13667
14244
|
exports.Button = Button;
|
|
@@ -13712,7 +14289,7 @@ exports.attributesMapToNameValuePairs = attributesMapToNameValuePairs;
|
|
|
13712
14289
|
exports.base64ToString = base64ToString;
|
|
13713
14290
|
exports.booleanMessages = messages$8;
|
|
13714
14291
|
exports.buildSearchQuery = buildSearchQuery;
|
|
13715
|
-
exports.businessRoleMessages = messages$
|
|
14292
|
+
exports.businessRoleMessages = messages$v;
|
|
13716
14293
|
exports.businessRoles = businessRoleKeys;
|
|
13717
14294
|
exports.capitalizeFirst = capitalizeFirst;
|
|
13718
14295
|
exports.clone = clone;
|
|
@@ -13813,7 +14390,7 @@ exports.resolveStatusType = resolveStatusType;
|
|
|
13813
14390
|
exports.safelyAddFallback = safelyAddFallback;
|
|
13814
14391
|
exports.sanitize = sanitize;
|
|
13815
14392
|
exports.searchCategories = searchCategories;
|
|
13816
|
-
exports.searchInputMessages = messages$
|
|
14393
|
+
exports.searchInputMessages = messages$J;
|
|
13817
14394
|
exports.setDisplayName = setDisplayName;
|
|
13818
14395
|
exports.setToArray = setToArray;
|
|
13819
14396
|
exports.shallowEqual = shallowEqual;
|
|
@@ -13865,7 +14442,7 @@ exports.validateNumber = validateFilter;
|
|
|
13865
14442
|
exports.validateSingleOptionEnum = validateSingleOptionEnum;
|
|
13866
14443
|
exports.validateText = validateText;
|
|
13867
14444
|
exports.validatedInput = validatedInput;
|
|
13868
|
-
exports.validationMessages = messages$
|
|
14445
|
+
exports.validationMessages = messages$O;
|
|
13869
14446
|
exports.withPendingRequests = withPendingRequests;
|
|
13870
14447
|
exports.withProps = withProps;
|
|
13871
14448
|
exports.withRedirectTo = withRedirectTo;
|