@commercetools-frontend/experimental-components 0.0.3 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commercetools-frontend-experimental-components.cjs.dev.js +611 -982
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +611 -982
- package/dist/commercetools-frontend-experimental-components.esm.js +609 -977
- package/dist/styles.css +16 -297
- package/package.json +29 -22
|
@@ -16,7 +16,7 @@ import _getPrototypeOf from '@babel/runtime-corejs3/helpers/esm/getPrototypeOf';
|
|
|
16
16
|
import _someInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/some';
|
|
17
17
|
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
18
18
|
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
19
|
-
import React, { useEffect, useCallback, useState, useContext, useRef, useMemo, PureComponent, Component, memo, createContext, createElement, Children, cloneElement, isValidElement
|
|
19
|
+
import React, { useEffect, useCallback, useState, useContext, useRef, useMemo, PureComponent, Component, memo, createContext, createElement, Children, cloneElement, isValidElement } from 'react';
|
|
20
20
|
import flowRight from 'lodash.flowright';
|
|
21
21
|
import { graphql as graphql$1, withApollo } from '@apollo/client/react/hoc';
|
|
22
22
|
import flatten from 'lodash.flatten';
|
|
@@ -41,7 +41,7 @@ import { NO_VALUE_FALLBACK, GRAPHQL_TARGETS, DOMAINS, MC_API_PROXY_TARGETS, PORT
|
|
|
41
41
|
import { reportErrorToSentry } from '@commercetools-frontend/sentry';
|
|
42
42
|
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
43
43
|
import _valuesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/values';
|
|
44
|
-
import { usePaginationState, useDataTableSortingState, useToggleState, Spacings, Text, Link, LoadingSpinner, Constraints, AsyncSelectInput, AccessibleHidden, SecondaryIconButton, CloseIcon, SearchIcon, Tooltip as Tooltip$1, MoneyInput, TextInput, MultilineTextInput, LocalizedTextInput, LocalizedMultilineTextInput, SelectInput, NumberInput, DateInput, DateTimeInput, TimeInput, customProperties, SecondaryButton, RevertIcon, Grid, SubdirectoryArrowIcon, Tag, IconButton, EditIcon, FieldLabel, WarningIcon, FlatButton, AngleUpIcon, AngleDownIcon, BinFilledIcon, PlusBoldIcon, ErrorIcon, InformationIcon, Card, SelectField, AsyncSelectField, SearchSelectField, FieldErrors, SearchSelectInput, ContentNotification, ListIcon
|
|
44
|
+
import { usePaginationState, useDataTableSortingState, useToggleState, Spacings, Text, Link, LoadingSpinner, Constraints, AsyncSelectInput, AccessibleHidden, SecondaryIconButton, CloseIcon, SearchIcon, Tooltip as Tooltip$1, MoneyInput, TextInput, MultilineTextInput, LocalizedTextInput, LocalizedMultilineTextInput, SelectInput, NumberInput, DateInput, DateTimeInput, TimeInput, customProperties, SecondaryButton, RevertIcon, Grid, SubdirectoryArrowIcon, Tag, IconButton, EditIcon, FieldLabel, WarningIcon, FlatButton, AngleUpIcon, AngleDownIcon, BinFilledIcon, PlusBoldIcon, ErrorIcon, InformationIcon, Card, SelectField, AsyncSelectField, SearchSelectField, FieldErrors, SearchSelectInput, ContentNotification, ListIcon } from '@commercetools-frontend/ui-kit';
|
|
45
45
|
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
46
46
|
import { useShowNotification, useShowApiErrorNotification, useOnActionError, useHideAllPageNotifications } from '@commercetools-frontend/actions-global';
|
|
47
47
|
import PropTypes from 'prop-types';
|
|
@@ -202,25 +202,7 @@ function isInteger(value) {
|
|
|
202
202
|
return /^-{0,1}\d*$/.test(value);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
var modalQuery = '.ReactModal__Content';
|
|
206
|
-
|
|
207
|
-
// Calculates the number of active modals. This can be used
|
|
208
|
-
// to determine how many levels the modal should be indented.
|
|
209
|
-
function activeModals() {
|
|
210
|
-
return document.querySelectorAll(modalQuery).length;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
205
|
var regexpData = /^data-/;
|
|
214
|
-
function getDataAttribute(node, key) {
|
|
215
|
-
if (node.dataset) {
|
|
216
|
-
var camelKey = camelCase(key.replace(regexpData, ''));
|
|
217
|
-
return node.dataset[camelKey];
|
|
218
|
-
}
|
|
219
|
-
if (node.getAttribute)
|
|
220
|
-
// IE < 11 compatibility
|
|
221
|
-
return node.getAttribute(key);
|
|
222
|
-
return undefined;
|
|
223
|
-
}
|
|
224
206
|
function filterDataAttributes(obj) {
|
|
225
207
|
var _context, _context2;
|
|
226
208
|
return _reduceInstanceProperty(_context = _filterInstanceProperty(_context2 = _Object$keys(obj)).call(_context2, function (p) {
|
|
@@ -232,7 +214,7 @@ function filterDataAttributes(obj) {
|
|
|
232
214
|
}, {});
|
|
233
215
|
}
|
|
234
216
|
|
|
235
|
-
var messages$
|
|
217
|
+
var messages$J = defineMessages({
|
|
236
218
|
unique: {
|
|
237
219
|
id: 'Validation.unique',
|
|
238
220
|
description: 'An error message to show if the field must be unique',
|
|
@@ -1641,8 +1623,8 @@ var getFractionDigit = function getFractionDigit(code) {
|
|
|
1641
1623
|
return getData(code, 'fractionDigit');
|
|
1642
1624
|
};
|
|
1643
1625
|
|
|
1644
|
-
function ownKeys$
|
|
1645
|
-
function _objectSpread$
|
|
1626
|
+
function ownKeys$1v(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1627
|
+
function _objectSpread$1v(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1v(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$1v(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1646
1628
|
function formatMoneyRangeValue(value, intl) {
|
|
1647
1629
|
var _context;
|
|
1648
1630
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
@@ -1652,7 +1634,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
1652
1634
|
return '';
|
|
1653
1635
|
}
|
|
1654
1636
|
function formatMoneyValue(amount, currency, intl) {
|
|
1655
|
-
return formatMoney$1(_objectSpread$
|
|
1637
|
+
return formatMoney$1(_objectSpread$1v({
|
|
1656
1638
|
centAmount: amount,
|
|
1657
1639
|
fractionDigits: getFractionDigit(currency)
|
|
1658
1640
|
}, currency ? {
|
|
@@ -1669,14 +1651,14 @@ function getFractionedAmount(moneyValue) {
|
|
|
1669
1651
|
}
|
|
1670
1652
|
function formatMoney$1(moneyValue, intl, options) {
|
|
1671
1653
|
var _moneyValue$fractione;
|
|
1672
|
-
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$
|
|
1654
|
+
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$1v({
|
|
1673
1655
|
style: 'currency',
|
|
1674
1656
|
currency: moneyValue.currencyCode,
|
|
1675
1657
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
1676
1658
|
}, options));
|
|
1677
1659
|
}
|
|
1678
1660
|
|
|
1679
|
-
var messages$
|
|
1661
|
+
var messages$I = defineMessages({
|
|
1680
1662
|
booleanYes: {
|
|
1681
1663
|
id: 'AttributeTypeFormats.boolean.yes',
|
|
1682
1664
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -1756,7 +1738,7 @@ var formatDateTime = function formatDateTime(_ref7) {
|
|
|
1756
1738
|
var formatBoolean = function formatBoolean(_ref8) {
|
|
1757
1739
|
var value = _ref8.value,
|
|
1758
1740
|
intl = _ref8.intl;
|
|
1759
|
-
return value ? intl.formatMessage(messages$
|
|
1741
|
+
return value ? intl.formatMessage(messages$I.booleanYes) : intl.formatMessage(messages$I.booleanNo);
|
|
1760
1742
|
};
|
|
1761
1743
|
var formatNilType = function formatNilType(_ref9) {
|
|
1762
1744
|
var value = _ref9.value,
|
|
@@ -1924,8 +1906,8 @@ var wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) {
|
|
|
1924
1906
|
return _concatInstanceProperty(_context = "".concat(hocName, "(")).call(_context, getDisplayName(BaseComponent), ")");
|
|
1925
1907
|
};
|
|
1926
1908
|
|
|
1927
|
-
function ownKeys$
|
|
1928
|
-
function _objectSpread$
|
|
1909
|
+
function ownKeys$1u(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1910
|
+
function _objectSpread$1u(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$1u(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1u(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1929
1911
|
var injectDataTablePaginationState = function injectDataTablePaginationState(initialValues) {
|
|
1930
1912
|
return function (Component) {
|
|
1931
1913
|
var WithDataTablePaginationState = function WithDataTablePaginationState(props) {
|
|
@@ -1940,7 +1922,7 @@ var injectDataTablePaginationState = function injectDataTablePaginationState(ini
|
|
|
1940
1922
|
key: initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$tableS = initialValues.tableSorting) === null || _initialValues$tableS === void 0 ? void 0 : _initialValues$tableS.key,
|
|
1941
1923
|
order: initialValues === null || initialValues === void 0 ? void 0 : (_initialValues$tableS2 = initialValues.tableSorting) === null || _initialValues$tableS2 === void 0 ? void 0 : _initialValues$tableS2.order
|
|
1942
1924
|
});
|
|
1943
|
-
return jsx(Component, _objectSpread$
|
|
1925
|
+
return jsx(Component, _objectSpread$1u(_objectSpread$1u({}, props), {}, {
|
|
1944
1926
|
dataTablePaginationState: {
|
|
1945
1927
|
page: page,
|
|
1946
1928
|
perPage: perPage,
|
|
@@ -1953,8 +1935,8 @@ var injectDataTablePaginationState = function injectDataTablePaginationState(ini
|
|
|
1953
1935
|
};
|
|
1954
1936
|
};
|
|
1955
1937
|
|
|
1956
|
-
function ownKeys$
|
|
1957
|
-
function _objectSpread$
|
|
1938
|
+
function ownKeys$1t(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1939
|
+
function _objectSpread$1t(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$1t(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1t(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1958
1940
|
var injectNotifications = function injectNotifications() {
|
|
1959
1941
|
var propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
1960
1942
|
return function (Component) {
|
|
@@ -1969,31 +1951,31 @@ var injectNotifications = function injectNotifications() {
|
|
|
1969
1951
|
onActionError: onActionError,
|
|
1970
1952
|
hideAllPageNotifications: hideAllPageNotifications
|
|
1971
1953
|
};
|
|
1972
|
-
return jsx(Component, _objectSpread$
|
|
1954
|
+
return jsx(Component, _objectSpread$1t(_objectSpread$1t({}, props), _defineProperty({}, propName, notifications)));
|
|
1973
1955
|
};
|
|
1974
1956
|
WrappedComponent.displayName = "withNotifications(".concat(getDisplayName(Component));
|
|
1975
1957
|
return WrappedComponent;
|
|
1976
1958
|
};
|
|
1977
1959
|
};
|
|
1978
1960
|
|
|
1979
|
-
function ownKeys$
|
|
1980
|
-
function _objectSpread$
|
|
1961
|
+
function ownKeys$1s(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1962
|
+
function _objectSpread$1s(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$1s(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1s(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1981
1963
|
function isPropsMapper(mapProps) {
|
|
1982
1964
|
return typeof mapProps === 'function';
|
|
1983
1965
|
}
|
|
1984
1966
|
var withProps = function withProps(mapProps) {
|
|
1985
1967
|
return function (Component) {
|
|
1986
1968
|
var EnhancedWithProps = function EnhancedWithProps(ownProps) {
|
|
1987
|
-
var enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
1988
|
-
return jsx(Component, _objectSpread$
|
|
1969
|
+
var enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1s(_objectSpread$1s({}, ownProps), mapProps(ownProps)) : _objectSpread$1s(_objectSpread$1s({}, ownProps), mapProps);
|
|
1970
|
+
return jsx(Component, _objectSpread$1s({}, enhancedProps));
|
|
1989
1971
|
};
|
|
1990
1972
|
EnhancedWithProps.displayName = wrapDisplayName(Component, 'withProps');
|
|
1991
1973
|
return EnhancedWithProps;
|
|
1992
1974
|
};
|
|
1993
1975
|
};
|
|
1994
1976
|
|
|
1995
|
-
function ownKeys$
|
|
1996
|
-
function _objectSpread$
|
|
1977
|
+
function ownKeys$1r(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1978
|
+
function _objectSpread$1r(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$1r(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1r(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1997
1979
|
var useRedirectEffect = function useRedirectEffect(_ref) {
|
|
1998
1980
|
var goTo = _ref.goTo;
|
|
1999
1981
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -2016,58 +1998,58 @@ var defaultOptions$5 = {
|
|
|
2016
1998
|
};
|
|
2017
1999
|
var withRedirectTo = function withRedirectTo(options) {
|
|
2018
2000
|
return function (Component) {
|
|
2019
|
-
var mergedOptions = _objectSpread$
|
|
2001
|
+
var mergedOptions = _objectSpread$1r(_objectSpread$1r({}, defaultOptions$5), options);
|
|
2020
2002
|
var WithRedirectTo = function WithRedirectTo(props) {
|
|
2021
2003
|
if (!mergedOptions.skip(props)) {
|
|
2022
2004
|
return jsx(RedirectTo, {
|
|
2023
2005
|
goTo: options.selectGoTo(props)
|
|
2024
2006
|
});
|
|
2025
2007
|
}
|
|
2026
|
-
return jsx(Component, _objectSpread$
|
|
2008
|
+
return jsx(Component, _objectSpread$1r({}, props));
|
|
2027
2009
|
};
|
|
2028
2010
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
2029
2011
|
return WithRedirectTo;
|
|
2030
2012
|
};
|
|
2031
2013
|
};
|
|
2032
2014
|
|
|
2033
|
-
function ownKeys$
|
|
2034
|
-
function _objectSpread$
|
|
2015
|
+
function ownKeys$1q(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2016
|
+
function _objectSpread$1q(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$1q(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1q(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2035
2017
|
var defaultOptions$4 = {
|
|
2036
2018
|
propName: 'modalState',
|
|
2037
2019
|
isInitiallyOpen: false
|
|
2038
2020
|
};
|
|
2039
2021
|
var injectModalState$1 = function injectModalState(options) {
|
|
2040
2022
|
return function (Component) {
|
|
2041
|
-
var mergedOptions = _objectSpread$
|
|
2023
|
+
var mergedOptions = _objectSpread$1q(_objectSpread$1q({}, defaultOptions$4), options);
|
|
2042
2024
|
var WithModalState = function WithModalState(props) {
|
|
2043
2025
|
var modalState = useModalState(mergedOptions.isInitiallyOpen);
|
|
2044
|
-
return jsx(Component, _objectSpread$
|
|
2026
|
+
return jsx(Component, _objectSpread$1q(_objectSpread$1q({}, props), _defineProperty({}, mergedOptions.propName, modalState)));
|
|
2045
2027
|
};
|
|
2046
2028
|
WithModalState.displayName = wrapDisplayName(WithModalState, 'WithModalState');
|
|
2047
2029
|
return WithModalState;
|
|
2048
2030
|
};
|
|
2049
2031
|
};
|
|
2050
2032
|
|
|
2051
|
-
function ownKeys$
|
|
2052
|
-
function _objectSpread$
|
|
2033
|
+
function ownKeys$1p(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2034
|
+
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(_context = ownKeys$1p(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1p(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2053
2035
|
var defaultOptions$3 = {
|
|
2054
2036
|
propName: 'toggleState',
|
|
2055
2037
|
isInitiallyOpen: false
|
|
2056
2038
|
};
|
|
2057
2039
|
var injectModalState = function injectModalState(options) {
|
|
2058
2040
|
return function (Component) {
|
|
2059
|
-
var mergedOptions = _objectSpread$
|
|
2041
|
+
var mergedOptions = _objectSpread$1p(_objectSpread$1p({}, defaultOptions$3), options);
|
|
2060
2042
|
var WithToggleState = function WithToggleState(props) {
|
|
2061
2043
|
var toggleState = useToggleState(mergedOptions.isInitiallyOpen);
|
|
2062
|
-
return jsx(Component, _objectSpread$
|
|
2044
|
+
return jsx(Component, _objectSpread$1p(_objectSpread$1p({}, props), _defineProperty({}, mergedOptions.propName, toggleState)));
|
|
2063
2045
|
};
|
|
2064
2046
|
WithToggleState.displayName = wrapDisplayName(WithToggleState, 'WithToggleState');
|
|
2065
2047
|
return WithToggleState;
|
|
2066
2048
|
};
|
|
2067
2049
|
};
|
|
2068
2050
|
|
|
2069
|
-
function ownKeys$
|
|
2070
|
-
function _objectSpread$
|
|
2051
|
+
function ownKeys$1o(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2052
|
+
function _objectSpread$1o(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1o(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$1o(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2071
2053
|
var defaultOptions$2 = {
|
|
2072
2054
|
storageType: 'local',
|
|
2073
2055
|
segregateByUser: true
|
|
@@ -2091,7 +2073,7 @@ var isNil = function isNil(value) {
|
|
|
2091
2073
|
};
|
|
2092
2074
|
var useStorage = function useStorage(storageKey, initialStorageValue, options) {
|
|
2093
2075
|
var _context;
|
|
2094
|
-
var mergedOptions = _objectSpread$
|
|
2076
|
+
var mergedOptions = _objectSpread$1o(_objectSpread$1o({}, defaultOptions$2), options);
|
|
2095
2077
|
var userId = useApplicationContext(function (context) {
|
|
2096
2078
|
var _context$user;
|
|
2097
2079
|
return (_context$user = context.user) === null || _context$user === void 0 ? void 0 : _context$user.id;
|
|
@@ -2139,8 +2121,8 @@ var useStorage = function useStorage(storageKey, initialStorageValue, options) {
|
|
|
2139
2121
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
2140
2122
|
};
|
|
2141
2123
|
|
|
2142
|
-
function ownKeys$
|
|
2143
|
-
function _objectSpread$
|
|
2124
|
+
function ownKeys$1n(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2125
|
+
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(_context = ownKeys$1n(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1n(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2144
2126
|
var defaultOptions$1 = {
|
|
2145
2127
|
propName: 'storage',
|
|
2146
2128
|
storageKey: '',
|
|
@@ -2154,7 +2136,7 @@ var injectStorage = function injectStorage(options) {
|
|
|
2154
2136
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
2155
2137
|
* argument position does not allow passing specification of option(s).
|
|
2156
2138
|
*/
|
|
2157
|
-
var mergedOptions = _objectSpread$
|
|
2139
|
+
var mergedOptions = _objectSpread$1n(_objectSpread$1n({}, defaultOptions$1), options);
|
|
2158
2140
|
var WithStorage = function WithStorage(props) {
|
|
2159
2141
|
var _useStorage = useStorage(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
2160
2142
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -2166,7 +2148,7 @@ var injectStorage = function injectStorage(options) {
|
|
|
2166
2148
|
writeToStorage: writeToStorage,
|
|
2167
2149
|
readFromStorage: readFromStorage
|
|
2168
2150
|
});
|
|
2169
|
-
return jsx(WrappedComponent, _objectSpread$
|
|
2151
|
+
return jsx(WrappedComponent, _objectSpread$1n(_objectSpread$1n({}, props), storageProp));
|
|
2170
2152
|
};
|
|
2171
2153
|
WithStorage.displayName = wrapDisplayName(WrappedComponent, 'WithStorage');
|
|
2172
2154
|
return WithStorage;
|
|
@@ -2217,8 +2199,8 @@ var usePrevious = function usePrevious(value) {
|
|
|
2217
2199
|
return ref.current;
|
|
2218
2200
|
};
|
|
2219
2201
|
|
|
2220
|
-
function ownKeys$
|
|
2221
|
-
function _objectSpread$
|
|
2202
|
+
function ownKeys$1m(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2203
|
+
function _objectSpread$1m(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1m(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$1m(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2222
2204
|
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 } } } };
|
|
2223
2205
|
var filterStoresOutdatedDanglingProductSelections = function filterStoresOutdatedDanglingProductSelections(storesQueryResult) {
|
|
2224
2206
|
var _storesQueryResult$re;
|
|
@@ -2229,7 +2211,7 @@ var filterStoresOutdatedDanglingProductSelections = function filterStoresOutdate
|
|
|
2229
2211
|
offset: storesQueryResult.offset,
|
|
2230
2212
|
results: (_storesQueryResult$re = storesQueryResult.results) === null || _storesQueryResult$re === void 0 ? void 0 : _mapInstanceProperty(_storesQueryResult$re).call(_storesQueryResult$re, function (store) {
|
|
2231
2213
|
var _store$productSelecti;
|
|
2232
|
-
return _objectSpread$
|
|
2214
|
+
return _objectSpread$1m(_objectSpread$1m({}, store), {}, {
|
|
2233
2215
|
productSelections: (_store$productSelecti = store.productSelections) === null || _store$productSelecti === void 0 ? void 0 : _filterInstanceProperty(_store$productSelecti).call(_store$productSelecti, function (productSelectionRef) {
|
|
2234
2216
|
return Boolean(productSelectionRef.productSelection);
|
|
2235
2217
|
})
|
|
@@ -2239,7 +2221,7 @@ var filterStoresOutdatedDanglingProductSelections = function filterStoresOutdate
|
|
|
2239
2221
|
};
|
|
2240
2222
|
var createQueryVariables$8 = function createQueryVariables(ownProps) {
|
|
2241
2223
|
var _context;
|
|
2242
|
-
return _objectSpread$
|
|
2224
|
+
return _objectSpread$1m(_objectSpread$1m({
|
|
2243
2225
|
limit: ownProps.limit,
|
|
2244
2226
|
offset: ownProps.offset,
|
|
2245
2227
|
sort: _sortInstanceProperty(ownProps)
|
|
@@ -2407,8 +2389,8 @@ function useDidFormValidationFail() {
|
|
|
2407
2389
|
return Boolean(didFormValidationFail);
|
|
2408
2390
|
}
|
|
2409
2391
|
|
|
2410
|
-
function ownKeys$
|
|
2411
|
-
function _objectSpread$
|
|
2392
|
+
function ownKeys$1l(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2393
|
+
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(_context = ownKeys$1l(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1l(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2412
2394
|
var TEN_MINUTES_IN_MS = 600000;
|
|
2413
2395
|
var defaultOptions = {
|
|
2414
2396
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -2436,7 +2418,7 @@ var useHasReminderExpired = function useHasReminderExpired(readReminderInterval)
|
|
|
2436
2418
|
};
|
|
2437
2419
|
var usePersistedReminder = function usePersistedReminder() {
|
|
2438
2420
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2439
|
-
var mergedOptions = _objectSpread$
|
|
2421
|
+
var mergedOptions = _objectSpread$1l(_objectSpread$1l({}, defaultOptions), options);
|
|
2440
2422
|
var _useStorage = useStorage(mergedOptions.storageKey, null),
|
|
2441
2423
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
2442
2424
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -2486,7 +2468,7 @@ var usePersistedReminder = function usePersistedReminder() {
|
|
|
2486
2468
|
return [hasReminderExpired, hasChosenReminderRef, scheduleReminder];
|
|
2487
2469
|
};
|
|
2488
2470
|
|
|
2489
|
-
var messages$
|
|
2471
|
+
var messages$H = defineMessages({
|
|
2490
2472
|
profileUpdated: {
|
|
2491
2473
|
id: 'NotificationText.profileUpdated',
|
|
2492
2474
|
description: 'Label for the notification header',
|
|
@@ -2504,8 +2486,8 @@ var messages$I = defineMessages({
|
|
|
2504
2486
|
}
|
|
2505
2487
|
});
|
|
2506
2488
|
|
|
2507
|
-
function ownKeys$
|
|
2508
|
-
function _objectSpread$
|
|
2489
|
+
function ownKeys$1k(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2490
|
+
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(_context = ownKeys$1k(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1k(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2509
2491
|
var LinkToProfile = function LinkToProfile(props) {
|
|
2510
2492
|
var _useTrackingShared = useTrackingShared(),
|
|
2511
2493
|
trackClickOnInfoNotification = _useTrackingShared.trackClickOnInfoNotification;
|
|
@@ -2531,9 +2513,9 @@ var NotificationText = function NotificationText() {
|
|
|
2531
2513
|
children: [jsx(Text.Body, {
|
|
2532
2514
|
as: "p",
|
|
2533
2515
|
isBold: true,
|
|
2534
|
-
intlMessage: messages$
|
|
2516
|
+
intlMessage: messages$H.profileUpdated
|
|
2535
2517
|
}), jsx(Text.Body, {
|
|
2536
|
-
intlMessage: _objectSpread$
|
|
2518
|
+
intlMessage: _objectSpread$1k(_objectSpread$1k({}, messages$H.addMoreInformation), {}, {
|
|
2537
2519
|
values: {
|
|
2538
2520
|
newline: getNewLine
|
|
2539
2521
|
}
|
|
@@ -2542,7 +2524,7 @@ var NotificationText = function NotificationText() {
|
|
|
2542
2524
|
}), jsx(Spacings.Stack, {
|
|
2543
2525
|
scale: "xs",
|
|
2544
2526
|
children: jsx(Text.Body, {
|
|
2545
|
-
intlMessage: _objectSpread$
|
|
2527
|
+
intlMessage: _objectSpread$1k(_objectSpread$1k({}, messages$H.informationAndProfileLink), {}, {
|
|
2546
2528
|
values: {
|
|
2547
2529
|
newline: getNewLine,
|
|
2548
2530
|
link: getLinkToProfile
|
|
@@ -2721,7 +2703,7 @@ var useEventCallback = function useEventCallback(fn, dependencies) {
|
|
|
2721
2703
|
}, [ref]);
|
|
2722
2704
|
};
|
|
2723
2705
|
|
|
2724
|
-
var messages$
|
|
2706
|
+
var messages$G = defineMessages({
|
|
2725
2707
|
fallbackHint: {
|
|
2726
2708
|
id: 'KeyFallback.fallbackHint',
|
|
2727
2709
|
description: 'key fallback for a specified resource key (e.g name)',
|
|
@@ -2747,7 +2729,7 @@ var useLocalizedKeyFallback = function useLocalizedKeyFallback() {
|
|
|
2747
2729
|
return function (values) {
|
|
2748
2730
|
if (!values.resource) return null;
|
|
2749
2731
|
var localizedString = values.resource[values.localizedStringFieldName];
|
|
2750
|
-
var fallbackHintWithKey = intl.formatMessage(messages$
|
|
2732
|
+
var fallbackHintWithKey = intl.formatMessage(messages$G.fallbackHint, {
|
|
2751
2733
|
key: values.resource.key
|
|
2752
2734
|
});
|
|
2753
2735
|
if (!localizedString) return fallbackHintWithKey;
|
|
@@ -2762,8 +2744,8 @@ var useDebouncedPromiseCallback = function useDebouncedPromiseCallback(promiseCa
|
|
|
2762
2744
|
);
|
|
2763
2745
|
};
|
|
2764
2746
|
|
|
2765
|
-
function ownKeys$
|
|
2766
|
-
function _objectSpread$
|
|
2747
|
+
function ownKeys$1j(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2748
|
+
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(_context2 = ownKeys$1j(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$1j(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2767
2749
|
var prepareMutableColumnProps = function prepareMutableColumnProps(columnConfig, mutableColumnProps) {
|
|
2768
2750
|
var updatedColumnProps = {};
|
|
2769
2751
|
_forEachInstanceProperty(mutableColumnProps).call(mutableColumnProps, function (columnProp) {
|
|
@@ -2789,14 +2771,14 @@ var retrieveColumnsWithCachedConfiguration = function retrieveColumnsWithCachedC
|
|
|
2789
2771
|
var initialColumnConfig = _findInstanceProperty(allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, function (initialConfig) {
|
|
2790
2772
|
return initialConfig.key === cachedConfig.key;
|
|
2791
2773
|
});
|
|
2792
|
-
return _objectSpread$
|
|
2774
|
+
return _objectSpread$1j(_objectSpread$1j({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2793
2775
|
});
|
|
2794
2776
|
};
|
|
2795
2777
|
var handleCacheUpdate = function handleCacheUpdate(_ref2) {
|
|
2796
2778
|
var update = _ref2.update,
|
|
2797
2779
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2798
2780
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2799
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2781
|
+
return updateCachedTableConfiguration(_objectSpread$1j(_objectSpread$1j({}, pick(cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2800
2782
|
};
|
|
2801
2783
|
|
|
2802
2784
|
// Signature:
|
|
@@ -2827,7 +2809,7 @@ var usePersistedTableConfiguration = function usePersistedTableConfiguration(pro
|
|
|
2827
2809
|
var visibleColumnConfig = _findInstanceProperty(allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, function (columnConfig) {
|
|
2828
2810
|
return columnConfig.key === visibleColumnKey;
|
|
2829
2811
|
});
|
|
2830
|
-
return _objectSpread$
|
|
2812
|
+
return _objectSpread$1j({
|
|
2831
2813
|
key: visibleColumnKey
|
|
2832
2814
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2833
2815
|
}),
|
|
@@ -2906,15 +2888,15 @@ var handlers$6 = {
|
|
|
2906
2888
|
}
|
|
2907
2889
|
};
|
|
2908
2890
|
|
|
2909
|
-
function ownKeys$
|
|
2910
|
-
function _objectSpread$
|
|
2891
|
+
function ownKeys$1i(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2892
|
+
function _objectSpread$1i(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1i(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$1i(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2911
2893
|
|
|
2912
2894
|
// eslint-disable-next-line import/prefer-default-export
|
|
2913
2895
|
var convertProductSelectionsFromGraphQl = function convertProductSelectionsFromGraphQl(productSelections) {
|
|
2914
2896
|
var _context;
|
|
2915
|
-
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$
|
|
2897
|
+
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$1i(_objectSpread$1i({}, productSelections), {}, {
|
|
2916
2898
|
results: _mapInstanceProperty(_context = productSelections.results).call(_context, function (productSelection) {
|
|
2917
|
-
return _objectSpread$
|
|
2899
|
+
return _objectSpread$1i({}, applyTransformedLocalizedFields(productSelection, [{
|
|
2918
2900
|
from: 'nameAllLocales',
|
|
2919
2901
|
to: 'name'
|
|
2920
2902
|
}]));
|
|
@@ -3059,7 +3041,7 @@ var localizedTextTransformer = (function (localizedString) {
|
|
|
3059
3041
|
}).join(' and ');
|
|
3060
3042
|
});
|
|
3061
3043
|
|
|
3062
|
-
var styles$
|
|
3044
|
+
var styles$p = {
|
|
3063
3045
|
"loading-container": "centered-loading-spinner-module__loading-container___3_9-h"
|
|
3064
3046
|
};
|
|
3065
3047
|
/**
|
|
@@ -3068,14 +3050,14 @@ var styles$r = {
|
|
|
3068
3050
|
*/
|
|
3069
3051
|
var CenteredLoadingSpinner = function CenteredLoadingSpinner() {
|
|
3070
3052
|
return jsx("div", {
|
|
3071
|
-
className: styles$
|
|
3053
|
+
className: styles$p['loading-container'],
|
|
3072
3054
|
"data-testid": "centered-loading-spinner",
|
|
3073
3055
|
children: jsx(LoadingSpinner, {})
|
|
3074
3056
|
});
|
|
3075
3057
|
};
|
|
3076
3058
|
CenteredLoadingSpinner.displayName = 'CenteredLoadingSpinner';
|
|
3077
3059
|
|
|
3078
|
-
var messages$
|
|
3060
|
+
var messages$F = defineMessages({
|
|
3079
3061
|
noChannelsFound: {
|
|
3080
3062
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
3081
3063
|
description: 'The message to display when no channels were found',
|
|
@@ -3213,7 +3195,7 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3213
3195
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
3214
3196
|
var isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
3215
3197
|
var handleNoOptions = useCallback(function () {
|
|
3216
|
-
return loadingError ? null : formatMessage(messages$
|
|
3198
|
+
return loadingError ? null : formatMessage(messages$F.noChannelsFound);
|
|
3217
3199
|
}, [loadingError, formatMessage]);
|
|
3218
3200
|
var tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0 ? void 0 : (_currentOption$data = currentOption.data) === null || _currentOption$data === void 0 ? void 0 : _currentOption$data.label) !== null && _currentOption$data$l !== void 0 ? _currentOption$data$l : '';
|
|
3219
3201
|
return jsx(Constraints.Horizontal, {
|
|
@@ -3225,7 +3207,7 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3225
3207
|
children: jsx(AsyncSelectInput, {
|
|
3226
3208
|
id: name,
|
|
3227
3209
|
name: name,
|
|
3228
|
-
placeholder: formatMessage(messages$
|
|
3210
|
+
placeholder: formatMessage(messages$F.placeholder),
|
|
3229
3211
|
loadOptions: loadOptionsDebounced,
|
|
3230
3212
|
defaultOptions: true,
|
|
3231
3213
|
showOptionGroupDivider: true,
|
|
@@ -3251,11 +3233,11 @@ var ChannelPickerInput = function ChannelPickerInput(_ref) {
|
|
|
3251
3233
|
};
|
|
3252
3234
|
ChannelPickerInput.displayName = 'ChannelPickerInput';
|
|
3253
3235
|
|
|
3254
|
-
function _createSuper$
|
|
3255
|
-
function _isNativeReflectConstruct$
|
|
3236
|
+
function _createSuper$d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$d(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3237
|
+
function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3256
3238
|
var FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
3257
3239
|
_inherits(FormattedDateTime, _PureComponent);
|
|
3258
|
-
var _super = _createSuper$
|
|
3240
|
+
var _super = _createSuper$d(FormattedDateTime);
|
|
3259
3241
|
function FormattedDateTime() {
|
|
3260
3242
|
_classCallCheck(this, FormattedDateTime);
|
|
3261
3243
|
return _super.apply(this, arguments);
|
|
@@ -3285,14 +3267,14 @@ var keepDisplayName = function keepDisplayName(component) {
|
|
|
3285
3267
|
return setDisplayName(getDisplayName(component));
|
|
3286
3268
|
};
|
|
3287
3269
|
|
|
3288
|
-
function ownKeys$
|
|
3289
|
-
function _objectSpread$
|
|
3290
|
-
function _createSuper$
|
|
3291
|
-
function _isNativeReflectConstruct$
|
|
3270
|
+
function ownKeys$1h(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3271
|
+
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(_context2 = ownKeys$1h(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$1h(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3272
|
+
function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3273
|
+
function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3292
3274
|
var withMouseOverState = function withMouseOverState(BaseComponent) {
|
|
3293
3275
|
var WithMouseOverState = /*#__PURE__*/function (_Component) {
|
|
3294
3276
|
_inherits(WithMouseOverState, _Component);
|
|
3295
|
-
var _super = _createSuper$
|
|
3277
|
+
var _super = _createSuper$c(WithMouseOverState);
|
|
3296
3278
|
function WithMouseOverState() {
|
|
3297
3279
|
var _context;
|
|
3298
3280
|
var _this;
|
|
@@ -3325,7 +3307,7 @@ var withMouseOverState = function withMouseOverState(BaseComponent) {
|
|
|
3325
3307
|
handleMouseOver: this.handleMouseOver,
|
|
3326
3308
|
handleMouseOut: this.handleMouseOut
|
|
3327
3309
|
};
|
|
3328
|
-
return jsx(BaseComponent, _objectSpread$
|
|
3310
|
+
return jsx(BaseComponent, _objectSpread$1h({}, _objectSpread$1h(_objectSpread$1h({}, this.props), injectedProps)));
|
|
3329
3311
|
}
|
|
3330
3312
|
}]);
|
|
3331
3313
|
return WithMouseOverState;
|
|
@@ -3334,11 +3316,11 @@ var withMouseOverState = function withMouseOverState(BaseComponent) {
|
|
|
3334
3316
|
return WithMouseOverState;
|
|
3335
3317
|
};
|
|
3336
3318
|
|
|
3337
|
-
function ownKeys$
|
|
3338
|
-
function _objectSpread$
|
|
3339
|
-
function _createSuper$
|
|
3340
|
-
function _isNativeReflectConstruct$
|
|
3341
|
-
var styles$
|
|
3319
|
+
function ownKeys$1g(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3320
|
+
function _objectSpread$1g(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1g(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$1g(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3321
|
+
function _createSuper$b(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$b(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3322
|
+
function _isNativeReflectConstruct$b() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3323
|
+
var styles$o = {
|
|
3342
3324
|
"size": "throttled-field-module__size___324jx",
|
|
3343
3325
|
"input-text": "throttled-field-module__input-text___3zFFp",
|
|
3344
3326
|
"input-secondary": "throttled-field-module__input-secondary___cFo9e throttled-field-module__input-text___3zFFp throttled-field-module__size___324jx",
|
|
@@ -3352,7 +3334,7 @@ var styles$q = {
|
|
|
3352
3334
|
};
|
|
3353
3335
|
var ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
3354
3336
|
_inherits(ThrottledField, _PureComponent);
|
|
3355
|
-
var _super = _createSuper$
|
|
3337
|
+
var _super = _createSuper$b(ThrottledField);
|
|
3356
3338
|
function ThrottledField() {
|
|
3357
3339
|
var _context;
|
|
3358
3340
|
var _this;
|
|
@@ -3450,7 +3432,7 @@ var ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3450
3432
|
key: "render",
|
|
3451
3433
|
value: function render() {
|
|
3452
3434
|
var _classnames, _classnames2;
|
|
3453
|
-
var commonProps = _objectSpread$
|
|
3435
|
+
var commonProps = _objectSpread$1g(_objectSpread$1g({
|
|
3454
3436
|
value: this.state.draftValue,
|
|
3455
3437
|
autoComplete: this.props.autoComplete,
|
|
3456
3438
|
onChange: this.handleChange,
|
|
@@ -3469,17 +3451,17 @@ var ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3469
3451
|
htmlFor: inputId,
|
|
3470
3452
|
children: this.props.label
|
|
3471
3453
|
})
|
|
3472
|
-
}), this.props.as === 'textarea' ? jsx(Textarea, _objectSpread$
|
|
3454
|
+
}), this.props.as === 'textarea' ? jsx(Textarea, _objectSpread$1g(_objectSpread$1g({}, commonProps), {}, {
|
|
3473
3455
|
id: inputId,
|
|
3474
|
-
className: classnames(styles$
|
|
3456
|
+
className: classnames(styles$o.textarea, styles$o["textarea-".concat(this.props.style)], (_classnames = {}, _defineProperty(_classnames, styles$o.invalid, !this.props.isValid), _defineProperty(_classnames, styles$o.disabled, this.props.disabled), _classnames)),
|
|
3475
3457
|
rows: 1,
|
|
3476
3458
|
maxRows: this.props.autoSize ? undefined : 1,
|
|
3477
3459
|
cacheMeasurements: true
|
|
3478
|
-
})) : jsx("input", _objectSpread$
|
|
3460
|
+
})) : jsx("input", _objectSpread$1g(_objectSpread$1g({}, commonProps), {}, {
|
|
3479
3461
|
id: inputId,
|
|
3480
3462
|
ref: this.props.inputRef,
|
|
3481
3463
|
type: this.props.as,
|
|
3482
|
-
className: classnames(styles$
|
|
3464
|
+
className: classnames(styles$o["input-".concat(this.props.style)], (_classnames2 = {}, _defineProperty(_classnames2, styles$o.invalid, !this.props.isValid), _defineProperty(_classnames2, styles$o.disabled, this.props.disabled), _defineProperty(_classnames2, styles$o.granular, this.props.isGranular), _classnames2))
|
|
3483
3465
|
}))]
|
|
3484
3466
|
});
|
|
3485
3467
|
}
|
|
@@ -3498,7 +3480,7 @@ ThrottledField.defaultProps = {
|
|
|
3498
3480
|
label: 'Throttled field'
|
|
3499
3481
|
};
|
|
3500
3482
|
|
|
3501
|
-
var messages$
|
|
3483
|
+
var messages$E = defineMessages({
|
|
3502
3484
|
buttonLabel: {
|
|
3503
3485
|
id: 'SearchInput.buttonLabel',
|
|
3504
3486
|
description: 'Label for "Search" button.',
|
|
@@ -3511,9 +3493,9 @@ var messages$F = defineMessages({
|
|
|
3511
3493
|
}
|
|
3512
3494
|
});
|
|
3513
3495
|
|
|
3514
|
-
function _createSuper$
|
|
3515
|
-
function _isNativeReflectConstruct$
|
|
3516
|
-
var styles$
|
|
3496
|
+
function _createSuper$a(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$a(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3497
|
+
function _isNativeReflectConstruct$a() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3498
|
+
var styles$n = {
|
|
3517
3499
|
"block": "search-input-module__block___1uM-y",
|
|
3518
3500
|
"container": "search-input-module__container___9u6if",
|
|
3519
3501
|
"input-container": "search-input-module__input-container___mJnyZ",
|
|
@@ -3530,7 +3512,7 @@ var styles$p = {
|
|
|
3530
3512
|
};
|
|
3531
3513
|
var SearchInput = /*#__PURE__*/function (_Component) {
|
|
3532
3514
|
_inherits(SearchInput, _Component);
|
|
3533
|
-
var _super = _createSuper$
|
|
3515
|
+
var _super = _createSuper$a(SearchInput);
|
|
3534
3516
|
function SearchInput() {
|
|
3535
3517
|
var _context;
|
|
3536
3518
|
var _this;
|
|
@@ -3592,19 +3574,19 @@ var SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3592
3574
|
value: function render() {
|
|
3593
3575
|
var _classnames, _classnames3;
|
|
3594
3576
|
return jsx("div", {
|
|
3595
|
-
className: classnames(this.props.blockClassName, styles$
|
|
3577
|
+
className: classnames(this.props.blockClassName, styles$n.block),
|
|
3596
3578
|
"data-track-component": "Search",
|
|
3597
3579
|
children: jsxs("div", {
|
|
3598
|
-
className: classnames(this.props.containerClassName, styles$
|
|
3580
|
+
className: classnames(this.props.containerClassName, styles$n.container),
|
|
3599
3581
|
children: [jsx("div", {
|
|
3600
|
-
className: classnames(styles$
|
|
3582
|
+
className: classnames(styles$n['input-container'], (_classnames = {}, _defineProperty(_classnames, styles$n['input-container-hoverable'], !this.props.disabled), _defineProperty(_classnames, styles$n['input-container-disabled'], this.props.disabled && this.props.enableDisabledStyle), _defineProperty(_classnames, styles$n['input-container-granular'], this.props.isGranular), _classnames)),
|
|
3601
3583
|
children: jsx(ThrottledField, {
|
|
3602
3584
|
style: "primary",
|
|
3603
3585
|
name: "search-text",
|
|
3604
3586
|
"data-testid": this.props.testId || 'search-input',
|
|
3605
3587
|
value: this.state.text,
|
|
3606
3588
|
label: this.props.label,
|
|
3607
|
-
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$
|
|
3589
|
+
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$E.placeholder),
|
|
3608
3590
|
inputRef: this.props.inputRef || this.setInputRef,
|
|
3609
3591
|
"data-track-component": "Text",
|
|
3610
3592
|
"data-track-event": "change",
|
|
@@ -3616,7 +3598,7 @@ var SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3616
3598
|
isGranular: this.props.isGranular
|
|
3617
3599
|
})
|
|
3618
3600
|
}), this.state.text && jsx(SecondaryIconButton, {
|
|
3619
|
-
className: classnames(styles$
|
|
3601
|
+
className: classnames(styles$n['clear-icon-container'], _defineProperty({}, styles$n['clear-icon-container-granular'], this.props.isGranular)),
|
|
3620
3602
|
icon: jsx(CloseIcon, {
|
|
3621
3603
|
size: "medium"
|
|
3622
3604
|
}),
|
|
@@ -3624,7 +3606,7 @@ var SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3624
3606
|
onClick: this.handleClear
|
|
3625
3607
|
}), jsx("div", {
|
|
3626
3608
|
"data-testid": "search-button",
|
|
3627
|
-
className: classnames(styles$
|
|
3609
|
+
className: classnames(styles$n['search-icon-container'], (_classnames3 = {}, _defineProperty(_classnames3, styles$n['search-icon-container-hoverable'], !this.props.disabled), _defineProperty(_classnames3, styles$n['search-icon-container-granular'], this.props.isGranular), _classnames3)),
|
|
3628
3610
|
onClick: this.props.disabled ? null : this.handleSubmit,
|
|
3629
3611
|
label: "search-button",
|
|
3630
3612
|
"data-track-component": "Button",
|
|
@@ -3839,7 +3821,7 @@ var useProductTypeOptions = function useProductTypeOptions(_ref4) {
|
|
|
3839
3821
|
};
|
|
3840
3822
|
};
|
|
3841
3823
|
|
|
3842
|
-
var messages$
|
|
3824
|
+
var messages$D = defineMessages({
|
|
3843
3825
|
bottomOption: {
|
|
3844
3826
|
id: 'Products.Pickers.bottomOption',
|
|
3845
3827
|
description: 'The message to display at the end of the options menu',
|
|
@@ -3847,12 +3829,12 @@ var messages$E = defineMessages({
|
|
|
3847
3829
|
}
|
|
3848
3830
|
});
|
|
3849
3831
|
|
|
3850
|
-
function ownKeys$
|
|
3851
|
-
function _objectSpread$
|
|
3832
|
+
function ownKeys$1f(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3833
|
+
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(_context = ownKeys$1f(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1f(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3852
3834
|
var getBottomOption = function getBottomOption() {
|
|
3853
3835
|
return {
|
|
3854
3836
|
options: [{
|
|
3855
|
-
label: messages$
|
|
3837
|
+
label: messages$D.bottomOption,
|
|
3856
3838
|
isBottomOption: true,
|
|
3857
3839
|
isDisabled: true
|
|
3858
3840
|
}]
|
|
@@ -3861,7 +3843,7 @@ var getBottomOption = function getBottomOption() {
|
|
|
3861
3843
|
var Option$2 = function Option(props) {
|
|
3862
3844
|
var _useIntl = useIntl(),
|
|
3863
3845
|
formatMessage = _useIntl.formatMessage;
|
|
3864
|
-
return jsx(AsyncSelectInput.Option, _objectSpread$
|
|
3846
|
+
return jsx(AsyncSelectInput.Option, _objectSpread$1f(_objectSpread$1f({}, props), {}, {
|
|
3865
3847
|
children: props.data.isBottomOption ? jsx(Text.Detail, {
|
|
3866
3848
|
tone: "secondary",
|
|
3867
3849
|
children: formatMessage(props.data.label)
|
|
@@ -3878,8 +3860,8 @@ var Option$2 = function Option(props) {
|
|
|
3878
3860
|
};
|
|
3879
3861
|
Option$2.displayName = 'Option';
|
|
3880
3862
|
|
|
3881
|
-
function ownKeys$
|
|
3882
|
-
function _objectSpread$
|
|
3863
|
+
function ownKeys$1e(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3864
|
+
function _objectSpread$1e(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$1e(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1e(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3883
3865
|
var useHandlers = function useHandlers(onChange, getTrackingEvent) {
|
|
3884
3866
|
var _useTracking = useTracking(),
|
|
3885
3867
|
track = _useTracking.track;
|
|
@@ -3904,8 +3886,8 @@ var useHandlers = function useHandlers(onChange, getTrackingEvent) {
|
|
|
3904
3886
|
if (event.target.value) {
|
|
3905
3887
|
doTrack();
|
|
3906
3888
|
}
|
|
3907
|
-
var eventWithExtractedValue = _objectSpread$
|
|
3908
|
-
target: _objectSpread$
|
|
3889
|
+
var eventWithExtractedValue = _objectSpread$1e(_objectSpread$1e({}, event), {}, {
|
|
3890
|
+
target: _objectSpread$1e(_objectSpread$1e({}, event.target), {}, {
|
|
3909
3891
|
value: (_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.value
|
|
3910
3892
|
})
|
|
3911
3893
|
});
|
|
@@ -3914,8 +3896,8 @@ var useHandlers = function useHandlers(onChange, getTrackingEvent) {
|
|
|
3914
3896
|
return [handleInputChange, handleChange];
|
|
3915
3897
|
};
|
|
3916
3898
|
|
|
3917
|
-
function ownKeys$
|
|
3918
|
-
function _objectSpread$
|
|
3899
|
+
function ownKeys$1d(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3900
|
+
function _objectSpread$1d(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context6 = ownKeys$1d(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context7 = ownKeys$1d(Object(source))).call(_context7, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
3919
3901
|
var constructPrefixSearchPredicate = function constructPrefixSearchPredicate() {
|
|
3920
3902
|
var prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
3921
3903
|
var lowerBound = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -3949,7 +3931,7 @@ var useLoadOptions = function useLoadOptions(_ref) {
|
|
|
3949
3931
|
var where = inputValue.length ? isUUID(inputValue) ? "id = \"".concat(inputValue, "\"") : (_getPrefixSearchBound = getPrefixSearchBounds(inputValue), _getPrefixSearchBound2 = _slicedToArray(_getPrefixSearchBound, 2), lowerBound = _getPrefixSearchBound2[0], upperBound = _getPrefixSearchBound2[1], constructPrefixSearchPredicate(prefixSearchFields, lowerBound, upperBound)) : void 0;
|
|
3950
3932
|
return client.query({
|
|
3951
3933
|
query: query,
|
|
3952
|
-
variables: _objectSpread$
|
|
3934
|
+
variables: _objectSpread$1d({
|
|
3953
3935
|
where: where
|
|
3954
3936
|
}, variables),
|
|
3955
3937
|
context: {
|
|
@@ -3981,7 +3963,7 @@ function useCurrentOption(_ref) {
|
|
|
3981
3963
|
};
|
|
3982
3964
|
}
|
|
3983
3965
|
|
|
3984
|
-
var messages$
|
|
3966
|
+
var messages$C = defineMessages({
|
|
3985
3967
|
noProductTypesFound: {
|
|
3986
3968
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
3987
3969
|
description: 'The message to display when no product types were found',
|
|
@@ -4097,7 +4079,7 @@ var ProductTypePickerInput = function ProductTypePickerInput(_ref) {
|
|
|
4097
4079
|
children: jsx(AsyncSelectInput, {
|
|
4098
4080
|
id: name,
|
|
4099
4081
|
name: name,
|
|
4100
|
-
placeholder: formatMessage(messages$
|
|
4082
|
+
placeholder: formatMessage(messages$C.placeholder),
|
|
4101
4083
|
loadOptions: loadOptionsDebounced,
|
|
4102
4084
|
defaultOptions: [],
|
|
4103
4085
|
isClearable: isClearable,
|
|
@@ -4111,7 +4093,7 @@ var ProductTypePickerInput = function ProductTypePickerInput(_ref) {
|
|
|
4111
4093
|
onBlur: onBlur,
|
|
4112
4094
|
value: currentOption.data,
|
|
4113
4095
|
noOptionsMessage: function noOptionsMessage() {
|
|
4114
|
-
return loadingError ? null : formatMessage(messages$
|
|
4096
|
+
return loadingError ? null : formatMessage(messages$C.noProductTypesFound);
|
|
4115
4097
|
},
|
|
4116
4098
|
hasError: hasError || isLoadingFailed
|
|
4117
4099
|
})
|
|
@@ -4124,7 +4106,7 @@ var ProductTypePickerInput = function ProductTypePickerInput(_ref) {
|
|
|
4124
4106
|
};
|
|
4125
4107
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
4126
4108
|
|
|
4127
|
-
var messages$
|
|
4109
|
+
var messages$B = defineMessages({
|
|
4128
4110
|
noStatesFound: {
|
|
4129
4111
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
4130
4112
|
description: 'The message to display when no states were found',
|
|
@@ -4246,7 +4228,7 @@ var StatePickerInput = function StatePickerInput(_ref) {
|
|
|
4246
4228
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
4247
4229
|
var isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
4248
4230
|
var handleNoOptions = useCallback(function () {
|
|
4249
|
-
return loadingError ? null : formatMessage(messages$
|
|
4231
|
+
return loadingError ? null : formatMessage(messages$B.noStatesFound);
|
|
4250
4232
|
}, [loadingError, formatMessage]);
|
|
4251
4233
|
var tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0 ? void 0 : (_currentOption$data = currentOption.data) === null || _currentOption$data === void 0 ? void 0 : _currentOption$data.label) !== null && _currentOption$data$l !== void 0 ? _currentOption$data$l : '';
|
|
4252
4234
|
return jsx(Constraints.Horizontal, {
|
|
@@ -4259,7 +4241,7 @@ var StatePickerInput = function StatePickerInput(_ref) {
|
|
|
4259
4241
|
id: name,
|
|
4260
4242
|
name: name,
|
|
4261
4243
|
horizontalConstraint: "scale",
|
|
4262
|
-
placeholder: formatMessage(messages$
|
|
4244
|
+
placeholder: formatMessage(messages$B.placeholder),
|
|
4263
4245
|
loadOptions: loadOptionsDebounced,
|
|
4264
4246
|
defaultOptions: true,
|
|
4265
4247
|
showOptionGroupDivider: true,
|
|
@@ -4285,10 +4267,10 @@ var StatePickerInput = function StatePickerInput(_ref) {
|
|
|
4285
4267
|
};
|
|
4286
4268
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
4287
4269
|
|
|
4288
|
-
function ownKeys$
|
|
4289
|
-
function _objectSpread$
|
|
4270
|
+
function ownKeys$1c(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4271
|
+
function _objectSpread$1c(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$1c(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1c(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4290
4272
|
var TooltipWrapper = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
4291
|
-
return jsx("div", _objectSpread$
|
|
4273
|
+
return jsx("div", _objectSpread$1c({
|
|
4292
4274
|
ref: ref,
|
|
4293
4275
|
style: {
|
|
4294
4276
|
display: 'block',
|
|
@@ -4435,8 +4417,8 @@ var getPrefixSearchBounds = function getPrefixSearchBounds(input) {
|
|
|
4435
4417
|
};
|
|
4436
4418
|
|
|
4437
4419
|
var _excluded = ["action"];
|
|
4438
|
-
function ownKeys$
|
|
4439
|
-
function _objectSpread$
|
|
4420
|
+
function ownKeys$1b(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4421
|
+
function _objectSpread$1b(target) { for (var i = 1; i < arguments.length; i++) { var _context11, _context12; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context11 = ownKeys$1b(Object(source), !0)).call(_context11, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context12 = ownKeys$1b(Object(source))).call(_context12, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4440
4422
|
|
|
4441
4423
|
/**
|
|
4442
4424
|
* Checks if a value is a LocalizedString
|
|
@@ -4459,7 +4441,7 @@ var getIsLocalizedString = function getIsLocalizedString(maybeLocalizedString) {
|
|
|
4459
4441
|
var transformCustomFieldsRawToCustomFields = function transformCustomFieldsRawToCustomFields(customFieldsRaw) {
|
|
4460
4442
|
if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
|
|
4461
4443
|
return _reduceInstanceProperty(customFieldsRaw).call(customFieldsRaw, function (customFields, customField) {
|
|
4462
|
-
return _objectSpread$
|
|
4444
|
+
return _objectSpread$1b(_objectSpread$1b({}, customFields), {}, _defineProperty({}, customField.name, customField.value));
|
|
4463
4445
|
}, {});
|
|
4464
4446
|
};
|
|
4465
4447
|
|
|
@@ -4484,7 +4466,7 @@ function transformLocalizedFieldsForCategory(category) {
|
|
|
4484
4466
|
var ancestors = category.ancestors ? _mapInstanceProperty(_context = category.ancestors).call(_context, function (ancestor) {
|
|
4485
4467
|
return transformLocalizedFieldsForCategory(ancestor);
|
|
4486
4468
|
}) : null;
|
|
4487
|
-
return _objectSpread$
|
|
4469
|
+
return _objectSpread$1b(_objectSpread$1b(_objectSpread$1b({}, transformedData), parent ? {
|
|
4488
4470
|
parent: parent
|
|
4489
4471
|
} : {}), ancestors ? {
|
|
4490
4472
|
ancestors: ancestors
|
|
@@ -4670,7 +4652,7 @@ var convertAction = function convertAction(actionName, actionPayload) {
|
|
|
4670
4652
|
};
|
|
4671
4653
|
case 'addAttributeDefinition':
|
|
4672
4654
|
return _defineProperty({}, actionName, {
|
|
4673
|
-
attributeDefinition: _objectSpread$
|
|
4655
|
+
attributeDefinition: _objectSpread$1b(_objectSpread$1b({}, actionPayload.attribute), {}, {
|
|
4674
4656
|
label: transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
|
|
4675
4657
|
inputTip: transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
|
|
4676
4658
|
type: createAttributeTypeValue(actionPayload.attribute)
|
|
@@ -4751,14 +4733,14 @@ var convertAction = function convertAction(actionName, actionPayload) {
|
|
|
4751
4733
|
case 'addLocalizedEnumValue':
|
|
4752
4734
|
return _defineProperty({}, actionName, {
|
|
4753
4735
|
attributeName: actionPayload.attributeName,
|
|
4754
|
-
value: _objectSpread$
|
|
4736
|
+
value: _objectSpread$1b(_objectSpread$1b({}, actionPayload.value), {}, {
|
|
4755
4737
|
label: transformLocalizedStringToLocalizedField(actionPayload.value.label)
|
|
4756
4738
|
})
|
|
4757
4739
|
});
|
|
4758
4740
|
case 'changeLocalizedEnumValueLabel':
|
|
4759
4741
|
return _defineProperty({}, actionName, {
|
|
4760
4742
|
attributeName: actionPayload.attributeName,
|
|
4761
|
-
newValue: _objectSpread$
|
|
4743
|
+
newValue: _objectSpread$1b(_objectSpread$1b({}, actionPayload.newValue), {}, {
|
|
4762
4744
|
label: transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
|
|
4763
4745
|
})
|
|
4764
4746
|
});
|
|
@@ -4780,7 +4762,7 @@ var convertAction = function convertAction(actionName, actionPayload) {
|
|
|
4780
4762
|
quantity: actionPayload.quantity,
|
|
4781
4763
|
name: transformLocalizedStringToLocalizedField(actionPayload.name),
|
|
4782
4764
|
taxCategory: actionPayload.taxCategory,
|
|
4783
|
-
money: _defineProperty({}, actionPayload.money.type, _objectSpread$
|
|
4765
|
+
money: _defineProperty({}, actionPayload.money.type, _objectSpread$1b({
|
|
4784
4766
|
centAmount: actionPayload.money.centAmount,
|
|
4785
4767
|
currencyCode: actionPayload.money.currencyCode
|
|
4786
4768
|
}, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4825,8 +4807,8 @@ var convertAction = function convertAction(actionName, actionPayload) {
|
|
|
4825
4807
|
},
|
|
4826
4808
|
fields: customFields
|
|
4827
4809
|
} : null;
|
|
4828
|
-
return _defineProperty({}, actionName, _objectSpread$
|
|
4829
|
-
address: _objectSpread$
|
|
4810
|
+
return _defineProperty({}, actionName, _objectSpread$1b(_objectSpread$1b({}, actionPayload), {}, {
|
|
4811
|
+
address: _objectSpread$1b(_objectSpread$1b({}, omit(actionPayload.address, ['__typename'])), {}, {
|
|
4830
4812
|
custom: custom
|
|
4831
4813
|
})
|
|
4832
4814
|
}));
|
|
@@ -4902,8 +4884,8 @@ function omitDeep(obj, fieldsToOmit) {
|
|
|
4902
4884
|
return originalOmitDeep(obj, fieldsToOmit);
|
|
4903
4885
|
}
|
|
4904
4886
|
|
|
4905
|
-
function ownKeys$
|
|
4906
|
-
function _objectSpread$
|
|
4887
|
+
function ownKeys$1a(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4888
|
+
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(_context = ownKeys$1a(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$1a(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4907
4889
|
function getPriceChannelName(price) {
|
|
4908
4890
|
var _ref, _price$channel$name, _price$channel, _price$channel2;
|
|
4909
4891
|
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;
|
|
@@ -4917,11 +4899,11 @@ function getDiscountValue(price) {
|
|
|
4917
4899
|
} 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) {
|
|
4918
4900
|
fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
|
|
4919
4901
|
}
|
|
4920
|
-
return price.discounted ? _objectSpread$
|
|
4902
|
+
return price.discounted ? _objectSpread$1a(_objectSpread$1a({}, price.value), {}, {
|
|
4921
4903
|
fractionedAmount: fractionedAmount,
|
|
4922
4904
|
centAmount: price.value.centAmount - price.discounted.value.centAmount,
|
|
4923
4905
|
preciseAmount: preciseAmount
|
|
4924
|
-
}) : _objectSpread$
|
|
4906
|
+
}) : _objectSpread$1a(_objectSpread$1a({}, price.value), {}, {
|
|
4925
4907
|
centAmount: 0
|
|
4926
4908
|
});
|
|
4927
4909
|
}
|
|
@@ -4934,11 +4916,15 @@ function getNetUnitPrice(_ref2) {
|
|
|
4934
4916
|
var price = getSelectedPrice(lineItem.price);
|
|
4935
4917
|
if (lineItem.taxRate && lineItem.taxRate.includedInPrice) {
|
|
4936
4918
|
var _price$value3;
|
|
4937
|
-
var centAmount
|
|
4919
|
+
var centAmount;
|
|
4920
|
+
if (price.value.centAmount) {
|
|
4921
|
+
var amount = price.value.centAmount / (1 + lineItem.taxRate.amount);
|
|
4922
|
+
centAmount = shouldRoundAmount ? Math.round(amount) : amount;
|
|
4923
|
+
}
|
|
4938
4924
|
var preciseAmount;
|
|
4939
4925
|
if (((_price$value3 = price.value) === null || _price$value3 === void 0 ? void 0 : _price$value3.type) === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + lineItem.taxRate.amount);
|
|
4940
|
-
return _objectSpread$
|
|
4941
|
-
centAmount:
|
|
4926
|
+
return _objectSpread$1a(_objectSpread$1a({}, price.value), {}, {
|
|
4927
|
+
centAmount: centAmount,
|
|
4942
4928
|
preciseAmount: preciseAmount
|
|
4943
4929
|
});
|
|
4944
4930
|
}
|
|
@@ -4949,15 +4935,15 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4949
4935
|
var currencyCode = price.value.currencyCode;
|
|
4950
4936
|
var fractionedAmount = getFractionedAmount(price.value);
|
|
4951
4937
|
if (currencyCode && !isNil$1(fractionedAmount)) {
|
|
4952
|
-
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$
|
|
4938
|
+
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$1a(_objectSpread$1a({}, minPrices), {}, _defineProperty({}, currencyCode, price.value));
|
|
4953
4939
|
}
|
|
4954
4940
|
return minPrices;
|
|
4955
4941
|
}, {});
|
|
4956
4942
|
return _Object$values(minPricesByCurrency);
|
|
4957
4943
|
}
|
|
4958
4944
|
|
|
4959
|
-
function ownKeys$
|
|
4960
|
-
function _objectSpread$
|
|
4945
|
+
function ownKeys$19(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4946
|
+
function _objectSpread$19(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context5 = ownKeys$19(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context6 = ownKeys$19(Object(source))).call(_context6, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4961
4947
|
var transformCustomFieldFromGraphQLResponse = function transformCustomFieldFromGraphQLResponse(resource) {
|
|
4962
4948
|
var _context, _context4;
|
|
4963
4949
|
return {
|
|
@@ -4972,8 +4958,8 @@ var transformCustomFieldFromGraphQLResponse = function transformCustomFieldFromG
|
|
|
4972
4958
|
return {
|
|
4973
4959
|
name: fieldDefinition.name,
|
|
4974
4960
|
required: fieldDefinition.required,
|
|
4975
|
-
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$
|
|
4976
|
-
elementType: _objectSpread$
|
|
4961
|
+
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$19(_objectSpread$19({}, fieldDefinition.type), {}, {
|
|
4962
|
+
elementType: _objectSpread$19(_objectSpread$19({}, fieldDefinition.type.elementType), {}, {
|
|
4977
4963
|
values: _mapInstanceProperty(_context2 = _valuesInstanceProperty(fieldDefinition.type.elementType)).call(_context2, function (value) {
|
|
4978
4964
|
return {
|
|
4979
4965
|
key: value.key,
|
|
@@ -4981,7 +4967,7 @@ var transformCustomFieldFromGraphQLResponse = function transformCustomFieldFromG
|
|
|
4981
4967
|
};
|
|
4982
4968
|
})
|
|
4983
4969
|
})
|
|
4984
|
-
}) : ((_fieldDefinition$type3 = fieldDefinition.type) === null || _fieldDefinition$type3 === void 0 ? void 0 : _fieldDefinition$type3.name) === 'LocalizedEnum' ? _objectSpread$
|
|
4970
|
+
}) : ((_fieldDefinition$type3 = fieldDefinition.type) === null || _fieldDefinition$type3 === void 0 ? void 0 : _fieldDefinition$type3.name) === 'LocalizedEnum' ? _objectSpread$19(_objectSpread$19({}, fieldDefinition.type), {}, {
|
|
4985
4971
|
values: _mapInstanceProperty(_context3 = _valuesInstanceProperty(fieldDefinition.type)).call(_context3, function (value) {
|
|
4986
4972
|
return {
|
|
4987
4973
|
key: value.key,
|
|
@@ -4995,7 +4981,7 @@ var transformCustomFieldFromGraphQLResponse = function transformCustomFieldFromG
|
|
|
4995
4981
|
}
|
|
4996
4982
|
},
|
|
4997
4983
|
fields: _reduceInstanceProperty(_context4 = resource.custom.customFieldsRaw).call(_context4, function (fields, customField) {
|
|
4998
|
-
return _objectSpread$
|
|
4984
|
+
return _objectSpread$19(_objectSpread$19({}, fields), {}, _defineProperty({}, customField.name, customField.value));
|
|
4999
4985
|
}, {})
|
|
5000
4986
|
};
|
|
5001
4987
|
};
|
|
@@ -5006,7 +4992,7 @@ var convertProductSelectionFromGraphQl = function convertProductSelectionFromGra
|
|
|
5006
4992
|
// Incase the product selection is not missing or if the current project dose not yet have access to the feature,
|
|
5007
4993
|
// in either case we return null
|
|
5008
4994
|
if (!productSelection) return null;
|
|
5009
|
-
return _objectSpread$
|
|
4995
|
+
return _objectSpread$19(_objectSpread$19({}, applyTransformedLocalizedFields(productSelection, [{
|
|
5010
4996
|
from: 'nameAllLocales',
|
|
5011
4997
|
to: 'name'
|
|
5012
4998
|
}])), {}, {
|
|
@@ -5033,8 +5019,8 @@ var transformAllToProperNounCase = function transformAllToProperNounCase(text) {
|
|
|
5033
5019
|
}).join(' ');
|
|
5034
5020
|
};
|
|
5035
5021
|
|
|
5036
|
-
function ownKeys$
|
|
5037
|
-
function _objectSpread$
|
|
5022
|
+
function ownKeys$18(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5023
|
+
function _objectSpread$18(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context3 = ownKeys$18(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context4 = ownKeys$18(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5038
5024
|
var REGEX_ISO8601 = /(\d{4}-\d{2}-\d{2}[T]\d{2}:\d{2}:\d{2}(\.\d{3}[Z]?))/;
|
|
5039
5025
|
var REGEX_TIME = /\d{2}:\d{2}/;
|
|
5040
5026
|
var REGEX_DATE = /\d{4}-\d{2}-\d{2}/;
|
|
@@ -5053,7 +5039,7 @@ function filterCustomTypeUpdateActionValues() {
|
|
|
5053
5039
|
return field.name === updateAction.name;
|
|
5054
5040
|
});
|
|
5055
5041
|
var definitionName = definition.type.elementType.name;
|
|
5056
|
-
return _objectSpread$
|
|
5042
|
+
return _objectSpread$18(_objectSpread$18({}, updateAction), {}, {
|
|
5057
5043
|
value: filterNotDefinedValues(updateAction.value, definitionName)
|
|
5058
5044
|
});
|
|
5059
5045
|
}
|
|
@@ -5137,15 +5123,15 @@ function omitSetsOfSets() {
|
|
|
5137
5123
|
|
|
5138
5124
|
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 } } } };
|
|
5139
5125
|
|
|
5140
|
-
function ownKeys$
|
|
5141
|
-
function _objectSpread$
|
|
5142
|
-
function _createSuper$
|
|
5143
|
-
function _isNativeReflectConstruct$
|
|
5126
|
+
function ownKeys$17(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5127
|
+
function _objectSpread$17(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context4 = ownKeys$17(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context5 = ownKeys$17(Object(source))).call(_context5, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5128
|
+
function _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5129
|
+
function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5144
5130
|
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 } } } };
|
|
5145
|
-
var customizableResources$1 = ['asset', 'category', 'channel', 'customer', 'order', 'discount-code', 'cart-discount', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shopping-list', 'shopping-list-text-line-item', 'review'];
|
|
5131
|
+
var customizableResources$1 = ['asset', 'category', 'channel', 'customer', 'order', 'discount-code', 'cart-discount', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review'];
|
|
5146
5132
|
var CustomFieldDefinitionsConnector = /*#__PURE__*/function (_Component) {
|
|
5147
5133
|
_inherits(CustomFieldDefinitionsConnector, _Component);
|
|
5148
|
-
var _super = _createSuper$
|
|
5134
|
+
var _super = _createSuper$9(CustomFieldDefinitionsConnector);
|
|
5149
5135
|
function CustomFieldDefinitionsConnector() {
|
|
5150
5136
|
_classCallCheck(this, CustomFieldDefinitionsConnector);
|
|
5151
5137
|
return _super.apply(this, arguments);
|
|
@@ -5207,7 +5193,7 @@ var mapDataToProps = function mapDataToProps(_ref) {
|
|
|
5207
5193
|
fetchTypeDefinitionsQuery: {
|
|
5208
5194
|
loading: fetchTypeDefinitionsQuery.loading,
|
|
5209
5195
|
customFieldDefinitions: uniqBy(_mapInstanceProperty(fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, function (fieldDefinition) {
|
|
5210
|
-
return _objectSpread$
|
|
5196
|
+
return _objectSpread$17({}, applyTransformedLocalizedFields(omitDeep(fieldDefinition, ['__typename'], {
|
|
5211
5197
|
isImmutable: true
|
|
5212
5198
|
}), [{
|
|
5213
5199
|
from: 'labelAllLocales',
|
|
@@ -5242,12 +5228,12 @@ var handlers$4 = {
|
|
|
5242
5228
|
}
|
|
5243
5229
|
};
|
|
5244
5230
|
|
|
5245
|
-
function ownKeys$
|
|
5246
|
-
function _objectSpread$
|
|
5231
|
+
function ownKeys$16(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5232
|
+
function _objectSpread$16(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context4 = ownKeys$16(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context5 = ownKeys$16(Object(source))).call(_context5, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5247
5233
|
var restDocToForm = function restDocToForm(customFieldsFromRestResponse) {
|
|
5248
5234
|
return {
|
|
5249
5235
|
fields: customFieldsFromRestResponse.fields,
|
|
5250
|
-
type: _objectSpread$
|
|
5236
|
+
type: _objectSpread$16({
|
|
5251
5237
|
id: customFieldsFromRestResponse.type.id
|
|
5252
5238
|
}, customFieldsFromRestResponse.type.obj)
|
|
5253
5239
|
};
|
|
@@ -5266,8 +5252,8 @@ var graphQlDocToForm = function graphQlDocToForm(typeDefinition) {
|
|
|
5266
5252
|
name: fieldDefinition.name,
|
|
5267
5253
|
required: fieldDefinition.required,
|
|
5268
5254
|
inputHint: fieldDefinition.inputHint,
|
|
5269
|
-
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$
|
|
5270
|
-
elementType: _objectSpread$
|
|
5255
|
+
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$16(_objectSpread$16({}, fieldDefinition.type), {}, {
|
|
5256
|
+
elementType: _objectSpread$16(_objectSpread$16({}, fieldDefinition.type.elementType), {}, {
|
|
5271
5257
|
values: _mapInstanceProperty(_context2 = _valuesInstanceProperty(fieldDefinition.type.elementType)).call(_context2, function (value) {
|
|
5272
5258
|
return {
|
|
5273
5259
|
key: value.key,
|
|
@@ -5275,7 +5261,7 @@ var graphQlDocToForm = function graphQlDocToForm(typeDefinition) {
|
|
|
5275
5261
|
};
|
|
5276
5262
|
})
|
|
5277
5263
|
})
|
|
5278
|
-
}) : ((_fieldDefinition$type3 = fieldDefinition.type) === null || _fieldDefinition$type3 === void 0 ? void 0 : _fieldDefinition$type3.name) === 'LocalizedEnum' ? _objectSpread$
|
|
5264
|
+
}) : ((_fieldDefinition$type3 = fieldDefinition.type) === null || _fieldDefinition$type3 === void 0 ? void 0 : _fieldDefinition$type3.name) === 'LocalizedEnum' ? _objectSpread$16(_objectSpread$16({}, fieldDefinition.type), {}, {
|
|
5279
5265
|
values: _mapInstanceProperty(_context3 = _valuesInstanceProperty(fieldDefinition.type)).call(_context3, function (value) {
|
|
5280
5266
|
return {
|
|
5281
5267
|
key: value.key,
|
|
@@ -5294,7 +5280,7 @@ var formToRestDoc = function formToRestDoc(formCustomFields) {
|
|
|
5294
5280
|
type: {
|
|
5295
5281
|
id: formCustomFields.type.id,
|
|
5296
5282
|
typeId: 'type',
|
|
5297
|
-
obj: _objectSpread$
|
|
5283
|
+
obj: _objectSpread$16({}, formCustomFields.type)
|
|
5298
5284
|
},
|
|
5299
5285
|
fields: formCustomFields.fields
|
|
5300
5286
|
};
|
|
@@ -5304,7 +5290,7 @@ var formToGraphQlDoc = function formToGraphQlDoc(formCustomFields) {
|
|
|
5304
5290
|
type: {
|
|
5305
5291
|
id: formCustomFields.type.id,
|
|
5306
5292
|
typeId: 'type',
|
|
5307
|
-
obj: _objectSpread$
|
|
5293
|
+
obj: _objectSpread$16({}, omit(formCustomFields.type, ['id']))
|
|
5308
5294
|
},
|
|
5309
5295
|
fields: omitBy(formCustomFields.fields || {}, isNil$1)
|
|
5310
5296
|
};
|
|
@@ -5320,10 +5306,10 @@ var createEmptyCustomFields = function createEmptyCustomFields(typeDefinition) {
|
|
|
5320
5306
|
};
|
|
5321
5307
|
};
|
|
5322
5308
|
|
|
5323
|
-
function _createSuper$
|
|
5324
|
-
function _isNativeReflectConstruct$
|
|
5309
|
+
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(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5310
|
+
function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5325
5311
|
var FetchTypeDefinitionsWithNamesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsWithNamesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "required" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 1445, source: { body: "query FetchTypeDefinitionsWithNamesQuery(\n $where: String\n $limit: Int\n $offset: Int\n) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n id\n key\n nameAllLocales {\n value\n locale\n }\n fieldDefinitions {\n required\n type {\n name\n ... on ReferenceType {\n referenceTypeId\n }\n ... on SetType {\n elementType {\n name\n ... on ReferenceType {\n referenceTypeId\n name\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n inputHint\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
5326
|
-
var customizableResources = ['asset', 'address', 'business-unit', 'category', 'channel', 'customer', 'order', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shopping-list', 'shopping-list-text-line-item', 'review', 'cart-discount', 'product-selection'];
|
|
5312
|
+
var customizableResources = ['asset', 'address', 'business-unit', 'category', 'channel', 'customer', 'order', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection'];
|
|
5327
5313
|
var emptyTypeDefinitions = {
|
|
5328
5314
|
total: 0,
|
|
5329
5315
|
count: 0,
|
|
@@ -5331,7 +5317,7 @@ var emptyTypeDefinitions = {
|
|
|
5331
5317
|
};
|
|
5332
5318
|
var CustomFieldTypeDefinitionsConnector = /*#__PURE__*/function (_Component) {
|
|
5333
5319
|
_inherits(CustomFieldTypeDefinitionsConnector, _Component);
|
|
5334
|
-
var _super = _createSuper$
|
|
5320
|
+
var _super = _createSuper$8(CustomFieldTypeDefinitionsConnector);
|
|
5335
5321
|
function CustomFieldTypeDefinitionsConnector() {
|
|
5336
5322
|
_classCallCheck(this, CustomFieldTypeDefinitionsConnector);
|
|
5337
5323
|
return _super.apply(this, arguments);
|
|
@@ -5452,8 +5438,8 @@ var REFERENCED_TYPES = {
|
|
|
5452
5438
|
zone: 'zone'
|
|
5453
5439
|
};
|
|
5454
5440
|
|
|
5455
|
-
function ownKeys$
|
|
5456
|
-
function _objectSpread$
|
|
5441
|
+
function ownKeys$15(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5442
|
+
function _objectSpread$15(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context3 = ownKeys$15(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context4 = ownKeys$15(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5457
5443
|
var extractDuplicatedValues = function extractDuplicatedValues(values, type, language, languages) {
|
|
5458
5444
|
var validatedValues = [];
|
|
5459
5445
|
if (type.name.toLowerCase() === 'money') {
|
|
@@ -5527,7 +5513,7 @@ function validations (formValues, language, languages) {
|
|
|
5527
5513
|
return fieldDefinition.required || fieldDefinition.type.name.toLowerCase() === 'set';
|
|
5528
5514
|
});
|
|
5529
5515
|
var errors = _reduceInstanceProperty(fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, function (acc, fieldDefinition) {
|
|
5530
|
-
return _objectSpread$
|
|
5516
|
+
return _objectSpread$15(_objectSpread$15({}, acc), {}, _defineProperty({}, fieldDefinition.name, _objectSpread$15(_objectSpread$15({}, setMissingIfRequired(formValues, fieldDefinition)), setDuplicatedIfSet(formValues, fieldDefinition, language, languages))));
|
|
5531
5517
|
}, {});
|
|
5532
5518
|
return withoutEmptyErrorsByField(errors);
|
|
5533
5519
|
}
|
|
@@ -5556,8 +5542,8 @@ function CustomTextInput(props) {
|
|
|
5556
5542
|
}
|
|
5557
5543
|
CustomTextInput.displayName = 'CustomTextInput';
|
|
5558
5544
|
|
|
5559
|
-
function ownKeys$
|
|
5560
|
-
function _objectSpread$
|
|
5545
|
+
function ownKeys$14(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5546
|
+
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(_context = ownKeys$14(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$14(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5561
5547
|
var getSubfieldLanguage = function getSubfieldLanguage(subfieldName) {
|
|
5562
5548
|
var lastDotIndex = _lastIndexOfInstanceProperty(subfieldName).call(subfieldName, '.');
|
|
5563
5549
|
return subfieldName.substring(lastDotIndex + 1);
|
|
@@ -5583,7 +5569,7 @@ function CustomLocalizedTextInput(props) {
|
|
|
5583
5569
|
// as a whole.
|
|
5584
5570
|
|
|
5585
5571
|
var fieldLanguage = getSubfieldLanguage(subfieldName);
|
|
5586
|
-
var newValue = _objectSpread$
|
|
5572
|
+
var newValue = _objectSpread$14(_objectSpread$14({}, props.value), {}, _defineProperty({}, fieldLanguage, rawValue));
|
|
5587
5573
|
var nullifiedIfNeeded = LocalizedTextInput.isEmpty(newValue) ? undefined : newValue;
|
|
5588
5574
|
props.setFieldValue(props.name, nullifiedIfNeeded);
|
|
5589
5575
|
});
|
|
@@ -5652,21 +5638,21 @@ function CustomNumberInput(props) {
|
|
|
5652
5638
|
}
|
|
5653
5639
|
CustomNumberInput.displayName = 'CustomNumberInput';
|
|
5654
5640
|
|
|
5655
|
-
function ownKeys$
|
|
5656
|
-
function _objectSpread$
|
|
5657
|
-
var styles$
|
|
5641
|
+
function ownKeys$13(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5642
|
+
function _objectSpread$13(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$13(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$13(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5643
|
+
var styles$m = {
|
|
5658
5644
|
"container": "custom-money-input-module__container___1fdO2"
|
|
5659
5645
|
};
|
|
5660
5646
|
var fixCurrencyCode = function fixCurrencyCode(value, currencies) {
|
|
5661
5647
|
if (value.currencyCode) return value;
|
|
5662
5648
|
var firstCurrency = currencies[0];
|
|
5663
|
-
return _objectSpread$
|
|
5649
|
+
return _objectSpread$13(_objectSpread$13({}, value), {}, {
|
|
5664
5650
|
currencyCode: firstCurrency
|
|
5665
5651
|
});
|
|
5666
5652
|
};
|
|
5667
5653
|
var fixAmount = function fixAmount(value) {
|
|
5668
5654
|
if (!value.amount) {
|
|
5669
|
-
return _objectSpread$
|
|
5655
|
+
return _objectSpread$13(_objectSpread$13({}, value), {}, {
|
|
5670
5656
|
amount: '0'
|
|
5671
5657
|
});
|
|
5672
5658
|
}
|
|
@@ -5710,7 +5696,7 @@ function CustomMoneyInput(props) {
|
|
|
5710
5696
|
}
|
|
5711
5697
|
var handleChange = makeChangeHandler(function (rawValue, subfieldName) {
|
|
5712
5698
|
var isAmount = _endsWithInstanceProperty(subfieldName).call(subfieldName, 'amount');
|
|
5713
|
-
var newValue = _objectSpread$
|
|
5699
|
+
var newValue = _objectSpread$13({}, internalValue.current);
|
|
5714
5700
|
if (isAmount) newValue.amount = rawValue;else newValue.currencyCode = rawValue;
|
|
5715
5701
|
var fixedValue = fixEnteredValue(newValue, internalValue.current, currencies);
|
|
5716
5702
|
internalValue.current = fixedValue;
|
|
@@ -5720,7 +5706,7 @@ function CustomMoneyInput(props) {
|
|
|
5720
5706
|
|
|
5721
5707
|
// TODO(pa3): fix setting proper id in UIKit
|
|
5722
5708
|
return jsxs("div", {
|
|
5723
|
-
className: styles$
|
|
5709
|
+
className: styles$m.container,
|
|
5724
5710
|
"aria-labelledby": props.name,
|
|
5725
5711
|
children: [jsx(AccessibleHidden, {
|
|
5726
5712
|
children: jsx("label", {
|
|
@@ -5743,22 +5729,31 @@ function CustomMoneyInput(props) {
|
|
|
5743
5729
|
}
|
|
5744
5730
|
CustomMoneyInput.displayName = 'CustomMoneyInput';
|
|
5745
5731
|
|
|
5746
|
-
var convertTypeValuesToOptions$1 = defaultMemoize(function (type,
|
|
5732
|
+
var convertTypeValuesToOptions$1 = defaultMemoize(function (type, dataLocale, languages) {
|
|
5747
5733
|
var _context;
|
|
5748
5734
|
return _mapInstanceProperty(_context = _valuesInstanceProperty(type)).call(_context, function (value) {
|
|
5749
|
-
var _value$label;
|
|
5750
5735
|
return {
|
|
5751
|
-
label: (
|
|
5736
|
+
label: formatLocalizedString(value, {
|
|
5737
|
+
key: 'label',
|
|
5738
|
+
locale: dataLocale,
|
|
5739
|
+
fallbackOrder: languages,
|
|
5740
|
+
fallback: "".concat(value.key, " (key)")
|
|
5741
|
+
}),
|
|
5752
5742
|
value: value.key
|
|
5753
5743
|
};
|
|
5754
5744
|
});
|
|
5755
5745
|
});
|
|
5756
5746
|
function CustomLocalizedEnumInput(props) {
|
|
5757
5747
|
var _options$find$label, _options$find;
|
|
5758
|
-
var
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5748
|
+
var _useApplicationContex = useApplicationContext(function (applicationContext) {
|
|
5749
|
+
return {
|
|
5750
|
+
languages: applicationContext.project.languages,
|
|
5751
|
+
dataLocale: applicationContext.dataLocale
|
|
5752
|
+
};
|
|
5753
|
+
}),
|
|
5754
|
+
languages = _useApplicationContex.languages,
|
|
5755
|
+
dataLocale = _useApplicationContex.dataLocale;
|
|
5756
|
+
var options = convertTypeValuesToOptions$1(props.fieldDefinition.type, dataLocale, languages);
|
|
5762
5757
|
var handleChange = makeChangeHandler(function (rawValue) {
|
|
5763
5758
|
return props.setFieldValue(props.name, rawValue);
|
|
5764
5759
|
});
|
|
@@ -5853,13 +5848,13 @@ function getCategoriesByIds(apolloClient, options) {
|
|
|
5853
5848
|
});
|
|
5854
5849
|
}
|
|
5855
5850
|
|
|
5856
|
-
var styles$
|
|
5851
|
+
var styles$l = {
|
|
5857
5852
|
"dropdownIndicator": "dropdown-indicator-module__dropdownIndicator___3bkJT"
|
|
5858
5853
|
}; // This should be separated into a new shared components in the packages-shared
|
|
5859
5854
|
// and used all over instead of SearchIconDropdownIndicator in application-product
|
|
5860
5855
|
function DropdownIndicator$1() {
|
|
5861
5856
|
return jsx("div", {
|
|
5862
|
-
className: styles$
|
|
5857
|
+
className: styles$l.dropdownIndicator,
|
|
5863
5858
|
children: jsx(SearchIcon, {
|
|
5864
5859
|
scale: "medium",
|
|
5865
5860
|
color: "primary"
|
|
@@ -5867,9 +5862,9 @@ function DropdownIndicator$1() {
|
|
|
5867
5862
|
});
|
|
5868
5863
|
}
|
|
5869
5864
|
|
|
5870
|
-
function ownKeys$
|
|
5871
|
-
function _objectSpread$
|
|
5872
|
-
var styles$
|
|
5865
|
+
function ownKeys$12(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5866
|
+
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(_context3 = ownKeys$12(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context4 = ownKeys$12(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5867
|
+
var styles$k = {
|
|
5873
5868
|
"container": "autocomplete-module__container___sBqGo"
|
|
5874
5869
|
};
|
|
5875
5870
|
function Autocomplete(props) {
|
|
@@ -5898,7 +5893,7 @@ function Autocomplete(props) {
|
|
|
5898
5893
|
var value = null;
|
|
5899
5894
|
if (props.value) value = props.isMulti ? _mapInstanceProperty(_context2 = props.value).call(_context2, props.mapItemToOption) : props.mapItemToOption(props.value);
|
|
5900
5895
|
return jsxs("div", {
|
|
5901
|
-
className: classnames(props.className, styles$
|
|
5896
|
+
className: classnames(props.className, styles$k.container),
|
|
5902
5897
|
children: [jsx(AccessibleHidden, {
|
|
5903
5898
|
children: jsx("label", {
|
|
5904
5899
|
htmlFor: props.id,
|
|
@@ -5916,7 +5911,7 @@ function Autocomplete(props) {
|
|
|
5916
5911
|
onBlur: props.onBlur,
|
|
5917
5912
|
onChange: handleChange,
|
|
5918
5913
|
loadOptions: handleLoadItems,
|
|
5919
|
-
components: _objectSpread$
|
|
5914
|
+
components: _objectSpread$12({
|
|
5920
5915
|
DropdownIndicator: DropdownIndicator$1
|
|
5921
5916
|
}, props.components),
|
|
5922
5917
|
isClearable: props.isClearable,
|
|
@@ -5942,7 +5937,7 @@ Autocomplete.defaultProps = {
|
|
|
5942
5937
|
};
|
|
5943
5938
|
var Autocomplete$1 = /*#__PURE__*/memo(Autocomplete);
|
|
5944
5939
|
|
|
5945
|
-
var styles$
|
|
5940
|
+
var styles$j = {
|
|
5946
5941
|
"container": "reference-search-module__container___3-iK3",
|
|
5947
5942
|
"missing-label": "reference-search-module__missing-label___az9AO"
|
|
5948
5943
|
}; // This is a hashmap of loaded items used to map a value to an item
|
|
@@ -6096,9 +6091,9 @@ function ReferenceSearch(props) {
|
|
|
6096
6091
|
var value = props.isMulti ? items : items === null || items === void 0 ? void 0 : items[0];
|
|
6097
6092
|
var tooltipTitle = value || props.value ? props.mapItemToOption(value || props.value).label : '';
|
|
6098
6093
|
return jsxs("div", {
|
|
6099
|
-
className: styles$
|
|
6094
|
+
className: styles$j.container,
|
|
6100
6095
|
children: [areSomeItemsMissing && jsx("div", {
|
|
6101
|
-
className: styles$
|
|
6096
|
+
className: styles$j['missing-label'],
|
|
6102
6097
|
children: props.referenceIsMissingLabel
|
|
6103
6098
|
}), jsx(CustomFieldTooltip, {
|
|
6104
6099
|
title: tooltipTitle,
|
|
@@ -6124,7 +6119,7 @@ function ReferenceSearch(props) {
|
|
|
6124
6119
|
});
|
|
6125
6120
|
}
|
|
6126
6121
|
|
|
6127
|
-
var messages$
|
|
6122
|
+
var messages$A = defineMessages({
|
|
6128
6123
|
placeholder: {
|
|
6129
6124
|
id: 'CategoryReferenceSearch.placeholder',
|
|
6130
6125
|
description: 'Placeholder for search for a category',
|
|
@@ -6157,8 +6152,8 @@ var messages$B = defineMessages({
|
|
|
6157
6152
|
}
|
|
6158
6153
|
});
|
|
6159
6154
|
|
|
6160
|
-
function ownKeys$
|
|
6161
|
-
function _objectSpread$
|
|
6155
|
+
function ownKeys$11(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6156
|
+
function _objectSpread$11(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context3 = ownKeys$11(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context4 = ownKeys$11(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6162
6157
|
function Option$1(props) {
|
|
6163
6158
|
var _context, _context2;
|
|
6164
6159
|
var _useApplicationContex = useApplicationContext(function (applicationContext) {
|
|
@@ -6172,7 +6167,7 @@ function Option$1(props) {
|
|
|
6172
6167
|
var _useIntl = useIntl(),
|
|
6173
6168
|
formatMessage = _useIntl.formatMessage;
|
|
6174
6169
|
var category = props.data;
|
|
6175
|
-
return jsx(AsyncSelectInput.Option, _objectSpread$
|
|
6170
|
+
return jsx(AsyncSelectInput.Option, _objectSpread$11(_objectSpread$11({}, props), {}, {
|
|
6176
6171
|
children: jsxs("div", {
|
|
6177
6172
|
"data-testid": "category-option",
|
|
6178
6173
|
children: [jsx(Text.Body, {
|
|
@@ -6183,7 +6178,7 @@ function Option$1(props) {
|
|
|
6183
6178
|
fallbackOrder: languages
|
|
6184
6179
|
})
|
|
6185
6180
|
}), category.parent && jsx(Text.Detail, {
|
|
6186
|
-
children: _concatInstanceProperty(_context = "".concat(formatMessage(messages$
|
|
6181
|
+
children: _concatInstanceProperty(_context = "".concat(formatMessage(messages$A.parentCategory), ": ")).call(_context, formatLocalizedString(category.parent, {
|
|
6187
6182
|
key: 'name',
|
|
6188
6183
|
locale: language,
|
|
6189
6184
|
fallbackOrder: languages
|
|
@@ -6195,14 +6190,14 @@ function Option$1(props) {
|
|
|
6195
6190
|
fallbackOrder: languages
|
|
6196
6191
|
}))
|
|
6197
6192
|
}), category.externalId && jsx(Text.Detail, {
|
|
6198
|
-
children: _concatInstanceProperty(_context2 = "".concat(formatMessage(messages$
|
|
6193
|
+
children: _concatInstanceProperty(_context2 = "".concat(formatMessage(messages$A.externalId), ": ")).call(_context2, category.externalId || NO_VALUE_FALLBACK)
|
|
6199
6194
|
})]
|
|
6200
6195
|
})
|
|
6201
6196
|
}));
|
|
6202
6197
|
}
|
|
6203
6198
|
|
|
6204
|
-
function ownKeys$
|
|
6205
|
-
function _objectSpread$
|
|
6199
|
+
function ownKeys$10(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6200
|
+
function _objectSpread$10(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$10(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$10(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6206
6201
|
var filterOption$1 = function filterOption() {
|
|
6207
6202
|
return true;
|
|
6208
6203
|
};
|
|
@@ -6219,7 +6214,7 @@ function CategoryReferenceSearch(props) {
|
|
|
6219
6214
|
language = _useApplicationContex.language,
|
|
6220
6215
|
languages = _useApplicationContex.languages;
|
|
6221
6216
|
var mapItemToOption = useCallback(function (category) {
|
|
6222
|
-
return _objectSpread$
|
|
6217
|
+
return _objectSpread$10(_objectSpread$10({}, category), {}, {
|
|
6223
6218
|
value: category.id,
|
|
6224
6219
|
label: formatLocalizedString(category, {
|
|
6225
6220
|
key: 'name',
|
|
@@ -6242,7 +6237,7 @@ function CategoryReferenceSearch(props) {
|
|
|
6242
6237
|
}, [apolloClient]);
|
|
6243
6238
|
return jsx(ReferenceSearch, {
|
|
6244
6239
|
id: props.id,
|
|
6245
|
-
components: _objectSpread$
|
|
6240
|
+
components: _objectSpread$10({
|
|
6246
6241
|
Option: Option$1
|
|
6247
6242
|
}, props.components),
|
|
6248
6243
|
isClearable: props.isClearable,
|
|
@@ -6253,10 +6248,10 @@ function CategoryReferenceSearch(props) {
|
|
|
6253
6248
|
onBlur: props.onBlur,
|
|
6254
6249
|
onChange: props.onChange,
|
|
6255
6250
|
value: props.value,
|
|
6256
|
-
placeholderLabel: formatMessage(messages$
|
|
6257
|
-
searchPromptLabel: formatMessage(messages$
|
|
6258
|
-
noResultsLabel: formatMessage(messages$
|
|
6259
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
6251
|
+
placeholderLabel: formatMessage(messages$A.placeholder),
|
|
6252
|
+
searchPromptLabel: formatMessage(messages$A.searchPrompt),
|
|
6253
|
+
noResultsLabel: formatMessage(messages$A.noResults),
|
|
6254
|
+
referenceIsMissingLabel: formatMessage(messages$A.isMissing),
|
|
6260
6255
|
mapItemToOption: mapItemToOption,
|
|
6261
6256
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
6262
6257
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -6338,7 +6333,7 @@ function getCartDiscountById(apolloClient, options) {
|
|
|
6338
6333
|
});
|
|
6339
6334
|
}
|
|
6340
6335
|
|
|
6341
|
-
var messages$
|
|
6336
|
+
var messages$z = defineMessages({
|
|
6342
6337
|
placeholder: {
|
|
6343
6338
|
id: 'CartDiscountReferenceSearch.placeholder',
|
|
6344
6339
|
description: 'Placeholder for search for a cart discount',
|
|
@@ -6366,8 +6361,8 @@ var messages$A = defineMessages({
|
|
|
6366
6361
|
}
|
|
6367
6362
|
});
|
|
6368
6363
|
|
|
6369
|
-
function ownKeys
|
|
6370
|
-
function _objectSpread
|
|
6364
|
+
function ownKeys$$(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6365
|
+
function _objectSpread$$(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$$(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$$(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6371
6366
|
function Option(props) {
|
|
6372
6367
|
var _useApplicationContex = useApplicationContext(function (applicationContext) {
|
|
6373
6368
|
return {
|
|
@@ -6380,7 +6375,7 @@ function Option(props) {
|
|
|
6380
6375
|
var _useIntl = useIntl(),
|
|
6381
6376
|
formatMessage = _useIntl.formatMessage;
|
|
6382
6377
|
var cartDiscount = props.data;
|
|
6383
|
-
return jsx(AsyncSelectInput.Option, _objectSpread
|
|
6378
|
+
return jsx(AsyncSelectInput.Option, _objectSpread$$(_objectSpread$$({}, props), {}, {
|
|
6384
6379
|
children: jsxs("div", {
|
|
6385
6380
|
"data-testid": "cart-discount-option",
|
|
6386
6381
|
children: [jsx(Text.Detail, {
|
|
@@ -6391,14 +6386,14 @@ function Option(props) {
|
|
|
6391
6386
|
fallbackOrder: languages
|
|
6392
6387
|
})
|
|
6393
6388
|
}), jsxs(Text.Detail, {
|
|
6394
|
-
children: [formatMessage(messages$
|
|
6389
|
+
children: [formatMessage(messages$z.key), ": ", cartDiscount.key || NO_VALUE_FALLBACK]
|
|
6395
6390
|
})]
|
|
6396
6391
|
})
|
|
6397
6392
|
}));
|
|
6398
6393
|
}
|
|
6399
6394
|
|
|
6400
|
-
function ownKeys$
|
|
6401
|
-
function _objectSpread$
|
|
6395
|
+
function ownKeys$_(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6396
|
+
function _objectSpread$_(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$_(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$_(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6402
6397
|
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 } } } };
|
|
6403
6398
|
var returnNullIfEmpty = function returnNullIfEmpty(value) {
|
|
6404
6399
|
return value && value.id === '' ? null : value;
|
|
@@ -6429,7 +6424,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
6429
6424
|
language = _useApplicationContex.language,
|
|
6430
6425
|
languages = _useApplicationContex.languages;
|
|
6431
6426
|
var mapItemToOption = useCallback(function (cartDiscount) {
|
|
6432
|
-
return _objectSpread$
|
|
6427
|
+
return _objectSpread$_(_objectSpread$_({}, cartDiscount), {}, {
|
|
6433
6428
|
value: cartDiscount.id,
|
|
6434
6429
|
key: cartDiscount.key,
|
|
6435
6430
|
label: formatLocalizedString(cartDiscount, {
|
|
@@ -6477,10 +6472,10 @@ function CartDiscountReferenceSearch(props) {
|
|
|
6477
6472
|
onBlur: props.onBlur,
|
|
6478
6473
|
onChange: props.onChange,
|
|
6479
6474
|
value: returnNullIfEmpty(props.value),
|
|
6480
|
-
placeholderLabel: formatMessage(messages$
|
|
6481
|
-
searchPromptLabel: formatMessage(messages$
|
|
6482
|
-
noResultsLabel: formatMessage(messages$
|
|
6483
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
6475
|
+
placeholderLabel: formatMessage(messages$z.placeholder),
|
|
6476
|
+
searchPromptLabel: formatMessage(messages$z.searchPrompt),
|
|
6477
|
+
noResultsLabel: formatMessage(messages$z.noResults),
|
|
6478
|
+
referenceIsMissingLabel: formatMessage(messages$z.isMissing),
|
|
6484
6479
|
mapItemToOption: mapItemToOption,
|
|
6485
6480
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
6486
6481
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -6545,7 +6540,7 @@ function CustomCartDiscountReferenceInput(props) {
|
|
|
6545
6540
|
});
|
|
6546
6541
|
}
|
|
6547
6542
|
|
|
6548
|
-
var messages$
|
|
6543
|
+
var messages$y = defineMessages({
|
|
6549
6544
|
noProductsFound: {
|
|
6550
6545
|
id: 'Shared.ProductPickerInput.noProductsFound',
|
|
6551
6546
|
description: 'The message to display when no products were found',
|
|
@@ -6676,7 +6671,7 @@ var ProductPickerInput = function ProductPickerInput(_ref) {
|
|
|
6676
6671
|
children: jsx(AsyncSelectInput, {
|
|
6677
6672
|
id: name,
|
|
6678
6673
|
name: name,
|
|
6679
|
-
placeholder: formatMessage(messages$
|
|
6674
|
+
placeholder: formatMessage(messages$y.placeholder),
|
|
6680
6675
|
loadOptions: loadOptionsDebounced,
|
|
6681
6676
|
defaultOptions: [],
|
|
6682
6677
|
isClearable: isClearable,
|
|
@@ -6691,7 +6686,7 @@ var ProductPickerInput = function ProductPickerInput(_ref) {
|
|
|
6691
6686
|
onBlur: onBlur,
|
|
6692
6687
|
value: currentOption.data,
|
|
6693
6688
|
noOptionsMessage: function noOptionsMessage() {
|
|
6694
|
-
return isLoadingFailed ? null : formatMessage(messages$
|
|
6689
|
+
return isLoadingFailed ? null : formatMessage(messages$y.noProductsFound);
|
|
6695
6690
|
},
|
|
6696
6691
|
hasError: hasError || isLoadingFailed
|
|
6697
6692
|
})
|
|
@@ -6964,8 +6959,8 @@ function CustomBooleanInputSet(props) {
|
|
|
6964
6959
|
}
|
|
6965
6960
|
CustomBooleanInputSet.displayName = 'CustomBooleanInputSet';
|
|
6966
6961
|
|
|
6967
|
-
function ownKeys$
|
|
6968
|
-
function _objectSpread$
|
|
6962
|
+
function ownKeys$Z(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6963
|
+
function _objectSpread$Z(target) { for (var i = 1; i < arguments.length; i++) { var _context7, _context8; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context7 = ownKeys$Z(Object(source), !0)).call(_context7, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context8 = ownKeys$Z(Object(source))).call(_context8, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6969
6964
|
var getTypeName = function getTypeName(type) {
|
|
6970
6965
|
return type.name.toLowerCase();
|
|
6971
6966
|
};
|
|
@@ -7023,7 +7018,7 @@ var nameValuePairsToMap = function nameValuePairsToMap(pairs) {
|
|
|
7023
7018
|
return _reduceInstanceProperty(pairs).call(pairs, function (result, _ref2) {
|
|
7024
7019
|
var name = _ref2.name,
|
|
7025
7020
|
value = _ref2.value;
|
|
7026
|
-
return _objectSpread$
|
|
7021
|
+
return _objectSpread$Z(_objectSpread$Z({}, result), {}, _defineProperty({}, name, value));
|
|
7027
7022
|
}, {});
|
|
7028
7023
|
};
|
|
7029
7024
|
var attributesMapToNameValuePairs = function attributesMapToNameValuePairs(map) {
|
|
@@ -7124,17 +7119,17 @@ var customFieldsMessages = defineMessages({
|
|
|
7124
7119
|
}
|
|
7125
7120
|
});
|
|
7126
7121
|
|
|
7127
|
-
function ownKeys$
|
|
7128
|
-
function _objectSpread$
|
|
7122
|
+
function ownKeys$Y(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7123
|
+
function _objectSpread$Y(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context6 = ownKeys$Y(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context7 = ownKeys$Y(Object(source))).call(_context7, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7129
7124
|
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 } } } };
|
|
7130
7125
|
var mapAttributeDefinition = function mapAttributeDefinition(definition) {
|
|
7131
7126
|
var _context, _definition$type, _definition$type$elem, _context2, _context3, _definition$type2, _context4;
|
|
7132
|
-
return _objectSpread$
|
|
7127
|
+
return _objectSpread$Y(_objectSpread$Y({}, definition), {}, {
|
|
7133
7128
|
required: definition.isRequired,
|
|
7134
7129
|
inputTip: transformLocalizedFieldToLocalizedString(definition.inputTipAllLocales),
|
|
7135
7130
|
label: transformLocalizedFieldToLocalizedString(definition.labelAllLocales),
|
|
7136
|
-
type: _includesInstanceProperty(_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$
|
|
7137
|
-
elementType: _objectSpread$
|
|
7131
|
+
type: _includesInstanceProperty(_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$Y(_objectSpread$Y({}, definition.type), {}, {
|
|
7132
|
+
elementType: _objectSpread$Y(_objectSpread$Y({}, definition.type.elementType), {}, {
|
|
7138
7133
|
values: _mapInstanceProperty(_context2 = _valuesInstanceProperty(definition.type.elementType).results).call(_context2, function (value) {
|
|
7139
7134
|
return {
|
|
7140
7135
|
key: value.key,
|
|
@@ -7142,7 +7137,7 @@ var mapAttributeDefinition = function mapAttributeDefinition(definition) {
|
|
|
7142
7137
|
};
|
|
7143
7138
|
})
|
|
7144
7139
|
})
|
|
7145
|
-
}) : _includesInstanceProperty(_context3 = ['enum', 'lenum']).call(_context3, (_definition$type2 = definition.type) === null || _definition$type2 === void 0 ? void 0 : _definition$type2.name) ? _objectSpread$
|
|
7140
|
+
}) : _includesInstanceProperty(_context3 = ['enum', 'lenum']).call(_context3, (_definition$type2 = definition.type) === null || _definition$type2 === void 0 ? void 0 : _definition$type2.name) ? _objectSpread$Y(_objectSpread$Y({}, definition.type), {}, {
|
|
7146
7141
|
values: _mapInstanceProperty(_context4 = _valuesInstanceProperty(definition.type).results).call(_context4, function (value) {
|
|
7147
7142
|
return {
|
|
7148
7143
|
key: value.key,
|
|
@@ -7185,7 +7180,7 @@ function useNestedProductType(fieldDefinition) {
|
|
|
7185
7180
|
};
|
|
7186
7181
|
}
|
|
7187
7182
|
|
|
7188
|
-
var messages$
|
|
7183
|
+
var messages$x = defineMessages({
|
|
7189
7184
|
updateButton: {
|
|
7190
7185
|
id: 'NestedAttributes.Details.updateButton',
|
|
7191
7186
|
description: 'Update button label',
|
|
@@ -7265,14 +7260,14 @@ var messages$y = defineMessages({
|
|
|
7265
7260
|
|
|
7266
7261
|
var NestingLevelContext = /*#__PURE__*/createContext(0);
|
|
7267
7262
|
|
|
7268
|
-
function ownKeys
|
|
7269
|
-
function _objectSpread
|
|
7263
|
+
function ownKeys$X(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7264
|
+
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(_context = ownKeys$X(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$X(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7270
7265
|
var EditButton = function EditButton(props) {
|
|
7271
7266
|
var _useIntl = useIntl(),
|
|
7272
7267
|
formatMessage = _useIntl.formatMessage;
|
|
7273
7268
|
return jsx(Tooltip$1, {
|
|
7274
7269
|
placement: "top",
|
|
7275
|
-
title: formatMessage(messages$
|
|
7270
|
+
title: formatMessage(messages$x.editTooltip),
|
|
7276
7271
|
children: jsx(IconButton, {
|
|
7277
7272
|
label: "Edit",
|
|
7278
7273
|
isDisabled: props.isDisabled,
|
|
@@ -7288,12 +7283,12 @@ var DropChangesConfirmation = function DropChangesConfirmation(props) {
|
|
|
7288
7283
|
formatMessage = _useIntl2.formatMessage;
|
|
7289
7284
|
return jsx(ConfirmationDialog, {
|
|
7290
7285
|
isOpen: props.isOpen || false,
|
|
7291
|
-
title: formatMessage(messages$
|
|
7292
|
-
labelPrimary: formatMessage(messages$
|
|
7286
|
+
title: formatMessage(messages$x.confirmationDialogTitle),
|
|
7287
|
+
labelPrimary: formatMessage(messages$x.nestedAttributesConfirmLabel),
|
|
7293
7288
|
onConfirm: props.onConfirm,
|
|
7294
7289
|
onCancel: props.onCancel,
|
|
7295
7290
|
children: jsx(Text.Body, {
|
|
7296
|
-
intlMessage: messages$
|
|
7291
|
+
intlMessage: messages$x.confirmationDialogBody
|
|
7297
7292
|
})
|
|
7298
7293
|
});
|
|
7299
7294
|
};
|
|
@@ -7320,11 +7315,11 @@ var NestedAttributeModalPage = function NestedAttributeModalPage(props) {
|
|
|
7320
7315
|
children: [jsx(SecondaryButton, {
|
|
7321
7316
|
isDisabled: !formik.dirty,
|
|
7322
7317
|
iconLeft: jsx(RevertIcon, {}),
|
|
7323
|
-
label: formatMessage(messages$
|
|
7318
|
+
label: formatMessage(messages$x.cancelButton),
|
|
7324
7319
|
onClick: formik.resetForm
|
|
7325
7320
|
}), jsx(CustomFormModalPage.FormPrimaryButton, {
|
|
7326
7321
|
isDisabled: !formik.dirty,
|
|
7327
|
-
label: formatMessage(messages$
|
|
7322
|
+
label: formatMessage(messages$x.updateButton),
|
|
7328
7323
|
onClick: formik.handleSubmit
|
|
7329
7324
|
})]
|
|
7330
7325
|
}),
|
|
@@ -7365,7 +7360,7 @@ var NestedInputControls = function NestedInputControls(props) {
|
|
|
7365
7360
|
if (nextNestingLevel >= 6) return jsx(MaxNestingLevelReached, {});
|
|
7366
7361
|
var hasAttributes = props.productType.attributeDefinitions.length > 0;
|
|
7367
7362
|
if (!hasAttributes) return jsx(Text.Body, {
|
|
7368
|
-
intlMessage: messages$
|
|
7363
|
+
intlMessage: messages$x.emptyProductType,
|
|
7369
7364
|
tone: "secondary"
|
|
7370
7365
|
});
|
|
7371
7366
|
return jsxs(Spacings.Inline, {
|
|
@@ -7417,13 +7412,13 @@ var CustomNestedInput = /*#__PURE__*/memo(function (props) {
|
|
|
7417
7412
|
var valuesAsMap = nameValuePairsToMap(value);
|
|
7418
7413
|
var initialValues = omitUnknownValues(valuesAsMap, attributeDefinitionsAsMap);
|
|
7419
7414
|
var openNestedAttributesForm = function openNestedAttributesForm() {
|
|
7420
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread
|
|
7415
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$X(_objectSpread$X({}, parentFormik.status), {}, {
|
|
7421
7416
|
hideSaveToolbar: true
|
|
7422
7417
|
}));
|
|
7423
7418
|
attributesForm.openModal();
|
|
7424
7419
|
};
|
|
7425
7420
|
var closeNestedAttributesForm = function closeNestedAttributesForm() {
|
|
7426
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread
|
|
7421
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$X(_objectSpread$X({}, parentFormik.status), {}, {
|
|
7427
7422
|
hideSaveToolbar: false
|
|
7428
7423
|
}));
|
|
7429
7424
|
attributesForm.closeModal();
|
|
@@ -7443,7 +7438,7 @@ var CustomNestedInput = /*#__PURE__*/memo(function (props) {
|
|
|
7443
7438
|
if (nestingLevel !== 0) parentFormik.submitForm();else showNotification({
|
|
7444
7439
|
kind: 'success',
|
|
7445
7440
|
domain: DOMAINS.SIDE,
|
|
7446
|
-
text: formatMessage(messages$
|
|
7441
|
+
text: formatMessage(messages$x.attributeUpdateSucceeded)
|
|
7447
7442
|
});
|
|
7448
7443
|
setSubmitting(false);
|
|
7449
7444
|
},
|
|
@@ -7471,7 +7466,7 @@ var CustomNestedInput = /*#__PURE__*/memo(function (props) {
|
|
|
7471
7466
|
});
|
|
7472
7467
|
CustomNestedInput.displayName = 'CustomNestedInput';
|
|
7473
7468
|
|
|
7474
|
-
var styles$
|
|
7469
|
+
var styles$i = {
|
|
7475
7470
|
"divider": "divider-module__divider___4-vdy",
|
|
7476
7471
|
"divider-solid": "divider-module__divider-solid___3Fs4q divider-module__divider___4-vdy",
|
|
7477
7472
|
"divider-dashed": "divider-module__divider-dashed___2Em8A divider-module__divider___4-vdy",
|
|
@@ -7484,7 +7479,7 @@ function Divider(_ref) {
|
|
|
7484
7479
|
size = _ref$size === void 0 ? 's' : _ref$size,
|
|
7485
7480
|
isDashed = _ref.isDashed;
|
|
7486
7481
|
return jsx("hr", {
|
|
7487
|
-
className: classnames((_classnames = {}, _defineProperty(_classnames, styles$
|
|
7482
|
+
className: classnames((_classnames = {}, _defineProperty(_classnames, styles$i['divider-solid'], !isDashed), _defineProperty(_classnames, styles$i['divider-dashed'], isDashed), _defineProperty(_classnames, styles$i.size_s, size === 's'), _defineProperty(_classnames, styles$i.size_m, size === 'm'), _classnames))
|
|
7488
7483
|
});
|
|
7489
7484
|
}
|
|
7490
7485
|
Divider.displayName = 'Divider';
|
|
@@ -7505,14 +7500,14 @@ var ExpandButton = function ExpandButton(props) {
|
|
|
7505
7500
|
};
|
|
7506
7501
|
ExpandButton.displayName = 'ExpandButton';
|
|
7507
7502
|
|
|
7508
|
-
var styles$
|
|
7503
|
+
var styles$h = {
|
|
7509
7504
|
"topAlign": "set-buttons-module__topAlign___3AZwc",
|
|
7510
7505
|
"gap": "set-buttons-module__gap___38Qr0"
|
|
7511
7506
|
}; // TODO(pa3): alignment of buttons made in a kinda ugly way (i.e. gap class).
|
|
7512
7507
|
// have to find a better way to do it.
|
|
7513
7508
|
var SetButtons = function SetButtons(props) {
|
|
7514
7509
|
return jsx("div", {
|
|
7515
|
-
className: props.isTopAligned ? styles$
|
|
7510
|
+
className: props.isTopAligned ? styles$h.topAlign : undefined,
|
|
7516
7511
|
children: jsxs(Spacings.Inline, {
|
|
7517
7512
|
children: [jsx(IconButton, {
|
|
7518
7513
|
label: "Remove value",
|
|
@@ -7527,15 +7522,15 @@ var SetButtons = function SetButtons(props) {
|
|
|
7527
7522
|
size: "medium",
|
|
7528
7523
|
icon: jsx(PlusBoldIcon, {})
|
|
7529
7524
|
}) : jsx("div", {
|
|
7530
|
-
className: styles$
|
|
7525
|
+
className: styles$h.gap
|
|
7531
7526
|
})]
|
|
7532
7527
|
})
|
|
7533
7528
|
});
|
|
7534
7529
|
};
|
|
7535
7530
|
SetButtons.displayName = 'SetButtons';
|
|
7536
7531
|
|
|
7537
|
-
function ownKeys$
|
|
7538
|
-
function _objectSpread$
|
|
7532
|
+
function ownKeys$W(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7533
|
+
function _objectSpread$W(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context6 = ownKeys$W(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context7 = ownKeys$W(Object(source))).call(_context7, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7539
7534
|
var getDuplicateErrors = function getDuplicateErrors(setValues) {
|
|
7540
7535
|
/* eslint-disable no-plusplus */
|
|
7541
7536
|
var result = [];
|
|
@@ -7610,7 +7605,7 @@ function CustomInputSet(props) {
|
|
|
7610
7605
|
touched = _useFormikContext.touched,
|
|
7611
7606
|
isSubmitting = _useFormikContext.isSubmitting,
|
|
7612
7607
|
dirty = _useFormikContext.dirty;
|
|
7613
|
-
var itemFieldDefintion = _objectSpread$
|
|
7608
|
+
var itemFieldDefintion = _objectSpread$W(_objectSpread$W({}, props.fieldDefinition), {}, {
|
|
7614
7609
|
type: props.fieldDefinition.type.elementType
|
|
7615
7610
|
});
|
|
7616
7611
|
var value = useMemo(function () {
|
|
@@ -7776,7 +7771,7 @@ var CustomFieldInput = /*#__PURE__*/memo(function (props) {
|
|
|
7776
7771
|
});
|
|
7777
7772
|
CustomFieldInput.displayName = 'CustomFieldInput';
|
|
7778
7773
|
|
|
7779
|
-
var messages$
|
|
7774
|
+
var messages$w = defineMessages({
|
|
7780
7775
|
referencedProductType: {
|
|
7781
7776
|
id: 'NestedAttributes.referencedProductType',
|
|
7782
7777
|
description: 'Product type referenced hint',
|
|
@@ -7784,10 +7779,10 @@ var messages$x = defineMessages({
|
|
|
7784
7779
|
}
|
|
7785
7780
|
});
|
|
7786
7781
|
|
|
7787
|
-
function ownKeys$
|
|
7788
|
-
function _objectSpread$
|
|
7782
|
+
function ownKeys$V(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7783
|
+
function _objectSpread$V(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$V(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$V(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7789
7784
|
function ProductTypeReference(props) {
|
|
7790
|
-
var productTypeMessage = _objectSpread$
|
|
7785
|
+
var productTypeMessage = _objectSpread$V(_objectSpread$V({}, messages$w.referencedProductType), {}, {
|
|
7791
7786
|
values: {
|
|
7792
7787
|
productTypeName: props.productType.name
|
|
7793
7788
|
}
|
|
@@ -7833,14 +7828,14 @@ function CustomNestedFieldInput(props) {
|
|
|
7833
7828
|
}
|
|
7834
7829
|
CustomNestedFieldInput.displayName = 'CustomNestedFieldInput';
|
|
7835
7830
|
|
|
7836
|
-
function _createSuper$
|
|
7837
|
-
function _isNativeReflectConstruct$
|
|
7831
|
+
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(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7832
|
+
function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
7838
7833
|
var isEmptyChildren = function isEmptyChildren(children) {
|
|
7839
7834
|
return Children.count(children) === 0;
|
|
7840
7835
|
};
|
|
7841
7836
|
var Match = /*#__PURE__*/function (_PureComponent) {
|
|
7842
7837
|
_inherits(Match, _PureComponent);
|
|
7843
|
-
var _super = _createSuper$
|
|
7838
|
+
var _super = _createSuper$7(Match);
|
|
7844
7839
|
function Match() {
|
|
7845
7840
|
_classCallCheck(this, Match);
|
|
7846
7841
|
return _super.apply(this, arguments);
|
|
@@ -7859,8 +7854,8 @@ var Match = /*#__PURE__*/function (_PureComponent) {
|
|
|
7859
7854
|
}(PureComponent);
|
|
7860
7855
|
Match.displayName = 'ValidationErrorMatch';
|
|
7861
7856
|
|
|
7862
|
-
function _createSuper$
|
|
7863
|
-
function _isNativeReflectConstruct$
|
|
7857
|
+
function _createSuper$6(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$6(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7858
|
+
function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
7864
7859
|
var hasUnknownChildren = function hasUnknownChildren(children) {
|
|
7865
7860
|
var _context;
|
|
7866
7861
|
return _someInstanceProperty(_context = Children.toArray(children)).call(_context, function (child) {
|
|
@@ -7872,7 +7867,7 @@ var hasError = function hasError(errors, rule) {
|
|
|
7872
7867
|
};
|
|
7873
7868
|
var Switch = /*#__PURE__*/function (_PureComponent) {
|
|
7874
7869
|
_inherits(Switch, _PureComponent);
|
|
7875
|
-
var _super = _createSuper$
|
|
7870
|
+
var _super = _createSuper$6(Switch);
|
|
7876
7871
|
function Switch() {
|
|
7877
7872
|
_classCallCheck(this, Switch);
|
|
7878
7873
|
return _super.apply(this, arguments);
|
|
@@ -7911,11 +7906,11 @@ var ValidationError = {
|
|
|
7911
7906
|
Match: Match
|
|
7912
7907
|
};
|
|
7913
7908
|
|
|
7914
|
-
function ownKeys$
|
|
7915
|
-
function _objectSpread$
|
|
7909
|
+
function ownKeys$U(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7910
|
+
function _objectSpread$U(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$U(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$U(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7916
7911
|
var mergeSetItemsErrors = function mergeSetItemsErrors(errors) {
|
|
7917
7912
|
return _reduceInstanceProperty(errors).call(errors, function (result, itemErrors) {
|
|
7918
|
-
return _objectSpread$
|
|
7913
|
+
return _objectSpread$U(_objectSpread$U({}, result), itemErrors);
|
|
7919
7914
|
}, {});
|
|
7920
7915
|
};
|
|
7921
7916
|
|
|
@@ -7932,19 +7927,19 @@ var CustomFieldErrors = function CustomFieldErrors(props) {
|
|
|
7932
7927
|
children: [jsx(ValidationError.Match, {
|
|
7933
7928
|
rule: "missing",
|
|
7934
7929
|
children: jsx(ErrorMessage, {
|
|
7935
|
-
intlMessage: messages$
|
|
7930
|
+
intlMessage: messages$J.required
|
|
7936
7931
|
})
|
|
7937
7932
|
}), jsx(ValidationError.Match, {
|
|
7938
7933
|
rule: "duplicated",
|
|
7939
7934
|
children: jsx(ErrorMessage, {
|
|
7940
|
-
intlMessage: messages$
|
|
7935
|
+
intlMessage: messages$J.unique
|
|
7941
7936
|
})
|
|
7942
7937
|
})]
|
|
7943
7938
|
});
|
|
7944
7939
|
};
|
|
7945
7940
|
CustomFieldErrors.displayName = 'CustomFieldErrors';
|
|
7946
7941
|
|
|
7947
|
-
var messages$
|
|
7942
|
+
var messages$v = defineMessages({
|
|
7948
7943
|
productReferenceLabel: {
|
|
7949
7944
|
id: 'CustomFieldsLabel.productReferenceLabel',
|
|
7950
7945
|
description: 'Label shown above the product picker input.',
|
|
@@ -7977,8 +7972,8 @@ var messages$w = defineMessages({
|
|
|
7977
7972
|
}
|
|
7978
7973
|
});
|
|
7979
7974
|
|
|
7980
|
-
function ownKeys$
|
|
7981
|
-
function _objectSpread$
|
|
7975
|
+
function ownKeys$T(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7976
|
+
function _objectSpread$T(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$T(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$T(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7982
7977
|
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 } } } };
|
|
7983
7978
|
var CustomFieldsLabelHint = function CustomFieldsLabelHint(_ref) {
|
|
7984
7979
|
var _type$name;
|
|
@@ -8011,7 +8006,7 @@ var CustomFieldsLabelHint = function CustomFieldsLabelHint(_ref) {
|
|
|
8011
8006
|
alignItems: "flex-start",
|
|
8012
8007
|
children: [jsx(InformationIcon, {
|
|
8013
8008
|
size: "medium"
|
|
8014
|
-
}), jsx(FormattedMessage, _objectSpread$
|
|
8009
|
+
}), jsx(FormattedMessage, _objectSpread$T({}, messages$v.cartDiscountMoreThan500))]
|
|
8015
8010
|
})
|
|
8016
8011
|
});
|
|
8017
8012
|
}
|
|
@@ -8026,8 +8021,8 @@ function CustomFieldsProductTypeReferenceSubtitle() {
|
|
|
8026
8021
|
formatMessage = _useIntl.formatMessage;
|
|
8027
8022
|
var _usePimStatus = usePimStatus(),
|
|
8028
8023
|
isProjectIndexed = _usePimStatus.isProjectIndexed;
|
|
8029
|
-
if (isProjectIndexed) return formatMessage(messages$
|
|
8030
|
-
return formatMessage(messages$
|
|
8024
|
+
if (isProjectIndexed) return formatMessage(messages$v.productTypeReferenceLabelI);
|
|
8025
|
+
return formatMessage(messages$v.productTypeReferenceLabel);
|
|
8031
8026
|
}
|
|
8032
8027
|
|
|
8033
8028
|
// TODO(pa3): this logic may be misplaced and probably
|
|
@@ -8043,7 +8038,7 @@ function CustomFieldsLabelSubtitle(_ref2) {
|
|
|
8043
8038
|
var referenceTypeId = type.referenceTypeId;
|
|
8044
8039
|
var referenceTypeName = capitalizeFirst(referenceTypeId);
|
|
8045
8040
|
if (_includesInstanceProperty(_context = [SEARCHABLE_REFERENCES.category, SEARCHABLE_REFERENCES.cartDiscount]).call(_context, referenceTypeId)) return referenceTypeName;
|
|
8046
|
-
return referenceTypeId === SEARCHABLE_REFERENCES.product ? formatMessage(messages$
|
|
8041
|
+
return referenceTypeId === SEARCHABLE_REFERENCES.product ? formatMessage(messages$v.productReferenceLabel) : referenceTypeId === SEARCHABLE_REFERENCES.productType ? jsx(CustomFieldsProductTypeReferenceSubtitle, {}) : referenceTypeId === SEARCHABLE_REFERENCES.channel ? formatMessage(messages$v.channelReferenceLabel) : referenceTypeId === SEARCHABLE_REFERENCES.state ? formatMessage(messages$v.stateReferenceLabel) : "".concat(referenceTypeName, " ID");
|
|
8047
8042
|
}
|
|
8048
8043
|
var CustomFieldsLabel = /*#__PURE__*/memo(function (_ref3) {
|
|
8049
8044
|
var name = _ref3.name,
|
|
@@ -8458,8 +8453,8 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
8458
8453
|
});
|
|
8459
8454
|
}
|
|
8460
8455
|
|
|
8461
|
-
function ownKeys$
|
|
8462
|
-
function _objectSpread$
|
|
8456
|
+
function ownKeys$S(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8457
|
+
function _objectSpread$S(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$S(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$S(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8463
8458
|
var components = {
|
|
8464
8459
|
// eslint-disable-next-line react/display-name
|
|
8465
8460
|
Option: function Option(optionInnerProps) {
|
|
@@ -8474,7 +8469,7 @@ function ProductSelectionsPicker(props) {
|
|
|
8474
8469
|
if (productSelectionsTotalFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
8475
8470
|
var CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= props.lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= props.upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
|
|
8476
8471
|
return jsx(Spacings.Stack, {
|
|
8477
|
-
children: jsx(CustomProductSelectionsPicker, _objectSpread$
|
|
8472
|
+
children: jsx(CustomProductSelectionsPicker, _objectSpread$S(_objectSpread$S({}, props), {}, {
|
|
8478
8473
|
components: components
|
|
8479
8474
|
}))
|
|
8480
8475
|
});
|
|
@@ -8491,7 +8486,7 @@ ProductSelectionsPicker.defaultProps = {
|
|
|
8491
8486
|
|
|
8492
8487
|
var COUNTRIES_ASYNC_LOADING_LIMIT = 60;
|
|
8493
8488
|
|
|
8494
|
-
var messages$
|
|
8489
|
+
var messages$u = defineMessages({
|
|
8495
8490
|
countriesBasicSelectPlaceholder: {
|
|
8496
8491
|
id: 'CountriesPicker.countriesBasicSelectPlaceholder',
|
|
8497
8492
|
description: 'Placeholder of the basic field for countries',
|
|
@@ -8519,7 +8514,7 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
8519
8514
|
value: props.value,
|
|
8520
8515
|
isRequired: props.isRequired,
|
|
8521
8516
|
description: props.description,
|
|
8522
|
-
placeholder: intl.formatMessage(messages$
|
|
8517
|
+
placeholder: intl.formatMessage(messages$u.countriesBasicSelectPlaceholder),
|
|
8523
8518
|
options: props.options,
|
|
8524
8519
|
onChange: props.onChange,
|
|
8525
8520
|
isDisabled: props.isDisabled,
|
|
@@ -8529,11 +8524,11 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
8529
8524
|
});
|
|
8530
8525
|
}
|
|
8531
8526
|
|
|
8532
|
-
function ownKeys$
|
|
8533
|
-
function _objectSpread$
|
|
8527
|
+
function ownKeys$R(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8528
|
+
function _objectSpread$R(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context5 = ownKeys$R(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context6 = ownKeys$R(Object(source))).call(_context6, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8534
8529
|
var emptyCountryOption = function emptyCountryOption(intl) {
|
|
8535
8530
|
return [{
|
|
8536
|
-
label: intl.formatMessage(messages$
|
|
8531
|
+
label: intl.formatMessage(messages$u.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
8537
8532
|
value: undefined,
|
|
8538
8533
|
isDisabled: true
|
|
8539
8534
|
}];
|
|
@@ -8578,7 +8573,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8578
8573
|
var onOptionChange = function onOptionChange(event) {
|
|
8579
8574
|
var countries = event.target.value;
|
|
8580
8575
|
props.onChange({
|
|
8581
|
-
target: _objectSpread$
|
|
8576
|
+
target: _objectSpread$R(_objectSpread$R({}, event.target), {}, {
|
|
8582
8577
|
value: _mapInstanceProperty(countries).call(countries, function (country) {
|
|
8583
8578
|
var _country$value;
|
|
8584
8579
|
return (_country$value = country === null || country === void 0 ? void 0 : country.value) !== null && _country$value !== void 0 ? _country$value : country;
|
|
@@ -8601,7 +8596,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8601
8596
|
return country.value === countryCode;
|
|
8602
8597
|
});
|
|
8603
8598
|
}),
|
|
8604
|
-
placeholder: intl.formatMessage(messages$
|
|
8599
|
+
placeholder: intl.formatMessage(messages$u.countriesAsyncSelectPlaceholder),
|
|
8605
8600
|
loadOptions: handleLoadOptions,
|
|
8606
8601
|
onChange: onOptionChange,
|
|
8607
8602
|
isDisabled: props.isDisabled,
|
|
@@ -8611,13 +8606,13 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8611
8606
|
});
|
|
8612
8607
|
}
|
|
8613
8608
|
|
|
8614
|
-
function ownKeys$
|
|
8615
|
-
function _objectSpread$
|
|
8609
|
+
function ownKeys$Q(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8610
|
+
function _objectSpread$Q(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$Q(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$Q(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8616
8611
|
function CountriesPicker(props) {
|
|
8617
8612
|
var _props$options;
|
|
8618
8613
|
var CustomCountriesPicker = ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.length) <= props.countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
|
|
8619
8614
|
return jsx(Spacings.Stack, {
|
|
8620
|
-
children: jsx(CustomCountriesPicker, _objectSpread$
|
|
8615
|
+
children: jsx(CustomCountriesPicker, _objectSpread$Q({}, props))
|
|
8621
8616
|
});
|
|
8622
8617
|
}
|
|
8623
8618
|
CountriesPicker.defaultProps = {
|
|
@@ -8673,7 +8668,7 @@ var getFirst60Options$1 = function getFirst60Options(storesOptions, currentValue
|
|
|
8673
8668
|
return _sliceInstanceProperty(storesOptions).call(storesOptions, 0, LOWER_STORES_LIMIT + currentValuesLength);
|
|
8674
8669
|
};
|
|
8675
8670
|
|
|
8676
|
-
var messages$
|
|
8671
|
+
var messages$t = defineMessages({
|
|
8677
8672
|
basicSelectInputPlaceholder: {
|
|
8678
8673
|
id: 'Shared.StoreSelectInput.basicSelectInputPlaceholder',
|
|
8679
8674
|
description: 'The placeholder shown for basic select input',
|
|
@@ -8706,8 +8701,8 @@ var messages$u = defineMessages({
|
|
|
8706
8701
|
}
|
|
8707
8702
|
});
|
|
8708
8703
|
|
|
8709
|
-
function ownKeys$
|
|
8710
|
-
function _objectSpread$
|
|
8704
|
+
function ownKeys$P(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8705
|
+
function _objectSpread$P(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context6 = ownKeys$P(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context7 = ownKeys$P(Object(source))).call(_context7, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8711
8706
|
var hasErrors$5 = function hasErrors(errors) {
|
|
8712
8707
|
var _context;
|
|
8713
8708
|
return errors && _someInstanceProperty(_context = _Object$values(errors)).call(_context, Boolean);
|
|
@@ -8737,7 +8732,7 @@ var getValueFromOptions$1 = function getValueFromOptions(_ref) {
|
|
|
8737
8732
|
};
|
|
8738
8733
|
var emptyStoreOption = function emptyStoreOption(intl) {
|
|
8739
8734
|
return [{
|
|
8740
|
-
label: intl.formatMessage(messages$
|
|
8735
|
+
label: intl.formatMessage(messages$t.asyncSelectDropdownTypeAheadPrompt),
|
|
8741
8736
|
value: undefined,
|
|
8742
8737
|
isDisabled: true
|
|
8743
8738
|
}];
|
|
@@ -8810,10 +8805,10 @@ var StoresAsyncSelectInput = function StoresAsyncSelectInput(props) {
|
|
|
8810
8805
|
}();
|
|
8811
8806
|
if (storesListFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
8812
8807
|
return jsxs(Fragment, {
|
|
8813
|
-
children: [jsx(AsyncSelectInput, _objectSpread$
|
|
8808
|
+
children: [jsx(AsyncSelectInput, _objectSpread$P(_objectSpread$P({
|
|
8814
8809
|
id: props.id,
|
|
8815
8810
|
name: props.name,
|
|
8816
|
-
placeholder: intl.formatMessage(messages$
|
|
8811
|
+
placeholder: intl.formatMessage(messages$t.basicSelectInputPlaceholder),
|
|
8817
8812
|
horizontalConstraint: props.horizontalConstraint,
|
|
8818
8813
|
loadOptions: handleLoadOptions,
|
|
8819
8814
|
defaultOptions: true,
|
|
@@ -8852,8 +8847,8 @@ StoresAsyncSelectInput.defaultProps = {
|
|
|
8852
8847
|
shouldFetchProductSelections: false
|
|
8853
8848
|
};
|
|
8854
8849
|
|
|
8855
|
-
function ownKeys$
|
|
8856
|
-
function _objectSpread$
|
|
8850
|
+
function ownKeys$O(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8851
|
+
function _objectSpread$O(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context3 = ownKeys$O(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context4 = ownKeys$O(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8857
8852
|
var hasErrors$4 = function hasErrors(errors) {
|
|
8858
8853
|
var _context;
|
|
8859
8854
|
return errors && _someInstanceProperty(_context = _Object$values(errors)).call(_context, Boolean);
|
|
@@ -8907,10 +8902,10 @@ var StoresBasicSelectInput = function StoresBasicSelectInput(props) {
|
|
|
8907
8902
|
};
|
|
8908
8903
|
if (storesListFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
8909
8904
|
return jsxs(Fragment, {
|
|
8910
|
-
children: [jsx(SelectInput, _objectSpread$
|
|
8905
|
+
children: [jsx(SelectInput, _objectSpread$O(_objectSpread$O({
|
|
8911
8906
|
id: props.id,
|
|
8912
8907
|
name: props.name,
|
|
8913
|
-
placeholder: intl.formatMessage(messages$
|
|
8908
|
+
placeholder: intl.formatMessage(messages$t.basicSelectInputPlaceholder),
|
|
8914
8909
|
horizontalConstraint: props.horizontalConstraint,
|
|
8915
8910
|
options: mappedStoresListOptions,
|
|
8916
8911
|
isMulti: props.isMulti,
|
|
@@ -9006,8 +9001,8 @@ var useStoresByFieldFetcher = function useStoresByFieldFetcher(stores, predicate
|
|
|
9006
9001
|
};
|
|
9007
9002
|
};
|
|
9008
9003
|
|
|
9009
|
-
function ownKeys$
|
|
9010
|
-
function _objectSpread$
|
|
9004
|
+
function ownKeys$N(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9005
|
+
function _objectSpread$N(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context6 = ownKeys$N(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context7 = ownKeys$N(Object(source))).call(_context7, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9011
9006
|
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 } } } };
|
|
9012
9007
|
var hasErrors$3 = function hasErrors(errors) {
|
|
9013
9008
|
var _context;
|
|
@@ -9115,10 +9110,10 @@ var StoresSearchSelectInput = function StoresSearchSelectInput(props) {
|
|
|
9115
9110
|
var loadOptionsDebounced = debounce(handleLoadOptions, 500);
|
|
9116
9111
|
if (storesByFieldFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
9117
9112
|
return jsxs(Fragment, {
|
|
9118
|
-
children: [jsx(SearchSelectInput, _objectSpread$
|
|
9113
|
+
children: [jsx(SearchSelectInput, _objectSpread$N(_objectSpread$N({
|
|
9119
9114
|
id: props.id,
|
|
9120
9115
|
name: props.name,
|
|
9121
|
-
placeholder: intl.formatMessage(messages$
|
|
9116
|
+
placeholder: intl.formatMessage(messages$t.searchSelectInputPlaceholder),
|
|
9122
9117
|
horizontalConstraint: props.horizontalConstraint,
|
|
9123
9118
|
loadOptions: loadOptionsDebounced,
|
|
9124
9119
|
defaultOptions: false,
|
|
@@ -9132,9 +9127,9 @@ var StoresSearchSelectInput = function StoresSearchSelectInput(props) {
|
|
|
9132
9127
|
}),
|
|
9133
9128
|
onChange: props.onChange,
|
|
9134
9129
|
onBlur: props.onBlur,
|
|
9135
|
-
loadingMessage: intl.formatMessage(messages$
|
|
9130
|
+
loadingMessage: intl.formatMessage(messages$t.searchSelectInputLoadingMessage),
|
|
9136
9131
|
noOptionsMessage: function noOptionsMessage() {
|
|
9137
|
-
return intl.formatMessage(messages$
|
|
9132
|
+
return intl.formatMessage(messages$t.searchSelectInputNoOptionsFoundMessage);
|
|
9138
9133
|
},
|
|
9139
9134
|
isDisabled: props.isDisabled || storesByFieldFetcher.isLoading,
|
|
9140
9135
|
isReadOnly: props.isReadOnly,
|
|
@@ -9162,8 +9157,8 @@ StoresSearchSelectInput.defaultProps = {
|
|
|
9162
9157
|
shouldFetchProductSelections: false
|
|
9163
9158
|
};
|
|
9164
9159
|
|
|
9165
|
-
function ownKeys$
|
|
9166
|
-
function _objectSpread$
|
|
9160
|
+
function ownKeys$M(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9161
|
+
function _objectSpread$M(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$M(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$M(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9167
9162
|
var StoreSelectInput = function StoreSelectInput(props) {
|
|
9168
9163
|
var totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher(props.projectKey);
|
|
9169
9164
|
var components = useMemo(function () {
|
|
@@ -9171,7 +9166,7 @@ var StoreSelectInput = function StoreSelectInput(props) {
|
|
|
9171
9166
|
// eslint-disable-next-line react/display-name
|
|
9172
9167
|
Option: function Option(optionInnerProps) {
|
|
9173
9168
|
if (optionInnerProps.isDisabled) {
|
|
9174
|
-
return jsx(SelectInput.Option, _objectSpread$
|
|
9169
|
+
return jsx(SelectInput.Option, _objectSpread$M({}, optionInnerProps));
|
|
9175
9170
|
}
|
|
9176
9171
|
return jsx(CustomSelectInputOption, {
|
|
9177
9172
|
optionType: props.optionType,
|
|
@@ -9182,7 +9177,7 @@ var StoreSelectInput = function StoreSelectInput(props) {
|
|
|
9182
9177
|
}, [props.optionType]);
|
|
9183
9178
|
if (totalNumberOfStoresFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
9184
9179
|
var CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput : StoresSearchSelectInput;
|
|
9185
|
-
return jsx(CustomStoreSelectInput, _objectSpread$
|
|
9180
|
+
return jsx(CustomStoreSelectInput, _objectSpread$M(_objectSpread$M({
|
|
9186
9181
|
projectKey: props.projectKey,
|
|
9187
9182
|
id: props.id,
|
|
9188
9183
|
name: props.name,
|
|
@@ -9221,12 +9216,12 @@ StoreSelectInput.defaultProps = {
|
|
|
9221
9216
|
shouldFetchProductSelections: false
|
|
9222
9217
|
};
|
|
9223
9218
|
|
|
9224
|
-
function ownKeys$
|
|
9225
|
-
function _objectSpread$
|
|
9219
|
+
function ownKeys$L(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9220
|
+
function _objectSpread$L(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$L(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$L(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9226
9221
|
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 } } } };
|
|
9227
9222
|
var createQueryVariables$3 = function createQueryVariables(ownProps) {
|
|
9228
9223
|
var _context;
|
|
9229
|
-
return _objectSpread$
|
|
9224
|
+
return _objectSpread$L(_objectSpread$L({
|
|
9230
9225
|
limit: ownProps.limit,
|
|
9231
9226
|
offset: ownProps.offset,
|
|
9232
9227
|
sort: _sortInstanceProperty(ownProps)
|
|
@@ -9305,7 +9300,7 @@ var getFirst60Options = function getFirst60Options(businessUnitOptions, currentV
|
|
|
9305
9300
|
return _sliceInstanceProperty(businessUnitOptions).call(businessUnitOptions, 0, LOWER_BUSINESS_UNITS_LIMIT + currentValuesLength);
|
|
9306
9301
|
};
|
|
9307
9302
|
|
|
9308
|
-
var messages$
|
|
9303
|
+
var messages$s = defineMessages({
|
|
9309
9304
|
asyncSelectInputPlaceholder: {
|
|
9310
9305
|
id: 'Shared.BusinessUnitSelectInput.asyncSelectInputPlaceholder',
|
|
9311
9306
|
description: 'The placeholder shown for async select input',
|
|
@@ -9333,8 +9328,8 @@ var messages$t = defineMessages({
|
|
|
9333
9328
|
}
|
|
9334
9329
|
});
|
|
9335
9330
|
|
|
9336
|
-
function ownKeys$
|
|
9337
|
-
function _objectSpread$
|
|
9331
|
+
function ownKeys$K(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9332
|
+
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(_context5 = ownKeys$K(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context6 = ownKeys$K(Object(source))).call(_context6, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9338
9333
|
var hasErrors$2 = function hasErrors(errors) {
|
|
9339
9334
|
var _context;
|
|
9340
9335
|
return errors && _someInstanceProperty(_context = _Object$values(errors)).call(_context, Boolean);
|
|
@@ -9405,10 +9400,10 @@ var BusinessUnitAsyncSelectInput = function BusinessUnitAsyncSelectInput(props)
|
|
|
9405
9400
|
};
|
|
9406
9401
|
if (businessUnitsListFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
9407
9402
|
return jsxs(Fragment, {
|
|
9408
|
-
children: [jsx(AsyncSelectInput, _objectSpread$
|
|
9403
|
+
children: [jsx(AsyncSelectInput, _objectSpread$K(_objectSpread$K({
|
|
9409
9404
|
id: props.id,
|
|
9410
9405
|
name: props.name,
|
|
9411
|
-
placeholder: props.placeholder || intl.formatMessage(messages$
|
|
9406
|
+
placeholder: props.placeholder || intl.formatMessage(messages$s.asyncSelectInputPlaceholder),
|
|
9412
9407
|
horizontalConstraint: props.horizontalConstraint,
|
|
9413
9408
|
loadOptions: handleLoadOptions,
|
|
9414
9409
|
defaultOptions: getDefaultOptions(),
|
|
@@ -9441,8 +9436,8 @@ BusinessUnitAsyncSelectInput.defaultProps = {
|
|
|
9441
9436
|
shouldFetchProductSelections: false
|
|
9442
9437
|
};
|
|
9443
9438
|
|
|
9444
|
-
function ownKeys$
|
|
9445
|
-
function _objectSpread$
|
|
9439
|
+
function ownKeys$J(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9440
|
+
function _objectSpread$J(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$J(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$J(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9446
9441
|
var hasErrors$1 = function hasErrors(errors) {
|
|
9447
9442
|
var _context;
|
|
9448
9443
|
return errors && _someInstanceProperty(_context = _Object$values(errors)).call(_context, Boolean);
|
|
@@ -9477,10 +9472,10 @@ var BusinessUnitBasicSelectInput = function BusinessUnitBasicSelectInput(props)
|
|
|
9477
9472
|
};
|
|
9478
9473
|
if (businessUnitsListFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
9479
9474
|
return jsxs(Fragment, {
|
|
9480
|
-
children: [jsx(SelectInput, _objectSpread$
|
|
9475
|
+
children: [jsx(SelectInput, _objectSpread$J(_objectSpread$J({
|
|
9481
9476
|
id: props.id,
|
|
9482
9477
|
name: props.name,
|
|
9483
|
-
placeholder: props.placeholder || intl.formatMessage(messages$
|
|
9478
|
+
placeholder: props.placeholder || intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
9484
9479
|
horizontalConstraint: props.horizontalConstraint,
|
|
9485
9480
|
options: mappedBusinessUnitsOptions,
|
|
9486
9481
|
value: (_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.value,
|
|
@@ -9568,8 +9563,8 @@ var handlers$1 = {
|
|
|
9568
9563
|
}
|
|
9569
9564
|
};
|
|
9570
9565
|
|
|
9571
|
-
function ownKeys$
|
|
9572
|
-
function _objectSpread$
|
|
9566
|
+
function ownKeys$I(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9567
|
+
function _objectSpread$I(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context4 = ownKeys$I(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context5 = ownKeys$I(Object(source))).call(_context5, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9573
9568
|
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 } } } };
|
|
9574
9569
|
var hasErrors = function hasErrors(errors) {
|
|
9575
9570
|
var _context;
|
|
@@ -9620,19 +9615,19 @@ var BusinessUnitSearchSelectInput = function BusinessUnitSearchSelectInput(props
|
|
|
9620
9615
|
var loadOptionsDebounced = debounce(handleLoadOptions, 500);
|
|
9621
9616
|
if (businessUnitsByFieldFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
9622
9617
|
return jsxs(Fragment, {
|
|
9623
|
-
children: [jsx(SearchSelectInput, _objectSpread$
|
|
9618
|
+
children: [jsx(SearchSelectInput, _objectSpread$I(_objectSpread$I({
|
|
9624
9619
|
id: props.id,
|
|
9625
9620
|
name: props.name,
|
|
9626
|
-
placeholder: props.placeholder || intl.formatMessage(messages$
|
|
9621
|
+
placeholder: props.placeholder || intl.formatMessage(messages$s.searchSelectInputPlaceholder),
|
|
9627
9622
|
horizontalConstraint: props.horizontalConstraint,
|
|
9628
9623
|
loadOptions: loadOptionsDebounced,
|
|
9629
9624
|
defaultOptions: false,
|
|
9630
9625
|
value: props.value,
|
|
9631
9626
|
onChange: handleChange,
|
|
9632
9627
|
onBlur: props.onBlur,
|
|
9633
|
-
loadingMessage: intl.formatMessage(messages$
|
|
9628
|
+
loadingMessage: intl.formatMessage(messages$s.searchSelectInputLoadingMessage),
|
|
9634
9629
|
noOptionsMessage: function noOptionsMessage() {
|
|
9635
|
-
return intl.formatMessage(messages$
|
|
9630
|
+
return intl.formatMessage(messages$s.searchSelectInputNoOptionsFoundMessage);
|
|
9636
9631
|
},
|
|
9637
9632
|
isDisabled: props.isDisabled || businessUnitsByFieldFetcher.isLoading,
|
|
9638
9633
|
isReadOnly: props.isReadOnly,
|
|
@@ -9660,8 +9655,8 @@ BusinessUnitSearchSelectInput.defaultProps = {
|
|
|
9660
9655
|
shouldFetchProductSelections: false
|
|
9661
9656
|
};
|
|
9662
9657
|
|
|
9663
|
-
function ownKeys$
|
|
9664
|
-
function _objectSpread$
|
|
9658
|
+
function ownKeys$H(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9659
|
+
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(_context = ownKeys$H(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$H(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9665
9660
|
var BusinessUnitSelectInput = function BusinessUnitSelectInput(props) {
|
|
9666
9661
|
var totalNumberOfBusinessUnitsFetcher = useTotalNumberOfBusinessUnitsFetcher();
|
|
9667
9662
|
var components = useMemo(function () {
|
|
@@ -9669,7 +9664,7 @@ var BusinessUnitSelectInput = function BusinessUnitSelectInput(props) {
|
|
|
9669
9664
|
// eslint-disable-next-line react/display-name
|
|
9670
9665
|
Option: function Option(optionInnerProps) {
|
|
9671
9666
|
if (optionInnerProps.isDisabled) {
|
|
9672
|
-
return jsx(SelectInput.Option, _objectSpread$
|
|
9667
|
+
return jsx(SelectInput.Option, _objectSpread$H({}, optionInnerProps));
|
|
9673
9668
|
}
|
|
9674
9669
|
return jsx(CustomSelectInputOption, {
|
|
9675
9670
|
optionType: props.optionType,
|
|
@@ -9680,7 +9675,7 @@ var BusinessUnitSelectInput = function BusinessUnitSelectInput(props) {
|
|
|
9680
9675
|
}, [props.optionType]);
|
|
9681
9676
|
if (totalNumberOfBusinessUnitsFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
9682
9677
|
var CustomSelectInput = totalNumberOfBusinessUnitsFetcher.total <= props.lowerBusinessUnitsLimit ? BusinessUnitBasicSelectInput : totalNumberOfBusinessUnitsFetcher.total <= props.upperBusinessUnitsLimit ? BusinessUnitAsyncSelectInput : BusinessUnitSearchSelectInput;
|
|
9683
|
-
return jsx(CustomSelectInput, _objectSpread$
|
|
9678
|
+
return jsx(CustomSelectInput, _objectSpread$H(_objectSpread$H({
|
|
9684
9679
|
id: props.id,
|
|
9685
9680
|
name: props.name,
|
|
9686
9681
|
components: components,
|
|
@@ -9721,7 +9716,7 @@ BusinessUnitSelectInput.defaultProps = {
|
|
|
9721
9716
|
// https://github.com/sphereio/sphere-backend/blob/master/ws/core/users.md#-businessrole
|
|
9722
9717
|
var businessRoleKeys = ['ExecutiveManagement', 'BusinessIntelligence', 'BuyingPlanningAndInventoryManagement', 'DataQualityAndContentManagement', 'CustomerService', 'FinanceAndAccounting', 'LegalAndPeople', 'LogisticsAndSupplyChain', 'FulfillmentAndOperationsManagement', 'OfflineRetailStore', 'Marketing', 'BusinessDevSalesAndAccountManagement', 'UXUIDesign', 'TechProductManagement', 'TechProjectAndProgramManagement', 'SoftwareDevelopmentAndSolutionsArchitect', 'OperationsITAndSupportEngineering', 'Other'];
|
|
9723
9718
|
|
|
9724
|
-
var messages$
|
|
9719
|
+
var messages$r = defineMessages({
|
|
9725
9720
|
ExecutiveManagement: {
|
|
9726
9721
|
id: 'Shared.businessRoles.executiveManagement',
|
|
9727
9722
|
description: 'The label for one of the selectable business roles',
|
|
@@ -9831,7 +9826,7 @@ function convertRatioToPercentage(ratio) {
|
|
|
9831
9826
|
return _parseFloat((ratio * 100).toFixed(2));
|
|
9832
9827
|
}
|
|
9833
9828
|
|
|
9834
|
-
var messages$
|
|
9829
|
+
var messages$q = defineMessages({
|
|
9835
9830
|
inputFieldError: {
|
|
9836
9831
|
id: 'Search.Filters.validation.customField.inputFieldError',
|
|
9837
9832
|
description: 'Error message for empty input field ',
|
|
@@ -9851,14 +9846,14 @@ var validateValue = function validateValue(value, type, intl) {
|
|
|
9851
9846
|
if (validateSingleFilter({
|
|
9852
9847
|
value: value
|
|
9853
9848
|
})) {
|
|
9854
|
-
return intl.formatMessage(messages$
|
|
9849
|
+
return intl.formatMessage(messages$q.inputFieldError);
|
|
9855
9850
|
}
|
|
9856
9851
|
if (type === FIELD_TYPES.Money && (validateSingleFilter({
|
|
9857
9852
|
value: value.currencyCode
|
|
9858
9853
|
}) || validateSingleFilter({
|
|
9859
9854
|
value: value.amount
|
|
9860
9855
|
}))) {
|
|
9861
|
-
return intl.formatMessage(messages$
|
|
9856
|
+
return intl.formatMessage(messages$q.inputFieldError);
|
|
9862
9857
|
}
|
|
9863
9858
|
return null;
|
|
9864
9859
|
};
|
|
@@ -9866,7 +9861,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
9866
9861
|
var value = _ref.value;
|
|
9867
9862
|
if (!value || !value.type) {
|
|
9868
9863
|
return {
|
|
9869
|
-
type: intl.formatMessage(messages$
|
|
9864
|
+
type: intl.formatMessage(messages$q.optionFieldError)
|
|
9870
9865
|
};
|
|
9871
9866
|
}
|
|
9872
9867
|
var typeName = value.type.name;
|
|
@@ -9874,7 +9869,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
9874
9869
|
var filterValue = value.value;
|
|
9875
9870
|
if (hasOption && !value.option) {
|
|
9876
9871
|
return {
|
|
9877
|
-
option: intl.formatMessage(messages$
|
|
9872
|
+
option: intl.formatMessage(messages$q.optionFieldError)
|
|
9878
9873
|
};
|
|
9879
9874
|
}
|
|
9880
9875
|
if (value.option === FILTER_TYPES.range) {
|
|
@@ -9893,7 +9888,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
9893
9888
|
} : null;
|
|
9894
9889
|
}
|
|
9895
9890
|
|
|
9896
|
-
var messages$
|
|
9891
|
+
var messages$p = defineMessages({
|
|
9897
9892
|
rangeMissingValue: {
|
|
9898
9893
|
id: 'Search.Filters.validation.date.rangeMissingValue',
|
|
9899
9894
|
description: 'error message if missing a value in a range',
|
|
@@ -9917,25 +9912,25 @@ function validateFilter$1(_ref, intl) {
|
|
|
9917
9912
|
if (validateSingleFilter({
|
|
9918
9913
|
value: value === null || value === void 0 ? void 0 : value.from
|
|
9919
9914
|
})) return {
|
|
9920
|
-
from: intl.formatMessage(messages$
|
|
9915
|
+
from: intl.formatMessage(messages$p.rangeMissingValue)
|
|
9921
9916
|
};
|
|
9922
9917
|
if (validateSingleFilter({
|
|
9923
9918
|
value: value === null || value === void 0 ? void 0 : value.to
|
|
9924
9919
|
})) return {
|
|
9925
|
-
to: intl.formatMessage(messages$
|
|
9920
|
+
to: intl.formatMessage(messages$p.rangeMissingValue)
|
|
9926
9921
|
};
|
|
9927
9922
|
if (moment$1(value === null || value === void 0 ? void 0 : value.to).isBefore(value === null || value === void 0 ? void 0 : value.from)) return {
|
|
9928
|
-
from: intl.formatMessage(messages$
|
|
9923
|
+
from: intl.formatMessage(messages$p.rangeToSmallerThanFrom)
|
|
9929
9924
|
};
|
|
9930
9925
|
} else if (type === 'equalTo' || type === 'lessThan' || type === 'moreThan') {
|
|
9931
9926
|
if (validateSingleFilter({
|
|
9932
9927
|
value: value
|
|
9933
|
-
})) return intl.formatMessage(messages$
|
|
9928
|
+
})) return intl.formatMessage(messages$p.missingValue);
|
|
9934
9929
|
}
|
|
9935
9930
|
return null;
|
|
9936
9931
|
}
|
|
9937
9932
|
|
|
9938
|
-
var messages$
|
|
9933
|
+
var messages$o = defineMessages({
|
|
9939
9934
|
rangeMissingValue: {
|
|
9940
9935
|
id: 'Search.Filters.validation.number.rangeMissingValue',
|
|
9941
9936
|
description: 'error message if missing a value in a range',
|
|
@@ -9953,30 +9948,30 @@ function validateFilter(_ref, intl) {
|
|
|
9953
9948
|
_ref$allowFloat = _ref.allowFloat,
|
|
9954
9949
|
allowFloat = _ref$allowFloat === void 0 ? true : _ref$allowFloat;
|
|
9955
9950
|
if (type !== 'range') {
|
|
9956
|
-
if (!allowFloat && !isInteger(value)) return intl.formatMessage(messages$
|
|
9951
|
+
if (!allowFloat && !isInteger(value)) return intl.formatMessage(messages$J.integer);
|
|
9957
9952
|
return null;
|
|
9958
9953
|
}
|
|
9959
9954
|
|
|
9960
9955
|
// only range types from here
|
|
9961
9956
|
|
|
9962
9957
|
if (!allowFloat && !isInteger(value.from)) return {
|
|
9963
|
-
from: intl.formatMessage(messages$
|
|
9958
|
+
from: intl.formatMessage(messages$J.integer)
|
|
9964
9959
|
};
|
|
9965
9960
|
if (!allowFloat && !isInteger(value.to)) return {
|
|
9966
|
-
to: intl.formatMessage(messages$
|
|
9961
|
+
to: intl.formatMessage(messages$J.integer)
|
|
9967
9962
|
};
|
|
9968
9963
|
if (validateSingleFilter({
|
|
9969
9964
|
value: value.from
|
|
9970
9965
|
})) return {
|
|
9971
|
-
from: intl.formatMessage(messages$
|
|
9966
|
+
from: intl.formatMessage(messages$o.rangeMissingValue)
|
|
9972
9967
|
};
|
|
9973
9968
|
if (validateSingleFilter({
|
|
9974
9969
|
value: value.to
|
|
9975
9970
|
})) return {
|
|
9976
|
-
to: intl.formatMessage(messages$
|
|
9971
|
+
to: intl.formatMessage(messages$o.rangeMissingValue)
|
|
9977
9972
|
};
|
|
9978
9973
|
if (_parseFloat(value.to) < _parseFloat(value.from)) return {
|
|
9979
|
-
from: intl.formatMessage(messages$
|
|
9974
|
+
from: intl.formatMessage(messages$o.rangeToSmallerThanFrom)
|
|
9980
9975
|
};
|
|
9981
9976
|
return null;
|
|
9982
9977
|
}
|
|
@@ -10277,12 +10272,12 @@ var RESOURCES_WITH_PLATFORM_LIMITS = {
|
|
|
10277
10272
|
};
|
|
10278
10273
|
var CUSTOMER_SUPPORT_LINK = 'https://jira.commercetools.com/servicedesk/customer/portal/1';
|
|
10279
10274
|
|
|
10280
|
-
function ownKeys$
|
|
10281
|
-
function _objectSpread$
|
|
10275
|
+
function ownKeys$G(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10276
|
+
function _objectSpread$G(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$G(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$G(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10282
10277
|
var resourcesWithPlatformLimits = _Object$keys(RESOURCES_WITH_PLATFORM_LIMITS);
|
|
10283
10278
|
var createQueryVariables = function createQueryVariables(platformLimit) {
|
|
10284
10279
|
return _reduceInstanceProperty(resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, function (previousIncludedLimits, nextNameOfLimit) {
|
|
10285
|
-
return _objectSpread$
|
|
10280
|
+
return _objectSpread$G(_defineProperty({}, camelCase("should include ".concat(nextNameOfLimit)), platformLimit ? nextNameOfLimit === platformLimit : true), previousIncludedLimits);
|
|
10286
10281
|
}, {});
|
|
10287
10282
|
};
|
|
10288
10283
|
|
|
@@ -10356,7 +10351,7 @@ var useInterceptNavigation = function useInterceptNavigation(hasReachedErrorLimi
|
|
|
10356
10351
|
};
|
|
10357
10352
|
};
|
|
10358
10353
|
|
|
10359
|
-
var messages$
|
|
10354
|
+
var messages$n = defineMessages({
|
|
10360
10355
|
shippingMethods: {
|
|
10361
10356
|
id: 'PlatformLimits.Notifications.shippingMethodsWarning',
|
|
10362
10357
|
description: 'warning message about platform limit exceeded',
|
|
@@ -10384,8 +10379,8 @@ var messages$o = defineMessages({
|
|
|
10384
10379
|
}
|
|
10385
10380
|
});
|
|
10386
10381
|
|
|
10387
|
-
function ownKeys$
|
|
10388
|
-
function _objectSpread$
|
|
10382
|
+
function ownKeys$F(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10383
|
+
function _objectSpread$F(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$F(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$F(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10389
10384
|
var getCustomerSupportLink$1 = function getCustomerSupportLink(msg) {
|
|
10390
10385
|
return jsx(Link, {
|
|
10391
10386
|
isExternal: true,
|
|
@@ -10402,7 +10397,7 @@ var PlatformLimitWarningNotification = function PlatformLimitWarningNotification
|
|
|
10402
10397
|
color: "warning",
|
|
10403
10398
|
size: "medium"
|
|
10404
10399
|
}), jsx(Text.Body, {
|
|
10405
|
-
intlMessage: _objectSpread$
|
|
10400
|
+
intlMessage: _objectSpread$F(_objectSpread$F({}, messages$n[resource]), {}, {
|
|
10406
10401
|
values: {
|
|
10407
10402
|
limit: limit,
|
|
10408
10403
|
customersupport: getCustomerSupportLink$1
|
|
@@ -10413,7 +10408,7 @@ var PlatformLimitWarningNotification = function PlatformLimitWarningNotification
|
|
|
10413
10408
|
};
|
|
10414
10409
|
PlatformLimitWarningNotification.displayName = 'PlatformLimitWarningNotification';
|
|
10415
10410
|
|
|
10416
|
-
var messages$
|
|
10411
|
+
var messages$m = defineMessages({
|
|
10417
10412
|
shippingMethods: {
|
|
10418
10413
|
id: 'PlatformLimits.Notifications.shippingMethodsError',
|
|
10419
10414
|
description: 'error message about platform limit exceeded',
|
|
@@ -10441,8 +10436,8 @@ var messages$n = defineMessages({
|
|
|
10441
10436
|
}
|
|
10442
10437
|
});
|
|
10443
10438
|
|
|
10444
|
-
function ownKeys$
|
|
10445
|
-
function _objectSpread$
|
|
10439
|
+
function ownKeys$E(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10440
|
+
function _objectSpread$E(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$E(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$E(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10446
10441
|
var getCustomerSupportLink = function getCustomerSupportLink(msg) {
|
|
10447
10442
|
return jsx(Link, {
|
|
10448
10443
|
isExternal: true,
|
|
@@ -10455,7 +10450,7 @@ var PlatformLimitErrorNotification = function PlatformLimitErrorNotification(_re
|
|
|
10455
10450
|
limit = _ref.limit;
|
|
10456
10451
|
return jsx(ContentNotification, {
|
|
10457
10452
|
type: "error",
|
|
10458
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
10453
|
+
children: jsx(FormattedMessage, _objectSpread$E(_objectSpread$E({}, messages$m[resource]), {}, {
|
|
10459
10454
|
values: {
|
|
10460
10455
|
limit: limit,
|
|
10461
10456
|
customersupport: getCustomerSupportLink
|
|
@@ -10475,14 +10470,14 @@ var Notifications = {
|
|
|
10475
10470
|
Error: PlatformLimitErrorNotification
|
|
10476
10471
|
};
|
|
10477
10472
|
|
|
10478
|
-
function ownKeys$
|
|
10479
|
-
function _objectSpread$
|
|
10473
|
+
function ownKeys$D(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10474
|
+
function _objectSpread$D(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$D(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$D(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10480
10475
|
var PlatformLimitsStatusText = function PlatformLimitsStatusText(_ref) {
|
|
10481
10476
|
var intlMessage = _ref.intlMessage,
|
|
10482
10477
|
children = _ref.children;
|
|
10483
10478
|
return jsxs(Text.Subheadline, {
|
|
10484
10479
|
as: "h4",
|
|
10485
|
-
children: [intlMessage && jsx(FormattedMessage, _objectSpread$
|
|
10480
|
+
children: [intlMessage && jsx(FormattedMessage, _objectSpread$D({}, intlMessage)), children]
|
|
10486
10481
|
});
|
|
10487
10482
|
};
|
|
10488
10483
|
PlatformLimitsStatusText.displayName = 'PlatformLimitsStatusText';
|
|
@@ -10579,7 +10574,7 @@ var PlatformLimitsShippingMethodsNotifications = function PlatformLimitsShipping
|
|
|
10579
10574
|
};
|
|
10580
10575
|
PlatformLimitsShippingMethodsNotifications.displayName = 'PlatformLimitsShippingMethodsNotifications';
|
|
10581
10576
|
|
|
10582
|
-
var messages$
|
|
10577
|
+
var messages$l = defineMessages({
|
|
10583
10578
|
shippingMethodsPlatformLimitReached: {
|
|
10584
10579
|
id: 'PlatformLimits.Tooltip.shippingMethodsLimitReached',
|
|
10585
10580
|
description: 'The message for shipping methods platform limit being reached',
|
|
@@ -10587,17 +10582,17 @@ var messages$m = defineMessages({
|
|
|
10587
10582
|
}
|
|
10588
10583
|
});
|
|
10589
10584
|
|
|
10590
|
-
function ownKeys$
|
|
10591
|
-
function _objectSpread$
|
|
10585
|
+
function ownKeys$C(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10586
|
+
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(_context = ownKeys$C(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$C(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10592
10587
|
var PlatformLimitsShippingMethodsTooltip = function PlatformLimitsShippingMethodsTooltip(props) {
|
|
10593
10588
|
var intl = useIntl();
|
|
10594
|
-
return jsx(Tooltip$1, _objectSpread$
|
|
10595
|
-
title: intl.formatMessage(messages$
|
|
10589
|
+
return jsx(Tooltip$1, _objectSpread$C(_objectSpread$C({}, props), {}, {
|
|
10590
|
+
title: intl.formatMessage(messages$l.shippingMethodsPlatformLimitReached)
|
|
10596
10591
|
}));
|
|
10597
10592
|
};
|
|
10598
10593
|
PlatformLimitsShippingMethodsTooltip.displayName = 'PlatformLimitsShippingMethodsTooltip';
|
|
10599
10594
|
|
|
10600
|
-
var messages$
|
|
10595
|
+
var messages$k = defineMessages({
|
|
10601
10596
|
shippingMethodsStatus: {
|
|
10602
10597
|
id: 'PlatformLimits.Status.shippingMethods',
|
|
10603
10598
|
description: 'The message for shipping methods platform limit values',
|
|
@@ -10614,7 +10609,7 @@ var PlatformLimitsShippingMethodsStatus = function PlatformLimitsShippingMethods
|
|
|
10614
10609
|
var 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;
|
|
10615
10610
|
var 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;
|
|
10616
10611
|
return jsx(PlatformLimitsStatusText, {
|
|
10617
|
-
children: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages$
|
|
10612
|
+
children: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages$k.shippingMethodsStatus), " ")).call(_context, getPlatformLimitsStatus({
|
|
10618
10613
|
limit: limit,
|
|
10619
10614
|
current: current,
|
|
10620
10615
|
total: total,
|
|
@@ -10644,8 +10639,8 @@ var useShippingMethodsLimits = function useShippingMethodsLimits() {
|
|
|
10644
10639
|
};
|
|
10645
10640
|
};
|
|
10646
10641
|
|
|
10647
|
-
function ownKeys$
|
|
10648
|
-
function _objectSpread$
|
|
10642
|
+
function ownKeys$B(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10643
|
+
function _objectSpread$B(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$B(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$B(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10649
10644
|
var injectShippingMethodsPlatformLimits = function injectShippingMethodsPlatformLimits() {
|
|
10650
10645
|
return function (WrappedComponent) {
|
|
10651
10646
|
var WithShippingMethodsPlatformLimits = function WithShippingMethodsPlatformLimits(props) {
|
|
@@ -10653,7 +10648,7 @@ var injectShippingMethodsPlatformLimits = function injectShippingMethodsPlatform
|
|
|
10653
10648
|
var shippingMethodsProps = {
|
|
10654
10649
|
platformLimits: shippingMethodsPlatformLimits
|
|
10655
10650
|
};
|
|
10656
|
-
return jsx(WrappedComponent, _objectSpread$
|
|
10651
|
+
return jsx(WrappedComponent, _objectSpread$B(_objectSpread$B({}, props), shippingMethodsProps));
|
|
10657
10652
|
};
|
|
10658
10653
|
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
10659
10654
|
return WithShippingMethodsPlatformLimits;
|
|
@@ -10727,7 +10722,7 @@ var PlatformLimitsTaxCategoriesNotifications = function PlatformLimitsTaxCategor
|
|
|
10727
10722
|
};
|
|
10728
10723
|
PlatformLimitsTaxCategoriesNotifications.displayName = 'PlatformLimitsTaxCategoriesNotifications';
|
|
10729
10724
|
|
|
10730
|
-
var messages$
|
|
10725
|
+
var messages$j = defineMessages({
|
|
10731
10726
|
taxCategoriesPlatformLimitReached: {
|
|
10732
10727
|
id: 'PlatformLimits.Tooltip.taxCategoriesLimitReached',
|
|
10733
10728
|
description: 'The message for tax categories platform limit being reached',
|
|
@@ -10735,17 +10730,17 @@ var messages$k = defineMessages({
|
|
|
10735
10730
|
}
|
|
10736
10731
|
});
|
|
10737
10732
|
|
|
10738
|
-
function ownKeys$
|
|
10739
|
-
function _objectSpread$
|
|
10733
|
+
function ownKeys$A(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10734
|
+
function _objectSpread$A(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$A(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$A(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10740
10735
|
var PlatformLimitsTaxCategoriesTooltip = function PlatformLimitsTaxCategoriesTooltip(props) {
|
|
10741
10736
|
var intl = useIntl();
|
|
10742
|
-
return jsx(Tooltip$1, _objectSpread$
|
|
10743
|
-
title: intl.formatMessage(messages$
|
|
10737
|
+
return jsx(Tooltip$1, _objectSpread$A(_objectSpread$A({}, props), {}, {
|
|
10738
|
+
title: intl.formatMessage(messages$j.taxCategoriesPlatformLimitReached)
|
|
10744
10739
|
}));
|
|
10745
10740
|
};
|
|
10746
10741
|
PlatformLimitsTaxCategoriesTooltip.displayName = 'PlatformLimitsTaxCategoriesTooltip';
|
|
10747
10742
|
|
|
10748
|
-
var messages$
|
|
10743
|
+
var messages$i = defineMessages({
|
|
10749
10744
|
taxCategoriesStatus: {
|
|
10750
10745
|
id: 'PlatformLimits.Status.taxCategories',
|
|
10751
10746
|
description: 'The message for tax categories platform limit values',
|
|
@@ -10762,7 +10757,7 @@ var PlatformLimitsTaxCategoriesStatus = function PlatformLimitsTaxCategoriesStat
|
|
|
10762
10757
|
var 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;
|
|
10763
10758
|
var 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;
|
|
10764
10759
|
return jsx(PlatformLimitsStatusText, {
|
|
10765
|
-
children: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages$
|
|
10760
|
+
children: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages$i.taxCategoriesStatus), " ")).call(_context, getPlatformLimitsStatus({
|
|
10766
10761
|
limit: limit,
|
|
10767
10762
|
current: current,
|
|
10768
10763
|
total: total,
|
|
@@ -10792,15 +10787,15 @@ var useTaxCategoriesLimits = function useTaxCategoriesLimits() {
|
|
|
10792
10787
|
};
|
|
10793
10788
|
};
|
|
10794
10789
|
|
|
10795
|
-
function ownKeys$
|
|
10796
|
-
function _objectSpread$
|
|
10790
|
+
function ownKeys$z(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10791
|
+
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(_context = ownKeys$z(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$z(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10797
10792
|
var injectTaxCategoriesPlatformLimits = function injectTaxCategoriesPlatformLimits(WrappedComponent) {
|
|
10798
10793
|
var WithTaxCategoriesPlatformLimits = function WithTaxCategoriesPlatformLimits(props) {
|
|
10799
10794
|
var taxCategoriesPlatformLimits = useTaxCategoriesLimits();
|
|
10800
10795
|
var taxCategoriesProps = {
|
|
10801
10796
|
platformLimits: taxCategoriesPlatformLimits
|
|
10802
10797
|
};
|
|
10803
|
-
return jsx(WrappedComponent, _objectSpread$
|
|
10798
|
+
return jsx(WrappedComponent, _objectSpread$z(_objectSpread$z({}, props), taxCategoriesProps));
|
|
10804
10799
|
};
|
|
10805
10800
|
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
10806
10801
|
return WithTaxCategoriesPlatformLimits;
|
|
@@ -10873,7 +10868,7 @@ var PlatformLimitsZonesNotifications = function PlatformLimitsZonesNotifications
|
|
|
10873
10868
|
};
|
|
10874
10869
|
PlatformLimitsZonesNotifications.displayName = 'PlatformLimitsZonesNotifications';
|
|
10875
10870
|
|
|
10876
|
-
var messages$
|
|
10871
|
+
var messages$h = defineMessages({
|
|
10877
10872
|
zonesPlatformLimitReached: {
|
|
10878
10873
|
id: 'PlatformLimits.Tooltip.zonesLimitReached',
|
|
10879
10874
|
description: 'The message for zones platform limit being reached',
|
|
@@ -10881,17 +10876,17 @@ var messages$i = defineMessages({
|
|
|
10881
10876
|
}
|
|
10882
10877
|
});
|
|
10883
10878
|
|
|
10884
|
-
function ownKeys$
|
|
10885
|
-
function _objectSpread$
|
|
10879
|
+
function ownKeys$y(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10880
|
+
function _objectSpread$y(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$y(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$y(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10886
10881
|
var PlatformLimitsZonesTooltip = function PlatformLimitsZonesTooltip(props) {
|
|
10887
10882
|
var intl = useIntl();
|
|
10888
|
-
return jsx(Tooltip$1, _objectSpread$
|
|
10889
|
-
title: intl.formatMessage(messages$
|
|
10883
|
+
return jsx(Tooltip$1, _objectSpread$y(_objectSpread$y({}, props), {}, {
|
|
10884
|
+
title: intl.formatMessage(messages$h.zonesPlatformLimitReached)
|
|
10890
10885
|
}));
|
|
10891
10886
|
};
|
|
10892
10887
|
PlatformLimitsZonesTooltip.displayName = 'PlatformLimitsZonesTooltip';
|
|
10893
10888
|
|
|
10894
|
-
var messages$
|
|
10889
|
+
var messages$g = defineMessages({
|
|
10895
10890
|
zonesStatus: {
|
|
10896
10891
|
id: 'PlatformLimits.Status.zones',
|
|
10897
10892
|
description: 'The message for zones platform limit values',
|
|
@@ -10908,7 +10903,7 @@ var PlatformLimitsZonesStatus = function PlatformLimitsZonesStatus(_ref) {
|
|
|
10908
10903
|
var 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;
|
|
10909
10904
|
var 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;
|
|
10910
10905
|
return jsx(PlatformLimitsStatusText, {
|
|
10911
|
-
children: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages$
|
|
10906
|
+
children: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages$g.zonesStatus), " ")).call(_context, getPlatformLimitsStatus({
|
|
10912
10907
|
limit: limit,
|
|
10913
10908
|
current: current,
|
|
10914
10909
|
total: total,
|
|
@@ -10938,8 +10933,8 @@ var useZonesLimits = function useZonesLimits() {
|
|
|
10938
10933
|
};
|
|
10939
10934
|
};
|
|
10940
10935
|
|
|
10941
|
-
function ownKeys$
|
|
10942
|
-
function _objectSpread$
|
|
10936
|
+
function ownKeys$x(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10937
|
+
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(_context = ownKeys$x(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$x(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10943
10938
|
var injectZonesPlatformLimits = function injectZonesPlatformLimits() {
|
|
10944
10939
|
return function (WrappedComponent) {
|
|
10945
10940
|
var WithZonesPlatformLimits = function WithZonesPlatformLimits(props) {
|
|
@@ -10947,7 +10942,7 @@ var injectZonesPlatformLimits = function injectZonesPlatformLimits() {
|
|
|
10947
10942
|
var zonesProps = {
|
|
10948
10943
|
platformLimits: zonesPlatformLimits
|
|
10949
10944
|
};
|
|
10950
|
-
return jsx(WrappedComponent, _objectSpread$
|
|
10945
|
+
return jsx(WrappedComponent, _objectSpread$x(_objectSpread$x({}, props), zonesProps));
|
|
10951
10946
|
};
|
|
10952
10947
|
WithZonesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithZonesPlatformLimits');
|
|
10953
10948
|
return WithZonesPlatformLimits;
|
|
@@ -11034,7 +11029,7 @@ var PlatformLimitsCustomersNotifications = function PlatformLimitsCustomersNotif
|
|
|
11034
11029
|
};
|
|
11035
11030
|
PlatformLimitsCustomersNotifications.displayName = 'PlatformLimitsCustomersNotifications';
|
|
11036
11031
|
|
|
11037
|
-
var messages$
|
|
11032
|
+
var messages$f = defineMessages({
|
|
11038
11033
|
customersPlatformLimitReached: {
|
|
11039
11034
|
id: 'PlatformLimits.Tooltip.customersLimitReached',
|
|
11040
11035
|
description: 'The message for customers platform limit being reached',
|
|
@@ -11042,17 +11037,17 @@ var messages$g = defineMessages({
|
|
|
11042
11037
|
}
|
|
11043
11038
|
});
|
|
11044
11039
|
|
|
11045
|
-
function ownKeys$
|
|
11046
|
-
function _objectSpread$
|
|
11040
|
+
function ownKeys$w(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11041
|
+
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(_context = ownKeys$w(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$w(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11047
11042
|
var PlatformLimitsCustomersTooltip = function PlatformLimitsCustomersTooltip(props) {
|
|
11048
11043
|
var intl = useIntl();
|
|
11049
|
-
return jsx(Tooltip$1, _objectSpread$
|
|
11050
|
-
title: intl.formatMessage(messages$
|
|
11044
|
+
return jsx(Tooltip$1, _objectSpread$w(_objectSpread$w({}, props), {}, {
|
|
11045
|
+
title: intl.formatMessage(messages$f.customersPlatformLimitReached)
|
|
11051
11046
|
}));
|
|
11052
11047
|
};
|
|
11053
11048
|
PlatformLimitsCustomersTooltip.displayName = 'PlatformLimitsCustomersTooltip';
|
|
11054
11049
|
|
|
11055
|
-
var messages$
|
|
11050
|
+
var messages$e = defineMessages({
|
|
11056
11051
|
customersStatus: {
|
|
11057
11052
|
id: 'PlatformLimits.Status.customers',
|
|
11058
11053
|
description: 'The message for customers platform limit values',
|
|
@@ -11060,9 +11055,9 @@ var messages$f = defineMessages({
|
|
|
11060
11055
|
}
|
|
11061
11056
|
});
|
|
11062
11057
|
|
|
11063
|
-
function ownKeys$
|
|
11064
|
-
function _objectSpread$
|
|
11065
|
-
var styles$
|
|
11058
|
+
function ownKeys$v(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11059
|
+
function _objectSpread$v(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$v(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$v(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11060
|
+
var styles$g = {
|
|
11066
11061
|
"status": "platform-limits-customers-status-module__status___3rXYM"
|
|
11067
11062
|
};
|
|
11068
11063
|
var PlatformLimitsCustomersStatus = function PlatformLimitsCustomersStatus() {
|
|
@@ -11077,11 +11072,11 @@ var PlatformLimitsCustomersStatus = function PlatformLimitsCustomersStatus() {
|
|
|
11077
11072
|
current = _platformLimits$custo2.current,
|
|
11078
11073
|
limit = _platformLimits$custo2.limit;
|
|
11079
11074
|
return jsx("div", {
|
|
11080
|
-
className: styles$
|
|
11075
|
+
className: styles$g.status,
|
|
11081
11076
|
children: jsx(Text.Detail, {
|
|
11082
11077
|
tone: "secondary",
|
|
11083
11078
|
isInline: true,
|
|
11084
|
-
intlMessage: _objectSpread$
|
|
11079
|
+
intlMessage: _objectSpread$v(_objectSpread$v({}, messages$e.customersStatus), {}, {
|
|
11085
11080
|
values: {
|
|
11086
11081
|
current: intl.formatNumber(current),
|
|
11087
11082
|
limit: intl.formatNumber(limit)
|
|
@@ -11092,7 +11087,7 @@ var PlatformLimitsCustomersStatus = function PlatformLimitsCustomersStatus() {
|
|
|
11092
11087
|
};
|
|
11093
11088
|
PlatformLimitsCustomersStatus.displayName = 'PlatformLimitsCustomersStatus';
|
|
11094
11089
|
|
|
11095
|
-
var messages$
|
|
11090
|
+
var messages$d = defineMessages({
|
|
11096
11091
|
title: {
|
|
11097
11092
|
id: 'PlatformLimits.Customers.modalTitle',
|
|
11098
11093
|
description: 'The modal title for the customer platform limits error',
|
|
@@ -11105,10 +11100,10 @@ var messages$e = defineMessages({
|
|
|
11105
11100
|
}
|
|
11106
11101
|
});
|
|
11107
11102
|
|
|
11108
|
-
function ownKeys$
|
|
11109
|
-
function _objectSpread$
|
|
11103
|
+
function ownKeys$u(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11104
|
+
function _objectSpread$u(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$u(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$u(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11110
11105
|
var LimitsReachedErrorGraphic$1 = function LimitsReachedErrorGraphic(props) {
|
|
11111
|
-
return jsxs("svg", _objectSpread$
|
|
11106
|
+
return jsxs("svg", _objectSpread$u(_objectSpread$u({}, props), {}, {
|
|
11112
11107
|
children: [jsx("defs", {
|
|
11113
11108
|
children: jsx("path", {
|
|
11114
11109
|
id: "a",
|
|
@@ -11216,7 +11211,7 @@ var PlatformLimitsCustomersErrorModal = function PlatformLimitsCustomersErrorMod
|
|
|
11216
11211
|
return jsx(InfoDialog, {
|
|
11217
11212
|
isOpen: customersPlatformLimitsModalState.isModalOpen,
|
|
11218
11213
|
onClose: onClose,
|
|
11219
|
-
title: intl.formatMessage(messages$
|
|
11214
|
+
title: intl.formatMessage(messages$d.title),
|
|
11220
11215
|
children: jsxs(Spacings.Stack, {
|
|
11221
11216
|
scale: "m",
|
|
11222
11217
|
alignItems: "center",
|
|
@@ -11225,7 +11220,7 @@ var PlatformLimitsCustomersErrorModal = function PlatformLimitsCustomersErrorMod
|
|
|
11225
11220
|
alignItems: "center",
|
|
11226
11221
|
children: [jsx(PlatformLimitsCustomersNotifications, {}), jsx(FlatButton, {
|
|
11227
11222
|
onClick: onClose,
|
|
11228
|
-
label: intl.formatMessage(messages$
|
|
11223
|
+
label: intl.formatMessage(messages$d.backToList),
|
|
11229
11224
|
icon: jsx(ListIcon, {
|
|
11230
11225
|
size: "medium",
|
|
11231
11226
|
color: "primary"
|
|
@@ -11237,7 +11232,7 @@ var PlatformLimitsCustomersErrorModal = function PlatformLimitsCustomersErrorMod
|
|
|
11237
11232
|
};
|
|
11238
11233
|
PlatformLimitsCustomersErrorModal.displayName = 'PlatformLimitsCustomersErrorModal';
|
|
11239
11234
|
|
|
11240
|
-
var styles$
|
|
11235
|
+
var styles$f = {
|
|
11241
11236
|
"combined": "platform-limits-customers-combined-module__combined___OszDd"
|
|
11242
11237
|
};
|
|
11243
11238
|
var PlatformLimitsCustomersCombined = function PlatformLimitsCustomersCombined() {
|
|
@@ -11246,7 +11241,7 @@ var PlatformLimitsCustomersCombined = function PlatformLimitsCustomersCombined()
|
|
|
11246
11241
|
hasReachedCustomersErrorLimit = _useCustomersPlatform.hasReachedCustomersErrorLimit,
|
|
11247
11242
|
hasReachedCustomersWarningLimit = _useCustomersPlatform.hasReachedCustomersWarningLimit;
|
|
11248
11243
|
return jsx("div", {
|
|
11249
|
-
className: styles$
|
|
11244
|
+
className: styles$f.combined,
|
|
11250
11245
|
children: jsxs(Spacings.Inline, {
|
|
11251
11246
|
scale: "xl",
|
|
11252
11247
|
justifyContent: "space-between",
|
|
@@ -11280,8 +11275,8 @@ var useCustomersPlatformLimits = function useCustomersPlatformLimits() {
|
|
|
11280
11275
|
};
|
|
11281
11276
|
};
|
|
11282
11277
|
|
|
11283
|
-
function ownKeys$
|
|
11284
|
-
function _objectSpread$
|
|
11278
|
+
function ownKeys$t(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11279
|
+
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(_context = ownKeys$t(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$t(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11285
11280
|
var injectCustomersPlatformLimits = function injectCustomersPlatformLimits() {
|
|
11286
11281
|
return function (WrappedComponent) {
|
|
11287
11282
|
var WithCustomersPlatformLimits = function WithCustomersPlatformLimits(props) {
|
|
@@ -11289,7 +11284,7 @@ var injectCustomersPlatformLimits = function injectCustomersPlatformLimits() {
|
|
|
11289
11284
|
var customersProps = {
|
|
11290
11285
|
platformLimits: CustomersPlatformLimits
|
|
11291
11286
|
};
|
|
11292
|
-
return jsx(WrappedComponent, _objectSpread$
|
|
11287
|
+
return jsx(WrappedComponent, _objectSpread$t(_objectSpread$t({}, props), customersProps));
|
|
11293
11288
|
};
|
|
11294
11289
|
WithCustomersPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
11295
11290
|
return WithCustomersPlatformLimits;
|
|
@@ -11376,7 +11371,7 @@ var PlatformLimitsCustomerGroupsNotifications = function PlatformLimitsCustomerG
|
|
|
11376
11371
|
};
|
|
11377
11372
|
PlatformLimitsCustomerGroupsNotifications.displayName = 'PlatformLimitsCustomerGroupsNotifications';
|
|
11378
11373
|
|
|
11379
|
-
var messages$
|
|
11374
|
+
var messages$c = defineMessages({
|
|
11380
11375
|
customerGroupsPlatformLimitReached: {
|
|
11381
11376
|
id: 'PlatformLimits.Tooltip.customerGroupsLimitReached',
|
|
11382
11377
|
description: 'The message for custome groups platform limit being reached',
|
|
@@ -11384,17 +11379,17 @@ var messages$d = defineMessages({
|
|
|
11384
11379
|
}
|
|
11385
11380
|
});
|
|
11386
11381
|
|
|
11387
|
-
function ownKeys$
|
|
11388
|
-
function _objectSpread$
|
|
11382
|
+
function ownKeys$s(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11383
|
+
function _objectSpread$s(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$s(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$s(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11389
11384
|
var PlatformLimitsCustomerGroupsTooltip = function PlatformLimitsCustomerGroupsTooltip(props) {
|
|
11390
11385
|
var intl = useIntl();
|
|
11391
|
-
return jsx(Tooltip$1, _objectSpread$
|
|
11392
|
-
title: intl.formatMessage(messages$
|
|
11386
|
+
return jsx(Tooltip$1, _objectSpread$s(_objectSpread$s({}, props), {}, {
|
|
11387
|
+
title: intl.formatMessage(messages$c.customerGroupsPlatformLimitReached)
|
|
11393
11388
|
}));
|
|
11394
11389
|
};
|
|
11395
11390
|
PlatformLimitsCustomerGroupsTooltip.displayName = 'PlatformLimitsCustomerGroupsTooltip';
|
|
11396
11391
|
|
|
11397
|
-
var messages$
|
|
11392
|
+
var messages$b = defineMessages({
|
|
11398
11393
|
customerGroupsStatus: {
|
|
11399
11394
|
id: 'PlatformLimits.Status.customerGroups',
|
|
11400
11395
|
description: 'The message for customer groups platform limit values',
|
|
@@ -11402,9 +11397,9 @@ var messages$c = defineMessages({
|
|
|
11402
11397
|
}
|
|
11403
11398
|
});
|
|
11404
11399
|
|
|
11405
|
-
function ownKeys$
|
|
11406
|
-
function _objectSpread$
|
|
11407
|
-
var styles$
|
|
11400
|
+
function ownKeys$r(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11401
|
+
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(_context = ownKeys$r(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$r(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11402
|
+
var styles$e = {
|
|
11408
11403
|
"status": "platform-limits-customer-groups-status-module__status___6099G"
|
|
11409
11404
|
};
|
|
11410
11405
|
var PlatformLimitsCustomerGroupsStatus = function PlatformLimitsCustomerGroupsStatus() {
|
|
@@ -11419,11 +11414,11 @@ var PlatformLimitsCustomerGroupsStatus = function PlatformLimitsCustomerGroupsSt
|
|
|
11419
11414
|
current = _platformLimits$custo2.current,
|
|
11420
11415
|
limit = _platformLimits$custo2.limit;
|
|
11421
11416
|
return jsx("div", {
|
|
11422
|
-
className: styles$
|
|
11417
|
+
className: styles$e.status,
|
|
11423
11418
|
children: jsx(Text.Detail, {
|
|
11424
11419
|
tone: "secondary",
|
|
11425
11420
|
isInline: true,
|
|
11426
|
-
intlMessage: _objectSpread$
|
|
11421
|
+
intlMessage: _objectSpread$r(_objectSpread$r({}, messages$b.customerGroupsStatus), {}, {
|
|
11427
11422
|
values: {
|
|
11428
11423
|
current: intl.formatNumber(current),
|
|
11429
11424
|
limit: intl.formatNumber(limit)
|
|
@@ -11434,7 +11429,7 @@ var PlatformLimitsCustomerGroupsStatus = function PlatformLimitsCustomerGroupsSt
|
|
|
11434
11429
|
};
|
|
11435
11430
|
PlatformLimitsCustomerGroupsStatus.displayName = 'PlatformLimitsCustomerGroupsStatus';
|
|
11436
11431
|
|
|
11437
|
-
var messages$
|
|
11432
|
+
var messages$a = defineMessages({
|
|
11438
11433
|
title: {
|
|
11439
11434
|
id: 'PlatformLimits.CustomerGroups.modalTitle',
|
|
11440
11435
|
description: 'The modal title for the customer groups platform limits error',
|
|
@@ -11447,10 +11442,10 @@ var messages$b = defineMessages({
|
|
|
11447
11442
|
}
|
|
11448
11443
|
});
|
|
11449
11444
|
|
|
11450
|
-
function ownKeys$
|
|
11451
|
-
function _objectSpread$
|
|
11445
|
+
function ownKeys$q(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11446
|
+
function _objectSpread$q(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$q(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$q(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11452
11447
|
var LimitsReachedErrorGraphic = function LimitsReachedErrorGraphic(props) {
|
|
11453
|
-
return jsxs("svg", _objectSpread$
|
|
11448
|
+
return jsxs("svg", _objectSpread$q(_objectSpread$q({}, props), {}, {
|
|
11454
11449
|
children: [jsx("defs", {
|
|
11455
11450
|
children: jsx("path", {
|
|
11456
11451
|
id: "a",
|
|
@@ -11558,7 +11553,7 @@ var PlatformLimitsCustomerGroupsErrorModal = function PlatformLimitsCustomerGrou
|
|
|
11558
11553
|
return jsx(InfoDialog, {
|
|
11559
11554
|
isOpen: customerGroupsPlatformLimitsModalState.isModalOpen,
|
|
11560
11555
|
onClose: onClose,
|
|
11561
|
-
title: intl.formatMessage(messages$
|
|
11556
|
+
title: intl.formatMessage(messages$a.title),
|
|
11562
11557
|
children: jsxs(Spacings.Stack, {
|
|
11563
11558
|
scale: "m",
|
|
11564
11559
|
alignItems: "center",
|
|
@@ -11567,7 +11562,7 @@ var PlatformLimitsCustomerGroupsErrorModal = function PlatformLimitsCustomerGrou
|
|
|
11567
11562
|
alignItems: "center",
|
|
11568
11563
|
children: [jsx(PlatformLimitsCustomerGroupsNotifications, {}), jsx(FlatButton, {
|
|
11569
11564
|
onClick: onClose,
|
|
11570
|
-
label: intl.formatMessage(messages$
|
|
11565
|
+
label: intl.formatMessage(messages$a.backToList),
|
|
11571
11566
|
icon: jsx(ListIcon, {
|
|
11572
11567
|
size: "medium",
|
|
11573
11568
|
color: "primary"
|
|
@@ -11579,7 +11574,7 @@ var PlatformLimitsCustomerGroupsErrorModal = function PlatformLimitsCustomerGrou
|
|
|
11579
11574
|
};
|
|
11580
11575
|
PlatformLimitsCustomerGroupsErrorModal.displayName = 'PlatformLimitsCustomerGroupsErrorModal';
|
|
11581
11576
|
|
|
11582
|
-
var styles$
|
|
11577
|
+
var styles$d = {
|
|
11583
11578
|
"combined": "platform-limits-customer-groups-combined-module__combined___WjRoI"
|
|
11584
11579
|
};
|
|
11585
11580
|
var PlatformLimitsCustomerGroupsCombined = function PlatformLimitsCustomerGroupsCombined() {
|
|
@@ -11588,7 +11583,7 @@ var PlatformLimitsCustomerGroupsCombined = function PlatformLimitsCustomerGroups
|
|
|
11588
11583
|
hasReachedCustomerGroupsErrorLimit = _useCustomerGroupsPla.hasReachedCustomerGroupsErrorLimit,
|
|
11589
11584
|
hasReachedCustomerGroupsWarningLimit = _useCustomerGroupsPla.hasReachedCustomerGroupsWarningLimit;
|
|
11590
11585
|
return jsx("div", {
|
|
11591
|
-
className: styles$
|
|
11586
|
+
className: styles$d.combined,
|
|
11592
11587
|
children: jsxs(Spacings.Inline, {
|
|
11593
11588
|
scale: "xl",
|
|
11594
11589
|
justifyContent: "space-between",
|
|
@@ -11622,8 +11617,8 @@ var useCustomerGroupsPlatformLimits = function useCustomerGroupsPlatformLimits()
|
|
|
11622
11617
|
};
|
|
11623
11618
|
};
|
|
11624
11619
|
|
|
11625
|
-
function ownKeys$
|
|
11626
|
-
function _objectSpread$
|
|
11620
|
+
function ownKeys$p(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11621
|
+
function _objectSpread$p(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$p(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$p(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11627
11622
|
var injectCustomerGroupsPlatformLimits = function injectCustomerGroupsPlatformLimits() {
|
|
11628
11623
|
return function (WrappedComponent) {
|
|
11629
11624
|
var WithCustomerGroupsPlatformLimits = function WithCustomerGroupsPlatformLimits(props) {
|
|
@@ -11631,7 +11626,7 @@ var injectCustomerGroupsPlatformLimits = function injectCustomerGroupsPlatformLi
|
|
|
11631
11626
|
var customersProps = {
|
|
11632
11627
|
platformLimits: CustomerGroupsPlatformLimits
|
|
11633
11628
|
};
|
|
11634
|
-
return jsx(WrappedComponent, _objectSpread$
|
|
11629
|
+
return jsx(WrappedComponent, _objectSpread$p(_objectSpread$p({}, props), customersProps));
|
|
11635
11630
|
};
|
|
11636
11631
|
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
11637
11632
|
return WithCustomerGroupsPlatformLimits;
|
|
@@ -11717,7 +11712,7 @@ var fetchPimIndexStatus = (function (apolloClient, projectKey) {
|
|
|
11717
11712
|
}();
|
|
11718
11713
|
});
|
|
11719
11714
|
|
|
11720
|
-
var messages$
|
|
11715
|
+
var messages$9 = defineMessages({
|
|
11721
11716
|
indexingSucceed: {
|
|
11722
11717
|
id: 'Products.PimIndexer.Notifications.indexingSucceed',
|
|
11723
11718
|
description: 'Message to be shown to user when PIM successfully finishes initial project indexing.',
|
|
@@ -11755,10 +11750,10 @@ var defaultValue = {
|
|
|
11755
11750
|
*/
|
|
11756
11751
|
var PimIndexerContext = /*#__PURE__*/createContext(defaultValue);
|
|
11757
11752
|
|
|
11758
|
-
function ownKeys$
|
|
11759
|
-
function _objectSpread$
|
|
11760
|
-
function _createSuper$
|
|
11761
|
-
function _isNativeReflectConstruct$
|
|
11753
|
+
function ownKeys$o(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11754
|
+
function _objectSpread$o(target) { for (var i = 1; i < arguments.length; i++) { var _context7, _context8; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context7 = ownKeys$o(Object(source), !0)).call(_context7, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context8 = ownKeys$o(Object(source))).call(_context8, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11755
|
+
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(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11756
|
+
function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11762
11757
|
var RefreshProductIndices = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "RefreshProductIndices" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "ids" } }, type: { kind: "NonNullType", type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "refreshProducts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "ids" }, value: { kind: "Variable", name: { kind: "Name", value: "ids" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updatedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "deletedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "notFoundDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "unchangedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "failedRefreshedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "reason" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 1119, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
11763
11758
|
var IndexProject = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "IndexProject" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "products" }, name: { kind: "Name", value: "reIndexAllProducts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indexingJobId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "existingIndexingJobId" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productTypes" }, name: { kind: "Name", value: "reIndexAllProductTypes" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indexingJobId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "existingIndexingJobId" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 1119, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
11764
11759
|
var GetIndexingProgress = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetIndexingProgress" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productsJobId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productTypesJobId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "products" }, name: { kind: "Name", value: "getReindexingStatus" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "productsJobId" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "percentCompleted" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "completed" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productTypes" }, name: { kind: "Name", value: "getReindexingStatus" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "productTypesJobId" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "percentCompleted" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "completed" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 1119, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -11782,7 +11777,7 @@ var getIndexingJobIds = function getIndexingJobIds(_ref) {
|
|
|
11782
11777
|
};
|
|
11783
11778
|
var PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
11784
11779
|
_inherits(PimIndexerProvider, _PureComponent);
|
|
11785
|
-
var _super = _createSuper$
|
|
11780
|
+
var _super = _createSuper$5(PimIndexerProvider);
|
|
11786
11781
|
function PimIndexerProvider() {
|
|
11787
11782
|
var _context;
|
|
11788
11783
|
var _this;
|
|
@@ -11861,7 +11856,7 @@ var PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11861
11856
|
_this.props.notifications.showNotification({
|
|
11862
11857
|
kind: 'error',
|
|
11863
11858
|
domain: DOMAINS.SIDE,
|
|
11864
|
-
text: _this.props.intl.formatMessage(messages$
|
|
11859
|
+
text: _this.props.intl.formatMessage(messages$9.indexingFailed)
|
|
11865
11860
|
});
|
|
11866
11861
|
};
|
|
11867
11862
|
_this.getIndexingProgress = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
@@ -11923,7 +11918,7 @@ var PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11923
11918
|
_this.props.notifications.showNotification({
|
|
11924
11919
|
kind: 'success',
|
|
11925
11920
|
domain: DOMAINS.SIDE,
|
|
11926
|
-
text: _this.props.intl.formatMessage(messages$
|
|
11921
|
+
text: _this.props.intl.formatMessage(messages$9.indexingSucceed)
|
|
11927
11922
|
},
|
|
11928
11923
|
// because the indexing may take so long, the success notification
|
|
11929
11924
|
// may be dismissed without being seen by the user. Set `dismissAfter`
|
|
@@ -12011,7 +12006,7 @@ var PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
12011
12006
|
});
|
|
12012
12007
|
case 6:
|
|
12013
12008
|
indexMutationResult = _context6.sent;
|
|
12014
|
-
_this.setState(_objectSpread$
|
|
12009
|
+
_this.setState(_objectSpread$o(_objectSpread$o({
|
|
12015
12010
|
isLoading: false,
|
|
12016
12011
|
isProjectBeingIndexedByPim: true
|
|
12017
12012
|
}, getIndexingJobIds(indexMutationResult)), {}, {
|
|
@@ -12053,7 +12048,7 @@ var PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
12053
12048
|
key: "render",
|
|
12054
12049
|
value: function render() {
|
|
12055
12050
|
return jsx(PimIndexerContext.Provider, {
|
|
12056
|
-
value: _objectSpread$
|
|
12051
|
+
value: _objectSpread$o(_objectSpread$o({}, this.state), {}, {
|
|
12057
12052
|
attemptToRefreshProducts: this.attemptToRefreshProducts,
|
|
12058
12053
|
indexProject: this.indexProject
|
|
12059
12054
|
}),
|
|
@@ -12076,11 +12071,11 @@ var pimIndexerProvider = flowRight(withApplicationContext(function (applicationC
|
|
|
12076
12071
|
name: 'indexProject'
|
|
12077
12072
|
}), withApollo, injectIntl, injectNotifications())(PimIndexerProvider);
|
|
12078
12073
|
|
|
12079
|
-
function _createSuper$
|
|
12080
|
-
function _isNativeReflectConstruct$
|
|
12074
|
+
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12075
|
+
function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12081
12076
|
var WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
12082
12077
|
_inherits(WithPimIndexer, _PureComponent);
|
|
12083
|
-
var _super = _createSuper$
|
|
12078
|
+
var _super = _createSuper$4(WithPimIndexer);
|
|
12084
12079
|
function WithPimIndexer() {
|
|
12085
12080
|
_classCallCheck(this, WithPimIndexer);
|
|
12086
12081
|
return _super.apply(this, arguments);
|
|
@@ -12100,15 +12095,15 @@ var WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
|
12100
12095
|
}(PureComponent);
|
|
12101
12096
|
WithPimIndexer.displayName = 'WithPimIndexer';
|
|
12102
12097
|
|
|
12103
|
-
function ownKeys$
|
|
12104
|
-
function _objectSpread$
|
|
12098
|
+
function ownKeys$n(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12099
|
+
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(_context = ownKeys$n(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$n(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12105
12100
|
var injectPimIndexer = (function () {
|
|
12106
12101
|
var propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pimIndexer';
|
|
12107
12102
|
return function (Component) {
|
|
12108
12103
|
var WrappedComponent = function WrappedComponent(props) {
|
|
12109
12104
|
return jsx(WithPimIndexer, {
|
|
12110
12105
|
children: function children(pimIndexerProps) {
|
|
12111
|
-
return jsx(Component, _objectSpread$
|
|
12106
|
+
return jsx(Component, _objectSpread$n(_objectSpread$n({}, props), _defineProperty({}, propName, pimIndexerProps)));
|
|
12112
12107
|
}
|
|
12113
12108
|
});
|
|
12114
12109
|
};
|
|
@@ -12121,7 +12116,7 @@ function usePimIndexer() {
|
|
|
12121
12116
|
return useContext(PimIndexerContext);
|
|
12122
12117
|
}
|
|
12123
12118
|
|
|
12124
|
-
var messages$
|
|
12119
|
+
var messages$8 = defineMessages({
|
|
12125
12120
|
yes: {
|
|
12126
12121
|
id: 'BooleanField.yes',
|
|
12127
12122
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -12143,8 +12138,8 @@ var BooleanField = function BooleanField(props) {
|
|
|
12143
12138
|
var _context;
|
|
12144
12139
|
var selectedValue;
|
|
12145
12140
|
if (typeof props.value === 'boolean') selectedValue = getBooleanValue(props.value);else if (props.isMulti && _Array$isArray(props.value) && props.value.length) selectedValue = props.value.length === 2 ? 'all' : getBooleanValue(props.value[0]);
|
|
12146
|
-
var yesLabel = props.intl.formatMessage(messages$
|
|
12147
|
-
var noLabel = props.intl.formatMessage(messages$
|
|
12141
|
+
var yesLabel = props.intl.formatMessage(messages$8.yes);
|
|
12142
|
+
var noLabel = props.intl.formatMessage(messages$8.no);
|
|
12148
12143
|
var options = [{
|
|
12149
12144
|
value: 'yes',
|
|
12150
12145
|
label: yesLabel
|
|
@@ -12182,9 +12177,9 @@ function getBooleanValue(value) {
|
|
|
12182
12177
|
return value === false ? 'no' : 'yes';
|
|
12183
12178
|
}
|
|
12184
12179
|
|
|
12185
|
-
function ownKeys$
|
|
12186
|
-
function _objectSpread$
|
|
12187
|
-
var styles$
|
|
12180
|
+
function ownKeys$m(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12181
|
+
function _objectSpread$m(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$m(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$m(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12182
|
+
var styles$c = {
|
|
12188
12183
|
"custom-check": "checkbox-field-module__custom-check___3uPdz",
|
|
12189
12184
|
"check-element": "checkbox-field-module__check-element___3wMNq",
|
|
12190
12185
|
"check-text": "checkbox-field-module__check-text___3M3mq",
|
|
@@ -12194,20 +12189,20 @@ var styles$e = {
|
|
|
12194
12189
|
var CheckboxField = function CheckboxField(props) {
|
|
12195
12190
|
// Pass only `data-*` props
|
|
12196
12191
|
var dataAttributes = filterDataAttributes(props);
|
|
12197
|
-
return jsxs("label", _objectSpread$
|
|
12198
|
-
className: classnames(props.labelClassName, styles$
|
|
12192
|
+
return jsxs("label", _objectSpread$m(_objectSpread$m({
|
|
12193
|
+
className: classnames(props.labelClassName, styles$c['custom-check'], _defineProperty({}, styles$c.disabled, props.disabled))
|
|
12199
12194
|
}, dataAttributes), {}, {
|
|
12200
12195
|
children: [jsx("input", {
|
|
12201
12196
|
type: "checkbox",
|
|
12202
|
-
className: classnames(props.inputClassName, styles$
|
|
12197
|
+
className: classnames(props.inputClassName, styles$c['input-checkbox'], _defineProperty({}, styles$c.disabled, props.disabled)),
|
|
12203
12198
|
name: props.name,
|
|
12204
12199
|
checked: props.checked,
|
|
12205
12200
|
onChange: props.onChange,
|
|
12206
12201
|
disabled: props.disabled
|
|
12207
12202
|
}), jsx("span", {
|
|
12208
|
-
className: styles$
|
|
12203
|
+
className: styles$c['check-element']
|
|
12209
12204
|
}), props.label ? jsx("span", {
|
|
12210
|
-
className: styles$
|
|
12205
|
+
className: styles$c['check-text'],
|
|
12211
12206
|
children: props.label
|
|
12212
12207
|
}) : null]
|
|
12213
12208
|
}));
|
|
@@ -12218,7 +12213,7 @@ CheckboxField.defaultProps = {
|
|
|
12218
12213
|
disabled: false
|
|
12219
12214
|
};
|
|
12220
12215
|
|
|
12221
|
-
var messages$
|
|
12216
|
+
var messages$7 = defineMessages({
|
|
12222
12217
|
label: {
|
|
12223
12218
|
id: 'MissingValueField.label',
|
|
12224
12219
|
description: 'The label text for the missing values option',
|
|
@@ -12226,8 +12221,8 @@ var messages$8 = defineMessages({
|
|
|
12226
12221
|
}
|
|
12227
12222
|
});
|
|
12228
12223
|
|
|
12229
|
-
function ownKeys$
|
|
12230
|
-
function _objectSpread$
|
|
12224
|
+
function ownKeys$l(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12225
|
+
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(_context = ownKeys$l(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$l(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12231
12226
|
var MissingValueField = function MissingValueField(props) {
|
|
12232
12227
|
return jsx("div", {
|
|
12233
12228
|
children: jsx(CheckboxField, {
|
|
@@ -12238,7 +12233,7 @@ var MissingValueField = function MissingValueField(props) {
|
|
|
12238
12233
|
"data-track-component": "MissingValue",
|
|
12239
12234
|
"data-track-event": "change",
|
|
12240
12235
|
"data-track-label": props.isChecked,
|
|
12241
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
12236
|
+
label: jsx(FormattedMessage, _objectSpread$l({}, messages$7.label))
|
|
12242
12237
|
})
|
|
12243
12238
|
});
|
|
12244
12239
|
};
|
|
@@ -12247,9 +12242,9 @@ MissingValueField.defaultProps = {
|
|
|
12247
12242
|
isChecked: false
|
|
12248
12243
|
};
|
|
12249
12244
|
|
|
12250
|
-
function ownKeys$
|
|
12251
|
-
function _objectSpread$
|
|
12252
|
-
var styles$
|
|
12245
|
+
function ownKeys$k(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12246
|
+
function _objectSpread$k(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$k(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$k(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12247
|
+
var styles$b = {
|
|
12253
12248
|
"button": "button-module__button___1OzVf",
|
|
12254
12249
|
"cancel": "button-module__cancel___1-jYL button-module__button___1OzVf",
|
|
12255
12250
|
"confirm": "button-module__confirm___-W92x button-module__button___1OzVf",
|
|
@@ -12282,10 +12277,10 @@ var Button = function Button(props) {
|
|
|
12282
12277
|
|
|
12283
12278
|
// Pass only `data-*` props
|
|
12284
12279
|
var dataProps = filterDataAttributes(props);
|
|
12285
|
-
return jsx("button", _objectSpread$
|
|
12280
|
+
return jsx("button", _objectSpread$k(_objectSpread$k({
|
|
12286
12281
|
onClick: isDisabled ? null : onClick,
|
|
12287
12282
|
type: props.type,
|
|
12288
|
-
className: classnames(styles$
|
|
12283
|
+
className: classnames(styles$b.button, isDisabled ? styles$b.disabled : null, className),
|
|
12289
12284
|
disabled: isDisabled,
|
|
12290
12285
|
"aria-label": props['aria-label']
|
|
12291
12286
|
}, dataProps), {}, {
|
|
@@ -12297,10 +12292,10 @@ Button.defaultProps = {
|
|
|
12297
12292
|
type: 'button'
|
|
12298
12293
|
};
|
|
12299
12294
|
|
|
12300
|
-
function ownKeys$
|
|
12301
|
-
function _objectSpread$
|
|
12302
|
-
function _createSuper$
|
|
12303
|
-
function _isNativeReflectConstruct$
|
|
12295
|
+
function ownKeys$j(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12296
|
+
function _objectSpread$j(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$j(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$j(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12297
|
+
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12298
|
+
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12304
12299
|
var customStyles = {
|
|
12305
12300
|
"btn-group": "button-group-module__btn-group___1AG0_",
|
|
12306
12301
|
"active": "button-group-module__active___1wtks",
|
|
@@ -12309,7 +12304,7 @@ var customStyles = {
|
|
|
12309
12304
|
};
|
|
12310
12305
|
var ButtonGroup = /*#__PURE__*/function (_PureComponent) {
|
|
12311
12306
|
_inherits(ButtonGroup, _PureComponent);
|
|
12312
|
-
var _super = _createSuper$
|
|
12307
|
+
var _super = _createSuper$3(ButtonGroup);
|
|
12313
12308
|
function ButtonGroup() {
|
|
12314
12309
|
_classCallCheck(this, ButtonGroup);
|
|
12315
12310
|
return _super.apply(this, arguments);
|
|
@@ -12319,12 +12314,12 @@ var ButtonGroup = /*#__PURE__*/function (_PureComponent) {
|
|
|
12319
12314
|
value: function render() {
|
|
12320
12315
|
var _context,
|
|
12321
12316
|
_this = this;
|
|
12322
|
-
return jsx("div", _objectSpread$
|
|
12317
|
+
return jsx("div", _objectSpread$j(_objectSpread$j({
|
|
12323
12318
|
className: customStyles['btn-group']
|
|
12324
12319
|
}, filterDataAttributes(this.props)), {}, {
|
|
12325
12320
|
children: _mapInstanceProperty(_context = this.props.options).call(_context, function (option, index) {
|
|
12326
12321
|
var _classnames;
|
|
12327
|
-
return jsx(Button, _objectSpread$
|
|
12322
|
+
return jsx(Button, _objectSpread$j(_objectSpread$j({
|
|
12328
12323
|
"data-track-component": "Button-".concat(option.label),
|
|
12329
12324
|
"data-testid": "group-button-".concat(option.value),
|
|
12330
12325
|
"data-track-event": "click",
|
|
@@ -12352,7 +12347,7 @@ var ButtonGroup = /*#__PURE__*/function (_PureComponent) {
|
|
|
12352
12347
|
}(PureComponent);
|
|
12353
12348
|
ButtonGroup.displayName = 'ButtonGroup';
|
|
12354
12349
|
|
|
12355
|
-
var messages$
|
|
12350
|
+
var messages$6 = defineMessages({
|
|
12356
12351
|
chooseFile: {
|
|
12357
12352
|
id: 'ButtonFileInput.chooseFile',
|
|
12358
12353
|
description: 'The label text of the field for upload local file',
|
|
@@ -12360,18 +12355,18 @@ var messages$7 = defineMessages({
|
|
|
12360
12355
|
}
|
|
12361
12356
|
});
|
|
12362
12357
|
|
|
12363
|
-
function ownKeys$
|
|
12364
|
-
function _objectSpread$
|
|
12365
|
-
var styles$
|
|
12358
|
+
function ownKeys$i(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12359
|
+
function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$i(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$i(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12360
|
+
var styles$a = {
|
|
12366
12361
|
"button": "file-input-module__button___2KypN",
|
|
12367
12362
|
"input": "file-input-module__input___3MP4D"
|
|
12368
12363
|
};
|
|
12369
12364
|
var FileInput = function FileInput(props) {
|
|
12370
12365
|
return jsx("label", {
|
|
12371
12366
|
children: jsxs("span", {
|
|
12372
|
-
className: styles$
|
|
12367
|
+
className: styles$a.button,
|
|
12373
12368
|
children: [jsx("input", {
|
|
12374
|
-
className: styles$
|
|
12369
|
+
className: styles$a.input,
|
|
12375
12370
|
type: "file",
|
|
12376
12371
|
accept: props.acceptTypes,
|
|
12377
12372
|
name: props.name,
|
|
@@ -12383,14 +12378,14 @@ var FileInput = function FileInput(props) {
|
|
|
12383
12378
|
};
|
|
12384
12379
|
FileInput.displayName = 'FileInput';
|
|
12385
12380
|
FileInput.defaultProps = {
|
|
12386
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
12381
|
+
children: jsx(FormattedMessage, _objectSpread$i({}, messages$6.chooseFile)),
|
|
12387
12382
|
allowMultiple: false,
|
|
12388
12383
|
acceptTypes: 'image/png,image/jpeg,image/gif'
|
|
12389
12384
|
};
|
|
12390
12385
|
|
|
12391
|
-
function ownKeys$
|
|
12392
|
-
function _objectSpread$
|
|
12393
|
-
var styles$
|
|
12386
|
+
function ownKeys$h(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12387
|
+
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(_context = ownKeys$h(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$h(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12388
|
+
var styles$9 = {
|
|
12394
12389
|
"button": "button-module__button___1OzVf",
|
|
12395
12390
|
"cancel": "button-module__cancel___1-jYL button-module__button___1OzVf",
|
|
12396
12391
|
"confirm": "button-module__confirm___-W92x button-module__button___1OzVf",
|
|
@@ -12451,10 +12446,10 @@ function ButtonTyped (name, options) {
|
|
|
12451
12446
|
className = props.className;
|
|
12452
12447
|
var isAlternativeStyle = hasAlternativeStyle && style === 'alternative';
|
|
12453
12448
|
var hasIcon = defaultIcon || icon;
|
|
12454
|
-
var classNames = classnames(_defineProperty({}, styles$
|
|
12449
|
+
var classNames = classnames(_defineProperty({}, styles$9.full, fullWidth), isAlternativeStyle ? styles$9["".concat(type, "-alt")] : styles$9[type], className);
|
|
12455
12450
|
var computedLabel = label || defaultLabel;
|
|
12456
12451
|
var dataAttrs = filterDataAttributes(props);
|
|
12457
|
-
return jsx(Button, _objectSpread$
|
|
12452
|
+
return jsx(Button, _objectSpread$h(_objectSpread$h({
|
|
12458
12453
|
onClick: isDisabled ? null : onClick,
|
|
12459
12454
|
url: url,
|
|
12460
12455
|
isDisabled: isDisabled,
|
|
@@ -12480,12 +12475,12 @@ function ButtonTyped (name, options) {
|
|
|
12480
12475
|
}
|
|
12481
12476
|
|
|
12482
12477
|
// NOTE: this component is duplicated in `app-shell/from-core`.
|
|
12483
|
-
var styles$
|
|
12478
|
+
var styles$8 = {
|
|
12484
12479
|
"button-close-container": "button-close-module__button-close-container___1uz2S"
|
|
12485
12480
|
};
|
|
12486
12481
|
var ButtonClose = function ButtonClose(props) {
|
|
12487
12482
|
return jsx("div", {
|
|
12488
|
-
className: styles$
|
|
12483
|
+
className: styles$8['button-close-container'],
|
|
12489
12484
|
onMouseOver: props.handleMouseOver,
|
|
12490
12485
|
onMouseOut: props.handleMouseOut,
|
|
12491
12486
|
onClick: props.onClick,
|
|
@@ -12502,9 +12497,9 @@ var ButtonClose = function ButtonClose(props) {
|
|
|
12502
12497
|
ButtonClose.displayName = 'ButtonClose';
|
|
12503
12498
|
var ButtonClose$1 = flowRight(keepDisplayName(ButtonClose), withMouseOverState)(ButtonClose);
|
|
12504
12499
|
|
|
12505
|
-
function ownKeys$
|
|
12506
|
-
function _objectSpread$
|
|
12507
|
-
var messages$
|
|
12500
|
+
function ownKeys$g(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12501
|
+
function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$g(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$g(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12502
|
+
var messages$5 = defineMessages({
|
|
12508
12503
|
cancel: {
|
|
12509
12504
|
id: 'Button.cancel',
|
|
12510
12505
|
description: 'Label for the cancel button',
|
|
@@ -12523,27 +12518,27 @@ var messages$6 = defineMessages({
|
|
|
12523
12518
|
});
|
|
12524
12519
|
var ButtonCancel = ButtonTyped('ButtonCancel', {
|
|
12525
12520
|
type: 'cancel',
|
|
12526
|
-
defaultLabel: jsx(FormattedMessage, _objectSpread$
|
|
12521
|
+
defaultLabel: jsx(FormattedMessage, _objectSpread$g({}, messages$5.cancel)),
|
|
12527
12522
|
hasAlternativeStyle: true
|
|
12528
12523
|
});
|
|
12529
12524
|
var ButtonConfirm = ButtonTyped('ButtonConfirm', {
|
|
12530
12525
|
type: 'confirm',
|
|
12531
|
-
defaultLabel: jsx(FormattedMessage, _objectSpread$
|
|
12526
|
+
defaultLabel: jsx(FormattedMessage, _objectSpread$g({}, messages$5.confirm)),
|
|
12532
12527
|
hasAlternativeStyle: true
|
|
12533
12528
|
});
|
|
12534
12529
|
var ButtonSave = ButtonTyped('ButtonSave', {
|
|
12535
12530
|
type: 'save',
|
|
12536
|
-
defaultLabel: jsx(FormattedMessage, _objectSpread$
|
|
12531
|
+
defaultLabel: jsx(FormattedMessage, _objectSpread$g({}, messages$5.save)),
|
|
12537
12532
|
hasAlternativeStyle: true
|
|
12538
12533
|
});
|
|
12539
12534
|
|
|
12540
|
-
function ownKeys$
|
|
12541
|
-
function _objectSpread$
|
|
12535
|
+
function ownKeys$f(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12536
|
+
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$f(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$f(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12542
12537
|
var parentSelector = function parentSelector() {
|
|
12543
12538
|
return process.env.NODE_ENV === 'test' ? document.body : document.querySelector("#".concat(PORTALS_CONTAINER_ID));
|
|
12544
12539
|
};
|
|
12545
12540
|
var ModalContainer = function ModalContainer(props) {
|
|
12546
|
-
return jsx(Modal, _objectSpread$
|
|
12541
|
+
return jsx(Modal, _objectSpread$f(_objectSpread$f({}, props), {}, {
|
|
12547
12542
|
parentSelector: parentSelector,
|
|
12548
12543
|
ariaHideApp: false,
|
|
12549
12544
|
children: props.children
|
|
@@ -12551,9 +12546,9 @@ var ModalContainer = function ModalContainer(props) {
|
|
|
12551
12546
|
};
|
|
12552
12547
|
ModalContainer.displayName = 'ModalContainer';
|
|
12553
12548
|
|
|
12554
|
-
function ownKeys$
|
|
12555
|
-
function _objectSpread$
|
|
12556
|
-
var styles$
|
|
12549
|
+
function ownKeys$e(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12550
|
+
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$e(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$e(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12551
|
+
var styles$7 = {
|
|
12557
12552
|
"container": "modal-content-layout-module__container___m-8MJ",
|
|
12558
12553
|
"header": "modal-content-layout-module__header___3s8J-",
|
|
12559
12554
|
"subtitle": "modal-content-layout-module__subtitle___W3B06",
|
|
@@ -12565,13 +12560,13 @@ var styles$9 = {
|
|
|
12565
12560
|
};
|
|
12566
12561
|
var ModalContentLayout = function ModalContentLayout(props) {
|
|
12567
12562
|
var dataAttrProps = filterDataAttributes(props);
|
|
12568
|
-
return jsxs("div", _objectSpread$
|
|
12569
|
-
className: styles$
|
|
12563
|
+
return jsxs("div", _objectSpread$e(_objectSpread$e({
|
|
12564
|
+
className: styles$7.container
|
|
12570
12565
|
}, dataAttrProps), {}, {
|
|
12571
12566
|
children: [jsxs("div", {
|
|
12572
|
-
className: styles$
|
|
12567
|
+
className: styles$7.header,
|
|
12573
12568
|
children: [Boolean(props.onClose) && jsx("div", {
|
|
12574
|
-
className: styles$
|
|
12569
|
+
className: styles$7['button-close'],
|
|
12575
12570
|
children: jsx(ButtonClose$1, {
|
|
12576
12571
|
onClick: props.onClose
|
|
12577
12572
|
})
|
|
@@ -12579,32 +12574,34 @@ var ModalContentLayout = function ModalContentLayout(props) {
|
|
|
12579
12574
|
as: "h2",
|
|
12580
12575
|
children: props.title
|
|
12581
12576
|
}), jsxs("div", {
|
|
12582
|
-
className: styles$
|
|
12577
|
+
className: styles$7.subheader,
|
|
12583
12578
|
children: [jsx("div", {
|
|
12584
|
-
className: styles$
|
|
12579
|
+
className: styles$7.subtitle,
|
|
12585
12580
|
children: props.subtitle
|
|
12586
12581
|
}), jsx("div", {
|
|
12587
12582
|
children: props.controls
|
|
12588
12583
|
})]
|
|
12589
12584
|
})]
|
|
12590
12585
|
}), jsx("div", {
|
|
12591
|
-
className: styles$
|
|
12586
|
+
className: styles$7.content,
|
|
12592
12587
|
children: props.children
|
|
12593
12588
|
}), props.footer && jsx("div", {
|
|
12594
|
-
className: styles$
|
|
12589
|
+
className: styles$7.footer,
|
|
12595
12590
|
children: props.footer
|
|
12596
12591
|
})]
|
|
12597
12592
|
}));
|
|
12598
12593
|
};
|
|
12599
12594
|
ModalContentLayout.displayName = 'ModalContentLayout';
|
|
12600
12595
|
|
|
12601
|
-
var styles$
|
|
12602
|
-
"colored": "required-indicator-module__colored____YUFm"
|
|
12596
|
+
var styles$6 = {
|
|
12597
|
+
"colored": "required-indicator-module__colored____YUFm",
|
|
12598
|
+
"indicatorAsterisk": "required-indicator-module__indicatorAsterisk___3lEdX"
|
|
12603
12599
|
};
|
|
12604
12600
|
var RequiredIndicator = function RequiredIndicator(_ref) {
|
|
12601
|
+
var _classnames;
|
|
12605
12602
|
var uncolored = _ref.uncolored;
|
|
12606
12603
|
return jsx("em", {
|
|
12607
|
-
className: classnames(
|
|
12604
|
+
className: classnames((_classnames = {}, _defineProperty(_classnames, styles$6.colored, !uncolored), _defineProperty(_classnames, styles$6.indicatorAsterisk, true), _classnames)),
|
|
12608
12605
|
children: '*'
|
|
12609
12606
|
});
|
|
12610
12607
|
};
|
|
@@ -12635,15 +12632,15 @@ var ScrollToFieldError = function ScrollToFieldError() {
|
|
|
12635
12632
|
return null;
|
|
12636
12633
|
};
|
|
12637
12634
|
|
|
12638
|
-
function ownKeys$
|
|
12639
|
-
function _objectSpread$
|
|
12640
|
-
var styles$
|
|
12635
|
+
function ownKeys$d(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12636
|
+
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$d(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$d(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12637
|
+
var styles$5 = {
|
|
12641
12638
|
"container": "selectable-field-search-input-module__container___z2ltR",
|
|
12642
12639
|
"search-mode-menu": "selectable-field-search-input-module__search-mode-menu___Od6Le"
|
|
12643
12640
|
};
|
|
12644
12641
|
var SearchModeOption = function SearchModeOption(props) {
|
|
12645
12642
|
var _props$label;
|
|
12646
|
-
return jsx(SelectInput.Option, _objectSpread$
|
|
12643
|
+
return jsx(SelectInput.Option, _objectSpread$d(_objectSpread$d({}, props), {}, {
|
|
12647
12644
|
children: jsx(Text.Body, {
|
|
12648
12645
|
truncate: true,
|
|
12649
12646
|
title: props.title || props.label,
|
|
@@ -12655,7 +12652,7 @@ var SearchModeOption = function SearchModeOption(props) {
|
|
|
12655
12652
|
SearchModeOption.displayName = 'SearchModeOption';
|
|
12656
12653
|
var SearchModeSingleValue = function SearchModeSingleValue(props) {
|
|
12657
12654
|
var _props$data$label;
|
|
12658
|
-
return jsx(SelectInput.SingleValue, _objectSpread$
|
|
12655
|
+
return jsx(SelectInput.SingleValue, _objectSpread$d(_objectSpread$d({}, props), {}, {
|
|
12659
12656
|
children: jsx(Text.Body, {
|
|
12660
12657
|
truncate: true,
|
|
12661
12658
|
title: props.data.title || props.data.label,
|
|
@@ -12666,8 +12663,8 @@ var SearchModeSingleValue = function SearchModeSingleValue(props) {
|
|
|
12666
12663
|
};
|
|
12667
12664
|
SearchModeSingleValue.displayName = 'SearchModeSingleValue';
|
|
12668
12665
|
var SearchModeMenu = function SearchModeMenu(props) {
|
|
12669
|
-
return jsx(SelectInput.Menu, _objectSpread$
|
|
12670
|
-
className: styles$
|
|
12666
|
+
return jsx(SelectInput.Menu, _objectSpread$d(_objectSpread$d({
|
|
12667
|
+
className: styles$5['search-mode-menu']
|
|
12671
12668
|
}, props), {}, {
|
|
12672
12669
|
children: props.children
|
|
12673
12670
|
}));
|
|
@@ -12692,13 +12689,13 @@ var SelectableFieldSearchInput = function SelectableFieldSearchInput(props) {
|
|
|
12692
12689
|
}
|
|
12693
12690
|
};
|
|
12694
12691
|
return jsxs("div", {
|
|
12695
|
-
className: styles$
|
|
12692
|
+
className: styles$5.container,
|
|
12696
12693
|
children: [jsx(AccessibleHidden, {
|
|
12697
12694
|
children: jsx("label", {
|
|
12698
12695
|
htmlFor: "select-search-mode",
|
|
12699
12696
|
children: "Open search mode"
|
|
12700
12697
|
})
|
|
12701
|
-
}), jsx(SelectInput, _objectSpread$
|
|
12698
|
+
}), jsx(SelectInput, _objectSpread$d({
|
|
12702
12699
|
id: "select-search-mode",
|
|
12703
12700
|
value: props.searchMode,
|
|
12704
12701
|
"aria-label": "search-mode",
|
|
@@ -12738,8 +12735,8 @@ var SelectableFieldSearchInput = function SelectableFieldSearchInput(props) {
|
|
|
12738
12735
|
};
|
|
12739
12736
|
SelectableFieldSearchInput.displayName = 'SelectableFieldSearchInput';
|
|
12740
12737
|
|
|
12741
|
-
function ownKeys$
|
|
12742
|
-
function _objectSpread$
|
|
12738
|
+
function ownKeys$c(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12739
|
+
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(_context = ownKeys$c(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$c(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12743
12740
|
var StoreSelectField = function StoreSelectField(props) {
|
|
12744
12741
|
return jsx(Constraints.Horizontal, {
|
|
12745
12742
|
max: props.horizontalConstraint,
|
|
@@ -12753,7 +12750,7 @@ var StoreSelectField = function StoreSelectField(props) {
|
|
|
12753
12750
|
htmlFor: props.id,
|
|
12754
12751
|
hasRequiredIndicator: props.isRequired,
|
|
12755
12752
|
isBold: props.isBold
|
|
12756
|
-
}), jsx(StoreSelectInput, _objectSpread$
|
|
12753
|
+
}), jsx(StoreSelectInput, _objectSpread$c(_objectSpread$c({
|
|
12757
12754
|
projectKey: props.projectKey,
|
|
12758
12755
|
id: props.id,
|
|
12759
12756
|
name: props.name,
|
|
@@ -12791,8 +12788,8 @@ StoreSelectField.defaultProps = {
|
|
|
12791
12788
|
mappedValueField: 'id'
|
|
12792
12789
|
};
|
|
12793
12790
|
|
|
12794
|
-
function ownKeys$
|
|
12795
|
-
function _objectSpread$
|
|
12791
|
+
function ownKeys$b(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12792
|
+
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$b(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$b(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12796
12793
|
var BusinessUnitSelectField = function BusinessUnitSelectField(props) {
|
|
12797
12794
|
return jsx(Constraints.Horizontal, {
|
|
12798
12795
|
max: props.horizontalConstraint,
|
|
@@ -12806,7 +12803,7 @@ var BusinessUnitSelectField = function BusinessUnitSelectField(props) {
|
|
|
12806
12803
|
htmlFor: props.id,
|
|
12807
12804
|
hasRequiredIndicator: props.isRequired,
|
|
12808
12805
|
isBold: props.isBold
|
|
12809
|
-
}), jsx(BusinessUnitSelectInput, _objectSpread$
|
|
12806
|
+
}), jsx(BusinessUnitSelectInput, _objectSpread$b(_objectSpread$b(_objectSpread$b({
|
|
12810
12807
|
id: props.id,
|
|
12811
12808
|
name: props.name,
|
|
12812
12809
|
horizontalConstraint: props.horizontalConstraint,
|
|
@@ -12845,11 +12842,11 @@ BusinessUnitSelectField.defaultProps = {
|
|
|
12845
12842
|
mappedValueField: 'id'
|
|
12846
12843
|
};
|
|
12847
12844
|
|
|
12848
|
-
function ownKeys$
|
|
12849
|
-
function _objectSpread$
|
|
12850
|
-
function _createSuper$
|
|
12851
|
-
function _isNativeReflectConstruct$
|
|
12852
|
-
var styles$
|
|
12845
|
+
function ownKeys$a(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12846
|
+
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$a(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$a(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12847
|
+
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12848
|
+
function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12849
|
+
var styles$4 = {
|
|
12853
12850
|
"container": "tooltip-module__container___2R5k4",
|
|
12854
12851
|
"box": "tooltip-module__box___1V72T",
|
|
12855
12852
|
"body": "tooltip-module__body___1hJvc",
|
|
@@ -12877,7 +12874,7 @@ var styles$6 = {
|
|
|
12877
12874
|
};
|
|
12878
12875
|
var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
12879
12876
|
_inherits(Tooltip, _PureComponent);
|
|
12880
|
-
var _super = _createSuper$
|
|
12877
|
+
var _super = _createSuper$2(Tooltip);
|
|
12881
12878
|
function Tooltip() {
|
|
12882
12879
|
var _context;
|
|
12883
12880
|
var _this;
|
|
@@ -12934,14 +12931,14 @@ var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
|
12934
12931
|
return jsxs("div", {
|
|
12935
12932
|
className: tooltipClassName,
|
|
12936
12933
|
children: [jsx("div", {
|
|
12937
|
-
className: styles$
|
|
12934
|
+
className: styles$4.body,
|
|
12938
12935
|
children: message
|
|
12939
12936
|
}), jsx("div", {
|
|
12940
|
-
className: styles$
|
|
12937
|
+
className: styles$4['arrow-shadow-top']
|
|
12941
12938
|
}), jsx("div", {
|
|
12942
|
-
className: styles$
|
|
12939
|
+
className: styles$4['arrow-top-border']
|
|
12943
12940
|
}), jsx("div", {
|
|
12944
|
-
className: styles$
|
|
12941
|
+
className: styles$4['arrow-top']
|
|
12945
12942
|
})]
|
|
12946
12943
|
});
|
|
12947
12944
|
};
|
|
@@ -12949,14 +12946,14 @@ var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
|
12949
12946
|
return jsxs("div", {
|
|
12950
12947
|
className: tooltipClassName,
|
|
12951
12948
|
children: [jsx("div", {
|
|
12952
|
-
className: styles$
|
|
12949
|
+
className: styles$4.body,
|
|
12953
12950
|
children: message
|
|
12954
12951
|
}), jsx("div", {
|
|
12955
|
-
className: styles$
|
|
12952
|
+
className: styles$4['arrow-shadow-top-right']
|
|
12956
12953
|
}), jsx("div", {
|
|
12957
|
-
className: styles$
|
|
12954
|
+
className: styles$4['arrow-top-right-border']
|
|
12958
12955
|
}), jsx("div", {
|
|
12959
|
-
className: styles$
|
|
12956
|
+
className: styles$4['arrow-top-right']
|
|
12960
12957
|
})]
|
|
12961
12958
|
});
|
|
12962
12959
|
};
|
|
@@ -12964,11 +12961,11 @@ var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
|
12964
12961
|
return jsxs("div", {
|
|
12965
12962
|
className: tooltipClassName,
|
|
12966
12963
|
children: [jsx("div", {
|
|
12967
|
-
className: styles$
|
|
12964
|
+
className: styles$4['arrow-right-border']
|
|
12968
12965
|
}), jsx("div", {
|
|
12969
|
-
className: styles$
|
|
12966
|
+
className: styles$4['arrow-right']
|
|
12970
12967
|
}), jsx("div", {
|
|
12971
|
-
className: styles$
|
|
12968
|
+
className: styles$4.body,
|
|
12972
12969
|
children: message
|
|
12973
12970
|
})]
|
|
12974
12971
|
});
|
|
@@ -12977,11 +12974,11 @@ var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
|
12977
12974
|
return jsxs("div", {
|
|
12978
12975
|
className: tooltipClassName,
|
|
12979
12976
|
children: [jsx("div", {
|
|
12980
|
-
className: styles$
|
|
12977
|
+
className: styles$4['arrow-bottom-border']
|
|
12981
12978
|
}), jsx("div", {
|
|
12982
|
-
className: styles$
|
|
12979
|
+
className: styles$4['arrow-bottom']
|
|
12983
12980
|
}), jsx("div", {
|
|
12984
|
-
className: styles$
|
|
12981
|
+
className: styles$4.body,
|
|
12985
12982
|
children: message
|
|
12986
12983
|
})]
|
|
12987
12984
|
});
|
|
@@ -12990,17 +12987,17 @@ var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
|
12990
12987
|
return jsxs("div", {
|
|
12991
12988
|
className: tooltipClassName,
|
|
12992
12989
|
children: [jsx("div", {
|
|
12993
|
-
className: styles$
|
|
12990
|
+
className: styles$4['arrow-left-border']
|
|
12994
12991
|
}), jsx("div", {
|
|
12995
|
-
className: styles$
|
|
12992
|
+
className: styles$4['arrow-left']
|
|
12996
12993
|
}), jsx("div", {
|
|
12997
|
-
className: styles$
|
|
12994
|
+
className: styles$4.body,
|
|
12998
12995
|
children: message
|
|
12999
12996
|
})]
|
|
13000
12997
|
});
|
|
13001
12998
|
};
|
|
13002
12999
|
_this.render = function () {
|
|
13003
|
-
var tooltipClassName = classnames(styles$
|
|
13000
|
+
var tooltipClassName = classnames(styles$4.container, styles$4["container-".concat(_this.props.position)], styles$4["".concat(_this.props.type)], _defineProperty({}, styles$4.hide, !_this.state.visible));
|
|
13004
13001
|
var containerProps = {
|
|
13005
13002
|
hover: {
|
|
13006
13003
|
onMouseEnter: _this.onMouseEnter,
|
|
@@ -13016,8 +13013,8 @@ var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
|
13016
13013
|
if (_this.props.position === 'bottom') rendererFn = _this.renderTooltipBottom;
|
|
13017
13014
|
if (_this.props.position === 'left') rendererFn = _this.renderTooltipLeft;
|
|
13018
13015
|
if (_this.props.position === 'right') rendererFn = _this.renderTooltipRight;
|
|
13019
|
-
return jsxs("div", _objectSpread$
|
|
13020
|
-
className: classnames(_this.props.className, styles$
|
|
13016
|
+
return jsxs("div", _objectSpread$a(_objectSpread$a({}, containerProps[_this.props.trigger]), {}, {
|
|
13017
|
+
className: classnames(_this.props.className, styles$4.box),
|
|
13021
13018
|
children: [rendererFn(tooltipClassName, _this.props.message), _this.props.children]
|
|
13022
13019
|
}));
|
|
13023
13020
|
};
|
|
@@ -13067,17 +13064,17 @@ Tooltip.defaultProps = {
|
|
|
13067
13064
|
autohide: {
|
|
13068
13065
|
enabled: true,
|
|
13069
13066
|
timeout: 5000,
|
|
13070
|
-
onHide: noop
|
|
13067
|
+
onHide: noop
|
|
13071
13068
|
}
|
|
13072
13069
|
};
|
|
13073
|
-
function noop
|
|
13070
|
+
function noop() {}
|
|
13074
13071
|
|
|
13075
13072
|
var _templateObject;
|
|
13076
|
-
function ownKeys$
|
|
13077
|
-
function _objectSpread$
|
|
13078
|
-
function _createSuper$
|
|
13079
|
-
function _isNativeReflectConstruct$
|
|
13080
|
-
var styles$
|
|
13073
|
+
function ownKeys$9(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13074
|
+
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var _context7, _context8; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context7 = ownKeys$9(Object(source), !0)).call(_context7, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context8 = ownKeys$9(Object(source))).call(_context8, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13075
|
+
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13076
|
+
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13077
|
+
var styles$3 = {
|
|
13081
13078
|
"invalid": "validated-input-module__invalid___380EL",
|
|
13082
13079
|
"container": "validated-input-module__container___3L2KB"
|
|
13083
13080
|
}; // Note: don't use `g`! Regex with global flag have state
|
|
@@ -13093,7 +13090,7 @@ var validateRequired = function validateRequired(value) {
|
|
|
13093
13090
|
};
|
|
13094
13091
|
var VALIDATOR_REQUIRED = {
|
|
13095
13092
|
name: 'required',
|
|
13096
|
-
message: messages$
|
|
13093
|
+
message: messages$J.required,
|
|
13097
13094
|
permanent: true,
|
|
13098
13095
|
validators: {
|
|
13099
13096
|
change: function change(value) {
|
|
@@ -13107,7 +13104,7 @@ var VALIDATOR_REQUIRED = {
|
|
|
13107
13104
|
};
|
|
13108
13105
|
var VALIDATOR_NUMERIC = {
|
|
13109
13106
|
name: 'numeric',
|
|
13110
|
-
message: messages$
|
|
13107
|
+
message: messages$J.numeric,
|
|
13111
13108
|
permanent: false,
|
|
13112
13109
|
validators: {
|
|
13113
13110
|
change: function change(v) {
|
|
@@ -13122,7 +13119,7 @@ var VALIDATOR_NUMERIC = {
|
|
|
13122
13119
|
};
|
|
13123
13120
|
var VALIDATOR_INTEGER = {
|
|
13124
13121
|
name: 'integer',
|
|
13125
|
-
message: messages$
|
|
13122
|
+
message: messages$J.integer,
|
|
13126
13123
|
permanent: false,
|
|
13127
13124
|
validators: {
|
|
13128
13125
|
change: function change(v) {
|
|
@@ -13137,7 +13134,7 @@ var VALIDATOR_INTEGER = {
|
|
|
13137
13134
|
};
|
|
13138
13135
|
({
|
|
13139
13136
|
name: 'email',
|
|
13140
|
-
message: messages$
|
|
13137
|
+
message: messages$J.email,
|
|
13141
13138
|
permanent: false,
|
|
13142
13139
|
validators: {
|
|
13143
13140
|
// Note: it's a bit weird to validate it on every change,
|
|
@@ -13173,7 +13170,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
13173
13170
|
});
|
|
13174
13171
|
var ValidatedInput = /*#__PURE__*/function (_PureComponent) {
|
|
13175
13172
|
_inherits(ValidatedInput, _PureComponent);
|
|
13176
|
-
var _super = _createSuper$
|
|
13173
|
+
var _super = _createSuper$1(ValidatedInput);
|
|
13177
13174
|
function ValidatedInput() {
|
|
13178
13175
|
var _context5;
|
|
13179
13176
|
var _this;
|
|
@@ -13209,7 +13206,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
13209
13206
|
_this.conditionalSetValidStatus(nextValidStatus);
|
|
13210
13207
|
};
|
|
13211
13208
|
_this.handleInvalid = function () {
|
|
13212
|
-
var nextValidStatus = _objectSpread$
|
|
13209
|
+
var nextValidStatus = _objectSpread$9({}, _this.state.validStatus);
|
|
13213
13210
|
if (has(nextValidStatus, 'numeric')) {
|
|
13214
13211
|
nextValidStatus.numeric = false;
|
|
13215
13212
|
_this.conditionalSetValidStatus(nextValidStatus);
|
|
@@ -13263,7 +13260,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
13263
13260
|
if (prev) return _this2.state.validStatus[v.name];
|
|
13264
13261
|
return prev;
|
|
13265
13262
|
}, true);
|
|
13266
|
-
var componentProps = _objectSpread$
|
|
13263
|
+
var componentProps = _objectSpread$9(_objectSpread$9({}, this.props), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, blurHandler || 'onBlurValue', this.handleBlur), _defineProperty(_objectSpread2, changeHandler || 'onChange', this.handleChange), _defineProperty(_objectSpread2, "onInvalidValue", this.handleInvalid), _defineProperty(_objectSpread2, "isValid", this.props.isValid && isValid), _defineProperty(_objectSpread2, "getInputRef", this.props.getInputRef), _objectSpread2));
|
|
13267
13264
|
var firstFailedValidator = _findInstanceProperty(_validators).call(_validators, function (v) {
|
|
13268
13265
|
return !_this2.state.validStatus[v.name];
|
|
13269
13266
|
});
|
|
@@ -13280,9 +13277,9 @@ function validatedInput(InnerComponent, validators) {
|
|
|
13280
13277
|
message: firstFailedValidator && this.props.intl.formatMessage(firstFailedValidator.message) || ''
|
|
13281
13278
|
};
|
|
13282
13279
|
return jsx("div", {
|
|
13283
|
-
className: classnames(styles$
|
|
13284
|
-
children: jsx(Tooltip, _objectSpread$
|
|
13285
|
-
children: jsx(_InnerComponent, _objectSpread$
|
|
13280
|
+
className: classnames(styles$3.container, containerClassName),
|
|
13281
|
+
children: jsx(Tooltip, _objectSpread$9(_objectSpread$9({}, tooltipProps), {}, {
|
|
13282
|
+
children: jsx(_InnerComponent, _objectSpread$9({}, componentProps))
|
|
13286
13283
|
}))
|
|
13287
13284
|
});
|
|
13288
13285
|
}
|
|
@@ -13300,7 +13297,7 @@ function simpleInput(type) {
|
|
|
13300
13297
|
var _class;
|
|
13301
13298
|
return _class = /*#__PURE__*/function (_PureComponent2) {
|
|
13302
13299
|
_inherits(_class, _PureComponent2);
|
|
13303
|
-
var _super2 = _createSuper$
|
|
13300
|
+
var _super2 = _createSuper$1(_class);
|
|
13304
13301
|
function _class() {
|
|
13305
13302
|
var _context6;
|
|
13306
13303
|
var _this3;
|
|
@@ -13318,7 +13315,7 @@ function simpleInput(type) {
|
|
|
13318
13315
|
key: "render",
|
|
13319
13316
|
value: function render() {
|
|
13320
13317
|
return jsx("input", {
|
|
13321
|
-
className: classnames(this.props.className, _defineProperty({}, styles$
|
|
13318
|
+
className: classnames(this.props.className, _defineProperty({}, styles$3.invalid, !this.props.isValid)),
|
|
13322
13319
|
name: this.props.name,
|
|
13323
13320
|
disabled: this.props.disabled,
|
|
13324
13321
|
ref: this.props.getInputRef,
|
|
@@ -13336,7 +13333,7 @@ function simpleInput(type) {
|
|
|
13336
13333
|
}, _class;
|
|
13337
13334
|
}
|
|
13338
13335
|
|
|
13339
|
-
var messages$
|
|
13336
|
+
var messages$4 = defineMessages({
|
|
13340
13337
|
customFieldsError: {
|
|
13341
13338
|
id: 'CustomFieldsError.Error',
|
|
13342
13339
|
description: 'The message when there are errors adding custom fields',
|
|
@@ -13344,14 +13341,14 @@ var messages$5 = defineMessages({
|
|
|
13344
13341
|
}
|
|
13345
13342
|
});
|
|
13346
13343
|
|
|
13347
|
-
function ownKeys$
|
|
13348
|
-
function _objectSpread$
|
|
13344
|
+
function ownKeys$8(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13345
|
+
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys$8(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys$8(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13349
13346
|
var CustomFieldsErrorTextNotification = function CustomFieldsErrorTextNotification(props) {
|
|
13350
13347
|
var _context;
|
|
13351
13348
|
return jsxs(Spacings.Stack, {
|
|
13352
13349
|
scale: "s",
|
|
13353
13350
|
children: [jsx(Text.Wrap, {
|
|
13354
|
-
intlMessage: _objectSpread$
|
|
13351
|
+
intlMessage: _objectSpread$8({}, messages$4.customFieldsError)
|
|
13355
13352
|
}), jsx(Spacings.Stack, {
|
|
13356
13353
|
scale: "xs",
|
|
13357
13354
|
children: _mapInstanceProperty(_context = props.formErrors).call(_context, function (formError) {
|
|
@@ -13365,67 +13362,9 @@ var CustomFieldsErrorTextNotification = function CustomFieldsErrorTextNotificati
|
|
|
13365
13362
|
};
|
|
13366
13363
|
CustomFieldsErrorTextNotification.displayName = 'CustomFieldsErrorTextNotification';
|
|
13367
13364
|
|
|
13368
|
-
var
|
|
13369
|
-
|
|
13370
|
-
|
|
13371
|
-
description: 'The label to expand a text attribute.',
|
|
13372
|
-
defaultMessage: 'Expand'
|
|
13373
|
-
},
|
|
13374
|
-
collapse: {
|
|
13375
|
-
id: 'ExpandControl.collapse',
|
|
13376
|
-
description: 'The label to collapse a text attribute.',
|
|
13377
|
-
defaultMessage: 'Collapse'
|
|
13378
|
-
}
|
|
13379
|
-
});
|
|
13380
|
-
|
|
13381
|
-
function ownKeys$b(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13382
|
-
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$b(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$b(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13383
|
-
var styles$4 = {
|
|
13384
|
-
"expandable-field": "expandable-field-module__expandable-field___1obGc"
|
|
13385
|
-
};
|
|
13386
|
-
var RequiredThrottledField = validatedInput(ThrottledField, [VALIDATOR_REQUIRED]);
|
|
13387
|
-
var ExpandableField = function ExpandableField(props) {
|
|
13388
|
-
var value = props.value,
|
|
13389
|
-
onToggle = props.onToggle,
|
|
13390
|
-
isExpanded = props.isExpanded,
|
|
13391
|
-
onChange = props.onChange,
|
|
13392
|
-
onBlurValue = props.onBlurValue,
|
|
13393
|
-
definition = props.definition,
|
|
13394
|
-
disabled = props.disabled;
|
|
13395
|
-
|
|
13396
|
-
// Filter out only `data-*` props
|
|
13397
|
-
var dataProps = filterDataAttributes(props);
|
|
13398
|
-
var fieldProps = _objectSpread$b({
|
|
13399
|
-
as: 'textarea',
|
|
13400
|
-
value: value,
|
|
13401
|
-
onChange: onChange,
|
|
13402
|
-
onBlurValue: onBlurValue,
|
|
13403
|
-
autoSize: isExpanded,
|
|
13404
|
-
disabled: disabled
|
|
13405
|
-
}, dataProps);
|
|
13406
|
-
var isRequired = definition && definition.isRequired;
|
|
13407
|
-
return jsxs("div", {
|
|
13408
|
-
className: classnames(styles$4['expandable-field'], props.expandableFieldModalClassName),
|
|
13409
|
-
children: [isRequired ? jsx(RequiredThrottledField, _objectSpread$b({}, fieldProps)) : jsx(ThrottledField, _objectSpread$b({}, fieldProps)), value ? jsx(FlatButton, {
|
|
13410
|
-
onClick: onToggle,
|
|
13411
|
-
icon: isExpanded ? jsx(AngleUpIcon, {}) : jsx(AngleDownIcon, {}),
|
|
13412
|
-
tone: "primary",
|
|
13413
|
-
label: props.intl.formatMessage(isExpanded ? messages$4.collapse : messages$4.expand)
|
|
13414
|
-
}) : null]
|
|
13415
|
-
});
|
|
13416
|
-
};
|
|
13417
|
-
ExpandableField.displayName = 'ExpandableField';
|
|
13418
|
-
ExpandableField.defaultProps = {
|
|
13419
|
-
definition: {
|
|
13420
|
-
isRequired: false
|
|
13421
|
-
},
|
|
13422
|
-
disabled: false
|
|
13423
|
-
};
|
|
13424
|
-
var ExpandableField$1 = injectIntl(ExpandableField);
|
|
13425
|
-
|
|
13426
|
-
function ownKeys$a(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13427
|
-
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$a(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$a(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13428
|
-
var styles$3 = {
|
|
13365
|
+
function ownKeys$7(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13366
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$7(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$7(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13367
|
+
var styles$2 = {
|
|
13429
13368
|
"label": "label-range-module__label___3Tb0p"
|
|
13430
13369
|
};
|
|
13431
13370
|
var messages$3 = defineMessages({
|
|
@@ -13443,14 +13382,14 @@ var messages$3 = defineMessages({
|
|
|
13443
13382
|
var LabelRange = function LabelRange(_ref) {
|
|
13444
13383
|
var type = _ref.type;
|
|
13445
13384
|
return jsx("label", {
|
|
13446
|
-
className: styles$
|
|
13447
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
13385
|
+
className: styles$2.label,
|
|
13386
|
+
children: jsx(FormattedMessage, _objectSpread$7({}, messages$3[type]))
|
|
13448
13387
|
});
|
|
13449
13388
|
};
|
|
13450
13389
|
LabelRange.displayName = 'LabelRange';
|
|
13451
13390
|
|
|
13452
|
-
function ownKeys$
|
|
13453
|
-
function _objectSpread$
|
|
13391
|
+
function ownKeys$6(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13392
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$6(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$6(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13454
13393
|
var messages$2 = defineMessages({
|
|
13455
13394
|
title: {
|
|
13456
13395
|
id: 'LabelRequired.title',
|
|
@@ -13459,7 +13398,7 @@ var messages$2 = defineMessages({
|
|
|
13459
13398
|
}
|
|
13460
13399
|
});
|
|
13461
13400
|
var LabelRequired = function LabelRequired() {
|
|
13462
|
-
return jsx(FormattedMessage, _objectSpread$
|
|
13401
|
+
return jsx(FormattedMessage, _objectSpread$6(_objectSpread$6({}, messages$2.title), {}, {
|
|
13463
13402
|
values: {
|
|
13464
13403
|
star: jsx(RequiredIndicator, {})
|
|
13465
13404
|
}
|
|
@@ -13467,313 +13406,6 @@ var LabelRequired = function LabelRequired() {
|
|
|
13467
13406
|
};
|
|
13468
13407
|
LabelRequired.displayName = 'LabelRequired';
|
|
13469
13408
|
|
|
13470
|
-
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13471
|
-
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13472
|
-
function ownKeys$8(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13473
|
-
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context4 = ownKeys$8(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context5 = ownKeys$8(Object(source))).call(_context5, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13474
|
-
var styles$2 = {
|
|
13475
|
-
"fields": "localized-field-module__fields___2pYgl",
|
|
13476
|
-
"input-text": "localized-field-module__input-text___19OTB",
|
|
13477
|
-
"all-locales": "localized-field-module__all-locales___3xnTj",
|
|
13478
|
-
"current-locale": "localized-field-module__current-locale___1OAvW",
|
|
13479
|
-
"available-locales": "localized-field-module__available-locales___1LL64",
|
|
13480
|
-
"counter": "localized-field-module__counter___M4crF",
|
|
13481
|
-
"locale": "localized-field-module__locale___1f9h9",
|
|
13482
|
-
"locale-modal": "localized-field-module__locale-modal___1hp7U",
|
|
13483
|
-
"text-area": "localized-field-module__text-area___2CkYY",
|
|
13484
|
-
"container": "localized-field-module__container___4wHqe",
|
|
13485
|
-
"container-expandable": "localized-field-module__container-expandable___LX72x localized-field-module__container___4wHqe",
|
|
13486
|
-
"left-cell": "localized-field-module__left-cell___YWB1o",
|
|
13487
|
-
"set-width": "localized-field-module__set-width___3BitN",
|
|
13488
|
-
"right-cell": "localized-field-module__right-cell___1ziDs",
|
|
13489
|
-
"field": "localized-field-module__field___193NR",
|
|
13490
|
-
"container-modal": "localized-field-module__container-modal___9rZ1j localized-field-module__container___4wHqe",
|
|
13491
|
-
"expandable-field-modal": "localized-field-module__expandable-field-modal___4P_Bs",
|
|
13492
|
-
"textarea-modal": "localized-field-module__textarea-modal___2BZTl",
|
|
13493
|
-
"edit-modal-form": "localized-field-module__edit-modal-form___1JH5t",
|
|
13494
|
-
"field-modal-search": "localized-field-module__field-modal-search___1pmvd",
|
|
13495
|
-
"locale-modal-search": "localized-field-module__locale-modal-search___3fdr9",
|
|
13496
|
-
"input": "localized-field-module__input___2wG41 localized-field-module__input-text___19OTB",
|
|
13497
|
-
"transition-modal-overlay": "localized-field-module__transition-modal-overlay___1Rzbn",
|
|
13498
|
-
"transition-modal-content": "localized-field-module__transition-modal-content___3TZ0q",
|
|
13499
|
-
"second-layer": "localized-field-module__second-layer___37wlq",
|
|
13500
|
-
"third-layer": "localized-field-module__third-layer___2QOn9",
|
|
13501
|
-
"push-right": "localized-field-module__push-right___KDu9r",
|
|
13502
|
-
"field-modal": "localized-field-module__field-modal___28xSG",
|
|
13503
|
-
"warning": "localized-field-module__warning___HguI1",
|
|
13504
|
-
"container-tooltip": "localized-field-module__container-tooltip___2h2P4"
|
|
13505
|
-
}; // This component is used to "reset" the default wrapper styles of
|
|
13506
|
-
// the Tooltip in order to render the underlying input with full width.
|
|
13507
|
-
// eslint-disable-next-line react/display-name
|
|
13508
|
-
var WrapperComponent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
13509
|
-
return jsx("div", _objectSpread$8(_objectSpread$8({}, props), {}, {
|
|
13510
|
-
ref: ref
|
|
13511
|
-
}));
|
|
13512
|
-
});
|
|
13513
|
-
function localizedField(FieldComponent, FieldFooter) {
|
|
13514
|
-
var LocalizedField = /*#__PURE__*/function (_PureComponent) {
|
|
13515
|
-
_inherits(LocalizedField, _PureComponent);
|
|
13516
|
-
var _super = _createSuper$1(LocalizedField);
|
|
13517
|
-
function LocalizedField() {
|
|
13518
|
-
var _context;
|
|
13519
|
-
var _this;
|
|
13520
|
-
_classCallCheck(this, LocalizedField);
|
|
13521
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
13522
|
-
args[_key] = arguments[_key];
|
|
13523
|
-
}
|
|
13524
|
-
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
13525
|
-
_this.state = {
|
|
13526
|
-
modalIsOpen: false,
|
|
13527
|
-
hasReceivedFocus: false,
|
|
13528
|
-
activeModalCount: 0
|
|
13529
|
-
};
|
|
13530
|
-
_this.calculateEmptyLocales = function () {
|
|
13531
|
-
var _context2, _context3;
|
|
13532
|
-
var filledLocales = _reduceInstanceProperty(_context2 = _this.props.languages).call(_context2, function (count, lang) {
|
|
13533
|
-
if (_this.props.value && lang in _this.props.value)
|
|
13534
|
-
// eslint-disable-next-line no-param-reassign
|
|
13535
|
-
count += 1;
|
|
13536
|
-
return count;
|
|
13537
|
-
}, 0);
|
|
13538
|
-
return jsxs("div", {
|
|
13539
|
-
children: [jsx("span", {
|
|
13540
|
-
className: styles$2['current-locale'],
|
|
13541
|
-
children: _this.props.selectedLanguage.toUpperCase()
|
|
13542
|
-
}), jsx("span", {
|
|
13543
|
-
className: styles$2['available-locales'],
|
|
13544
|
-
children: _concatInstanceProperty(_context3 = "".concat(filledLocales, " / ")).call(_context3, _this.props.languages.length)
|
|
13545
|
-
})]
|
|
13546
|
-
});
|
|
13547
|
-
};
|
|
13548
|
-
_this.handleChange = function (event) {
|
|
13549
|
-
var lang = getDataAttribute(event.target, 'data-lang');
|
|
13550
|
-
var newValue = _objectSpread$8(_objectSpread$8({}, _this.props.value), {}, _defineProperty({}, lang, event.target.value));
|
|
13551
|
-
if (!event.target.value) delete newValue[lang];
|
|
13552
|
-
var val = _Object$keys(newValue).length ? newValue : undefined;
|
|
13553
|
-
if (_this.props.onKeyUp) _this.props.onKeyUp(val, event);
|
|
13554
|
-
if (_this.props.onChangeValue) _this.props.onChangeValue(val, event);
|
|
13555
|
-
};
|
|
13556
|
-
_this.handleBlur = function (value) {
|
|
13557
|
-
_this.setState({
|
|
13558
|
-
hasReceivedFocus: true
|
|
13559
|
-
});
|
|
13560
|
-
if (_this.props.onBlurValue) _this.props.onBlurValue(value);
|
|
13561
|
-
};
|
|
13562
|
-
_this.editAll = function () {
|
|
13563
|
-
_this.setState({
|
|
13564
|
-
modalIsOpen: true,
|
|
13565
|
-
activeModalCount: activeModals()
|
|
13566
|
-
}, function () {
|
|
13567
|
-
if (_this.props.onModalOpen) _this.props.onModalOpen(_this.modalContent);
|
|
13568
|
-
});
|
|
13569
|
-
};
|
|
13570
|
-
_this.closeModal = function () {
|
|
13571
|
-
if (_this.props.onBlurValue) _this.props.onBlurValue();
|
|
13572
|
-
_this.setState({
|
|
13573
|
-
modalIsOpen: false
|
|
13574
|
-
});
|
|
13575
|
-
};
|
|
13576
|
-
_this.valuesAreEmpty = function () {
|
|
13577
|
-
if (_this.props.value === null || _this.props.value === undefined) return true;
|
|
13578
|
-
var localeKeys = _Object$keys(_this.props.value);
|
|
13579
|
-
var localeWithValues = _filterInstanceProperty(localeKeys).call(localeKeys, function (lang) {
|
|
13580
|
-
return !!_this.props.value[lang];
|
|
13581
|
-
});
|
|
13582
|
-
return !localeWithValues.length;
|
|
13583
|
-
};
|
|
13584
|
-
_this.renderInputGroups = function (locales) {
|
|
13585
|
-
var withModal = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
13586
|
-
var hasLocales = withModal && _this.props.languages.length > 1;
|
|
13587
|
-
var isRequired = Boolean(_this.props.definition && _this.props.definition.isRequired);
|
|
13588
|
-
var showEmptyErrorModal = isRequired && !withModal && _this.valuesAreEmpty();
|
|
13589
|
-
var showEmptyErrorNonModal = _this.state.hasReceivedFocus && isRequired && withModal && _this.valuesAreEmpty();
|
|
13590
|
-
var showError = function showError(lang) {
|
|
13591
|
-
return Boolean(showEmptyErrorNonModal || showEmptyErrorModal && lang === _this.props.selectedLanguage);
|
|
13592
|
-
};
|
|
13593
|
-
return jsx("div", {
|
|
13594
|
-
className: styles$2.fields,
|
|
13595
|
-
"data-track-component": hasLocales ? 'LocalizedField' : 'DetailInput',
|
|
13596
|
-
ref: function ref(div) {
|
|
13597
|
-
_this.modalContent = div;
|
|
13598
|
-
},
|
|
13599
|
-
children: _mapInstanceProperty(locales).call(locales, function (lang) {
|
|
13600
|
-
return jsxs("div", {
|
|
13601
|
-
className: classnames(styles$2.field, _defineProperty({}, styles$2['field-modal'], !withModal), _defineProperty({}, styles$2['field-modal-search'], !withModal && _this.props.isSearch)),
|
|
13602
|
-
children: [jsxs("div", {
|
|
13603
|
-
className: styles$2[withModal ? 'container' : 'container-modal'],
|
|
13604
|
-
children: [jsx("div", {
|
|
13605
|
-
className: classnames(styles$2['left-cell'], _defineProperty({}, styles$2['set-width'], _this.props.isSearch)),
|
|
13606
|
-
children: jsx(Tooltip$1, {
|
|
13607
|
-
isOpen: showError(lang),
|
|
13608
|
-
placement: "top",
|
|
13609
|
-
title: _this.props.intl.formatMessage(messages$K.required),
|
|
13610
|
-
styles: {
|
|
13611
|
-
body: {
|
|
13612
|
-
alignSelf: 'flex-start'
|
|
13613
|
-
}
|
|
13614
|
-
},
|
|
13615
|
-
components: {
|
|
13616
|
-
WrapperComponent: WrapperComponent
|
|
13617
|
-
},
|
|
13618
|
-
children: jsx(FieldComponent, {
|
|
13619
|
-
autoComplete: _this.props.autoComplete,
|
|
13620
|
-
name: _this.props.name,
|
|
13621
|
-
placeholder: _this.props.placeholder,
|
|
13622
|
-
value: _this.props.value && _this.props.value[lang],
|
|
13623
|
-
onChange: _this.handleChange,
|
|
13624
|
-
onBlurValue: _this.handleBlur,
|
|
13625
|
-
onKeyUp: _this.handleChange,
|
|
13626
|
-
onToggle: _this.props.onToggle,
|
|
13627
|
-
autoExpand: !withModal,
|
|
13628
|
-
hasExpand: _this.props.hasExpand,
|
|
13629
|
-
isExpanded: _this.props.isExpanded,
|
|
13630
|
-
"data-testid": "localized-field-".concat(lang),
|
|
13631
|
-
"data-lang": lang,
|
|
13632
|
-
"data-track-event": "change",
|
|
13633
|
-
"data-track-label": _this.props.name,
|
|
13634
|
-
localizedFieldProps: _this.props.localizedFieldProps,
|
|
13635
|
-
isValid: !showError(lang),
|
|
13636
|
-
inputClassName: styles$2.input,
|
|
13637
|
-
expandableFieldModalClassName: classnames(_defineProperty({}, styles$2['expandable-field-modal'], !withModal)),
|
|
13638
|
-
textAreaClassName: classnames(_defineProperty({}, styles$2['textarea-modal'], !withModal)),
|
|
13639
|
-
disabled: _this.props.disabled
|
|
13640
|
-
})
|
|
13641
|
-
})
|
|
13642
|
-
}), jsx("div", {
|
|
13643
|
-
className: styles$2['right-cell'],
|
|
13644
|
-
children: hasLocales ? jsxs("div", {
|
|
13645
|
-
children: [jsx("div", {
|
|
13646
|
-
className: classnames(styles$2['all-locales']),
|
|
13647
|
-
"data-track-component": "Edit",
|
|
13648
|
-
"data-track-event": "click",
|
|
13649
|
-
"data-track-label": _this.props.name,
|
|
13650
|
-
onClick: _this.editAll,
|
|
13651
|
-
children: jsx("span", {
|
|
13652
|
-
className: styles$2.counter,
|
|
13653
|
-
children: _this.calculateEmptyLocales()
|
|
13654
|
-
})
|
|
13655
|
-
}), _this.renderEditModal()]
|
|
13656
|
-
}) : jsx("div", {
|
|
13657
|
-
className: classnames(styles$2.locale, _defineProperty({}, styles$2['locale-modal'], !withModal)),
|
|
13658
|
-
children: lang
|
|
13659
|
-
})
|
|
13660
|
-
})]
|
|
13661
|
-
}), FieldFooter ? jsx("div", {
|
|
13662
|
-
children: jsx(FieldFooter, {
|
|
13663
|
-
name: _this.props.name,
|
|
13664
|
-
value: _this.props.value,
|
|
13665
|
-
lang: lang,
|
|
13666
|
-
footerProps: _this.props.footerProps,
|
|
13667
|
-
disabled: _this.props.disabled
|
|
13668
|
-
})
|
|
13669
|
-
}) : null]
|
|
13670
|
-
}, lang);
|
|
13671
|
-
})
|
|
13672
|
-
});
|
|
13673
|
-
};
|
|
13674
|
-
_this.renderModalWarning = function () {
|
|
13675
|
-
return _this.props.modalWarningMessage ? jsx("div", {
|
|
13676
|
-
className: styles$2.warning,
|
|
13677
|
-
children: _this.props.modalWarningMessage
|
|
13678
|
-
}) : null;
|
|
13679
|
-
};
|
|
13680
|
-
_this.renderEditModal = function () {
|
|
13681
|
-
var overlayClassName = styles$2['transition-modal-overlay'];
|
|
13682
|
-
var contentClassName = classnames(styles$2['transition-modal-content'], _this.state.activeModalCount === 0 ? styles$2['second-layer'] : styles$2['third-layer']);
|
|
13683
|
-
return jsx(ModalContainer, {
|
|
13684
|
-
isOpen: _this.state.modalIsOpen,
|
|
13685
|
-
closeTimeoutMS: 150,
|
|
13686
|
-
onRequestClose: _this.closeModal,
|
|
13687
|
-
overlayClassName: overlayClassName,
|
|
13688
|
-
className: contentClassName,
|
|
13689
|
-
contentLabel: "localized-field",
|
|
13690
|
-
children: jsxs(ModalContentLayout, {
|
|
13691
|
-
title: _this.props.modalTitle,
|
|
13692
|
-
subtitle: _this.props.modalSubtitle,
|
|
13693
|
-
onClose: _this.closeModal,
|
|
13694
|
-
"data-track-component": _this.props.name,
|
|
13695
|
-
children: [_this.renderModalWarning(), _this.renderInputGroups(_this.props.languages)]
|
|
13696
|
-
})
|
|
13697
|
-
});
|
|
13698
|
-
};
|
|
13699
|
-
return _this;
|
|
13700
|
-
}
|
|
13701
|
-
_createClass(LocalizedField, [{
|
|
13702
|
-
key: "render",
|
|
13703
|
-
value: function render() {
|
|
13704
|
-
return this.renderInputGroups([this.props.selectedLanguage], true);
|
|
13705
|
-
}
|
|
13706
|
-
}]);
|
|
13707
|
-
return LocalizedField;
|
|
13708
|
-
}(PureComponent);
|
|
13709
|
-
LocalizedField.displayName = 'LocalizedField';
|
|
13710
|
-
LocalizedField.defaultProps = {
|
|
13711
|
-
placeholder: '',
|
|
13712
|
-
value: {},
|
|
13713
|
-
definition: {},
|
|
13714
|
-
isSearch: false,
|
|
13715
|
-
isValid: true,
|
|
13716
|
-
disabled: false,
|
|
13717
|
-
modalSubtitle: null,
|
|
13718
|
-
modalTitle: null
|
|
13719
|
-
};
|
|
13720
|
-
return injectIntl(LocalizedField);
|
|
13721
|
-
}
|
|
13722
|
-
|
|
13723
|
-
function ownKeys$7(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13724
|
-
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$7(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$7(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13725
|
-
var LocalizedInput = function LocalizedInput(props) {
|
|
13726
|
-
return jsx(ThrottledField, _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
13727
|
-
onKeyUp: noop$1
|
|
13728
|
-
}));
|
|
13729
|
-
};
|
|
13730
|
-
LocalizedInput.displayName = 'LocalizedInput';
|
|
13731
|
-
LocalizedInput.defaultProps = {
|
|
13732
|
-
// text inputs don't respond to changes with null or undefined
|
|
13733
|
-
// https://github.com/facebook/react/issues/2533
|
|
13734
|
-
value: ''
|
|
13735
|
-
};
|
|
13736
|
-
var localizedInput = localizedField(LocalizedInput);
|
|
13737
|
-
function noop$1() {}
|
|
13738
|
-
|
|
13739
|
-
function ownKeys$6(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13740
|
-
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys$6(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys$6(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13741
|
-
var LocalizedTextarea = function LocalizedTextarea(props) {
|
|
13742
|
-
return (
|
|
13743
|
-
// If there is a `onToggle` function, we assume that the toggle state
|
|
13744
|
-
// will be handled outside of this component (e.g. settings).
|
|
13745
|
-
// If not, we keep a local state using the `Collapsible` component.
|
|
13746
|
-
props.onToggle ? jsx(ExpandableField$1, _objectSpread$6(_objectSpread$6({}, props), {}, {
|
|
13747
|
-
onKeyUp: noop // For ThrottledField
|
|
13748
|
-
,
|
|
13749
|
-
isExpanded: props.autoExpand || props.isExpanded,
|
|
13750
|
-
onToggle: props.onToggle
|
|
13751
|
-
})) : jsx(Collapsible, {
|
|
13752
|
-
isDefaultClosed: true,
|
|
13753
|
-
children: function children(_ref) {
|
|
13754
|
-
var isOpen = _ref.isOpen,
|
|
13755
|
-
toggle = _ref.toggle;
|
|
13756
|
-
return jsx(ExpandableField$1, _objectSpread$6(_objectSpread$6({}, props), {}, {
|
|
13757
|
-
onKeyUp: noop // For ThrottledField
|
|
13758
|
-
,
|
|
13759
|
-
isExpanded: isOpen,
|
|
13760
|
-
onToggle: toggle
|
|
13761
|
-
}));
|
|
13762
|
-
}
|
|
13763
|
-
})
|
|
13764
|
-
);
|
|
13765
|
-
};
|
|
13766
|
-
LocalizedTextarea.displayName = 'LocalizedTextarea';
|
|
13767
|
-
LocalizedTextarea.defaultProps = {
|
|
13768
|
-
// Returning `null` or `undefined` doesn't update the `textarea`.
|
|
13769
|
-
// See https://github.com/facebook/react/issues/2533
|
|
13770
|
-
value: '',
|
|
13771
|
-
isExpanded: false,
|
|
13772
|
-
disabled: false
|
|
13773
|
-
};
|
|
13774
|
-
var localizedTextarea = localizedField(LocalizedTextarea);
|
|
13775
|
-
function noop() {}
|
|
13776
|
-
|
|
13777
13409
|
var messages$1 = defineMessages({
|
|
13778
13410
|
filterWholeInput: {
|
|
13779
13411
|
id: 'MultiValueSearchInput.buttonLabel',
|
|
@@ -14470,17 +14102,17 @@ function isValidISODateTime(_ref3) {
|
|
|
14470
14102
|
}
|
|
14471
14103
|
|
|
14472
14104
|
var validateSingleOptionEnum = function validateSingleOptionEnum(selectedOption, intl) {
|
|
14473
|
-
if (validateSingleFilter(selectedOption)) return intl.formatMessage(messages$
|
|
14105
|
+
if (validateSingleFilter(selectedOption)) return intl.formatMessage(messages$J.required);
|
|
14474
14106
|
return null;
|
|
14475
14107
|
};
|
|
14476
14108
|
var validateMultiOptionEnum = function validateMultiOptionEnum(selectedOption, intl) {
|
|
14477
|
-
if (validateSingleFilter(selectedOption) || selectedOption.value.length === 0) return intl.formatMessage(messages$
|
|
14109
|
+
if (validateSingleFilter(selectedOption) || selectedOption.value.length === 0) return intl.formatMessage(messages$J.required);
|
|
14478
14110
|
return null;
|
|
14479
14111
|
};
|
|
14480
14112
|
|
|
14481
14113
|
// eslint-disable-next-line import/prefer-default-export
|
|
14482
14114
|
var validateText = function validateText(text, intl) {
|
|
14483
|
-
if (validateSingleFilter(text)) return intl.formatMessage(messages$
|
|
14115
|
+
if (validateSingleFilter(text)) return intl.formatMessage(messages$J.required);
|
|
14484
14116
|
return null;
|
|
14485
14117
|
};
|
|
14486
14118
|
|
|
@@ -14980,4 +14612,4 @@ function withPendingRequests() {
|
|
|
14980
14612
|
|
|
14981
14613
|
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 } } } };
|
|
14982
14614
|
|
|
14983
|
-
export { Autocomplete$1 as Autocomplete, booleanField as BooleanField, BusinessUnitSelectField, BusinessUnitSelectInput, Button, ButtonCancel, ButtonConfirm, ButtonGroup, ButtonSave, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner, CheckboxField, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, customFieldTypeDefinitionsConnector as CustomFieldTypeDefinitionsConnector, CustomFields, CustomFieldsErrorTextNotification, DefaultPageSizes, Divider, EMAIL_REGEX,
|
|
14615
|
+
export { Autocomplete$1 as Autocomplete, booleanField as BooleanField, BusinessUnitSelectField, BusinessUnitSelectInput, Button, ButtonCancel, ButtonConfirm, ButtonGroup, ButtonSave, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner, CheckboxField, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, customFieldTypeDefinitionsConnector as CustomFieldTypeDefinitionsConnector, CustomFields, CustomFieldsErrorTextNotification, DefaultPageSizes, Divider, EMAIL_REGEX, FileInput, FormattedDateTime$1 as FormattedDateTime, LabelRange, LabelRequired, MissingValueField, ModalContainer, ModalContentLayout, MultiValueSearchInput, numericFormatInput as NumericFormatInput, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, ProductAttributeInput, ProductAttributes, ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, RequestCache, RequiredIndicator, ScrollToFieldError, SearchInput$1 as SearchInput, SelectableFieldSearchInput, StoreSelectField, StoreSelectInput, ThrottledField, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, ValidationError, WithPimIndexer, allowedProperties, and, attributesMapToNameValuePairs, base64ToString, messages$8 as booleanMessages, buildSearchQuery, messages$r as businessRoleMessages, businessRoleKeys as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition, createReducer, createResourceReducer, handlers$4 as customFieldDefinitionsMockHanders, customFields as customFieldsTransformer, dateTransformer$1 as dateTransformer, exact, exists, extractErrorFromGraphQlResponse, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomField, formatCustomerAddress, formatCustomerName, formatDateRangeValue, formatDateTime$1 as formatDateTime, formatDiscount, formatMoney$1 as formatMoney, formatMoneyRangeValue, formatMoneyValue, formatPercentage, formatAttribute as formatProductAttribute, getAncestors, getAttributeValueByType, getAttributeValueType, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, dateTransformer as graphqlDateTransformer, missingLocaleTransformer as graphqlMissingLocaleTransformer, missingTransformer as graphqlMissingTransformer, numberTransformer as graphqlNumberTransformer, graphqlQueryBuilder, referenceTransformer as graphqlReferenceTransformer, textTransformer as graphqlTextTransformer, hasInvalidInputError, hasSemanticError, injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits, injectDataTablePaginationState, injectModalState$1 as injectModalState, injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits, injectStorage, injectTaxCategoriesPlatformLimits, injectModalState as injectToggleState, injectZonesPlatformLimits, isEmptyFilter as isEmpty, isEmptyValue, isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName, mapTimeZonesToOptions, minusify, messages$7 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, pickerMessages$1 as pickerMessages, handlers as platformLimitsMockHandlers, handlers$5 as productSelectionsFetcherMockHandler, handlers$6 as productSelectionsTotalFetcherMockHandler, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$E as searchInputMessages, setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, handlers$7 as storesListConnectorMockHandlers, stringToBase64, swapArrayItems, trackMenuClick, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, handlers$2 as useBusinessUnitsListFetcherMockHandler, useCachedCategoryOptions, useCustomerGroupsPlatformLimits, useCustomersPlatformLimits, useDebouncedPromiseCallback, useFormatLocalizedFieldToString, useLocalizedKeyFallback, usePendingRequests, usePersistedTableConfiguration, usePimIndexer, usePrevious, useProductSelectionsFetcher, useProductSelectionsTotalFetcher, useRoleNotificationEffect, useStorage, useStoreKeysInDataFences, useStoresListFetcher, handlers$1 as useTotalNumberOfBusinessUnitsFetcherHandlers, useTotalNumberOfStoresFetcher, handlers$3 as useTotalNumberOfStoresFetcherHandlers, useTracking, useTracking as useTrackingContext, useTrackingShared, validateFilter$2 as validateCustomField, validations as validateCustomFields, validateFilter$1 as validateDate, validateMultiOptionEnum, validateFilter as validateNumber, validateSingleOptionEnum, validateText, validatedInput, messages$J as validationMessages, withPendingRequests, withProps, withRedirectTo, withoutEmptyErrorsByField, wrapDisplayName };
|