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