@commercetools-frontend/experimental-components 0.1.0 → 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 +590 -972
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +590 -972
- package/dist/commercetools-frontend-experimental-components.esm.js +588 -967
- package/dist/styles.css +0 -295
- package/package.json +17 -17
|
@@ -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
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,8 +5306,8 @@ 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
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 = {
|
|
@@ -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", {
|
|
@@ -5862,13 +5848,13 @@ function getCategoriesByIds(apolloClient, options) {
|
|
|
5862
5848
|
});
|
|
5863
5849
|
}
|
|
5864
5850
|
|
|
5865
|
-
var styles$
|
|
5851
|
+
var styles$l = {
|
|
5866
5852
|
"dropdownIndicator": "dropdown-indicator-module__dropdownIndicator___3bkJT"
|
|
5867
5853
|
}; // This should be separated into a new shared components in the packages-shared
|
|
5868
5854
|
// and used all over instead of SearchIconDropdownIndicator in application-product
|
|
5869
5855
|
function DropdownIndicator$1() {
|
|
5870
5856
|
return jsx("div", {
|
|
5871
|
-
className: styles$
|
|
5857
|
+
className: styles$l.dropdownIndicator,
|
|
5872
5858
|
children: jsx(SearchIcon, {
|
|
5873
5859
|
scale: "medium",
|
|
5874
5860
|
color: "primary"
|
|
@@ -5876,9 +5862,9 @@ function DropdownIndicator$1() {
|
|
|
5876
5862
|
});
|
|
5877
5863
|
}
|
|
5878
5864
|
|
|
5879
|
-
function ownKeys$
|
|
5880
|
-
function _objectSpread$
|
|
5881
|
-
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 = {
|
|
5882
5868
|
"container": "autocomplete-module__container___sBqGo"
|
|
5883
5869
|
};
|
|
5884
5870
|
function Autocomplete(props) {
|
|
@@ -5907,7 +5893,7 @@ function Autocomplete(props) {
|
|
|
5907
5893
|
var value = null;
|
|
5908
5894
|
if (props.value) value = props.isMulti ? _mapInstanceProperty(_context2 = props.value).call(_context2, props.mapItemToOption) : props.mapItemToOption(props.value);
|
|
5909
5895
|
return jsxs("div", {
|
|
5910
|
-
className: classnames(props.className, styles$
|
|
5896
|
+
className: classnames(props.className, styles$k.container),
|
|
5911
5897
|
children: [jsx(AccessibleHidden, {
|
|
5912
5898
|
children: jsx("label", {
|
|
5913
5899
|
htmlFor: props.id,
|
|
@@ -5925,7 +5911,7 @@ function Autocomplete(props) {
|
|
|
5925
5911
|
onBlur: props.onBlur,
|
|
5926
5912
|
onChange: handleChange,
|
|
5927
5913
|
loadOptions: handleLoadItems,
|
|
5928
|
-
components: _objectSpread$
|
|
5914
|
+
components: _objectSpread$12({
|
|
5929
5915
|
DropdownIndicator: DropdownIndicator$1
|
|
5930
5916
|
}, props.components),
|
|
5931
5917
|
isClearable: props.isClearable,
|
|
@@ -5951,7 +5937,7 @@ Autocomplete.defaultProps = {
|
|
|
5951
5937
|
};
|
|
5952
5938
|
var Autocomplete$1 = /*#__PURE__*/memo(Autocomplete);
|
|
5953
5939
|
|
|
5954
|
-
var styles$
|
|
5940
|
+
var styles$j = {
|
|
5955
5941
|
"container": "reference-search-module__container___3-iK3",
|
|
5956
5942
|
"missing-label": "reference-search-module__missing-label___az9AO"
|
|
5957
5943
|
}; // This is a hashmap of loaded items used to map a value to an item
|
|
@@ -6105,9 +6091,9 @@ function ReferenceSearch(props) {
|
|
|
6105
6091
|
var value = props.isMulti ? items : items === null || items === void 0 ? void 0 : items[0];
|
|
6106
6092
|
var tooltipTitle = value || props.value ? props.mapItemToOption(value || props.value).label : '';
|
|
6107
6093
|
return jsxs("div", {
|
|
6108
|
-
className: styles$
|
|
6094
|
+
className: styles$j.container,
|
|
6109
6095
|
children: [areSomeItemsMissing && jsx("div", {
|
|
6110
|
-
className: styles$
|
|
6096
|
+
className: styles$j['missing-label'],
|
|
6111
6097
|
children: props.referenceIsMissingLabel
|
|
6112
6098
|
}), jsx(CustomFieldTooltip, {
|
|
6113
6099
|
title: tooltipTitle,
|
|
@@ -6133,7 +6119,7 @@ function ReferenceSearch(props) {
|
|
|
6133
6119
|
});
|
|
6134
6120
|
}
|
|
6135
6121
|
|
|
6136
|
-
var messages$
|
|
6122
|
+
var messages$A = defineMessages({
|
|
6137
6123
|
placeholder: {
|
|
6138
6124
|
id: 'CategoryReferenceSearch.placeholder',
|
|
6139
6125
|
description: 'Placeholder for search for a category',
|
|
@@ -6166,8 +6152,8 @@ var messages$B = defineMessages({
|
|
|
6166
6152
|
}
|
|
6167
6153
|
});
|
|
6168
6154
|
|
|
6169
|
-
function ownKeys$
|
|
6170
|
-
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; }
|
|
6171
6157
|
function Option$1(props) {
|
|
6172
6158
|
var _context, _context2;
|
|
6173
6159
|
var _useApplicationContex = useApplicationContext(function (applicationContext) {
|
|
@@ -6181,7 +6167,7 @@ function Option$1(props) {
|
|
|
6181
6167
|
var _useIntl = useIntl(),
|
|
6182
6168
|
formatMessage = _useIntl.formatMessage;
|
|
6183
6169
|
var category = props.data;
|
|
6184
|
-
return jsx(AsyncSelectInput.Option, _objectSpread$
|
|
6170
|
+
return jsx(AsyncSelectInput.Option, _objectSpread$11(_objectSpread$11({}, props), {}, {
|
|
6185
6171
|
children: jsxs("div", {
|
|
6186
6172
|
"data-testid": "category-option",
|
|
6187
6173
|
children: [jsx(Text.Body, {
|
|
@@ -6192,7 +6178,7 @@ function Option$1(props) {
|
|
|
6192
6178
|
fallbackOrder: languages
|
|
6193
6179
|
})
|
|
6194
6180
|
}), category.parent && jsx(Text.Detail, {
|
|
6195
|
-
children: _concatInstanceProperty(_context = "".concat(formatMessage(messages$
|
|
6181
|
+
children: _concatInstanceProperty(_context = "".concat(formatMessage(messages$A.parentCategory), ": ")).call(_context, formatLocalizedString(category.parent, {
|
|
6196
6182
|
key: 'name',
|
|
6197
6183
|
locale: language,
|
|
6198
6184
|
fallbackOrder: languages
|
|
@@ -6204,14 +6190,14 @@ function Option$1(props) {
|
|
|
6204
6190
|
fallbackOrder: languages
|
|
6205
6191
|
}))
|
|
6206
6192
|
}), category.externalId && jsx(Text.Detail, {
|
|
6207
|
-
children: _concatInstanceProperty(_context2 = "".concat(formatMessage(messages$
|
|
6193
|
+
children: _concatInstanceProperty(_context2 = "".concat(formatMessage(messages$A.externalId), ": ")).call(_context2, category.externalId || NO_VALUE_FALLBACK)
|
|
6208
6194
|
})]
|
|
6209
6195
|
})
|
|
6210
6196
|
}));
|
|
6211
6197
|
}
|
|
6212
6198
|
|
|
6213
|
-
function ownKeys$
|
|
6214
|
-
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; }
|
|
6215
6201
|
var filterOption$1 = function filterOption() {
|
|
6216
6202
|
return true;
|
|
6217
6203
|
};
|
|
@@ -6228,7 +6214,7 @@ function CategoryReferenceSearch(props) {
|
|
|
6228
6214
|
language = _useApplicationContex.language,
|
|
6229
6215
|
languages = _useApplicationContex.languages;
|
|
6230
6216
|
var mapItemToOption = useCallback(function (category) {
|
|
6231
|
-
return _objectSpread$
|
|
6217
|
+
return _objectSpread$10(_objectSpread$10({}, category), {}, {
|
|
6232
6218
|
value: category.id,
|
|
6233
6219
|
label: formatLocalizedString(category, {
|
|
6234
6220
|
key: 'name',
|
|
@@ -6251,7 +6237,7 @@ function CategoryReferenceSearch(props) {
|
|
|
6251
6237
|
}, [apolloClient]);
|
|
6252
6238
|
return jsx(ReferenceSearch, {
|
|
6253
6239
|
id: props.id,
|
|
6254
|
-
components: _objectSpread$
|
|
6240
|
+
components: _objectSpread$10({
|
|
6255
6241
|
Option: Option$1
|
|
6256
6242
|
}, props.components),
|
|
6257
6243
|
isClearable: props.isClearable,
|
|
@@ -6262,10 +6248,10 @@ function CategoryReferenceSearch(props) {
|
|
|
6262
6248
|
onBlur: props.onBlur,
|
|
6263
6249
|
onChange: props.onChange,
|
|
6264
6250
|
value: props.value,
|
|
6265
|
-
placeholderLabel: formatMessage(messages$
|
|
6266
|
-
searchPromptLabel: formatMessage(messages$
|
|
6267
|
-
noResultsLabel: formatMessage(messages$
|
|
6268
|
-
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),
|
|
6269
6255
|
mapItemToOption: mapItemToOption,
|
|
6270
6256
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
6271
6257
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -6347,7 +6333,7 @@ function getCartDiscountById(apolloClient, options) {
|
|
|
6347
6333
|
});
|
|
6348
6334
|
}
|
|
6349
6335
|
|
|
6350
|
-
var messages$
|
|
6336
|
+
var messages$z = defineMessages({
|
|
6351
6337
|
placeholder: {
|
|
6352
6338
|
id: 'CartDiscountReferenceSearch.placeholder',
|
|
6353
6339
|
description: 'Placeholder for search for a cart discount',
|
|
@@ -6375,8 +6361,8 @@ var messages$A = defineMessages({
|
|
|
6375
6361
|
}
|
|
6376
6362
|
});
|
|
6377
6363
|
|
|
6378
|
-
function ownKeys
|
|
6379
|
-
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; }
|
|
6380
6366
|
function Option(props) {
|
|
6381
6367
|
var _useApplicationContex = useApplicationContext(function (applicationContext) {
|
|
6382
6368
|
return {
|
|
@@ -6389,7 +6375,7 @@ function Option(props) {
|
|
|
6389
6375
|
var _useIntl = useIntl(),
|
|
6390
6376
|
formatMessage = _useIntl.formatMessage;
|
|
6391
6377
|
var cartDiscount = props.data;
|
|
6392
|
-
return jsx(AsyncSelectInput.Option, _objectSpread
|
|
6378
|
+
return jsx(AsyncSelectInput.Option, _objectSpread$$(_objectSpread$$({}, props), {}, {
|
|
6393
6379
|
children: jsxs("div", {
|
|
6394
6380
|
"data-testid": "cart-discount-option",
|
|
6395
6381
|
children: [jsx(Text.Detail, {
|
|
@@ -6400,14 +6386,14 @@ function Option(props) {
|
|
|
6400
6386
|
fallbackOrder: languages
|
|
6401
6387
|
})
|
|
6402
6388
|
}), jsxs(Text.Detail, {
|
|
6403
|
-
children: [formatMessage(messages$
|
|
6389
|
+
children: [formatMessage(messages$z.key), ": ", cartDiscount.key || NO_VALUE_FALLBACK]
|
|
6404
6390
|
})]
|
|
6405
6391
|
})
|
|
6406
6392
|
}));
|
|
6407
6393
|
}
|
|
6408
6394
|
|
|
6409
|
-
function ownKeys$
|
|
6410
|
-
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; }
|
|
6411
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 } } } };
|
|
6412
6398
|
var returnNullIfEmpty = function returnNullIfEmpty(value) {
|
|
6413
6399
|
return value && value.id === '' ? null : value;
|
|
@@ -6438,7 +6424,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
6438
6424
|
language = _useApplicationContex.language,
|
|
6439
6425
|
languages = _useApplicationContex.languages;
|
|
6440
6426
|
var mapItemToOption = useCallback(function (cartDiscount) {
|
|
6441
|
-
return _objectSpread$
|
|
6427
|
+
return _objectSpread$_(_objectSpread$_({}, cartDiscount), {}, {
|
|
6442
6428
|
value: cartDiscount.id,
|
|
6443
6429
|
key: cartDiscount.key,
|
|
6444
6430
|
label: formatLocalizedString(cartDiscount, {
|
|
@@ -6486,10 +6472,10 @@ function CartDiscountReferenceSearch(props) {
|
|
|
6486
6472
|
onBlur: props.onBlur,
|
|
6487
6473
|
onChange: props.onChange,
|
|
6488
6474
|
value: returnNullIfEmpty(props.value),
|
|
6489
|
-
placeholderLabel: formatMessage(messages$
|
|
6490
|
-
searchPromptLabel: formatMessage(messages$
|
|
6491
|
-
noResultsLabel: formatMessage(messages$
|
|
6492
|
-
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),
|
|
6493
6479
|
mapItemToOption: mapItemToOption,
|
|
6494
6480
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
6495
6481
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -6554,7 +6540,7 @@ function CustomCartDiscountReferenceInput(props) {
|
|
|
6554
6540
|
});
|
|
6555
6541
|
}
|
|
6556
6542
|
|
|
6557
|
-
var messages$
|
|
6543
|
+
var messages$y = defineMessages({
|
|
6558
6544
|
noProductsFound: {
|
|
6559
6545
|
id: 'Shared.ProductPickerInput.noProductsFound',
|
|
6560
6546
|
description: 'The message to display when no products were found',
|
|
@@ -6685,7 +6671,7 @@ var ProductPickerInput = function ProductPickerInput(_ref) {
|
|
|
6685
6671
|
children: jsx(AsyncSelectInput, {
|
|
6686
6672
|
id: name,
|
|
6687
6673
|
name: name,
|
|
6688
|
-
placeholder: formatMessage(messages$
|
|
6674
|
+
placeholder: formatMessage(messages$y.placeholder),
|
|
6689
6675
|
loadOptions: loadOptionsDebounced,
|
|
6690
6676
|
defaultOptions: [],
|
|
6691
6677
|
isClearable: isClearable,
|
|
@@ -6700,7 +6686,7 @@ var ProductPickerInput = function ProductPickerInput(_ref) {
|
|
|
6700
6686
|
onBlur: onBlur,
|
|
6701
6687
|
value: currentOption.data,
|
|
6702
6688
|
noOptionsMessage: function noOptionsMessage() {
|
|
6703
|
-
return isLoadingFailed ? null : formatMessage(messages$
|
|
6689
|
+
return isLoadingFailed ? null : formatMessage(messages$y.noProductsFound);
|
|
6704
6690
|
},
|
|
6705
6691
|
hasError: hasError || isLoadingFailed
|
|
6706
6692
|
})
|
|
@@ -6973,8 +6959,8 @@ function CustomBooleanInputSet(props) {
|
|
|
6973
6959
|
}
|
|
6974
6960
|
CustomBooleanInputSet.displayName = 'CustomBooleanInputSet';
|
|
6975
6961
|
|
|
6976
|
-
function ownKeys$
|
|
6977
|
-
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; }
|
|
6978
6964
|
var getTypeName = function getTypeName(type) {
|
|
6979
6965
|
return type.name.toLowerCase();
|
|
6980
6966
|
};
|
|
@@ -7032,7 +7018,7 @@ var nameValuePairsToMap = function nameValuePairsToMap(pairs) {
|
|
|
7032
7018
|
return _reduceInstanceProperty(pairs).call(pairs, function (result, _ref2) {
|
|
7033
7019
|
var name = _ref2.name,
|
|
7034
7020
|
value = _ref2.value;
|
|
7035
|
-
return _objectSpread$
|
|
7021
|
+
return _objectSpread$Z(_objectSpread$Z({}, result), {}, _defineProperty({}, name, value));
|
|
7036
7022
|
}, {});
|
|
7037
7023
|
};
|
|
7038
7024
|
var attributesMapToNameValuePairs = function attributesMapToNameValuePairs(map) {
|
|
@@ -7133,17 +7119,17 @@ var customFieldsMessages = defineMessages({
|
|
|
7133
7119
|
}
|
|
7134
7120
|
});
|
|
7135
7121
|
|
|
7136
|
-
function ownKeys$
|
|
7137
|
-
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; }
|
|
7138
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 } } } };
|
|
7139
7125
|
var mapAttributeDefinition = function mapAttributeDefinition(definition) {
|
|
7140
7126
|
var _context, _definition$type, _definition$type$elem, _context2, _context3, _definition$type2, _context4;
|
|
7141
|
-
return _objectSpread$
|
|
7127
|
+
return _objectSpread$Y(_objectSpread$Y({}, definition), {}, {
|
|
7142
7128
|
required: definition.isRequired,
|
|
7143
7129
|
inputTip: transformLocalizedFieldToLocalizedString(definition.inputTipAllLocales),
|
|
7144
7130
|
label: transformLocalizedFieldToLocalizedString(definition.labelAllLocales),
|
|
7145
|
-
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$
|
|
7146
|
-
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), {}, {
|
|
7147
7133
|
values: _mapInstanceProperty(_context2 = _valuesInstanceProperty(definition.type.elementType).results).call(_context2, function (value) {
|
|
7148
7134
|
return {
|
|
7149
7135
|
key: value.key,
|
|
@@ -7151,7 +7137,7 @@ var mapAttributeDefinition = function mapAttributeDefinition(definition) {
|
|
|
7151
7137
|
};
|
|
7152
7138
|
})
|
|
7153
7139
|
})
|
|
7154
|
-
}) : _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), {}, {
|
|
7155
7141
|
values: _mapInstanceProperty(_context4 = _valuesInstanceProperty(definition.type).results).call(_context4, function (value) {
|
|
7156
7142
|
return {
|
|
7157
7143
|
key: value.key,
|
|
@@ -7194,7 +7180,7 @@ function useNestedProductType(fieldDefinition) {
|
|
|
7194
7180
|
};
|
|
7195
7181
|
}
|
|
7196
7182
|
|
|
7197
|
-
var messages$
|
|
7183
|
+
var messages$x = defineMessages({
|
|
7198
7184
|
updateButton: {
|
|
7199
7185
|
id: 'NestedAttributes.Details.updateButton',
|
|
7200
7186
|
description: 'Update button label',
|
|
@@ -7274,14 +7260,14 @@ var messages$y = defineMessages({
|
|
|
7274
7260
|
|
|
7275
7261
|
var NestingLevelContext = /*#__PURE__*/createContext(0);
|
|
7276
7262
|
|
|
7277
|
-
function ownKeys
|
|
7278
|
-
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; }
|
|
7279
7265
|
var EditButton = function EditButton(props) {
|
|
7280
7266
|
var _useIntl = useIntl(),
|
|
7281
7267
|
formatMessage = _useIntl.formatMessage;
|
|
7282
7268
|
return jsx(Tooltip$1, {
|
|
7283
7269
|
placement: "top",
|
|
7284
|
-
title: formatMessage(messages$
|
|
7270
|
+
title: formatMessage(messages$x.editTooltip),
|
|
7285
7271
|
children: jsx(IconButton, {
|
|
7286
7272
|
label: "Edit",
|
|
7287
7273
|
isDisabled: props.isDisabled,
|
|
@@ -7297,12 +7283,12 @@ var DropChangesConfirmation = function DropChangesConfirmation(props) {
|
|
|
7297
7283
|
formatMessage = _useIntl2.formatMessage;
|
|
7298
7284
|
return jsx(ConfirmationDialog, {
|
|
7299
7285
|
isOpen: props.isOpen || false,
|
|
7300
|
-
title: formatMessage(messages$
|
|
7301
|
-
labelPrimary: formatMessage(messages$
|
|
7286
|
+
title: formatMessage(messages$x.confirmationDialogTitle),
|
|
7287
|
+
labelPrimary: formatMessage(messages$x.nestedAttributesConfirmLabel),
|
|
7302
7288
|
onConfirm: props.onConfirm,
|
|
7303
7289
|
onCancel: props.onCancel,
|
|
7304
7290
|
children: jsx(Text.Body, {
|
|
7305
|
-
intlMessage: messages$
|
|
7291
|
+
intlMessage: messages$x.confirmationDialogBody
|
|
7306
7292
|
})
|
|
7307
7293
|
});
|
|
7308
7294
|
};
|
|
@@ -7329,11 +7315,11 @@ var NestedAttributeModalPage = function NestedAttributeModalPage(props) {
|
|
|
7329
7315
|
children: [jsx(SecondaryButton, {
|
|
7330
7316
|
isDisabled: !formik.dirty,
|
|
7331
7317
|
iconLeft: jsx(RevertIcon, {}),
|
|
7332
|
-
label: formatMessage(messages$
|
|
7318
|
+
label: formatMessage(messages$x.cancelButton),
|
|
7333
7319
|
onClick: formik.resetForm
|
|
7334
7320
|
}), jsx(CustomFormModalPage.FormPrimaryButton, {
|
|
7335
7321
|
isDisabled: !formik.dirty,
|
|
7336
|
-
label: formatMessage(messages$
|
|
7322
|
+
label: formatMessage(messages$x.updateButton),
|
|
7337
7323
|
onClick: formik.handleSubmit
|
|
7338
7324
|
})]
|
|
7339
7325
|
}),
|
|
@@ -7374,7 +7360,7 @@ var NestedInputControls = function NestedInputControls(props) {
|
|
|
7374
7360
|
if (nextNestingLevel >= 6) return jsx(MaxNestingLevelReached, {});
|
|
7375
7361
|
var hasAttributes = props.productType.attributeDefinitions.length > 0;
|
|
7376
7362
|
if (!hasAttributes) return jsx(Text.Body, {
|
|
7377
|
-
intlMessage: messages$
|
|
7363
|
+
intlMessage: messages$x.emptyProductType,
|
|
7378
7364
|
tone: "secondary"
|
|
7379
7365
|
});
|
|
7380
7366
|
return jsxs(Spacings.Inline, {
|
|
@@ -7426,13 +7412,13 @@ var CustomNestedInput = /*#__PURE__*/memo(function (props) {
|
|
|
7426
7412
|
var valuesAsMap = nameValuePairsToMap(value);
|
|
7427
7413
|
var initialValues = omitUnknownValues(valuesAsMap, attributeDefinitionsAsMap);
|
|
7428
7414
|
var openNestedAttributesForm = function openNestedAttributesForm() {
|
|
7429
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread
|
|
7415
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$X(_objectSpread$X({}, parentFormik.status), {}, {
|
|
7430
7416
|
hideSaveToolbar: true
|
|
7431
7417
|
}));
|
|
7432
7418
|
attributesForm.openModal();
|
|
7433
7419
|
};
|
|
7434
7420
|
var closeNestedAttributesForm = function closeNestedAttributesForm() {
|
|
7435
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread
|
|
7421
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$X(_objectSpread$X({}, parentFormik.status), {}, {
|
|
7436
7422
|
hideSaveToolbar: false
|
|
7437
7423
|
}));
|
|
7438
7424
|
attributesForm.closeModal();
|
|
@@ -7452,7 +7438,7 @@ var CustomNestedInput = /*#__PURE__*/memo(function (props) {
|
|
|
7452
7438
|
if (nestingLevel !== 0) parentFormik.submitForm();else showNotification({
|
|
7453
7439
|
kind: 'success',
|
|
7454
7440
|
domain: DOMAINS.SIDE,
|
|
7455
|
-
text: formatMessage(messages$
|
|
7441
|
+
text: formatMessage(messages$x.attributeUpdateSucceeded)
|
|
7456
7442
|
});
|
|
7457
7443
|
setSubmitting(false);
|
|
7458
7444
|
},
|
|
@@ -7480,7 +7466,7 @@ var CustomNestedInput = /*#__PURE__*/memo(function (props) {
|
|
|
7480
7466
|
});
|
|
7481
7467
|
CustomNestedInput.displayName = 'CustomNestedInput';
|
|
7482
7468
|
|
|
7483
|
-
var styles$
|
|
7469
|
+
var styles$i = {
|
|
7484
7470
|
"divider": "divider-module__divider___4-vdy",
|
|
7485
7471
|
"divider-solid": "divider-module__divider-solid___3Fs4q divider-module__divider___4-vdy",
|
|
7486
7472
|
"divider-dashed": "divider-module__divider-dashed___2Em8A divider-module__divider___4-vdy",
|
|
@@ -7493,7 +7479,7 @@ function Divider(_ref) {
|
|
|
7493
7479
|
size = _ref$size === void 0 ? 's' : _ref$size,
|
|
7494
7480
|
isDashed = _ref.isDashed;
|
|
7495
7481
|
return jsx("hr", {
|
|
7496
|
-
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))
|
|
7497
7483
|
});
|
|
7498
7484
|
}
|
|
7499
7485
|
Divider.displayName = 'Divider';
|
|
@@ -7514,14 +7500,14 @@ var ExpandButton = function ExpandButton(props) {
|
|
|
7514
7500
|
};
|
|
7515
7501
|
ExpandButton.displayName = 'ExpandButton';
|
|
7516
7502
|
|
|
7517
|
-
var styles$
|
|
7503
|
+
var styles$h = {
|
|
7518
7504
|
"topAlign": "set-buttons-module__topAlign___3AZwc",
|
|
7519
7505
|
"gap": "set-buttons-module__gap___38Qr0"
|
|
7520
7506
|
}; // TODO(pa3): alignment of buttons made in a kinda ugly way (i.e. gap class).
|
|
7521
7507
|
// have to find a better way to do it.
|
|
7522
7508
|
var SetButtons = function SetButtons(props) {
|
|
7523
7509
|
return jsx("div", {
|
|
7524
|
-
className: props.isTopAligned ? styles$
|
|
7510
|
+
className: props.isTopAligned ? styles$h.topAlign : undefined,
|
|
7525
7511
|
children: jsxs(Spacings.Inline, {
|
|
7526
7512
|
children: [jsx(IconButton, {
|
|
7527
7513
|
label: "Remove value",
|
|
@@ -7536,15 +7522,15 @@ var SetButtons = function SetButtons(props) {
|
|
|
7536
7522
|
size: "medium",
|
|
7537
7523
|
icon: jsx(PlusBoldIcon, {})
|
|
7538
7524
|
}) : jsx("div", {
|
|
7539
|
-
className: styles$
|
|
7525
|
+
className: styles$h.gap
|
|
7540
7526
|
})]
|
|
7541
7527
|
})
|
|
7542
7528
|
});
|
|
7543
7529
|
};
|
|
7544
7530
|
SetButtons.displayName = 'SetButtons';
|
|
7545
7531
|
|
|
7546
|
-
function ownKeys$
|
|
7547
|
-
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; }
|
|
7548
7534
|
var getDuplicateErrors = function getDuplicateErrors(setValues) {
|
|
7549
7535
|
/* eslint-disable no-plusplus */
|
|
7550
7536
|
var result = [];
|
|
@@ -7619,7 +7605,7 @@ function CustomInputSet(props) {
|
|
|
7619
7605
|
touched = _useFormikContext.touched,
|
|
7620
7606
|
isSubmitting = _useFormikContext.isSubmitting,
|
|
7621
7607
|
dirty = _useFormikContext.dirty;
|
|
7622
|
-
var itemFieldDefintion = _objectSpread$
|
|
7608
|
+
var itemFieldDefintion = _objectSpread$W(_objectSpread$W({}, props.fieldDefinition), {}, {
|
|
7623
7609
|
type: props.fieldDefinition.type.elementType
|
|
7624
7610
|
});
|
|
7625
7611
|
var value = useMemo(function () {
|
|
@@ -7785,7 +7771,7 @@ var CustomFieldInput = /*#__PURE__*/memo(function (props) {
|
|
|
7785
7771
|
});
|
|
7786
7772
|
CustomFieldInput.displayName = 'CustomFieldInput';
|
|
7787
7773
|
|
|
7788
|
-
var messages$
|
|
7774
|
+
var messages$w = defineMessages({
|
|
7789
7775
|
referencedProductType: {
|
|
7790
7776
|
id: 'NestedAttributes.referencedProductType',
|
|
7791
7777
|
description: 'Product type referenced hint',
|
|
@@ -7793,10 +7779,10 @@ var messages$x = defineMessages({
|
|
|
7793
7779
|
}
|
|
7794
7780
|
});
|
|
7795
7781
|
|
|
7796
|
-
function ownKeys$
|
|
7797
|
-
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; }
|
|
7798
7784
|
function ProductTypeReference(props) {
|
|
7799
|
-
var productTypeMessage = _objectSpread$
|
|
7785
|
+
var productTypeMessage = _objectSpread$V(_objectSpread$V({}, messages$w.referencedProductType), {}, {
|
|
7800
7786
|
values: {
|
|
7801
7787
|
productTypeName: props.productType.name
|
|
7802
7788
|
}
|
|
@@ -7842,14 +7828,14 @@ function CustomNestedFieldInput(props) {
|
|
|
7842
7828
|
}
|
|
7843
7829
|
CustomNestedFieldInput.displayName = 'CustomNestedFieldInput';
|
|
7844
7830
|
|
|
7845
|
-
function _createSuper$
|
|
7846
|
-
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; } }
|
|
7847
7833
|
var isEmptyChildren = function isEmptyChildren(children) {
|
|
7848
7834
|
return Children.count(children) === 0;
|
|
7849
7835
|
};
|
|
7850
7836
|
var Match = /*#__PURE__*/function (_PureComponent) {
|
|
7851
7837
|
_inherits(Match, _PureComponent);
|
|
7852
|
-
var _super = _createSuper$
|
|
7838
|
+
var _super = _createSuper$7(Match);
|
|
7853
7839
|
function Match() {
|
|
7854
7840
|
_classCallCheck(this, Match);
|
|
7855
7841
|
return _super.apply(this, arguments);
|
|
@@ -7868,8 +7854,8 @@ var Match = /*#__PURE__*/function (_PureComponent) {
|
|
|
7868
7854
|
}(PureComponent);
|
|
7869
7855
|
Match.displayName = 'ValidationErrorMatch';
|
|
7870
7856
|
|
|
7871
|
-
function _createSuper$
|
|
7872
|
-
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; } }
|
|
7873
7859
|
var hasUnknownChildren = function hasUnknownChildren(children) {
|
|
7874
7860
|
var _context;
|
|
7875
7861
|
return _someInstanceProperty(_context = Children.toArray(children)).call(_context, function (child) {
|
|
@@ -7881,7 +7867,7 @@ var hasError = function hasError(errors, rule) {
|
|
|
7881
7867
|
};
|
|
7882
7868
|
var Switch = /*#__PURE__*/function (_PureComponent) {
|
|
7883
7869
|
_inherits(Switch, _PureComponent);
|
|
7884
|
-
var _super = _createSuper$
|
|
7870
|
+
var _super = _createSuper$6(Switch);
|
|
7885
7871
|
function Switch() {
|
|
7886
7872
|
_classCallCheck(this, Switch);
|
|
7887
7873
|
return _super.apply(this, arguments);
|
|
@@ -7920,11 +7906,11 @@ var ValidationError = {
|
|
|
7920
7906
|
Match: Match
|
|
7921
7907
|
};
|
|
7922
7908
|
|
|
7923
|
-
function ownKeys$
|
|
7924
|
-
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; }
|
|
7925
7911
|
var mergeSetItemsErrors = function mergeSetItemsErrors(errors) {
|
|
7926
7912
|
return _reduceInstanceProperty(errors).call(errors, function (result, itemErrors) {
|
|
7927
|
-
return _objectSpread$
|
|
7913
|
+
return _objectSpread$U(_objectSpread$U({}, result), itemErrors);
|
|
7928
7914
|
}, {});
|
|
7929
7915
|
};
|
|
7930
7916
|
|
|
@@ -7941,19 +7927,19 @@ var CustomFieldErrors = function CustomFieldErrors(props) {
|
|
|
7941
7927
|
children: [jsx(ValidationError.Match, {
|
|
7942
7928
|
rule: "missing",
|
|
7943
7929
|
children: jsx(ErrorMessage, {
|
|
7944
|
-
intlMessage: messages$
|
|
7930
|
+
intlMessage: messages$J.required
|
|
7945
7931
|
})
|
|
7946
7932
|
}), jsx(ValidationError.Match, {
|
|
7947
7933
|
rule: "duplicated",
|
|
7948
7934
|
children: jsx(ErrorMessage, {
|
|
7949
|
-
intlMessage: messages$
|
|
7935
|
+
intlMessage: messages$J.unique
|
|
7950
7936
|
})
|
|
7951
7937
|
})]
|
|
7952
7938
|
});
|
|
7953
7939
|
};
|
|
7954
7940
|
CustomFieldErrors.displayName = 'CustomFieldErrors';
|
|
7955
7941
|
|
|
7956
|
-
var messages$
|
|
7942
|
+
var messages$v = defineMessages({
|
|
7957
7943
|
productReferenceLabel: {
|
|
7958
7944
|
id: 'CustomFieldsLabel.productReferenceLabel',
|
|
7959
7945
|
description: 'Label shown above the product picker input.',
|
|
@@ -7986,8 +7972,8 @@ var messages$w = defineMessages({
|
|
|
7986
7972
|
}
|
|
7987
7973
|
});
|
|
7988
7974
|
|
|
7989
|
-
function ownKeys$
|
|
7990
|
-
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; }
|
|
7991
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 } } } };
|
|
7992
7978
|
var CustomFieldsLabelHint = function CustomFieldsLabelHint(_ref) {
|
|
7993
7979
|
var _type$name;
|
|
@@ -8020,7 +8006,7 @@ var CustomFieldsLabelHint = function CustomFieldsLabelHint(_ref) {
|
|
|
8020
8006
|
alignItems: "flex-start",
|
|
8021
8007
|
children: [jsx(InformationIcon, {
|
|
8022
8008
|
size: "medium"
|
|
8023
|
-
}), jsx(FormattedMessage, _objectSpread$
|
|
8009
|
+
}), jsx(FormattedMessage, _objectSpread$T({}, messages$v.cartDiscountMoreThan500))]
|
|
8024
8010
|
})
|
|
8025
8011
|
});
|
|
8026
8012
|
}
|
|
@@ -8035,8 +8021,8 @@ function CustomFieldsProductTypeReferenceSubtitle() {
|
|
|
8035
8021
|
formatMessage = _useIntl.formatMessage;
|
|
8036
8022
|
var _usePimStatus = usePimStatus(),
|
|
8037
8023
|
isProjectIndexed = _usePimStatus.isProjectIndexed;
|
|
8038
|
-
if (isProjectIndexed) return formatMessage(messages$
|
|
8039
|
-
return formatMessage(messages$
|
|
8024
|
+
if (isProjectIndexed) return formatMessage(messages$v.productTypeReferenceLabelI);
|
|
8025
|
+
return formatMessage(messages$v.productTypeReferenceLabel);
|
|
8040
8026
|
}
|
|
8041
8027
|
|
|
8042
8028
|
// TODO(pa3): this logic may be misplaced and probably
|
|
@@ -8052,7 +8038,7 @@ function CustomFieldsLabelSubtitle(_ref2) {
|
|
|
8052
8038
|
var referenceTypeId = type.referenceTypeId;
|
|
8053
8039
|
var referenceTypeName = capitalizeFirst(referenceTypeId);
|
|
8054
8040
|
if (_includesInstanceProperty(_context = [SEARCHABLE_REFERENCES.category, SEARCHABLE_REFERENCES.cartDiscount]).call(_context, referenceTypeId)) return referenceTypeName;
|
|
8055
|
-
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");
|
|
8056
8042
|
}
|
|
8057
8043
|
var CustomFieldsLabel = /*#__PURE__*/memo(function (_ref3) {
|
|
8058
8044
|
var name = _ref3.name,
|
|
@@ -8467,8 +8453,8 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
8467
8453
|
});
|
|
8468
8454
|
}
|
|
8469
8455
|
|
|
8470
|
-
function ownKeys$
|
|
8471
|
-
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; }
|
|
8472
8458
|
var components = {
|
|
8473
8459
|
// eslint-disable-next-line react/display-name
|
|
8474
8460
|
Option: function Option(optionInnerProps) {
|
|
@@ -8483,7 +8469,7 @@ function ProductSelectionsPicker(props) {
|
|
|
8483
8469
|
if (productSelectionsTotalFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
8484
8470
|
var CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= props.lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= props.upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
|
|
8485
8471
|
return jsx(Spacings.Stack, {
|
|
8486
|
-
children: jsx(CustomProductSelectionsPicker, _objectSpread$
|
|
8472
|
+
children: jsx(CustomProductSelectionsPicker, _objectSpread$S(_objectSpread$S({}, props), {}, {
|
|
8487
8473
|
components: components
|
|
8488
8474
|
}))
|
|
8489
8475
|
});
|
|
@@ -8500,7 +8486,7 @@ ProductSelectionsPicker.defaultProps = {
|
|
|
8500
8486
|
|
|
8501
8487
|
var COUNTRIES_ASYNC_LOADING_LIMIT = 60;
|
|
8502
8488
|
|
|
8503
|
-
var messages$
|
|
8489
|
+
var messages$u = defineMessages({
|
|
8504
8490
|
countriesBasicSelectPlaceholder: {
|
|
8505
8491
|
id: 'CountriesPicker.countriesBasicSelectPlaceholder',
|
|
8506
8492
|
description: 'Placeholder of the basic field for countries',
|
|
@@ -8528,7 +8514,7 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
8528
8514
|
value: props.value,
|
|
8529
8515
|
isRequired: props.isRequired,
|
|
8530
8516
|
description: props.description,
|
|
8531
|
-
placeholder: intl.formatMessage(messages$
|
|
8517
|
+
placeholder: intl.formatMessage(messages$u.countriesBasicSelectPlaceholder),
|
|
8532
8518
|
options: props.options,
|
|
8533
8519
|
onChange: props.onChange,
|
|
8534
8520
|
isDisabled: props.isDisabled,
|
|
@@ -8538,11 +8524,11 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
8538
8524
|
});
|
|
8539
8525
|
}
|
|
8540
8526
|
|
|
8541
|
-
function ownKeys$
|
|
8542
|
-
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; }
|
|
8543
8529
|
var emptyCountryOption = function emptyCountryOption(intl) {
|
|
8544
8530
|
return [{
|
|
8545
|
-
label: intl.formatMessage(messages$
|
|
8531
|
+
label: intl.formatMessage(messages$u.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
8546
8532
|
value: undefined,
|
|
8547
8533
|
isDisabled: true
|
|
8548
8534
|
}];
|
|
@@ -8587,7 +8573,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8587
8573
|
var onOptionChange = function onOptionChange(event) {
|
|
8588
8574
|
var countries = event.target.value;
|
|
8589
8575
|
props.onChange({
|
|
8590
|
-
target: _objectSpread$
|
|
8576
|
+
target: _objectSpread$R(_objectSpread$R({}, event.target), {}, {
|
|
8591
8577
|
value: _mapInstanceProperty(countries).call(countries, function (country) {
|
|
8592
8578
|
var _country$value;
|
|
8593
8579
|
return (_country$value = country === null || country === void 0 ? void 0 : country.value) !== null && _country$value !== void 0 ? _country$value : country;
|
|
@@ -8610,7 +8596,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8610
8596
|
return country.value === countryCode;
|
|
8611
8597
|
});
|
|
8612
8598
|
}),
|
|
8613
|
-
placeholder: intl.formatMessage(messages$
|
|
8599
|
+
placeholder: intl.formatMessage(messages$u.countriesAsyncSelectPlaceholder),
|
|
8614
8600
|
loadOptions: handleLoadOptions,
|
|
8615
8601
|
onChange: onOptionChange,
|
|
8616
8602
|
isDisabled: props.isDisabled,
|
|
@@ -8620,13 +8606,13 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8620
8606
|
});
|
|
8621
8607
|
}
|
|
8622
8608
|
|
|
8623
|
-
function ownKeys$
|
|
8624
|
-
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; }
|
|
8625
8611
|
function CountriesPicker(props) {
|
|
8626
8612
|
var _props$options;
|
|
8627
8613
|
var CustomCountriesPicker = ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.length) <= props.countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
|
|
8628
8614
|
return jsx(Spacings.Stack, {
|
|
8629
|
-
children: jsx(CustomCountriesPicker, _objectSpread$
|
|
8615
|
+
children: jsx(CustomCountriesPicker, _objectSpread$Q({}, props))
|
|
8630
8616
|
});
|
|
8631
8617
|
}
|
|
8632
8618
|
CountriesPicker.defaultProps = {
|
|
@@ -8682,7 +8668,7 @@ var getFirst60Options$1 = function getFirst60Options(storesOptions, currentValue
|
|
|
8682
8668
|
return _sliceInstanceProperty(storesOptions).call(storesOptions, 0, LOWER_STORES_LIMIT + currentValuesLength);
|
|
8683
8669
|
};
|
|
8684
8670
|
|
|
8685
|
-
var messages$
|
|
8671
|
+
var messages$t = defineMessages({
|
|
8686
8672
|
basicSelectInputPlaceholder: {
|
|
8687
8673
|
id: 'Shared.StoreSelectInput.basicSelectInputPlaceholder',
|
|
8688
8674
|
description: 'The placeholder shown for basic select input',
|
|
@@ -8715,8 +8701,8 @@ var messages$u = defineMessages({
|
|
|
8715
8701
|
}
|
|
8716
8702
|
});
|
|
8717
8703
|
|
|
8718
|
-
function ownKeys$
|
|
8719
|
-
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; }
|
|
8720
8706
|
var hasErrors$5 = function hasErrors(errors) {
|
|
8721
8707
|
var _context;
|
|
8722
8708
|
return errors && _someInstanceProperty(_context = _Object$values(errors)).call(_context, Boolean);
|
|
@@ -8746,7 +8732,7 @@ var getValueFromOptions$1 = function getValueFromOptions(_ref) {
|
|
|
8746
8732
|
};
|
|
8747
8733
|
var emptyStoreOption = function emptyStoreOption(intl) {
|
|
8748
8734
|
return [{
|
|
8749
|
-
label: intl.formatMessage(messages$
|
|
8735
|
+
label: intl.formatMessage(messages$t.asyncSelectDropdownTypeAheadPrompt),
|
|
8750
8736
|
value: undefined,
|
|
8751
8737
|
isDisabled: true
|
|
8752
8738
|
}];
|
|
@@ -8819,10 +8805,10 @@ var StoresAsyncSelectInput = function StoresAsyncSelectInput(props) {
|
|
|
8819
8805
|
}();
|
|
8820
8806
|
if (storesListFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
8821
8807
|
return jsxs(Fragment, {
|
|
8822
|
-
children: [jsx(AsyncSelectInput, _objectSpread$
|
|
8808
|
+
children: [jsx(AsyncSelectInput, _objectSpread$P(_objectSpread$P({
|
|
8823
8809
|
id: props.id,
|
|
8824
8810
|
name: props.name,
|
|
8825
|
-
placeholder: intl.formatMessage(messages$
|
|
8811
|
+
placeholder: intl.formatMessage(messages$t.basicSelectInputPlaceholder),
|
|
8826
8812
|
horizontalConstraint: props.horizontalConstraint,
|
|
8827
8813
|
loadOptions: handleLoadOptions,
|
|
8828
8814
|
defaultOptions: true,
|
|
@@ -8861,8 +8847,8 @@ StoresAsyncSelectInput.defaultProps = {
|
|
|
8861
8847
|
shouldFetchProductSelections: false
|
|
8862
8848
|
};
|
|
8863
8849
|
|
|
8864
|
-
function ownKeys$
|
|
8865
|
-
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; }
|
|
8866
8852
|
var hasErrors$4 = function hasErrors(errors) {
|
|
8867
8853
|
var _context;
|
|
8868
8854
|
return errors && _someInstanceProperty(_context = _Object$values(errors)).call(_context, Boolean);
|
|
@@ -8916,10 +8902,10 @@ var StoresBasicSelectInput = function StoresBasicSelectInput(props) {
|
|
|
8916
8902
|
};
|
|
8917
8903
|
if (storesListFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
8918
8904
|
return jsxs(Fragment, {
|
|
8919
|
-
children: [jsx(SelectInput, _objectSpread$
|
|
8905
|
+
children: [jsx(SelectInput, _objectSpread$O(_objectSpread$O({
|
|
8920
8906
|
id: props.id,
|
|
8921
8907
|
name: props.name,
|
|
8922
|
-
placeholder: intl.formatMessage(messages$
|
|
8908
|
+
placeholder: intl.formatMessage(messages$t.basicSelectInputPlaceholder),
|
|
8923
8909
|
horizontalConstraint: props.horizontalConstraint,
|
|
8924
8910
|
options: mappedStoresListOptions,
|
|
8925
8911
|
isMulti: props.isMulti,
|
|
@@ -9015,8 +9001,8 @@ var useStoresByFieldFetcher = function useStoresByFieldFetcher(stores, predicate
|
|
|
9015
9001
|
};
|
|
9016
9002
|
};
|
|
9017
9003
|
|
|
9018
|
-
function ownKeys$
|
|
9019
|
-
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; }
|
|
9020
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 } } } };
|
|
9021
9007
|
var hasErrors$3 = function hasErrors(errors) {
|
|
9022
9008
|
var _context;
|
|
@@ -9124,10 +9110,10 @@ var StoresSearchSelectInput = function StoresSearchSelectInput(props) {
|
|
|
9124
9110
|
var loadOptionsDebounced = debounce(handleLoadOptions, 500);
|
|
9125
9111
|
if (storesByFieldFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
9126
9112
|
return jsxs(Fragment, {
|
|
9127
|
-
children: [jsx(SearchSelectInput, _objectSpread$
|
|
9113
|
+
children: [jsx(SearchSelectInput, _objectSpread$N(_objectSpread$N({
|
|
9128
9114
|
id: props.id,
|
|
9129
9115
|
name: props.name,
|
|
9130
|
-
placeholder: intl.formatMessage(messages$
|
|
9116
|
+
placeholder: intl.formatMessage(messages$t.searchSelectInputPlaceholder),
|
|
9131
9117
|
horizontalConstraint: props.horizontalConstraint,
|
|
9132
9118
|
loadOptions: loadOptionsDebounced,
|
|
9133
9119
|
defaultOptions: false,
|
|
@@ -9141,9 +9127,9 @@ var StoresSearchSelectInput = function StoresSearchSelectInput(props) {
|
|
|
9141
9127
|
}),
|
|
9142
9128
|
onChange: props.onChange,
|
|
9143
9129
|
onBlur: props.onBlur,
|
|
9144
|
-
loadingMessage: intl.formatMessage(messages$
|
|
9130
|
+
loadingMessage: intl.formatMessage(messages$t.searchSelectInputLoadingMessage),
|
|
9145
9131
|
noOptionsMessage: function noOptionsMessage() {
|
|
9146
|
-
return intl.formatMessage(messages$
|
|
9132
|
+
return intl.formatMessage(messages$t.searchSelectInputNoOptionsFoundMessage);
|
|
9147
9133
|
},
|
|
9148
9134
|
isDisabled: props.isDisabled || storesByFieldFetcher.isLoading,
|
|
9149
9135
|
isReadOnly: props.isReadOnly,
|
|
@@ -9171,8 +9157,8 @@ StoresSearchSelectInput.defaultProps = {
|
|
|
9171
9157
|
shouldFetchProductSelections: false
|
|
9172
9158
|
};
|
|
9173
9159
|
|
|
9174
|
-
function ownKeys$
|
|
9175
|
-
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; }
|
|
9176
9162
|
var StoreSelectInput = function StoreSelectInput(props) {
|
|
9177
9163
|
var totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher(props.projectKey);
|
|
9178
9164
|
var components = useMemo(function () {
|
|
@@ -9180,7 +9166,7 @@ var StoreSelectInput = function StoreSelectInput(props) {
|
|
|
9180
9166
|
// eslint-disable-next-line react/display-name
|
|
9181
9167
|
Option: function Option(optionInnerProps) {
|
|
9182
9168
|
if (optionInnerProps.isDisabled) {
|
|
9183
|
-
return jsx(SelectInput.Option, _objectSpread$
|
|
9169
|
+
return jsx(SelectInput.Option, _objectSpread$M({}, optionInnerProps));
|
|
9184
9170
|
}
|
|
9185
9171
|
return jsx(CustomSelectInputOption, {
|
|
9186
9172
|
optionType: props.optionType,
|
|
@@ -9191,7 +9177,7 @@ var StoreSelectInput = function StoreSelectInput(props) {
|
|
|
9191
9177
|
}, [props.optionType]);
|
|
9192
9178
|
if (totalNumberOfStoresFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
9193
9179
|
var CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput : StoresSearchSelectInput;
|
|
9194
|
-
return jsx(CustomStoreSelectInput, _objectSpread$
|
|
9180
|
+
return jsx(CustomStoreSelectInput, _objectSpread$M(_objectSpread$M({
|
|
9195
9181
|
projectKey: props.projectKey,
|
|
9196
9182
|
id: props.id,
|
|
9197
9183
|
name: props.name,
|
|
@@ -9230,12 +9216,12 @@ StoreSelectInput.defaultProps = {
|
|
|
9230
9216
|
shouldFetchProductSelections: false
|
|
9231
9217
|
};
|
|
9232
9218
|
|
|
9233
|
-
function ownKeys$
|
|
9234
|
-
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; }
|
|
9235
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 } } } };
|
|
9236
9222
|
var createQueryVariables$3 = function createQueryVariables(ownProps) {
|
|
9237
9223
|
var _context;
|
|
9238
|
-
return _objectSpread$
|
|
9224
|
+
return _objectSpread$L(_objectSpread$L({
|
|
9239
9225
|
limit: ownProps.limit,
|
|
9240
9226
|
offset: ownProps.offset,
|
|
9241
9227
|
sort: _sortInstanceProperty(ownProps)
|
|
@@ -9314,7 +9300,7 @@ var getFirst60Options = function getFirst60Options(businessUnitOptions, currentV
|
|
|
9314
9300
|
return _sliceInstanceProperty(businessUnitOptions).call(businessUnitOptions, 0, LOWER_BUSINESS_UNITS_LIMIT + currentValuesLength);
|
|
9315
9301
|
};
|
|
9316
9302
|
|
|
9317
|
-
var messages$
|
|
9303
|
+
var messages$s = defineMessages({
|
|
9318
9304
|
asyncSelectInputPlaceholder: {
|
|
9319
9305
|
id: 'Shared.BusinessUnitSelectInput.asyncSelectInputPlaceholder',
|
|
9320
9306
|
description: 'The placeholder shown for async select input',
|
|
@@ -9342,8 +9328,8 @@ var messages$t = defineMessages({
|
|
|
9342
9328
|
}
|
|
9343
9329
|
});
|
|
9344
9330
|
|
|
9345
|
-
function ownKeys$
|
|
9346
|
-
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; }
|
|
9347
9333
|
var hasErrors$2 = function hasErrors(errors) {
|
|
9348
9334
|
var _context;
|
|
9349
9335
|
return errors && _someInstanceProperty(_context = _Object$values(errors)).call(_context, Boolean);
|
|
@@ -9414,10 +9400,10 @@ var BusinessUnitAsyncSelectInput = function BusinessUnitAsyncSelectInput(props)
|
|
|
9414
9400
|
};
|
|
9415
9401
|
if (businessUnitsListFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
9416
9402
|
return jsxs(Fragment, {
|
|
9417
|
-
children: [jsx(AsyncSelectInput, _objectSpread$
|
|
9403
|
+
children: [jsx(AsyncSelectInput, _objectSpread$K(_objectSpread$K({
|
|
9418
9404
|
id: props.id,
|
|
9419
9405
|
name: props.name,
|
|
9420
|
-
placeholder: props.placeholder || intl.formatMessage(messages$
|
|
9406
|
+
placeholder: props.placeholder || intl.formatMessage(messages$s.asyncSelectInputPlaceholder),
|
|
9421
9407
|
horizontalConstraint: props.horizontalConstraint,
|
|
9422
9408
|
loadOptions: handleLoadOptions,
|
|
9423
9409
|
defaultOptions: getDefaultOptions(),
|
|
@@ -9450,8 +9436,8 @@ BusinessUnitAsyncSelectInput.defaultProps = {
|
|
|
9450
9436
|
shouldFetchProductSelections: false
|
|
9451
9437
|
};
|
|
9452
9438
|
|
|
9453
|
-
function ownKeys$
|
|
9454
|
-
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; }
|
|
9455
9441
|
var hasErrors$1 = function hasErrors(errors) {
|
|
9456
9442
|
var _context;
|
|
9457
9443
|
return errors && _someInstanceProperty(_context = _Object$values(errors)).call(_context, Boolean);
|
|
@@ -9486,10 +9472,10 @@ var BusinessUnitBasicSelectInput = function BusinessUnitBasicSelectInput(props)
|
|
|
9486
9472
|
};
|
|
9487
9473
|
if (businessUnitsListFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
9488
9474
|
return jsxs(Fragment, {
|
|
9489
|
-
children: [jsx(SelectInput, _objectSpread$
|
|
9475
|
+
children: [jsx(SelectInput, _objectSpread$J(_objectSpread$J({
|
|
9490
9476
|
id: props.id,
|
|
9491
9477
|
name: props.name,
|
|
9492
|
-
placeholder: props.placeholder || intl.formatMessage(messages$
|
|
9478
|
+
placeholder: props.placeholder || intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
9493
9479
|
horizontalConstraint: props.horizontalConstraint,
|
|
9494
9480
|
options: mappedBusinessUnitsOptions,
|
|
9495
9481
|
value: (_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.value,
|
|
@@ -9577,8 +9563,8 @@ var handlers$1 = {
|
|
|
9577
9563
|
}
|
|
9578
9564
|
};
|
|
9579
9565
|
|
|
9580
|
-
function ownKeys$
|
|
9581
|
-
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; }
|
|
9582
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 } } } };
|
|
9583
9569
|
var hasErrors = function hasErrors(errors) {
|
|
9584
9570
|
var _context;
|
|
@@ -9629,19 +9615,19 @@ var BusinessUnitSearchSelectInput = function BusinessUnitSearchSelectInput(props
|
|
|
9629
9615
|
var loadOptionsDebounced = debounce(handleLoadOptions, 500);
|
|
9630
9616
|
if (businessUnitsByFieldFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
9631
9617
|
return jsxs(Fragment, {
|
|
9632
|
-
children: [jsx(SearchSelectInput, _objectSpread$
|
|
9618
|
+
children: [jsx(SearchSelectInput, _objectSpread$I(_objectSpread$I({
|
|
9633
9619
|
id: props.id,
|
|
9634
9620
|
name: props.name,
|
|
9635
|
-
placeholder: props.placeholder || intl.formatMessage(messages$
|
|
9621
|
+
placeholder: props.placeholder || intl.formatMessage(messages$s.searchSelectInputPlaceholder),
|
|
9636
9622
|
horizontalConstraint: props.horizontalConstraint,
|
|
9637
9623
|
loadOptions: loadOptionsDebounced,
|
|
9638
9624
|
defaultOptions: false,
|
|
9639
9625
|
value: props.value,
|
|
9640
9626
|
onChange: handleChange,
|
|
9641
9627
|
onBlur: props.onBlur,
|
|
9642
|
-
loadingMessage: intl.formatMessage(messages$
|
|
9628
|
+
loadingMessage: intl.formatMessage(messages$s.searchSelectInputLoadingMessage),
|
|
9643
9629
|
noOptionsMessage: function noOptionsMessage() {
|
|
9644
|
-
return intl.formatMessage(messages$
|
|
9630
|
+
return intl.formatMessage(messages$s.searchSelectInputNoOptionsFoundMessage);
|
|
9645
9631
|
},
|
|
9646
9632
|
isDisabled: props.isDisabled || businessUnitsByFieldFetcher.isLoading,
|
|
9647
9633
|
isReadOnly: props.isReadOnly,
|
|
@@ -9669,8 +9655,8 @@ BusinessUnitSearchSelectInput.defaultProps = {
|
|
|
9669
9655
|
shouldFetchProductSelections: false
|
|
9670
9656
|
};
|
|
9671
9657
|
|
|
9672
|
-
function ownKeys$
|
|
9673
|
-
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; }
|
|
9674
9660
|
var BusinessUnitSelectInput = function BusinessUnitSelectInput(props) {
|
|
9675
9661
|
var totalNumberOfBusinessUnitsFetcher = useTotalNumberOfBusinessUnitsFetcher();
|
|
9676
9662
|
var components = useMemo(function () {
|
|
@@ -9678,7 +9664,7 @@ var BusinessUnitSelectInput = function BusinessUnitSelectInput(props) {
|
|
|
9678
9664
|
// eslint-disable-next-line react/display-name
|
|
9679
9665
|
Option: function Option(optionInnerProps) {
|
|
9680
9666
|
if (optionInnerProps.isDisabled) {
|
|
9681
|
-
return jsx(SelectInput.Option, _objectSpread$
|
|
9667
|
+
return jsx(SelectInput.Option, _objectSpread$H({}, optionInnerProps));
|
|
9682
9668
|
}
|
|
9683
9669
|
return jsx(CustomSelectInputOption, {
|
|
9684
9670
|
optionType: props.optionType,
|
|
@@ -9689,7 +9675,7 @@ var BusinessUnitSelectInput = function BusinessUnitSelectInput(props) {
|
|
|
9689
9675
|
}, [props.optionType]);
|
|
9690
9676
|
if (totalNumberOfBusinessUnitsFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
9691
9677
|
var CustomSelectInput = totalNumberOfBusinessUnitsFetcher.total <= props.lowerBusinessUnitsLimit ? BusinessUnitBasicSelectInput : totalNumberOfBusinessUnitsFetcher.total <= props.upperBusinessUnitsLimit ? BusinessUnitAsyncSelectInput : BusinessUnitSearchSelectInput;
|
|
9692
|
-
return jsx(CustomSelectInput, _objectSpread$
|
|
9678
|
+
return jsx(CustomSelectInput, _objectSpread$H(_objectSpread$H({
|
|
9693
9679
|
id: props.id,
|
|
9694
9680
|
name: props.name,
|
|
9695
9681
|
components: components,
|
|
@@ -9730,7 +9716,7 @@ BusinessUnitSelectInput.defaultProps = {
|
|
|
9730
9716
|
// https://github.com/sphereio/sphere-backend/blob/master/ws/core/users.md#-businessrole
|
|
9731
9717
|
var businessRoleKeys = ['ExecutiveManagement', 'BusinessIntelligence', 'BuyingPlanningAndInventoryManagement', 'DataQualityAndContentManagement', 'CustomerService', 'FinanceAndAccounting', 'LegalAndPeople', 'LogisticsAndSupplyChain', 'FulfillmentAndOperationsManagement', 'OfflineRetailStore', 'Marketing', 'BusinessDevSalesAndAccountManagement', 'UXUIDesign', 'TechProductManagement', 'TechProjectAndProgramManagement', 'SoftwareDevelopmentAndSolutionsArchitect', 'OperationsITAndSupportEngineering', 'Other'];
|
|
9732
9718
|
|
|
9733
|
-
var messages$
|
|
9719
|
+
var messages$r = defineMessages({
|
|
9734
9720
|
ExecutiveManagement: {
|
|
9735
9721
|
id: 'Shared.businessRoles.executiveManagement',
|
|
9736
9722
|
description: 'The label for one of the selectable business roles',
|
|
@@ -9840,7 +9826,7 @@ function convertRatioToPercentage(ratio) {
|
|
|
9840
9826
|
return _parseFloat((ratio * 100).toFixed(2));
|
|
9841
9827
|
}
|
|
9842
9828
|
|
|
9843
|
-
var messages$
|
|
9829
|
+
var messages$q = defineMessages({
|
|
9844
9830
|
inputFieldError: {
|
|
9845
9831
|
id: 'Search.Filters.validation.customField.inputFieldError',
|
|
9846
9832
|
description: 'Error message for empty input field ',
|
|
@@ -9860,14 +9846,14 @@ var validateValue = function validateValue(value, type, intl) {
|
|
|
9860
9846
|
if (validateSingleFilter({
|
|
9861
9847
|
value: value
|
|
9862
9848
|
})) {
|
|
9863
|
-
return intl.formatMessage(messages$
|
|
9849
|
+
return intl.formatMessage(messages$q.inputFieldError);
|
|
9864
9850
|
}
|
|
9865
9851
|
if (type === FIELD_TYPES.Money && (validateSingleFilter({
|
|
9866
9852
|
value: value.currencyCode
|
|
9867
9853
|
}) || validateSingleFilter({
|
|
9868
9854
|
value: value.amount
|
|
9869
9855
|
}))) {
|
|
9870
|
-
return intl.formatMessage(messages$
|
|
9856
|
+
return intl.formatMessage(messages$q.inputFieldError);
|
|
9871
9857
|
}
|
|
9872
9858
|
return null;
|
|
9873
9859
|
};
|
|
@@ -9875,7 +9861,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
9875
9861
|
var value = _ref.value;
|
|
9876
9862
|
if (!value || !value.type) {
|
|
9877
9863
|
return {
|
|
9878
|
-
type: intl.formatMessage(messages$
|
|
9864
|
+
type: intl.formatMessage(messages$q.optionFieldError)
|
|
9879
9865
|
};
|
|
9880
9866
|
}
|
|
9881
9867
|
var typeName = value.type.name;
|
|
@@ -9883,7 +9869,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
9883
9869
|
var filterValue = value.value;
|
|
9884
9870
|
if (hasOption && !value.option) {
|
|
9885
9871
|
return {
|
|
9886
|
-
option: intl.formatMessage(messages$
|
|
9872
|
+
option: intl.formatMessage(messages$q.optionFieldError)
|
|
9887
9873
|
};
|
|
9888
9874
|
}
|
|
9889
9875
|
if (value.option === FILTER_TYPES.range) {
|
|
@@ -9902,7 +9888,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
9902
9888
|
} : null;
|
|
9903
9889
|
}
|
|
9904
9890
|
|
|
9905
|
-
var messages$
|
|
9891
|
+
var messages$p = defineMessages({
|
|
9906
9892
|
rangeMissingValue: {
|
|
9907
9893
|
id: 'Search.Filters.validation.date.rangeMissingValue',
|
|
9908
9894
|
description: 'error message if missing a value in a range',
|
|
@@ -9926,25 +9912,25 @@ function validateFilter$1(_ref, intl) {
|
|
|
9926
9912
|
if (validateSingleFilter({
|
|
9927
9913
|
value: value === null || value === void 0 ? void 0 : value.from
|
|
9928
9914
|
})) return {
|
|
9929
|
-
from: intl.formatMessage(messages$
|
|
9915
|
+
from: intl.formatMessage(messages$p.rangeMissingValue)
|
|
9930
9916
|
};
|
|
9931
9917
|
if (validateSingleFilter({
|
|
9932
9918
|
value: value === null || value === void 0 ? void 0 : value.to
|
|
9933
9919
|
})) return {
|
|
9934
|
-
to: intl.formatMessage(messages$
|
|
9920
|
+
to: intl.formatMessage(messages$p.rangeMissingValue)
|
|
9935
9921
|
};
|
|
9936
9922
|
if (moment$1(value === null || value === void 0 ? void 0 : value.to).isBefore(value === null || value === void 0 ? void 0 : value.from)) return {
|
|
9937
|
-
from: intl.formatMessage(messages$
|
|
9923
|
+
from: intl.formatMessage(messages$p.rangeToSmallerThanFrom)
|
|
9938
9924
|
};
|
|
9939
9925
|
} else if (type === 'equalTo' || type === 'lessThan' || type === 'moreThan') {
|
|
9940
9926
|
if (validateSingleFilter({
|
|
9941
9927
|
value: value
|
|
9942
|
-
})) return intl.formatMessage(messages$
|
|
9928
|
+
})) return intl.formatMessage(messages$p.missingValue);
|
|
9943
9929
|
}
|
|
9944
9930
|
return null;
|
|
9945
9931
|
}
|
|
9946
9932
|
|
|
9947
|
-
var messages$
|
|
9933
|
+
var messages$o = defineMessages({
|
|
9948
9934
|
rangeMissingValue: {
|
|
9949
9935
|
id: 'Search.Filters.validation.number.rangeMissingValue',
|
|
9950
9936
|
description: 'error message if missing a value in a range',
|
|
@@ -9962,30 +9948,30 @@ function validateFilter(_ref, intl) {
|
|
|
9962
9948
|
_ref$allowFloat = _ref.allowFloat,
|
|
9963
9949
|
allowFloat = _ref$allowFloat === void 0 ? true : _ref$allowFloat;
|
|
9964
9950
|
if (type !== 'range') {
|
|
9965
|
-
if (!allowFloat && !isInteger(value)) return intl.formatMessage(messages$
|
|
9951
|
+
if (!allowFloat && !isInteger(value)) return intl.formatMessage(messages$J.integer);
|
|
9966
9952
|
return null;
|
|
9967
9953
|
}
|
|
9968
9954
|
|
|
9969
9955
|
// only range types from here
|
|
9970
9956
|
|
|
9971
9957
|
if (!allowFloat && !isInteger(value.from)) return {
|
|
9972
|
-
from: intl.formatMessage(messages$
|
|
9958
|
+
from: intl.formatMessage(messages$J.integer)
|
|
9973
9959
|
};
|
|
9974
9960
|
if (!allowFloat && !isInteger(value.to)) return {
|
|
9975
|
-
to: intl.formatMessage(messages$
|
|
9961
|
+
to: intl.formatMessage(messages$J.integer)
|
|
9976
9962
|
};
|
|
9977
9963
|
if (validateSingleFilter({
|
|
9978
9964
|
value: value.from
|
|
9979
9965
|
})) return {
|
|
9980
|
-
from: intl.formatMessage(messages$
|
|
9966
|
+
from: intl.formatMessage(messages$o.rangeMissingValue)
|
|
9981
9967
|
};
|
|
9982
9968
|
if (validateSingleFilter({
|
|
9983
9969
|
value: value.to
|
|
9984
9970
|
})) return {
|
|
9985
|
-
to: intl.formatMessage(messages$
|
|
9971
|
+
to: intl.formatMessage(messages$o.rangeMissingValue)
|
|
9986
9972
|
};
|
|
9987
9973
|
if (_parseFloat(value.to) < _parseFloat(value.from)) return {
|
|
9988
|
-
from: intl.formatMessage(messages$
|
|
9974
|
+
from: intl.formatMessage(messages$o.rangeToSmallerThanFrom)
|
|
9989
9975
|
};
|
|
9990
9976
|
return null;
|
|
9991
9977
|
}
|
|
@@ -10286,12 +10272,12 @@ var RESOURCES_WITH_PLATFORM_LIMITS = {
|
|
|
10286
10272
|
};
|
|
10287
10273
|
var CUSTOMER_SUPPORT_LINK = 'https://jira.commercetools.com/servicedesk/customer/portal/1';
|
|
10288
10274
|
|
|
10289
|
-
function ownKeys$
|
|
10290
|
-
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; }
|
|
10291
10277
|
var resourcesWithPlatformLimits = _Object$keys(RESOURCES_WITH_PLATFORM_LIMITS);
|
|
10292
10278
|
var createQueryVariables = function createQueryVariables(platformLimit) {
|
|
10293
10279
|
return _reduceInstanceProperty(resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, function (previousIncludedLimits, nextNameOfLimit) {
|
|
10294
|
-
return _objectSpread$
|
|
10280
|
+
return _objectSpread$G(_defineProperty({}, camelCase("should include ".concat(nextNameOfLimit)), platformLimit ? nextNameOfLimit === platformLimit : true), previousIncludedLimits);
|
|
10295
10281
|
}, {});
|
|
10296
10282
|
};
|
|
10297
10283
|
|
|
@@ -10365,7 +10351,7 @@ var useInterceptNavigation = function useInterceptNavigation(hasReachedErrorLimi
|
|
|
10365
10351
|
};
|
|
10366
10352
|
};
|
|
10367
10353
|
|
|
10368
|
-
var messages$
|
|
10354
|
+
var messages$n = defineMessages({
|
|
10369
10355
|
shippingMethods: {
|
|
10370
10356
|
id: 'PlatformLimits.Notifications.shippingMethodsWarning',
|
|
10371
10357
|
description: 'warning message about platform limit exceeded',
|
|
@@ -10393,8 +10379,8 @@ var messages$o = defineMessages({
|
|
|
10393
10379
|
}
|
|
10394
10380
|
});
|
|
10395
10381
|
|
|
10396
|
-
function ownKeys$
|
|
10397
|
-
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; }
|
|
10398
10384
|
var getCustomerSupportLink$1 = function getCustomerSupportLink(msg) {
|
|
10399
10385
|
return jsx(Link, {
|
|
10400
10386
|
isExternal: true,
|
|
@@ -10411,7 +10397,7 @@ var PlatformLimitWarningNotification = function PlatformLimitWarningNotification
|
|
|
10411
10397
|
color: "warning",
|
|
10412
10398
|
size: "medium"
|
|
10413
10399
|
}), jsx(Text.Body, {
|
|
10414
|
-
intlMessage: _objectSpread$
|
|
10400
|
+
intlMessage: _objectSpread$F(_objectSpread$F({}, messages$n[resource]), {}, {
|
|
10415
10401
|
values: {
|
|
10416
10402
|
limit: limit,
|
|
10417
10403
|
customersupport: getCustomerSupportLink$1
|
|
@@ -10422,7 +10408,7 @@ var PlatformLimitWarningNotification = function PlatformLimitWarningNotification
|
|
|
10422
10408
|
};
|
|
10423
10409
|
PlatformLimitWarningNotification.displayName = 'PlatformLimitWarningNotification';
|
|
10424
10410
|
|
|
10425
|
-
var messages$
|
|
10411
|
+
var messages$m = defineMessages({
|
|
10426
10412
|
shippingMethods: {
|
|
10427
10413
|
id: 'PlatformLimits.Notifications.shippingMethodsError',
|
|
10428
10414
|
description: 'error message about platform limit exceeded',
|
|
@@ -10450,8 +10436,8 @@ var messages$n = defineMessages({
|
|
|
10450
10436
|
}
|
|
10451
10437
|
});
|
|
10452
10438
|
|
|
10453
|
-
function ownKeys$
|
|
10454
|
-
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; }
|
|
10455
10441
|
var getCustomerSupportLink = function getCustomerSupportLink(msg) {
|
|
10456
10442
|
return jsx(Link, {
|
|
10457
10443
|
isExternal: true,
|
|
@@ -10464,7 +10450,7 @@ var PlatformLimitErrorNotification = function PlatformLimitErrorNotification(_re
|
|
|
10464
10450
|
limit = _ref.limit;
|
|
10465
10451
|
return jsx(ContentNotification, {
|
|
10466
10452
|
type: "error",
|
|
10467
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
10453
|
+
children: jsx(FormattedMessage, _objectSpread$E(_objectSpread$E({}, messages$m[resource]), {}, {
|
|
10468
10454
|
values: {
|
|
10469
10455
|
limit: limit,
|
|
10470
10456
|
customersupport: getCustomerSupportLink
|
|
@@ -10484,14 +10470,14 @@ var Notifications = {
|
|
|
10484
10470
|
Error: PlatformLimitErrorNotification
|
|
10485
10471
|
};
|
|
10486
10472
|
|
|
10487
|
-
function ownKeys$
|
|
10488
|
-
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; }
|
|
10489
10475
|
var PlatformLimitsStatusText = function PlatformLimitsStatusText(_ref) {
|
|
10490
10476
|
var intlMessage = _ref.intlMessage,
|
|
10491
10477
|
children = _ref.children;
|
|
10492
10478
|
return jsxs(Text.Subheadline, {
|
|
10493
10479
|
as: "h4",
|
|
10494
|
-
children: [intlMessage && jsx(FormattedMessage, _objectSpread$
|
|
10480
|
+
children: [intlMessage && jsx(FormattedMessage, _objectSpread$D({}, intlMessage)), children]
|
|
10495
10481
|
});
|
|
10496
10482
|
};
|
|
10497
10483
|
PlatformLimitsStatusText.displayName = 'PlatformLimitsStatusText';
|
|
@@ -10588,7 +10574,7 @@ var PlatformLimitsShippingMethodsNotifications = function PlatformLimitsShipping
|
|
|
10588
10574
|
};
|
|
10589
10575
|
PlatformLimitsShippingMethodsNotifications.displayName = 'PlatformLimitsShippingMethodsNotifications';
|
|
10590
10576
|
|
|
10591
|
-
var messages$
|
|
10577
|
+
var messages$l = defineMessages({
|
|
10592
10578
|
shippingMethodsPlatformLimitReached: {
|
|
10593
10579
|
id: 'PlatformLimits.Tooltip.shippingMethodsLimitReached',
|
|
10594
10580
|
description: 'The message for shipping methods platform limit being reached',
|
|
@@ -10596,17 +10582,17 @@ var messages$m = defineMessages({
|
|
|
10596
10582
|
}
|
|
10597
10583
|
});
|
|
10598
10584
|
|
|
10599
|
-
function ownKeys$
|
|
10600
|
-
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; }
|
|
10601
10587
|
var PlatformLimitsShippingMethodsTooltip = function PlatformLimitsShippingMethodsTooltip(props) {
|
|
10602
10588
|
var intl = useIntl();
|
|
10603
|
-
return jsx(Tooltip$1, _objectSpread$
|
|
10604
|
-
title: intl.formatMessage(messages$
|
|
10589
|
+
return jsx(Tooltip$1, _objectSpread$C(_objectSpread$C({}, props), {}, {
|
|
10590
|
+
title: intl.formatMessage(messages$l.shippingMethodsPlatformLimitReached)
|
|
10605
10591
|
}));
|
|
10606
10592
|
};
|
|
10607
10593
|
PlatformLimitsShippingMethodsTooltip.displayName = 'PlatformLimitsShippingMethodsTooltip';
|
|
10608
10594
|
|
|
10609
|
-
var messages$
|
|
10595
|
+
var messages$k = defineMessages({
|
|
10610
10596
|
shippingMethodsStatus: {
|
|
10611
10597
|
id: 'PlatformLimits.Status.shippingMethods',
|
|
10612
10598
|
description: 'The message for shipping methods platform limit values',
|
|
@@ -10623,7 +10609,7 @@ var PlatformLimitsShippingMethodsStatus = function PlatformLimitsShippingMethods
|
|
|
10623
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;
|
|
10624
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;
|
|
10625
10611
|
return jsx(PlatformLimitsStatusText, {
|
|
10626
|
-
children: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages$
|
|
10612
|
+
children: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages$k.shippingMethodsStatus), " ")).call(_context, getPlatformLimitsStatus({
|
|
10627
10613
|
limit: limit,
|
|
10628
10614
|
current: current,
|
|
10629
10615
|
total: total,
|
|
@@ -10653,8 +10639,8 @@ var useShippingMethodsLimits = function useShippingMethodsLimits() {
|
|
|
10653
10639
|
};
|
|
10654
10640
|
};
|
|
10655
10641
|
|
|
10656
|
-
function ownKeys$
|
|
10657
|
-
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; }
|
|
10658
10644
|
var injectShippingMethodsPlatformLimits = function injectShippingMethodsPlatformLimits() {
|
|
10659
10645
|
return function (WrappedComponent) {
|
|
10660
10646
|
var WithShippingMethodsPlatformLimits = function WithShippingMethodsPlatformLimits(props) {
|
|
@@ -10662,7 +10648,7 @@ var injectShippingMethodsPlatformLimits = function injectShippingMethodsPlatform
|
|
|
10662
10648
|
var shippingMethodsProps = {
|
|
10663
10649
|
platformLimits: shippingMethodsPlatformLimits
|
|
10664
10650
|
};
|
|
10665
|
-
return jsx(WrappedComponent, _objectSpread$
|
|
10651
|
+
return jsx(WrappedComponent, _objectSpread$B(_objectSpread$B({}, props), shippingMethodsProps));
|
|
10666
10652
|
};
|
|
10667
10653
|
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
10668
10654
|
return WithShippingMethodsPlatformLimits;
|
|
@@ -10736,7 +10722,7 @@ var PlatformLimitsTaxCategoriesNotifications = function PlatformLimitsTaxCategor
|
|
|
10736
10722
|
};
|
|
10737
10723
|
PlatformLimitsTaxCategoriesNotifications.displayName = 'PlatformLimitsTaxCategoriesNotifications';
|
|
10738
10724
|
|
|
10739
|
-
var messages$
|
|
10725
|
+
var messages$j = defineMessages({
|
|
10740
10726
|
taxCategoriesPlatformLimitReached: {
|
|
10741
10727
|
id: 'PlatformLimits.Tooltip.taxCategoriesLimitReached',
|
|
10742
10728
|
description: 'The message for tax categories platform limit being reached',
|
|
@@ -10744,17 +10730,17 @@ var messages$k = defineMessages({
|
|
|
10744
10730
|
}
|
|
10745
10731
|
});
|
|
10746
10732
|
|
|
10747
|
-
function ownKeys$
|
|
10748
|
-
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; }
|
|
10749
10735
|
var PlatformLimitsTaxCategoriesTooltip = function PlatformLimitsTaxCategoriesTooltip(props) {
|
|
10750
10736
|
var intl = useIntl();
|
|
10751
|
-
return jsx(Tooltip$1, _objectSpread$
|
|
10752
|
-
title: intl.formatMessage(messages$
|
|
10737
|
+
return jsx(Tooltip$1, _objectSpread$A(_objectSpread$A({}, props), {}, {
|
|
10738
|
+
title: intl.formatMessage(messages$j.taxCategoriesPlatformLimitReached)
|
|
10753
10739
|
}));
|
|
10754
10740
|
};
|
|
10755
10741
|
PlatformLimitsTaxCategoriesTooltip.displayName = 'PlatformLimitsTaxCategoriesTooltip';
|
|
10756
10742
|
|
|
10757
|
-
var messages$
|
|
10743
|
+
var messages$i = defineMessages({
|
|
10758
10744
|
taxCategoriesStatus: {
|
|
10759
10745
|
id: 'PlatformLimits.Status.taxCategories',
|
|
10760
10746
|
description: 'The message for tax categories platform limit values',
|
|
@@ -10771,7 +10757,7 @@ var PlatformLimitsTaxCategoriesStatus = function PlatformLimitsTaxCategoriesStat
|
|
|
10771
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;
|
|
10772
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;
|
|
10773
10759
|
return jsx(PlatformLimitsStatusText, {
|
|
10774
|
-
children: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages$
|
|
10760
|
+
children: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages$i.taxCategoriesStatus), " ")).call(_context, getPlatformLimitsStatus({
|
|
10775
10761
|
limit: limit,
|
|
10776
10762
|
current: current,
|
|
10777
10763
|
total: total,
|
|
@@ -10801,15 +10787,15 @@ var useTaxCategoriesLimits = function useTaxCategoriesLimits() {
|
|
|
10801
10787
|
};
|
|
10802
10788
|
};
|
|
10803
10789
|
|
|
10804
|
-
function ownKeys$
|
|
10805
|
-
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; }
|
|
10806
10792
|
var injectTaxCategoriesPlatformLimits = function injectTaxCategoriesPlatformLimits(WrappedComponent) {
|
|
10807
10793
|
var WithTaxCategoriesPlatformLimits = function WithTaxCategoriesPlatformLimits(props) {
|
|
10808
10794
|
var taxCategoriesPlatformLimits = useTaxCategoriesLimits();
|
|
10809
10795
|
var taxCategoriesProps = {
|
|
10810
10796
|
platformLimits: taxCategoriesPlatformLimits
|
|
10811
10797
|
};
|
|
10812
|
-
return jsx(WrappedComponent, _objectSpread$
|
|
10798
|
+
return jsx(WrappedComponent, _objectSpread$z(_objectSpread$z({}, props), taxCategoriesProps));
|
|
10813
10799
|
};
|
|
10814
10800
|
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
10815
10801
|
return WithTaxCategoriesPlatformLimits;
|
|
@@ -10882,7 +10868,7 @@ var PlatformLimitsZonesNotifications = function PlatformLimitsZonesNotifications
|
|
|
10882
10868
|
};
|
|
10883
10869
|
PlatformLimitsZonesNotifications.displayName = 'PlatformLimitsZonesNotifications';
|
|
10884
10870
|
|
|
10885
|
-
var messages$
|
|
10871
|
+
var messages$h = defineMessages({
|
|
10886
10872
|
zonesPlatformLimitReached: {
|
|
10887
10873
|
id: 'PlatformLimits.Tooltip.zonesLimitReached',
|
|
10888
10874
|
description: 'The message for zones platform limit being reached',
|
|
@@ -10890,17 +10876,17 @@ var messages$i = defineMessages({
|
|
|
10890
10876
|
}
|
|
10891
10877
|
});
|
|
10892
10878
|
|
|
10893
|
-
function ownKeys$
|
|
10894
|
-
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; }
|
|
10895
10881
|
var PlatformLimitsZonesTooltip = function PlatformLimitsZonesTooltip(props) {
|
|
10896
10882
|
var intl = useIntl();
|
|
10897
|
-
return jsx(Tooltip$1, _objectSpread$
|
|
10898
|
-
title: intl.formatMessage(messages$
|
|
10883
|
+
return jsx(Tooltip$1, _objectSpread$y(_objectSpread$y({}, props), {}, {
|
|
10884
|
+
title: intl.formatMessage(messages$h.zonesPlatformLimitReached)
|
|
10899
10885
|
}));
|
|
10900
10886
|
};
|
|
10901
10887
|
PlatformLimitsZonesTooltip.displayName = 'PlatformLimitsZonesTooltip';
|
|
10902
10888
|
|
|
10903
|
-
var messages$
|
|
10889
|
+
var messages$g = defineMessages({
|
|
10904
10890
|
zonesStatus: {
|
|
10905
10891
|
id: 'PlatformLimits.Status.zones',
|
|
10906
10892
|
description: 'The message for zones platform limit values',
|
|
@@ -10917,7 +10903,7 @@ var PlatformLimitsZonesStatus = function PlatformLimitsZonesStatus(_ref) {
|
|
|
10917
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;
|
|
10918
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;
|
|
10919
10905
|
return jsx(PlatformLimitsStatusText, {
|
|
10920
|
-
children: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages$
|
|
10906
|
+
children: _concatInstanceProperty(_context = "".concat(intl.formatMessage(messages$g.zonesStatus), " ")).call(_context, getPlatformLimitsStatus({
|
|
10921
10907
|
limit: limit,
|
|
10922
10908
|
current: current,
|
|
10923
10909
|
total: total,
|
|
@@ -10947,8 +10933,8 @@ var useZonesLimits = function useZonesLimits() {
|
|
|
10947
10933
|
};
|
|
10948
10934
|
};
|
|
10949
10935
|
|
|
10950
|
-
function ownKeys$
|
|
10951
|
-
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; }
|
|
10952
10938
|
var injectZonesPlatformLimits = function injectZonesPlatformLimits() {
|
|
10953
10939
|
return function (WrappedComponent) {
|
|
10954
10940
|
var WithZonesPlatformLimits = function WithZonesPlatformLimits(props) {
|
|
@@ -10956,7 +10942,7 @@ var injectZonesPlatformLimits = function injectZonesPlatformLimits() {
|
|
|
10956
10942
|
var zonesProps = {
|
|
10957
10943
|
platformLimits: zonesPlatformLimits
|
|
10958
10944
|
};
|
|
10959
|
-
return jsx(WrappedComponent, _objectSpread$
|
|
10945
|
+
return jsx(WrappedComponent, _objectSpread$x(_objectSpread$x({}, props), zonesProps));
|
|
10960
10946
|
};
|
|
10961
10947
|
WithZonesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithZonesPlatformLimits');
|
|
10962
10948
|
return WithZonesPlatformLimits;
|
|
@@ -11043,7 +11029,7 @@ var PlatformLimitsCustomersNotifications = function PlatformLimitsCustomersNotif
|
|
|
11043
11029
|
};
|
|
11044
11030
|
PlatformLimitsCustomersNotifications.displayName = 'PlatformLimitsCustomersNotifications';
|
|
11045
11031
|
|
|
11046
|
-
var messages$
|
|
11032
|
+
var messages$f = defineMessages({
|
|
11047
11033
|
customersPlatformLimitReached: {
|
|
11048
11034
|
id: 'PlatformLimits.Tooltip.customersLimitReached',
|
|
11049
11035
|
description: 'The message for customers platform limit being reached',
|
|
@@ -11051,17 +11037,17 @@ var messages$g = defineMessages({
|
|
|
11051
11037
|
}
|
|
11052
11038
|
});
|
|
11053
11039
|
|
|
11054
|
-
function ownKeys$
|
|
11055
|
-
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; }
|
|
11056
11042
|
var PlatformLimitsCustomersTooltip = function PlatformLimitsCustomersTooltip(props) {
|
|
11057
11043
|
var intl = useIntl();
|
|
11058
|
-
return jsx(Tooltip$1, _objectSpread$
|
|
11059
|
-
title: intl.formatMessage(messages$
|
|
11044
|
+
return jsx(Tooltip$1, _objectSpread$w(_objectSpread$w({}, props), {}, {
|
|
11045
|
+
title: intl.formatMessage(messages$f.customersPlatformLimitReached)
|
|
11060
11046
|
}));
|
|
11061
11047
|
};
|
|
11062
11048
|
PlatformLimitsCustomersTooltip.displayName = 'PlatformLimitsCustomersTooltip';
|
|
11063
11049
|
|
|
11064
|
-
var messages$
|
|
11050
|
+
var messages$e = defineMessages({
|
|
11065
11051
|
customersStatus: {
|
|
11066
11052
|
id: 'PlatformLimits.Status.customers',
|
|
11067
11053
|
description: 'The message for customers platform limit values',
|
|
@@ -11069,9 +11055,9 @@ var messages$f = defineMessages({
|
|
|
11069
11055
|
}
|
|
11070
11056
|
});
|
|
11071
11057
|
|
|
11072
|
-
function ownKeys$
|
|
11073
|
-
function _objectSpread$
|
|
11074
|
-
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 = {
|
|
11075
11061
|
"status": "platform-limits-customers-status-module__status___3rXYM"
|
|
11076
11062
|
};
|
|
11077
11063
|
var PlatformLimitsCustomersStatus = function PlatformLimitsCustomersStatus() {
|
|
@@ -11086,11 +11072,11 @@ var PlatformLimitsCustomersStatus = function PlatformLimitsCustomersStatus() {
|
|
|
11086
11072
|
current = _platformLimits$custo2.current,
|
|
11087
11073
|
limit = _platformLimits$custo2.limit;
|
|
11088
11074
|
return jsx("div", {
|
|
11089
|
-
className: styles$
|
|
11075
|
+
className: styles$g.status,
|
|
11090
11076
|
children: jsx(Text.Detail, {
|
|
11091
11077
|
tone: "secondary",
|
|
11092
11078
|
isInline: true,
|
|
11093
|
-
intlMessage: _objectSpread$
|
|
11079
|
+
intlMessage: _objectSpread$v(_objectSpread$v({}, messages$e.customersStatus), {}, {
|
|
11094
11080
|
values: {
|
|
11095
11081
|
current: intl.formatNumber(current),
|
|
11096
11082
|
limit: intl.formatNumber(limit)
|
|
@@ -11101,7 +11087,7 @@ var PlatformLimitsCustomersStatus = function PlatformLimitsCustomersStatus() {
|
|
|
11101
11087
|
};
|
|
11102
11088
|
PlatformLimitsCustomersStatus.displayName = 'PlatformLimitsCustomersStatus';
|
|
11103
11089
|
|
|
11104
|
-
var messages$
|
|
11090
|
+
var messages$d = defineMessages({
|
|
11105
11091
|
title: {
|
|
11106
11092
|
id: 'PlatformLimits.Customers.modalTitle',
|
|
11107
11093
|
description: 'The modal title for the customer platform limits error',
|
|
@@ -11114,10 +11100,10 @@ var messages$e = defineMessages({
|
|
|
11114
11100
|
}
|
|
11115
11101
|
});
|
|
11116
11102
|
|
|
11117
|
-
function ownKeys$
|
|
11118
|
-
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; }
|
|
11119
11105
|
var LimitsReachedErrorGraphic$1 = function LimitsReachedErrorGraphic(props) {
|
|
11120
|
-
return jsxs("svg", _objectSpread$
|
|
11106
|
+
return jsxs("svg", _objectSpread$u(_objectSpread$u({}, props), {}, {
|
|
11121
11107
|
children: [jsx("defs", {
|
|
11122
11108
|
children: jsx("path", {
|
|
11123
11109
|
id: "a",
|
|
@@ -11225,7 +11211,7 @@ var PlatformLimitsCustomersErrorModal = function PlatformLimitsCustomersErrorMod
|
|
|
11225
11211
|
return jsx(InfoDialog, {
|
|
11226
11212
|
isOpen: customersPlatformLimitsModalState.isModalOpen,
|
|
11227
11213
|
onClose: onClose,
|
|
11228
|
-
title: intl.formatMessage(messages$
|
|
11214
|
+
title: intl.formatMessage(messages$d.title),
|
|
11229
11215
|
children: jsxs(Spacings.Stack, {
|
|
11230
11216
|
scale: "m",
|
|
11231
11217
|
alignItems: "center",
|
|
@@ -11234,7 +11220,7 @@ var PlatformLimitsCustomersErrorModal = function PlatformLimitsCustomersErrorMod
|
|
|
11234
11220
|
alignItems: "center",
|
|
11235
11221
|
children: [jsx(PlatformLimitsCustomersNotifications, {}), jsx(FlatButton, {
|
|
11236
11222
|
onClick: onClose,
|
|
11237
|
-
label: intl.formatMessage(messages$
|
|
11223
|
+
label: intl.formatMessage(messages$d.backToList),
|
|
11238
11224
|
icon: jsx(ListIcon, {
|
|
11239
11225
|
size: "medium",
|
|
11240
11226
|
color: "primary"
|
|
@@ -11246,7 +11232,7 @@ var PlatformLimitsCustomersErrorModal = function PlatformLimitsCustomersErrorMod
|
|
|
11246
11232
|
};
|
|
11247
11233
|
PlatformLimitsCustomersErrorModal.displayName = 'PlatformLimitsCustomersErrorModal';
|
|
11248
11234
|
|
|
11249
|
-
var styles$
|
|
11235
|
+
var styles$f = {
|
|
11250
11236
|
"combined": "platform-limits-customers-combined-module__combined___OszDd"
|
|
11251
11237
|
};
|
|
11252
11238
|
var PlatformLimitsCustomersCombined = function PlatformLimitsCustomersCombined() {
|
|
@@ -11255,7 +11241,7 @@ var PlatformLimitsCustomersCombined = function PlatformLimitsCustomersCombined()
|
|
|
11255
11241
|
hasReachedCustomersErrorLimit = _useCustomersPlatform.hasReachedCustomersErrorLimit,
|
|
11256
11242
|
hasReachedCustomersWarningLimit = _useCustomersPlatform.hasReachedCustomersWarningLimit;
|
|
11257
11243
|
return jsx("div", {
|
|
11258
|
-
className: styles$
|
|
11244
|
+
className: styles$f.combined,
|
|
11259
11245
|
children: jsxs(Spacings.Inline, {
|
|
11260
11246
|
scale: "xl",
|
|
11261
11247
|
justifyContent: "space-between",
|
|
@@ -11289,8 +11275,8 @@ var useCustomersPlatformLimits = function useCustomersPlatformLimits() {
|
|
|
11289
11275
|
};
|
|
11290
11276
|
};
|
|
11291
11277
|
|
|
11292
|
-
function ownKeys$
|
|
11293
|
-
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; }
|
|
11294
11280
|
var injectCustomersPlatformLimits = function injectCustomersPlatformLimits() {
|
|
11295
11281
|
return function (WrappedComponent) {
|
|
11296
11282
|
var WithCustomersPlatformLimits = function WithCustomersPlatformLimits(props) {
|
|
@@ -11298,7 +11284,7 @@ var injectCustomersPlatformLimits = function injectCustomersPlatformLimits() {
|
|
|
11298
11284
|
var customersProps = {
|
|
11299
11285
|
platformLimits: CustomersPlatformLimits
|
|
11300
11286
|
};
|
|
11301
|
-
return jsx(WrappedComponent, _objectSpread$
|
|
11287
|
+
return jsx(WrappedComponent, _objectSpread$t(_objectSpread$t({}, props), customersProps));
|
|
11302
11288
|
};
|
|
11303
11289
|
WithCustomersPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
11304
11290
|
return WithCustomersPlatformLimits;
|
|
@@ -11385,7 +11371,7 @@ var PlatformLimitsCustomerGroupsNotifications = function PlatformLimitsCustomerG
|
|
|
11385
11371
|
};
|
|
11386
11372
|
PlatformLimitsCustomerGroupsNotifications.displayName = 'PlatformLimitsCustomerGroupsNotifications';
|
|
11387
11373
|
|
|
11388
|
-
var messages$
|
|
11374
|
+
var messages$c = defineMessages({
|
|
11389
11375
|
customerGroupsPlatformLimitReached: {
|
|
11390
11376
|
id: 'PlatformLimits.Tooltip.customerGroupsLimitReached',
|
|
11391
11377
|
description: 'The message for custome groups platform limit being reached',
|
|
@@ -11393,17 +11379,17 @@ var messages$d = defineMessages({
|
|
|
11393
11379
|
}
|
|
11394
11380
|
});
|
|
11395
11381
|
|
|
11396
|
-
function ownKeys$
|
|
11397
|
-
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; }
|
|
11398
11384
|
var PlatformLimitsCustomerGroupsTooltip = function PlatformLimitsCustomerGroupsTooltip(props) {
|
|
11399
11385
|
var intl = useIntl();
|
|
11400
|
-
return jsx(Tooltip$1, _objectSpread$
|
|
11401
|
-
title: intl.formatMessage(messages$
|
|
11386
|
+
return jsx(Tooltip$1, _objectSpread$s(_objectSpread$s({}, props), {}, {
|
|
11387
|
+
title: intl.formatMessage(messages$c.customerGroupsPlatformLimitReached)
|
|
11402
11388
|
}));
|
|
11403
11389
|
};
|
|
11404
11390
|
PlatformLimitsCustomerGroupsTooltip.displayName = 'PlatformLimitsCustomerGroupsTooltip';
|
|
11405
11391
|
|
|
11406
|
-
var messages$
|
|
11392
|
+
var messages$b = defineMessages({
|
|
11407
11393
|
customerGroupsStatus: {
|
|
11408
11394
|
id: 'PlatformLimits.Status.customerGroups',
|
|
11409
11395
|
description: 'The message for customer groups platform limit values',
|
|
@@ -11411,9 +11397,9 @@ var messages$c = defineMessages({
|
|
|
11411
11397
|
}
|
|
11412
11398
|
});
|
|
11413
11399
|
|
|
11414
|
-
function ownKeys$
|
|
11415
|
-
function _objectSpread$
|
|
11416
|
-
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 = {
|
|
11417
11403
|
"status": "platform-limits-customer-groups-status-module__status___6099G"
|
|
11418
11404
|
};
|
|
11419
11405
|
var PlatformLimitsCustomerGroupsStatus = function PlatformLimitsCustomerGroupsStatus() {
|
|
@@ -11428,11 +11414,11 @@ var PlatformLimitsCustomerGroupsStatus = function PlatformLimitsCustomerGroupsSt
|
|
|
11428
11414
|
current = _platformLimits$custo2.current,
|
|
11429
11415
|
limit = _platformLimits$custo2.limit;
|
|
11430
11416
|
return jsx("div", {
|
|
11431
|
-
className: styles$
|
|
11417
|
+
className: styles$e.status,
|
|
11432
11418
|
children: jsx(Text.Detail, {
|
|
11433
11419
|
tone: "secondary",
|
|
11434
11420
|
isInline: true,
|
|
11435
|
-
intlMessage: _objectSpread$
|
|
11421
|
+
intlMessage: _objectSpread$r(_objectSpread$r({}, messages$b.customerGroupsStatus), {}, {
|
|
11436
11422
|
values: {
|
|
11437
11423
|
current: intl.formatNumber(current),
|
|
11438
11424
|
limit: intl.formatNumber(limit)
|
|
@@ -11443,7 +11429,7 @@ var PlatformLimitsCustomerGroupsStatus = function PlatformLimitsCustomerGroupsSt
|
|
|
11443
11429
|
};
|
|
11444
11430
|
PlatformLimitsCustomerGroupsStatus.displayName = 'PlatformLimitsCustomerGroupsStatus';
|
|
11445
11431
|
|
|
11446
|
-
var messages$
|
|
11432
|
+
var messages$a = defineMessages({
|
|
11447
11433
|
title: {
|
|
11448
11434
|
id: 'PlatformLimits.CustomerGroups.modalTitle',
|
|
11449
11435
|
description: 'The modal title for the customer groups platform limits error',
|
|
@@ -11456,10 +11442,10 @@ var messages$b = defineMessages({
|
|
|
11456
11442
|
}
|
|
11457
11443
|
});
|
|
11458
11444
|
|
|
11459
|
-
function ownKeys$
|
|
11460
|
-
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; }
|
|
11461
11447
|
var LimitsReachedErrorGraphic = function LimitsReachedErrorGraphic(props) {
|
|
11462
|
-
return jsxs("svg", _objectSpread$
|
|
11448
|
+
return jsxs("svg", _objectSpread$q(_objectSpread$q({}, props), {}, {
|
|
11463
11449
|
children: [jsx("defs", {
|
|
11464
11450
|
children: jsx("path", {
|
|
11465
11451
|
id: "a",
|
|
@@ -11567,7 +11553,7 @@ var PlatformLimitsCustomerGroupsErrorModal = function PlatformLimitsCustomerGrou
|
|
|
11567
11553
|
return jsx(InfoDialog, {
|
|
11568
11554
|
isOpen: customerGroupsPlatformLimitsModalState.isModalOpen,
|
|
11569
11555
|
onClose: onClose,
|
|
11570
|
-
title: intl.formatMessage(messages$
|
|
11556
|
+
title: intl.formatMessage(messages$a.title),
|
|
11571
11557
|
children: jsxs(Spacings.Stack, {
|
|
11572
11558
|
scale: "m",
|
|
11573
11559
|
alignItems: "center",
|
|
@@ -11576,7 +11562,7 @@ var PlatformLimitsCustomerGroupsErrorModal = function PlatformLimitsCustomerGrou
|
|
|
11576
11562
|
alignItems: "center",
|
|
11577
11563
|
children: [jsx(PlatformLimitsCustomerGroupsNotifications, {}), jsx(FlatButton, {
|
|
11578
11564
|
onClick: onClose,
|
|
11579
|
-
label: intl.formatMessage(messages$
|
|
11565
|
+
label: intl.formatMessage(messages$a.backToList),
|
|
11580
11566
|
icon: jsx(ListIcon, {
|
|
11581
11567
|
size: "medium",
|
|
11582
11568
|
color: "primary"
|
|
@@ -11588,7 +11574,7 @@ var PlatformLimitsCustomerGroupsErrorModal = function PlatformLimitsCustomerGrou
|
|
|
11588
11574
|
};
|
|
11589
11575
|
PlatformLimitsCustomerGroupsErrorModal.displayName = 'PlatformLimitsCustomerGroupsErrorModal';
|
|
11590
11576
|
|
|
11591
|
-
var styles$
|
|
11577
|
+
var styles$d = {
|
|
11592
11578
|
"combined": "platform-limits-customer-groups-combined-module__combined___WjRoI"
|
|
11593
11579
|
};
|
|
11594
11580
|
var PlatformLimitsCustomerGroupsCombined = function PlatformLimitsCustomerGroupsCombined() {
|
|
@@ -11597,7 +11583,7 @@ var PlatformLimitsCustomerGroupsCombined = function PlatformLimitsCustomerGroups
|
|
|
11597
11583
|
hasReachedCustomerGroupsErrorLimit = _useCustomerGroupsPla.hasReachedCustomerGroupsErrorLimit,
|
|
11598
11584
|
hasReachedCustomerGroupsWarningLimit = _useCustomerGroupsPla.hasReachedCustomerGroupsWarningLimit;
|
|
11599
11585
|
return jsx("div", {
|
|
11600
|
-
className: styles$
|
|
11586
|
+
className: styles$d.combined,
|
|
11601
11587
|
children: jsxs(Spacings.Inline, {
|
|
11602
11588
|
scale: "xl",
|
|
11603
11589
|
justifyContent: "space-between",
|
|
@@ -11631,8 +11617,8 @@ var useCustomerGroupsPlatformLimits = function useCustomerGroupsPlatformLimits()
|
|
|
11631
11617
|
};
|
|
11632
11618
|
};
|
|
11633
11619
|
|
|
11634
|
-
function ownKeys$
|
|
11635
|
-
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; }
|
|
11636
11622
|
var injectCustomerGroupsPlatformLimits = function injectCustomerGroupsPlatformLimits() {
|
|
11637
11623
|
return function (WrappedComponent) {
|
|
11638
11624
|
var WithCustomerGroupsPlatformLimits = function WithCustomerGroupsPlatformLimits(props) {
|
|
@@ -11640,7 +11626,7 @@ var injectCustomerGroupsPlatformLimits = function injectCustomerGroupsPlatformLi
|
|
|
11640
11626
|
var customersProps = {
|
|
11641
11627
|
platformLimits: CustomerGroupsPlatformLimits
|
|
11642
11628
|
};
|
|
11643
|
-
return jsx(WrappedComponent, _objectSpread$
|
|
11629
|
+
return jsx(WrappedComponent, _objectSpread$p(_objectSpread$p({}, props), customersProps));
|
|
11644
11630
|
};
|
|
11645
11631
|
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
11646
11632
|
return WithCustomerGroupsPlatformLimits;
|
|
@@ -11726,7 +11712,7 @@ var fetchPimIndexStatus = (function (apolloClient, projectKey) {
|
|
|
11726
11712
|
}();
|
|
11727
11713
|
});
|
|
11728
11714
|
|
|
11729
|
-
var messages$
|
|
11715
|
+
var messages$9 = defineMessages({
|
|
11730
11716
|
indexingSucceed: {
|
|
11731
11717
|
id: 'Products.PimIndexer.Notifications.indexingSucceed',
|
|
11732
11718
|
description: 'Message to be shown to user when PIM successfully finishes initial project indexing.',
|
|
@@ -11764,10 +11750,10 @@ var defaultValue = {
|
|
|
11764
11750
|
*/
|
|
11765
11751
|
var PimIndexerContext = /*#__PURE__*/createContext(defaultValue);
|
|
11766
11752
|
|
|
11767
|
-
function ownKeys$
|
|
11768
|
-
function _objectSpread$
|
|
11769
|
-
function _createSuper$
|
|
11770
|
-
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; } }
|
|
11771
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 } } } };
|
|
11772
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 } } } };
|
|
11773
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 } } } };
|
|
@@ -11791,7 +11777,7 @@ var getIndexingJobIds = function getIndexingJobIds(_ref) {
|
|
|
11791
11777
|
};
|
|
11792
11778
|
var PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
11793
11779
|
_inherits(PimIndexerProvider, _PureComponent);
|
|
11794
|
-
var _super = _createSuper$
|
|
11780
|
+
var _super = _createSuper$5(PimIndexerProvider);
|
|
11795
11781
|
function PimIndexerProvider() {
|
|
11796
11782
|
var _context;
|
|
11797
11783
|
var _this;
|
|
@@ -11870,7 +11856,7 @@ var PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11870
11856
|
_this.props.notifications.showNotification({
|
|
11871
11857
|
kind: 'error',
|
|
11872
11858
|
domain: DOMAINS.SIDE,
|
|
11873
|
-
text: _this.props.intl.formatMessage(messages$
|
|
11859
|
+
text: _this.props.intl.formatMessage(messages$9.indexingFailed)
|
|
11874
11860
|
});
|
|
11875
11861
|
};
|
|
11876
11862
|
_this.getIndexingProgress = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
@@ -11932,7 +11918,7 @@ var PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11932
11918
|
_this.props.notifications.showNotification({
|
|
11933
11919
|
kind: 'success',
|
|
11934
11920
|
domain: DOMAINS.SIDE,
|
|
11935
|
-
text: _this.props.intl.formatMessage(messages$
|
|
11921
|
+
text: _this.props.intl.formatMessage(messages$9.indexingSucceed)
|
|
11936
11922
|
},
|
|
11937
11923
|
// because the indexing may take so long, the success notification
|
|
11938
11924
|
// may be dismissed without being seen by the user. Set `dismissAfter`
|
|
@@ -12020,7 +12006,7 @@ var PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
12020
12006
|
});
|
|
12021
12007
|
case 6:
|
|
12022
12008
|
indexMutationResult = _context6.sent;
|
|
12023
|
-
_this.setState(_objectSpread$
|
|
12009
|
+
_this.setState(_objectSpread$o(_objectSpread$o({
|
|
12024
12010
|
isLoading: false,
|
|
12025
12011
|
isProjectBeingIndexedByPim: true
|
|
12026
12012
|
}, getIndexingJobIds(indexMutationResult)), {}, {
|
|
@@ -12062,7 +12048,7 @@ var PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
12062
12048
|
key: "render",
|
|
12063
12049
|
value: function render() {
|
|
12064
12050
|
return jsx(PimIndexerContext.Provider, {
|
|
12065
|
-
value: _objectSpread$
|
|
12051
|
+
value: _objectSpread$o(_objectSpread$o({}, this.state), {}, {
|
|
12066
12052
|
attemptToRefreshProducts: this.attemptToRefreshProducts,
|
|
12067
12053
|
indexProject: this.indexProject
|
|
12068
12054
|
}),
|
|
@@ -12085,11 +12071,11 @@ var pimIndexerProvider = flowRight(withApplicationContext(function (applicationC
|
|
|
12085
12071
|
name: 'indexProject'
|
|
12086
12072
|
}), withApollo, injectIntl, injectNotifications())(PimIndexerProvider);
|
|
12087
12073
|
|
|
12088
|
-
function _createSuper$
|
|
12089
|
-
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; } }
|
|
12090
12076
|
var WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
12091
12077
|
_inherits(WithPimIndexer, _PureComponent);
|
|
12092
|
-
var _super = _createSuper$
|
|
12078
|
+
var _super = _createSuper$4(WithPimIndexer);
|
|
12093
12079
|
function WithPimIndexer() {
|
|
12094
12080
|
_classCallCheck(this, WithPimIndexer);
|
|
12095
12081
|
return _super.apply(this, arguments);
|
|
@@ -12109,15 +12095,15 @@ var WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
|
12109
12095
|
}(PureComponent);
|
|
12110
12096
|
WithPimIndexer.displayName = 'WithPimIndexer';
|
|
12111
12097
|
|
|
12112
|
-
function ownKeys$
|
|
12113
|
-
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; }
|
|
12114
12100
|
var injectPimIndexer = (function () {
|
|
12115
12101
|
var propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pimIndexer';
|
|
12116
12102
|
return function (Component) {
|
|
12117
12103
|
var WrappedComponent = function WrappedComponent(props) {
|
|
12118
12104
|
return jsx(WithPimIndexer, {
|
|
12119
12105
|
children: function children(pimIndexerProps) {
|
|
12120
|
-
return jsx(Component, _objectSpread$
|
|
12106
|
+
return jsx(Component, _objectSpread$n(_objectSpread$n({}, props), _defineProperty({}, propName, pimIndexerProps)));
|
|
12121
12107
|
}
|
|
12122
12108
|
});
|
|
12123
12109
|
};
|
|
@@ -12130,7 +12116,7 @@ function usePimIndexer() {
|
|
|
12130
12116
|
return useContext(PimIndexerContext);
|
|
12131
12117
|
}
|
|
12132
12118
|
|
|
12133
|
-
var messages$
|
|
12119
|
+
var messages$8 = defineMessages({
|
|
12134
12120
|
yes: {
|
|
12135
12121
|
id: 'BooleanField.yes',
|
|
12136
12122
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -12152,8 +12138,8 @@ var BooleanField = function BooleanField(props) {
|
|
|
12152
12138
|
var _context;
|
|
12153
12139
|
var selectedValue;
|
|
12154
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]);
|
|
12155
|
-
var yesLabel = props.intl.formatMessage(messages$
|
|
12156
|
-
var noLabel = props.intl.formatMessage(messages$
|
|
12141
|
+
var yesLabel = props.intl.formatMessage(messages$8.yes);
|
|
12142
|
+
var noLabel = props.intl.formatMessage(messages$8.no);
|
|
12157
12143
|
var options = [{
|
|
12158
12144
|
value: 'yes',
|
|
12159
12145
|
label: yesLabel
|
|
@@ -12191,9 +12177,9 @@ function getBooleanValue(value) {
|
|
|
12191
12177
|
return value === false ? 'no' : 'yes';
|
|
12192
12178
|
}
|
|
12193
12179
|
|
|
12194
|
-
function ownKeys$
|
|
12195
|
-
function _objectSpread$
|
|
12196
|
-
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 = {
|
|
12197
12183
|
"custom-check": "checkbox-field-module__custom-check___3uPdz",
|
|
12198
12184
|
"check-element": "checkbox-field-module__check-element___3wMNq",
|
|
12199
12185
|
"check-text": "checkbox-field-module__check-text___3M3mq",
|
|
@@ -12203,20 +12189,20 @@ var styles$e = {
|
|
|
12203
12189
|
var CheckboxField = function CheckboxField(props) {
|
|
12204
12190
|
// Pass only `data-*` props
|
|
12205
12191
|
var dataAttributes = filterDataAttributes(props);
|
|
12206
|
-
return jsxs("label", _objectSpread$
|
|
12207
|
-
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))
|
|
12208
12194
|
}, dataAttributes), {}, {
|
|
12209
12195
|
children: [jsx("input", {
|
|
12210
12196
|
type: "checkbox",
|
|
12211
|
-
className: classnames(props.inputClassName, styles$
|
|
12197
|
+
className: classnames(props.inputClassName, styles$c['input-checkbox'], _defineProperty({}, styles$c.disabled, props.disabled)),
|
|
12212
12198
|
name: props.name,
|
|
12213
12199
|
checked: props.checked,
|
|
12214
12200
|
onChange: props.onChange,
|
|
12215
12201
|
disabled: props.disabled
|
|
12216
12202
|
}), jsx("span", {
|
|
12217
|
-
className: styles$
|
|
12203
|
+
className: styles$c['check-element']
|
|
12218
12204
|
}), props.label ? jsx("span", {
|
|
12219
|
-
className: styles$
|
|
12205
|
+
className: styles$c['check-text'],
|
|
12220
12206
|
children: props.label
|
|
12221
12207
|
}) : null]
|
|
12222
12208
|
}));
|
|
@@ -12227,7 +12213,7 @@ CheckboxField.defaultProps = {
|
|
|
12227
12213
|
disabled: false
|
|
12228
12214
|
};
|
|
12229
12215
|
|
|
12230
|
-
var messages$
|
|
12216
|
+
var messages$7 = defineMessages({
|
|
12231
12217
|
label: {
|
|
12232
12218
|
id: 'MissingValueField.label',
|
|
12233
12219
|
description: 'The label text for the missing values option',
|
|
@@ -12235,8 +12221,8 @@ var messages$8 = defineMessages({
|
|
|
12235
12221
|
}
|
|
12236
12222
|
});
|
|
12237
12223
|
|
|
12238
|
-
function ownKeys$
|
|
12239
|
-
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; }
|
|
12240
12226
|
var MissingValueField = function MissingValueField(props) {
|
|
12241
12227
|
return jsx("div", {
|
|
12242
12228
|
children: jsx(CheckboxField, {
|
|
@@ -12247,7 +12233,7 @@ var MissingValueField = function MissingValueField(props) {
|
|
|
12247
12233
|
"data-track-component": "MissingValue",
|
|
12248
12234
|
"data-track-event": "change",
|
|
12249
12235
|
"data-track-label": props.isChecked,
|
|
12250
|
-
label: jsx(FormattedMessage, _objectSpread$
|
|
12236
|
+
label: jsx(FormattedMessage, _objectSpread$l({}, messages$7.label))
|
|
12251
12237
|
})
|
|
12252
12238
|
});
|
|
12253
12239
|
};
|
|
@@ -12256,9 +12242,9 @@ MissingValueField.defaultProps = {
|
|
|
12256
12242
|
isChecked: false
|
|
12257
12243
|
};
|
|
12258
12244
|
|
|
12259
|
-
function ownKeys$
|
|
12260
|
-
function _objectSpread$
|
|
12261
|
-
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 = {
|
|
12262
12248
|
"button": "button-module__button___1OzVf",
|
|
12263
12249
|
"cancel": "button-module__cancel___1-jYL button-module__button___1OzVf",
|
|
12264
12250
|
"confirm": "button-module__confirm___-W92x button-module__button___1OzVf",
|
|
@@ -12291,10 +12277,10 @@ var Button = function Button(props) {
|
|
|
12291
12277
|
|
|
12292
12278
|
// Pass only `data-*` props
|
|
12293
12279
|
var dataProps = filterDataAttributes(props);
|
|
12294
|
-
return jsx("button", _objectSpread$
|
|
12280
|
+
return jsx("button", _objectSpread$k(_objectSpread$k({
|
|
12295
12281
|
onClick: isDisabled ? null : onClick,
|
|
12296
12282
|
type: props.type,
|
|
12297
|
-
className: classnames(styles$
|
|
12283
|
+
className: classnames(styles$b.button, isDisabled ? styles$b.disabled : null, className),
|
|
12298
12284
|
disabled: isDisabled,
|
|
12299
12285
|
"aria-label": props['aria-label']
|
|
12300
12286
|
}, dataProps), {}, {
|
|
@@ -12306,10 +12292,10 @@ Button.defaultProps = {
|
|
|
12306
12292
|
type: 'button'
|
|
12307
12293
|
};
|
|
12308
12294
|
|
|
12309
|
-
function ownKeys$
|
|
12310
|
-
function _objectSpread$
|
|
12311
|
-
function _createSuper$
|
|
12312
|
-
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; } }
|
|
12313
12299
|
var customStyles = {
|
|
12314
12300
|
"btn-group": "button-group-module__btn-group___1AG0_",
|
|
12315
12301
|
"active": "button-group-module__active___1wtks",
|
|
@@ -12318,7 +12304,7 @@ var customStyles = {
|
|
|
12318
12304
|
};
|
|
12319
12305
|
var ButtonGroup = /*#__PURE__*/function (_PureComponent) {
|
|
12320
12306
|
_inherits(ButtonGroup, _PureComponent);
|
|
12321
|
-
var _super = _createSuper$
|
|
12307
|
+
var _super = _createSuper$3(ButtonGroup);
|
|
12322
12308
|
function ButtonGroup() {
|
|
12323
12309
|
_classCallCheck(this, ButtonGroup);
|
|
12324
12310
|
return _super.apply(this, arguments);
|
|
@@ -12328,12 +12314,12 @@ var ButtonGroup = /*#__PURE__*/function (_PureComponent) {
|
|
|
12328
12314
|
value: function render() {
|
|
12329
12315
|
var _context,
|
|
12330
12316
|
_this = this;
|
|
12331
|
-
return jsx("div", _objectSpread$
|
|
12317
|
+
return jsx("div", _objectSpread$j(_objectSpread$j({
|
|
12332
12318
|
className: customStyles['btn-group']
|
|
12333
12319
|
}, filterDataAttributes(this.props)), {}, {
|
|
12334
12320
|
children: _mapInstanceProperty(_context = this.props.options).call(_context, function (option, index) {
|
|
12335
12321
|
var _classnames;
|
|
12336
|
-
return jsx(Button, _objectSpread$
|
|
12322
|
+
return jsx(Button, _objectSpread$j(_objectSpread$j({
|
|
12337
12323
|
"data-track-component": "Button-".concat(option.label),
|
|
12338
12324
|
"data-testid": "group-button-".concat(option.value),
|
|
12339
12325
|
"data-track-event": "click",
|
|
@@ -12361,7 +12347,7 @@ var ButtonGroup = /*#__PURE__*/function (_PureComponent) {
|
|
|
12361
12347
|
}(PureComponent);
|
|
12362
12348
|
ButtonGroup.displayName = 'ButtonGroup';
|
|
12363
12349
|
|
|
12364
|
-
var messages$
|
|
12350
|
+
var messages$6 = defineMessages({
|
|
12365
12351
|
chooseFile: {
|
|
12366
12352
|
id: 'ButtonFileInput.chooseFile',
|
|
12367
12353
|
description: 'The label text of the field for upload local file',
|
|
@@ -12369,18 +12355,18 @@ var messages$7 = defineMessages({
|
|
|
12369
12355
|
}
|
|
12370
12356
|
});
|
|
12371
12357
|
|
|
12372
|
-
function ownKeys$
|
|
12373
|
-
function _objectSpread$
|
|
12374
|
-
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 = {
|
|
12375
12361
|
"button": "file-input-module__button___2KypN",
|
|
12376
12362
|
"input": "file-input-module__input___3MP4D"
|
|
12377
12363
|
};
|
|
12378
12364
|
var FileInput = function FileInput(props) {
|
|
12379
12365
|
return jsx("label", {
|
|
12380
12366
|
children: jsxs("span", {
|
|
12381
|
-
className: styles$
|
|
12367
|
+
className: styles$a.button,
|
|
12382
12368
|
children: [jsx("input", {
|
|
12383
|
-
className: styles$
|
|
12369
|
+
className: styles$a.input,
|
|
12384
12370
|
type: "file",
|
|
12385
12371
|
accept: props.acceptTypes,
|
|
12386
12372
|
name: props.name,
|
|
@@ -12392,14 +12378,14 @@ var FileInput = function FileInput(props) {
|
|
|
12392
12378
|
};
|
|
12393
12379
|
FileInput.displayName = 'FileInput';
|
|
12394
12380
|
FileInput.defaultProps = {
|
|
12395
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
12381
|
+
children: jsx(FormattedMessage, _objectSpread$i({}, messages$6.chooseFile)),
|
|
12396
12382
|
allowMultiple: false,
|
|
12397
12383
|
acceptTypes: 'image/png,image/jpeg,image/gif'
|
|
12398
12384
|
};
|
|
12399
12385
|
|
|
12400
|
-
function ownKeys$
|
|
12401
|
-
function _objectSpread$
|
|
12402
|
-
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 = {
|
|
12403
12389
|
"button": "button-module__button___1OzVf",
|
|
12404
12390
|
"cancel": "button-module__cancel___1-jYL button-module__button___1OzVf",
|
|
12405
12391
|
"confirm": "button-module__confirm___-W92x button-module__button___1OzVf",
|
|
@@ -12460,10 +12446,10 @@ function ButtonTyped (name, options) {
|
|
|
12460
12446
|
className = props.className;
|
|
12461
12447
|
var isAlternativeStyle = hasAlternativeStyle && style === 'alternative';
|
|
12462
12448
|
var hasIcon = defaultIcon || icon;
|
|
12463
|
-
var classNames = classnames(_defineProperty({}, styles$
|
|
12449
|
+
var classNames = classnames(_defineProperty({}, styles$9.full, fullWidth), isAlternativeStyle ? styles$9["".concat(type, "-alt")] : styles$9[type], className);
|
|
12464
12450
|
var computedLabel = label || defaultLabel;
|
|
12465
12451
|
var dataAttrs = filterDataAttributes(props);
|
|
12466
|
-
return jsx(Button, _objectSpread$
|
|
12452
|
+
return jsx(Button, _objectSpread$h(_objectSpread$h({
|
|
12467
12453
|
onClick: isDisabled ? null : onClick,
|
|
12468
12454
|
url: url,
|
|
12469
12455
|
isDisabled: isDisabled,
|
|
@@ -12489,12 +12475,12 @@ function ButtonTyped (name, options) {
|
|
|
12489
12475
|
}
|
|
12490
12476
|
|
|
12491
12477
|
// NOTE: this component is duplicated in `app-shell/from-core`.
|
|
12492
|
-
var styles$
|
|
12478
|
+
var styles$8 = {
|
|
12493
12479
|
"button-close-container": "button-close-module__button-close-container___1uz2S"
|
|
12494
12480
|
};
|
|
12495
12481
|
var ButtonClose = function ButtonClose(props) {
|
|
12496
12482
|
return jsx("div", {
|
|
12497
|
-
className: styles$
|
|
12483
|
+
className: styles$8['button-close-container'],
|
|
12498
12484
|
onMouseOver: props.handleMouseOver,
|
|
12499
12485
|
onMouseOut: props.handleMouseOut,
|
|
12500
12486
|
onClick: props.onClick,
|
|
@@ -12511,9 +12497,9 @@ var ButtonClose = function ButtonClose(props) {
|
|
|
12511
12497
|
ButtonClose.displayName = 'ButtonClose';
|
|
12512
12498
|
var ButtonClose$1 = flowRight(keepDisplayName(ButtonClose), withMouseOverState)(ButtonClose);
|
|
12513
12499
|
|
|
12514
|
-
function ownKeys$
|
|
12515
|
-
function _objectSpread$
|
|
12516
|
-
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({
|
|
12517
12503
|
cancel: {
|
|
12518
12504
|
id: 'Button.cancel',
|
|
12519
12505
|
description: 'Label for the cancel button',
|
|
@@ -12532,27 +12518,27 @@ var messages$6 = defineMessages({
|
|
|
12532
12518
|
});
|
|
12533
12519
|
var ButtonCancel = ButtonTyped('ButtonCancel', {
|
|
12534
12520
|
type: 'cancel',
|
|
12535
|
-
defaultLabel: jsx(FormattedMessage, _objectSpread$
|
|
12521
|
+
defaultLabel: jsx(FormattedMessage, _objectSpread$g({}, messages$5.cancel)),
|
|
12536
12522
|
hasAlternativeStyle: true
|
|
12537
12523
|
});
|
|
12538
12524
|
var ButtonConfirm = ButtonTyped('ButtonConfirm', {
|
|
12539
12525
|
type: 'confirm',
|
|
12540
|
-
defaultLabel: jsx(FormattedMessage, _objectSpread$
|
|
12526
|
+
defaultLabel: jsx(FormattedMessage, _objectSpread$g({}, messages$5.confirm)),
|
|
12541
12527
|
hasAlternativeStyle: true
|
|
12542
12528
|
});
|
|
12543
12529
|
var ButtonSave = ButtonTyped('ButtonSave', {
|
|
12544
12530
|
type: 'save',
|
|
12545
|
-
defaultLabel: jsx(FormattedMessage, _objectSpread$
|
|
12531
|
+
defaultLabel: jsx(FormattedMessage, _objectSpread$g({}, messages$5.save)),
|
|
12546
12532
|
hasAlternativeStyle: true
|
|
12547
12533
|
});
|
|
12548
12534
|
|
|
12549
|
-
function ownKeys$
|
|
12550
|
-
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; }
|
|
12551
12537
|
var parentSelector = function parentSelector() {
|
|
12552
12538
|
return process.env.NODE_ENV === 'test' ? document.body : document.querySelector("#".concat(PORTALS_CONTAINER_ID));
|
|
12553
12539
|
};
|
|
12554
12540
|
var ModalContainer = function ModalContainer(props) {
|
|
12555
|
-
return jsx(Modal, _objectSpread$
|
|
12541
|
+
return jsx(Modal, _objectSpread$f(_objectSpread$f({}, props), {}, {
|
|
12556
12542
|
parentSelector: parentSelector,
|
|
12557
12543
|
ariaHideApp: false,
|
|
12558
12544
|
children: props.children
|
|
@@ -12560,9 +12546,9 @@ var ModalContainer = function ModalContainer(props) {
|
|
|
12560
12546
|
};
|
|
12561
12547
|
ModalContainer.displayName = 'ModalContainer';
|
|
12562
12548
|
|
|
12563
|
-
function ownKeys$
|
|
12564
|
-
function _objectSpread$
|
|
12565
|
-
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 = {
|
|
12566
12552
|
"container": "modal-content-layout-module__container___m-8MJ",
|
|
12567
12553
|
"header": "modal-content-layout-module__header___3s8J-",
|
|
12568
12554
|
"subtitle": "modal-content-layout-module__subtitle___W3B06",
|
|
@@ -12574,13 +12560,13 @@ var styles$9 = {
|
|
|
12574
12560
|
};
|
|
12575
12561
|
var ModalContentLayout = function ModalContentLayout(props) {
|
|
12576
12562
|
var dataAttrProps = filterDataAttributes(props);
|
|
12577
|
-
return jsxs("div", _objectSpread$
|
|
12578
|
-
className: styles$
|
|
12563
|
+
return jsxs("div", _objectSpread$e(_objectSpread$e({
|
|
12564
|
+
className: styles$7.container
|
|
12579
12565
|
}, dataAttrProps), {}, {
|
|
12580
12566
|
children: [jsxs("div", {
|
|
12581
|
-
className: styles$
|
|
12567
|
+
className: styles$7.header,
|
|
12582
12568
|
children: [Boolean(props.onClose) && jsx("div", {
|
|
12583
|
-
className: styles$
|
|
12569
|
+
className: styles$7['button-close'],
|
|
12584
12570
|
children: jsx(ButtonClose$1, {
|
|
12585
12571
|
onClick: props.onClose
|
|
12586
12572
|
})
|
|
@@ -12588,26 +12574,26 @@ var ModalContentLayout = function ModalContentLayout(props) {
|
|
|
12588
12574
|
as: "h2",
|
|
12589
12575
|
children: props.title
|
|
12590
12576
|
}), jsxs("div", {
|
|
12591
|
-
className: styles$
|
|
12577
|
+
className: styles$7.subheader,
|
|
12592
12578
|
children: [jsx("div", {
|
|
12593
|
-
className: styles$
|
|
12579
|
+
className: styles$7.subtitle,
|
|
12594
12580
|
children: props.subtitle
|
|
12595
12581
|
}), jsx("div", {
|
|
12596
12582
|
children: props.controls
|
|
12597
12583
|
})]
|
|
12598
12584
|
})]
|
|
12599
12585
|
}), jsx("div", {
|
|
12600
|
-
className: styles$
|
|
12586
|
+
className: styles$7.content,
|
|
12601
12587
|
children: props.children
|
|
12602
12588
|
}), props.footer && jsx("div", {
|
|
12603
|
-
className: styles$
|
|
12589
|
+
className: styles$7.footer,
|
|
12604
12590
|
children: props.footer
|
|
12605
12591
|
})]
|
|
12606
12592
|
}));
|
|
12607
12593
|
};
|
|
12608
12594
|
ModalContentLayout.displayName = 'ModalContentLayout';
|
|
12609
12595
|
|
|
12610
|
-
var styles$
|
|
12596
|
+
var styles$6 = {
|
|
12611
12597
|
"colored": "required-indicator-module__colored____YUFm",
|
|
12612
12598
|
"indicatorAsterisk": "required-indicator-module__indicatorAsterisk___3lEdX"
|
|
12613
12599
|
};
|
|
@@ -12615,7 +12601,7 @@ var RequiredIndicator = function RequiredIndicator(_ref) {
|
|
|
12615
12601
|
var _classnames;
|
|
12616
12602
|
var uncolored = _ref.uncolored;
|
|
12617
12603
|
return jsx("em", {
|
|
12618
|
-
className: classnames((_classnames = {}, _defineProperty(_classnames, styles$
|
|
12604
|
+
className: classnames((_classnames = {}, _defineProperty(_classnames, styles$6.colored, !uncolored), _defineProperty(_classnames, styles$6.indicatorAsterisk, true), _classnames)),
|
|
12619
12605
|
children: '*'
|
|
12620
12606
|
});
|
|
12621
12607
|
};
|
|
@@ -12646,15 +12632,15 @@ var ScrollToFieldError = function ScrollToFieldError() {
|
|
|
12646
12632
|
return null;
|
|
12647
12633
|
};
|
|
12648
12634
|
|
|
12649
|
-
function ownKeys$
|
|
12650
|
-
function _objectSpread$
|
|
12651
|
-
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 = {
|
|
12652
12638
|
"container": "selectable-field-search-input-module__container___z2ltR",
|
|
12653
12639
|
"search-mode-menu": "selectable-field-search-input-module__search-mode-menu___Od6Le"
|
|
12654
12640
|
};
|
|
12655
12641
|
var SearchModeOption = function SearchModeOption(props) {
|
|
12656
12642
|
var _props$label;
|
|
12657
|
-
return jsx(SelectInput.Option, _objectSpread$
|
|
12643
|
+
return jsx(SelectInput.Option, _objectSpread$d(_objectSpread$d({}, props), {}, {
|
|
12658
12644
|
children: jsx(Text.Body, {
|
|
12659
12645
|
truncate: true,
|
|
12660
12646
|
title: props.title || props.label,
|
|
@@ -12666,7 +12652,7 @@ var SearchModeOption = function SearchModeOption(props) {
|
|
|
12666
12652
|
SearchModeOption.displayName = 'SearchModeOption';
|
|
12667
12653
|
var SearchModeSingleValue = function SearchModeSingleValue(props) {
|
|
12668
12654
|
var _props$data$label;
|
|
12669
|
-
return jsx(SelectInput.SingleValue, _objectSpread$
|
|
12655
|
+
return jsx(SelectInput.SingleValue, _objectSpread$d(_objectSpread$d({}, props), {}, {
|
|
12670
12656
|
children: jsx(Text.Body, {
|
|
12671
12657
|
truncate: true,
|
|
12672
12658
|
title: props.data.title || props.data.label,
|
|
@@ -12677,8 +12663,8 @@ var SearchModeSingleValue = function SearchModeSingleValue(props) {
|
|
|
12677
12663
|
};
|
|
12678
12664
|
SearchModeSingleValue.displayName = 'SearchModeSingleValue';
|
|
12679
12665
|
var SearchModeMenu = function SearchModeMenu(props) {
|
|
12680
|
-
return jsx(SelectInput.Menu, _objectSpread$
|
|
12681
|
-
className: styles$
|
|
12666
|
+
return jsx(SelectInput.Menu, _objectSpread$d(_objectSpread$d({
|
|
12667
|
+
className: styles$5['search-mode-menu']
|
|
12682
12668
|
}, props), {}, {
|
|
12683
12669
|
children: props.children
|
|
12684
12670
|
}));
|
|
@@ -12703,13 +12689,13 @@ var SelectableFieldSearchInput = function SelectableFieldSearchInput(props) {
|
|
|
12703
12689
|
}
|
|
12704
12690
|
};
|
|
12705
12691
|
return jsxs("div", {
|
|
12706
|
-
className: styles$
|
|
12692
|
+
className: styles$5.container,
|
|
12707
12693
|
children: [jsx(AccessibleHidden, {
|
|
12708
12694
|
children: jsx("label", {
|
|
12709
12695
|
htmlFor: "select-search-mode",
|
|
12710
12696
|
children: "Open search mode"
|
|
12711
12697
|
})
|
|
12712
|
-
}), jsx(SelectInput, _objectSpread$
|
|
12698
|
+
}), jsx(SelectInput, _objectSpread$d({
|
|
12713
12699
|
id: "select-search-mode",
|
|
12714
12700
|
value: props.searchMode,
|
|
12715
12701
|
"aria-label": "search-mode",
|
|
@@ -12749,8 +12735,8 @@ var SelectableFieldSearchInput = function SelectableFieldSearchInput(props) {
|
|
|
12749
12735
|
};
|
|
12750
12736
|
SelectableFieldSearchInput.displayName = 'SelectableFieldSearchInput';
|
|
12751
12737
|
|
|
12752
|
-
function ownKeys$
|
|
12753
|
-
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; }
|
|
12754
12740
|
var StoreSelectField = function StoreSelectField(props) {
|
|
12755
12741
|
return jsx(Constraints.Horizontal, {
|
|
12756
12742
|
max: props.horizontalConstraint,
|
|
@@ -12764,7 +12750,7 @@ var StoreSelectField = function StoreSelectField(props) {
|
|
|
12764
12750
|
htmlFor: props.id,
|
|
12765
12751
|
hasRequiredIndicator: props.isRequired,
|
|
12766
12752
|
isBold: props.isBold
|
|
12767
|
-
}), jsx(StoreSelectInput, _objectSpread$
|
|
12753
|
+
}), jsx(StoreSelectInput, _objectSpread$c(_objectSpread$c({
|
|
12768
12754
|
projectKey: props.projectKey,
|
|
12769
12755
|
id: props.id,
|
|
12770
12756
|
name: props.name,
|
|
@@ -12802,8 +12788,8 @@ StoreSelectField.defaultProps = {
|
|
|
12802
12788
|
mappedValueField: 'id'
|
|
12803
12789
|
};
|
|
12804
12790
|
|
|
12805
|
-
function ownKeys$
|
|
12806
|
-
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; }
|
|
12807
12793
|
var BusinessUnitSelectField = function BusinessUnitSelectField(props) {
|
|
12808
12794
|
return jsx(Constraints.Horizontal, {
|
|
12809
12795
|
max: props.horizontalConstraint,
|
|
@@ -12817,7 +12803,7 @@ var BusinessUnitSelectField = function BusinessUnitSelectField(props) {
|
|
|
12817
12803
|
htmlFor: props.id,
|
|
12818
12804
|
hasRequiredIndicator: props.isRequired,
|
|
12819
12805
|
isBold: props.isBold
|
|
12820
|
-
}), jsx(BusinessUnitSelectInput, _objectSpread$
|
|
12806
|
+
}), jsx(BusinessUnitSelectInput, _objectSpread$b(_objectSpread$b(_objectSpread$b({
|
|
12821
12807
|
id: props.id,
|
|
12822
12808
|
name: props.name,
|
|
12823
12809
|
horizontalConstraint: props.horizontalConstraint,
|
|
@@ -12856,11 +12842,11 @@ BusinessUnitSelectField.defaultProps = {
|
|
|
12856
12842
|
mappedValueField: 'id'
|
|
12857
12843
|
};
|
|
12858
12844
|
|
|
12859
|
-
function ownKeys$
|
|
12860
|
-
function _objectSpread$
|
|
12861
|
-
function _createSuper$
|
|
12862
|
-
function _isNativeReflectConstruct$
|
|
12863
|
-
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 = {
|
|
12864
12850
|
"container": "tooltip-module__container___2R5k4",
|
|
12865
12851
|
"box": "tooltip-module__box___1V72T",
|
|
12866
12852
|
"body": "tooltip-module__body___1hJvc",
|
|
@@ -12888,7 +12874,7 @@ var styles$6 = {
|
|
|
12888
12874
|
};
|
|
12889
12875
|
var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
12890
12876
|
_inherits(Tooltip, _PureComponent);
|
|
12891
|
-
var _super = _createSuper$
|
|
12877
|
+
var _super = _createSuper$2(Tooltip);
|
|
12892
12878
|
function Tooltip() {
|
|
12893
12879
|
var _context;
|
|
12894
12880
|
var _this;
|
|
@@ -12945,14 +12931,14 @@ var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
|
12945
12931
|
return jsxs("div", {
|
|
12946
12932
|
className: tooltipClassName,
|
|
12947
12933
|
children: [jsx("div", {
|
|
12948
|
-
className: styles$
|
|
12934
|
+
className: styles$4.body,
|
|
12949
12935
|
children: message
|
|
12950
12936
|
}), jsx("div", {
|
|
12951
|
-
className: styles$
|
|
12937
|
+
className: styles$4['arrow-shadow-top']
|
|
12952
12938
|
}), jsx("div", {
|
|
12953
|
-
className: styles$
|
|
12939
|
+
className: styles$4['arrow-top-border']
|
|
12954
12940
|
}), jsx("div", {
|
|
12955
|
-
className: styles$
|
|
12941
|
+
className: styles$4['arrow-top']
|
|
12956
12942
|
})]
|
|
12957
12943
|
});
|
|
12958
12944
|
};
|
|
@@ -12960,14 +12946,14 @@ var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
|
12960
12946
|
return jsxs("div", {
|
|
12961
12947
|
className: tooltipClassName,
|
|
12962
12948
|
children: [jsx("div", {
|
|
12963
|
-
className: styles$
|
|
12949
|
+
className: styles$4.body,
|
|
12964
12950
|
children: message
|
|
12965
12951
|
}), jsx("div", {
|
|
12966
|
-
className: styles$
|
|
12952
|
+
className: styles$4['arrow-shadow-top-right']
|
|
12967
12953
|
}), jsx("div", {
|
|
12968
|
-
className: styles$
|
|
12954
|
+
className: styles$4['arrow-top-right-border']
|
|
12969
12955
|
}), jsx("div", {
|
|
12970
|
-
className: styles$
|
|
12956
|
+
className: styles$4['arrow-top-right']
|
|
12971
12957
|
})]
|
|
12972
12958
|
});
|
|
12973
12959
|
};
|
|
@@ -12975,11 +12961,11 @@ var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
|
12975
12961
|
return jsxs("div", {
|
|
12976
12962
|
className: tooltipClassName,
|
|
12977
12963
|
children: [jsx("div", {
|
|
12978
|
-
className: styles$
|
|
12964
|
+
className: styles$4['arrow-right-border']
|
|
12979
12965
|
}), jsx("div", {
|
|
12980
|
-
className: styles$
|
|
12966
|
+
className: styles$4['arrow-right']
|
|
12981
12967
|
}), jsx("div", {
|
|
12982
|
-
className: styles$
|
|
12968
|
+
className: styles$4.body,
|
|
12983
12969
|
children: message
|
|
12984
12970
|
})]
|
|
12985
12971
|
});
|
|
@@ -12988,11 +12974,11 @@ var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
|
12988
12974
|
return jsxs("div", {
|
|
12989
12975
|
className: tooltipClassName,
|
|
12990
12976
|
children: [jsx("div", {
|
|
12991
|
-
className: styles$
|
|
12977
|
+
className: styles$4['arrow-bottom-border']
|
|
12992
12978
|
}), jsx("div", {
|
|
12993
|
-
className: styles$
|
|
12979
|
+
className: styles$4['arrow-bottom']
|
|
12994
12980
|
}), jsx("div", {
|
|
12995
|
-
className: styles$
|
|
12981
|
+
className: styles$4.body,
|
|
12996
12982
|
children: message
|
|
12997
12983
|
})]
|
|
12998
12984
|
});
|
|
@@ -13001,17 +12987,17 @@ var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
|
13001
12987
|
return jsxs("div", {
|
|
13002
12988
|
className: tooltipClassName,
|
|
13003
12989
|
children: [jsx("div", {
|
|
13004
|
-
className: styles$
|
|
12990
|
+
className: styles$4['arrow-left-border']
|
|
13005
12991
|
}), jsx("div", {
|
|
13006
|
-
className: styles$
|
|
12992
|
+
className: styles$4['arrow-left']
|
|
13007
12993
|
}), jsx("div", {
|
|
13008
|
-
className: styles$
|
|
12994
|
+
className: styles$4.body,
|
|
13009
12995
|
children: message
|
|
13010
12996
|
})]
|
|
13011
12997
|
});
|
|
13012
12998
|
};
|
|
13013
12999
|
_this.render = function () {
|
|
13014
|
-
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));
|
|
13015
13001
|
var containerProps = {
|
|
13016
13002
|
hover: {
|
|
13017
13003
|
onMouseEnter: _this.onMouseEnter,
|
|
@@ -13027,8 +13013,8 @@ var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
|
13027
13013
|
if (_this.props.position === 'bottom') rendererFn = _this.renderTooltipBottom;
|
|
13028
13014
|
if (_this.props.position === 'left') rendererFn = _this.renderTooltipLeft;
|
|
13029
13015
|
if (_this.props.position === 'right') rendererFn = _this.renderTooltipRight;
|
|
13030
|
-
return jsxs("div", _objectSpread$
|
|
13031
|
-
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),
|
|
13032
13018
|
children: [rendererFn(tooltipClassName, _this.props.message), _this.props.children]
|
|
13033
13019
|
}));
|
|
13034
13020
|
};
|
|
@@ -13078,17 +13064,17 @@ Tooltip.defaultProps = {
|
|
|
13078
13064
|
autohide: {
|
|
13079
13065
|
enabled: true,
|
|
13080
13066
|
timeout: 5000,
|
|
13081
|
-
onHide: noop
|
|
13067
|
+
onHide: noop
|
|
13082
13068
|
}
|
|
13083
13069
|
};
|
|
13084
|
-
function noop
|
|
13070
|
+
function noop() {}
|
|
13085
13071
|
|
|
13086
13072
|
var _templateObject;
|
|
13087
|
-
function ownKeys$
|
|
13088
|
-
function _objectSpread$
|
|
13089
|
-
function _createSuper$
|
|
13090
|
-
function _isNativeReflectConstruct$
|
|
13091
|
-
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 = {
|
|
13092
13078
|
"invalid": "validated-input-module__invalid___380EL",
|
|
13093
13079
|
"container": "validated-input-module__container___3L2KB"
|
|
13094
13080
|
}; // Note: don't use `g`! Regex with global flag have state
|
|
@@ -13104,7 +13090,7 @@ var validateRequired = function validateRequired(value) {
|
|
|
13104
13090
|
};
|
|
13105
13091
|
var VALIDATOR_REQUIRED = {
|
|
13106
13092
|
name: 'required',
|
|
13107
|
-
message: messages$
|
|
13093
|
+
message: messages$J.required,
|
|
13108
13094
|
permanent: true,
|
|
13109
13095
|
validators: {
|
|
13110
13096
|
change: function change(value) {
|
|
@@ -13118,7 +13104,7 @@ var VALIDATOR_REQUIRED = {
|
|
|
13118
13104
|
};
|
|
13119
13105
|
var VALIDATOR_NUMERIC = {
|
|
13120
13106
|
name: 'numeric',
|
|
13121
|
-
message: messages$
|
|
13107
|
+
message: messages$J.numeric,
|
|
13122
13108
|
permanent: false,
|
|
13123
13109
|
validators: {
|
|
13124
13110
|
change: function change(v) {
|
|
@@ -13133,7 +13119,7 @@ var VALIDATOR_NUMERIC = {
|
|
|
13133
13119
|
};
|
|
13134
13120
|
var VALIDATOR_INTEGER = {
|
|
13135
13121
|
name: 'integer',
|
|
13136
|
-
message: messages$
|
|
13122
|
+
message: messages$J.integer,
|
|
13137
13123
|
permanent: false,
|
|
13138
13124
|
validators: {
|
|
13139
13125
|
change: function change(v) {
|
|
@@ -13148,7 +13134,7 @@ var VALIDATOR_INTEGER = {
|
|
|
13148
13134
|
};
|
|
13149
13135
|
({
|
|
13150
13136
|
name: 'email',
|
|
13151
|
-
message: messages$
|
|
13137
|
+
message: messages$J.email,
|
|
13152
13138
|
permanent: false,
|
|
13153
13139
|
validators: {
|
|
13154
13140
|
// Note: it's a bit weird to validate it on every change,
|
|
@@ -13184,7 +13170,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
13184
13170
|
});
|
|
13185
13171
|
var ValidatedInput = /*#__PURE__*/function (_PureComponent) {
|
|
13186
13172
|
_inherits(ValidatedInput, _PureComponent);
|
|
13187
|
-
var _super = _createSuper$
|
|
13173
|
+
var _super = _createSuper$1(ValidatedInput);
|
|
13188
13174
|
function ValidatedInput() {
|
|
13189
13175
|
var _context5;
|
|
13190
13176
|
var _this;
|
|
@@ -13220,7 +13206,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
13220
13206
|
_this.conditionalSetValidStatus(nextValidStatus);
|
|
13221
13207
|
};
|
|
13222
13208
|
_this.handleInvalid = function () {
|
|
13223
|
-
var nextValidStatus = _objectSpread$
|
|
13209
|
+
var nextValidStatus = _objectSpread$9({}, _this.state.validStatus);
|
|
13224
13210
|
if (has(nextValidStatus, 'numeric')) {
|
|
13225
13211
|
nextValidStatus.numeric = false;
|
|
13226
13212
|
_this.conditionalSetValidStatus(nextValidStatus);
|
|
@@ -13274,7 +13260,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
13274
13260
|
if (prev) return _this2.state.validStatus[v.name];
|
|
13275
13261
|
return prev;
|
|
13276
13262
|
}, true);
|
|
13277
|
-
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));
|
|
13278
13264
|
var firstFailedValidator = _findInstanceProperty(_validators).call(_validators, function (v) {
|
|
13279
13265
|
return !_this2.state.validStatus[v.name];
|
|
13280
13266
|
});
|
|
@@ -13291,9 +13277,9 @@ function validatedInput(InnerComponent, validators) {
|
|
|
13291
13277
|
message: firstFailedValidator && this.props.intl.formatMessage(firstFailedValidator.message) || ''
|
|
13292
13278
|
};
|
|
13293
13279
|
return jsx("div", {
|
|
13294
|
-
className: classnames(styles$
|
|
13295
|
-
children: jsx(Tooltip, _objectSpread$
|
|
13296
|
-
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))
|
|
13297
13283
|
}))
|
|
13298
13284
|
});
|
|
13299
13285
|
}
|
|
@@ -13311,7 +13297,7 @@ function simpleInput(type) {
|
|
|
13311
13297
|
var _class;
|
|
13312
13298
|
return _class = /*#__PURE__*/function (_PureComponent2) {
|
|
13313
13299
|
_inherits(_class, _PureComponent2);
|
|
13314
|
-
var _super2 = _createSuper$
|
|
13300
|
+
var _super2 = _createSuper$1(_class);
|
|
13315
13301
|
function _class() {
|
|
13316
13302
|
var _context6;
|
|
13317
13303
|
var _this3;
|
|
@@ -13329,7 +13315,7 @@ function simpleInput(type) {
|
|
|
13329
13315
|
key: "render",
|
|
13330
13316
|
value: function render() {
|
|
13331
13317
|
return jsx("input", {
|
|
13332
|
-
className: classnames(this.props.className, _defineProperty({}, styles$
|
|
13318
|
+
className: classnames(this.props.className, _defineProperty({}, styles$3.invalid, !this.props.isValid)),
|
|
13333
13319
|
name: this.props.name,
|
|
13334
13320
|
disabled: this.props.disabled,
|
|
13335
13321
|
ref: this.props.getInputRef,
|
|
@@ -13347,7 +13333,7 @@ function simpleInput(type) {
|
|
|
13347
13333
|
}, _class;
|
|
13348
13334
|
}
|
|
13349
13335
|
|
|
13350
|
-
var messages$
|
|
13336
|
+
var messages$4 = defineMessages({
|
|
13351
13337
|
customFieldsError: {
|
|
13352
13338
|
id: 'CustomFieldsError.Error',
|
|
13353
13339
|
description: 'The message when there are errors adding custom fields',
|
|
@@ -13355,14 +13341,14 @@ var messages$5 = defineMessages({
|
|
|
13355
13341
|
}
|
|
13356
13342
|
});
|
|
13357
13343
|
|
|
13358
|
-
function ownKeys$
|
|
13359
|
-
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; }
|
|
13360
13346
|
var CustomFieldsErrorTextNotification = function CustomFieldsErrorTextNotification(props) {
|
|
13361
13347
|
var _context;
|
|
13362
13348
|
return jsxs(Spacings.Stack, {
|
|
13363
13349
|
scale: "s",
|
|
13364
13350
|
children: [jsx(Text.Wrap, {
|
|
13365
|
-
intlMessage: _objectSpread$
|
|
13351
|
+
intlMessage: _objectSpread$8({}, messages$4.customFieldsError)
|
|
13366
13352
|
}), jsx(Spacings.Stack, {
|
|
13367
13353
|
scale: "xs",
|
|
13368
13354
|
children: _mapInstanceProperty(_context = props.formErrors).call(_context, function (formError) {
|
|
@@ -13376,67 +13362,9 @@ var CustomFieldsErrorTextNotification = function CustomFieldsErrorTextNotificati
|
|
|
13376
13362
|
};
|
|
13377
13363
|
CustomFieldsErrorTextNotification.displayName = 'CustomFieldsErrorTextNotification';
|
|
13378
13364
|
|
|
13379
|
-
var
|
|
13380
|
-
|
|
13381
|
-
|
|
13382
|
-
description: 'The label to expand a text attribute.',
|
|
13383
|
-
defaultMessage: 'Expand'
|
|
13384
|
-
},
|
|
13385
|
-
collapse: {
|
|
13386
|
-
id: 'ExpandControl.collapse',
|
|
13387
|
-
description: 'The label to collapse a text attribute.',
|
|
13388
|
-
defaultMessage: 'Collapse'
|
|
13389
|
-
}
|
|
13390
|
-
});
|
|
13391
|
-
|
|
13392
|
-
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; }
|
|
13393
|
-
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; }
|
|
13394
|
-
var styles$4 = {
|
|
13395
|
-
"expandable-field": "expandable-field-module__expandable-field___1obGc"
|
|
13396
|
-
};
|
|
13397
|
-
var RequiredThrottledField = validatedInput(ThrottledField, [VALIDATOR_REQUIRED]);
|
|
13398
|
-
var ExpandableField = function ExpandableField(props) {
|
|
13399
|
-
var value = props.value,
|
|
13400
|
-
onToggle = props.onToggle,
|
|
13401
|
-
isExpanded = props.isExpanded,
|
|
13402
|
-
onChange = props.onChange,
|
|
13403
|
-
onBlurValue = props.onBlurValue,
|
|
13404
|
-
definition = props.definition,
|
|
13405
|
-
disabled = props.disabled;
|
|
13406
|
-
|
|
13407
|
-
// Filter out only `data-*` props
|
|
13408
|
-
var dataProps = filterDataAttributes(props);
|
|
13409
|
-
var fieldProps = _objectSpread$b({
|
|
13410
|
-
as: 'textarea',
|
|
13411
|
-
value: value,
|
|
13412
|
-
onChange: onChange,
|
|
13413
|
-
onBlurValue: onBlurValue,
|
|
13414
|
-
autoSize: isExpanded,
|
|
13415
|
-
disabled: disabled
|
|
13416
|
-
}, dataProps);
|
|
13417
|
-
var isRequired = definition && definition.isRequired;
|
|
13418
|
-
return jsxs("div", {
|
|
13419
|
-
className: classnames(styles$4['expandable-field'], props.expandableFieldModalClassName),
|
|
13420
|
-
children: [isRequired ? jsx(RequiredThrottledField, _objectSpread$b({}, fieldProps)) : jsx(ThrottledField, _objectSpread$b({}, fieldProps)), value ? jsx(FlatButton, {
|
|
13421
|
-
onClick: onToggle,
|
|
13422
|
-
icon: isExpanded ? jsx(AngleUpIcon, {}) : jsx(AngleDownIcon, {}),
|
|
13423
|
-
tone: "primary",
|
|
13424
|
-
label: props.intl.formatMessage(isExpanded ? messages$4.collapse : messages$4.expand)
|
|
13425
|
-
}) : null]
|
|
13426
|
-
});
|
|
13427
|
-
};
|
|
13428
|
-
ExpandableField.displayName = 'ExpandableField';
|
|
13429
|
-
ExpandableField.defaultProps = {
|
|
13430
|
-
definition: {
|
|
13431
|
-
isRequired: false
|
|
13432
|
-
},
|
|
13433
|
-
disabled: false
|
|
13434
|
-
};
|
|
13435
|
-
var ExpandableField$1 = injectIntl(ExpandableField);
|
|
13436
|
-
|
|
13437
|
-
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; }
|
|
13438
|
-
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; }
|
|
13439
|
-
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 = {
|
|
13440
13368
|
"label": "label-range-module__label___3Tb0p"
|
|
13441
13369
|
};
|
|
13442
13370
|
var messages$3 = defineMessages({
|
|
@@ -13454,14 +13382,14 @@ var messages$3 = defineMessages({
|
|
|
13454
13382
|
var LabelRange = function LabelRange(_ref) {
|
|
13455
13383
|
var type = _ref.type;
|
|
13456
13384
|
return jsx("label", {
|
|
13457
|
-
className: styles$
|
|
13458
|
-
children: jsx(FormattedMessage, _objectSpread$
|
|
13385
|
+
className: styles$2.label,
|
|
13386
|
+
children: jsx(FormattedMessage, _objectSpread$7({}, messages$3[type]))
|
|
13459
13387
|
});
|
|
13460
13388
|
};
|
|
13461
13389
|
LabelRange.displayName = 'LabelRange';
|
|
13462
13390
|
|
|
13463
|
-
function ownKeys$
|
|
13464
|
-
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; }
|
|
13465
13393
|
var messages$2 = defineMessages({
|
|
13466
13394
|
title: {
|
|
13467
13395
|
id: 'LabelRequired.title',
|
|
@@ -13470,7 +13398,7 @@ var messages$2 = defineMessages({
|
|
|
13470
13398
|
}
|
|
13471
13399
|
});
|
|
13472
13400
|
var LabelRequired = function LabelRequired() {
|
|
13473
|
-
return jsx(FormattedMessage, _objectSpread$
|
|
13401
|
+
return jsx(FormattedMessage, _objectSpread$6(_objectSpread$6({}, messages$2.title), {}, {
|
|
13474
13402
|
values: {
|
|
13475
13403
|
star: jsx(RequiredIndicator, {})
|
|
13476
13404
|
}
|
|
@@ -13478,313 +13406,6 @@ var LabelRequired = function LabelRequired() {
|
|
|
13478
13406
|
};
|
|
13479
13407
|
LabelRequired.displayName = 'LabelRequired';
|
|
13480
13408
|
|
|
13481
|
-
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); }; }
|
|
13482
|
-
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; } }
|
|
13483
|
-
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; }
|
|
13484
|
-
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; }
|
|
13485
|
-
var styles$2 = {
|
|
13486
|
-
"fields": "localized-field-module__fields___2pYgl",
|
|
13487
|
-
"input-text": "localized-field-module__input-text___19OTB",
|
|
13488
|
-
"all-locales": "localized-field-module__all-locales___3xnTj",
|
|
13489
|
-
"current-locale": "localized-field-module__current-locale___1OAvW",
|
|
13490
|
-
"available-locales": "localized-field-module__available-locales___1LL64",
|
|
13491
|
-
"counter": "localized-field-module__counter___M4crF",
|
|
13492
|
-
"locale": "localized-field-module__locale___1f9h9",
|
|
13493
|
-
"locale-modal": "localized-field-module__locale-modal___1hp7U",
|
|
13494
|
-
"text-area": "localized-field-module__text-area___2CkYY",
|
|
13495
|
-
"container": "localized-field-module__container___4wHqe",
|
|
13496
|
-
"container-expandable": "localized-field-module__container-expandable___LX72x localized-field-module__container___4wHqe",
|
|
13497
|
-
"left-cell": "localized-field-module__left-cell___YWB1o",
|
|
13498
|
-
"set-width": "localized-field-module__set-width___3BitN",
|
|
13499
|
-
"right-cell": "localized-field-module__right-cell___1ziDs",
|
|
13500
|
-
"field": "localized-field-module__field___193NR",
|
|
13501
|
-
"container-modal": "localized-field-module__container-modal___9rZ1j localized-field-module__container___4wHqe",
|
|
13502
|
-
"expandable-field-modal": "localized-field-module__expandable-field-modal___4P_Bs",
|
|
13503
|
-
"textarea-modal": "localized-field-module__textarea-modal___2BZTl",
|
|
13504
|
-
"edit-modal-form": "localized-field-module__edit-modal-form___1JH5t",
|
|
13505
|
-
"field-modal-search": "localized-field-module__field-modal-search___1pmvd",
|
|
13506
|
-
"locale-modal-search": "localized-field-module__locale-modal-search___3fdr9",
|
|
13507
|
-
"input": "localized-field-module__input___2wG41 localized-field-module__input-text___19OTB",
|
|
13508
|
-
"transition-modal-overlay": "localized-field-module__transition-modal-overlay___1Rzbn",
|
|
13509
|
-
"transition-modal-content": "localized-field-module__transition-modal-content___3TZ0q",
|
|
13510
|
-
"second-layer": "localized-field-module__second-layer___37wlq",
|
|
13511
|
-
"third-layer": "localized-field-module__third-layer___2QOn9",
|
|
13512
|
-
"push-right": "localized-field-module__push-right___KDu9r",
|
|
13513
|
-
"field-modal": "localized-field-module__field-modal___28xSG",
|
|
13514
|
-
"warning": "localized-field-module__warning___HguI1",
|
|
13515
|
-
"container-tooltip": "localized-field-module__container-tooltip___2h2P4"
|
|
13516
|
-
}; // This component is used to "reset" the default wrapper styles of
|
|
13517
|
-
// the Tooltip in order to render the underlying input with full width.
|
|
13518
|
-
// eslint-disable-next-line react/display-name
|
|
13519
|
-
var WrapperComponent = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
13520
|
-
return jsx("div", _objectSpread$8(_objectSpread$8({}, props), {}, {
|
|
13521
|
-
ref: ref
|
|
13522
|
-
}));
|
|
13523
|
-
});
|
|
13524
|
-
function localizedField(FieldComponent, FieldFooter) {
|
|
13525
|
-
var LocalizedField = /*#__PURE__*/function (_PureComponent) {
|
|
13526
|
-
_inherits(LocalizedField, _PureComponent);
|
|
13527
|
-
var _super = _createSuper$1(LocalizedField);
|
|
13528
|
-
function LocalizedField() {
|
|
13529
|
-
var _context;
|
|
13530
|
-
var _this;
|
|
13531
|
-
_classCallCheck(this, LocalizedField);
|
|
13532
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
13533
|
-
args[_key] = arguments[_key];
|
|
13534
|
-
}
|
|
13535
|
-
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
13536
|
-
_this.state = {
|
|
13537
|
-
modalIsOpen: false,
|
|
13538
|
-
hasReceivedFocus: false,
|
|
13539
|
-
activeModalCount: 0
|
|
13540
|
-
};
|
|
13541
|
-
_this.calculateEmptyLocales = function () {
|
|
13542
|
-
var _context2, _context3;
|
|
13543
|
-
var filledLocales = _reduceInstanceProperty(_context2 = _this.props.languages).call(_context2, function (count, lang) {
|
|
13544
|
-
if (_this.props.value && lang in _this.props.value)
|
|
13545
|
-
// eslint-disable-next-line no-param-reassign
|
|
13546
|
-
count += 1;
|
|
13547
|
-
return count;
|
|
13548
|
-
}, 0);
|
|
13549
|
-
return jsxs("div", {
|
|
13550
|
-
children: [jsx("span", {
|
|
13551
|
-
className: styles$2['current-locale'],
|
|
13552
|
-
children: _this.props.selectedLanguage.toUpperCase()
|
|
13553
|
-
}), jsx("span", {
|
|
13554
|
-
className: styles$2['available-locales'],
|
|
13555
|
-
children: _concatInstanceProperty(_context3 = "".concat(filledLocales, " / ")).call(_context3, _this.props.languages.length)
|
|
13556
|
-
})]
|
|
13557
|
-
});
|
|
13558
|
-
};
|
|
13559
|
-
_this.handleChange = function (event) {
|
|
13560
|
-
var lang = getDataAttribute(event.target, 'data-lang');
|
|
13561
|
-
var newValue = _objectSpread$8(_objectSpread$8({}, _this.props.value), {}, _defineProperty({}, lang, event.target.value));
|
|
13562
|
-
if (!event.target.value) delete newValue[lang];
|
|
13563
|
-
var val = _Object$keys(newValue).length ? newValue : undefined;
|
|
13564
|
-
if (_this.props.onKeyUp) _this.props.onKeyUp(val, event);
|
|
13565
|
-
if (_this.props.onChangeValue) _this.props.onChangeValue(val, event);
|
|
13566
|
-
};
|
|
13567
|
-
_this.handleBlur = function (value) {
|
|
13568
|
-
_this.setState({
|
|
13569
|
-
hasReceivedFocus: true
|
|
13570
|
-
});
|
|
13571
|
-
if (_this.props.onBlurValue) _this.props.onBlurValue(value);
|
|
13572
|
-
};
|
|
13573
|
-
_this.editAll = function () {
|
|
13574
|
-
_this.setState({
|
|
13575
|
-
modalIsOpen: true,
|
|
13576
|
-
activeModalCount: activeModals()
|
|
13577
|
-
}, function () {
|
|
13578
|
-
if (_this.props.onModalOpen) _this.props.onModalOpen(_this.modalContent);
|
|
13579
|
-
});
|
|
13580
|
-
};
|
|
13581
|
-
_this.closeModal = function () {
|
|
13582
|
-
if (_this.props.onBlurValue) _this.props.onBlurValue();
|
|
13583
|
-
_this.setState({
|
|
13584
|
-
modalIsOpen: false
|
|
13585
|
-
});
|
|
13586
|
-
};
|
|
13587
|
-
_this.valuesAreEmpty = function () {
|
|
13588
|
-
if (_this.props.value === null || _this.props.value === undefined) return true;
|
|
13589
|
-
var localeKeys = _Object$keys(_this.props.value);
|
|
13590
|
-
var localeWithValues = _filterInstanceProperty(localeKeys).call(localeKeys, function (lang) {
|
|
13591
|
-
return !!_this.props.value[lang];
|
|
13592
|
-
});
|
|
13593
|
-
return !localeWithValues.length;
|
|
13594
|
-
};
|
|
13595
|
-
_this.renderInputGroups = function (locales) {
|
|
13596
|
-
var withModal = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
13597
|
-
var hasLocales = withModal && _this.props.languages.length > 1;
|
|
13598
|
-
var isRequired = Boolean(_this.props.definition && _this.props.definition.isRequired);
|
|
13599
|
-
var showEmptyErrorModal = isRequired && !withModal && _this.valuesAreEmpty();
|
|
13600
|
-
var showEmptyErrorNonModal = _this.state.hasReceivedFocus && isRequired && withModal && _this.valuesAreEmpty();
|
|
13601
|
-
var showError = function showError(lang) {
|
|
13602
|
-
return Boolean(showEmptyErrorNonModal || showEmptyErrorModal && lang === _this.props.selectedLanguage);
|
|
13603
|
-
};
|
|
13604
|
-
return jsx("div", {
|
|
13605
|
-
className: styles$2.fields,
|
|
13606
|
-
"data-track-component": hasLocales ? 'LocalizedField' : 'DetailInput',
|
|
13607
|
-
ref: function ref(div) {
|
|
13608
|
-
_this.modalContent = div;
|
|
13609
|
-
},
|
|
13610
|
-
children: _mapInstanceProperty(locales).call(locales, function (lang) {
|
|
13611
|
-
return jsxs("div", {
|
|
13612
|
-
className: classnames(styles$2.field, _defineProperty({}, styles$2['field-modal'], !withModal), _defineProperty({}, styles$2['field-modal-search'], !withModal && _this.props.isSearch)),
|
|
13613
|
-
children: [jsxs("div", {
|
|
13614
|
-
className: styles$2[withModal ? 'container' : 'container-modal'],
|
|
13615
|
-
children: [jsx("div", {
|
|
13616
|
-
className: classnames(styles$2['left-cell'], _defineProperty({}, styles$2['set-width'], _this.props.isSearch)),
|
|
13617
|
-
children: jsx(Tooltip$1, {
|
|
13618
|
-
isOpen: showError(lang),
|
|
13619
|
-
placement: "top",
|
|
13620
|
-
title: _this.props.intl.formatMessage(messages$K.required),
|
|
13621
|
-
styles: {
|
|
13622
|
-
body: {
|
|
13623
|
-
alignSelf: 'flex-start'
|
|
13624
|
-
}
|
|
13625
|
-
},
|
|
13626
|
-
components: {
|
|
13627
|
-
WrapperComponent: WrapperComponent
|
|
13628
|
-
},
|
|
13629
|
-
children: jsx(FieldComponent, {
|
|
13630
|
-
autoComplete: _this.props.autoComplete,
|
|
13631
|
-
name: _this.props.name,
|
|
13632
|
-
placeholder: _this.props.placeholder,
|
|
13633
|
-
value: _this.props.value && _this.props.value[lang],
|
|
13634
|
-
onChange: _this.handleChange,
|
|
13635
|
-
onBlurValue: _this.handleBlur,
|
|
13636
|
-
onKeyUp: _this.handleChange,
|
|
13637
|
-
onToggle: _this.props.onToggle,
|
|
13638
|
-
autoExpand: !withModal,
|
|
13639
|
-
hasExpand: _this.props.hasExpand,
|
|
13640
|
-
isExpanded: _this.props.isExpanded,
|
|
13641
|
-
"data-testid": "localized-field-".concat(lang),
|
|
13642
|
-
"data-lang": lang,
|
|
13643
|
-
"data-track-event": "change",
|
|
13644
|
-
"data-track-label": _this.props.name,
|
|
13645
|
-
localizedFieldProps: _this.props.localizedFieldProps,
|
|
13646
|
-
isValid: !showError(lang),
|
|
13647
|
-
inputClassName: styles$2.input,
|
|
13648
|
-
expandableFieldModalClassName: classnames(_defineProperty({}, styles$2['expandable-field-modal'], !withModal)),
|
|
13649
|
-
textAreaClassName: classnames(_defineProperty({}, styles$2['textarea-modal'], !withModal)),
|
|
13650
|
-
disabled: _this.props.disabled
|
|
13651
|
-
})
|
|
13652
|
-
})
|
|
13653
|
-
}), jsx("div", {
|
|
13654
|
-
className: styles$2['right-cell'],
|
|
13655
|
-
children: hasLocales ? jsxs("div", {
|
|
13656
|
-
children: [jsx("div", {
|
|
13657
|
-
className: classnames(styles$2['all-locales']),
|
|
13658
|
-
"data-track-component": "Edit",
|
|
13659
|
-
"data-track-event": "click",
|
|
13660
|
-
"data-track-label": _this.props.name,
|
|
13661
|
-
onClick: _this.editAll,
|
|
13662
|
-
children: jsx("span", {
|
|
13663
|
-
className: styles$2.counter,
|
|
13664
|
-
children: _this.calculateEmptyLocales()
|
|
13665
|
-
})
|
|
13666
|
-
}), _this.renderEditModal()]
|
|
13667
|
-
}) : jsx("div", {
|
|
13668
|
-
className: classnames(styles$2.locale, _defineProperty({}, styles$2['locale-modal'], !withModal)),
|
|
13669
|
-
children: lang
|
|
13670
|
-
})
|
|
13671
|
-
})]
|
|
13672
|
-
}), FieldFooter ? jsx("div", {
|
|
13673
|
-
children: jsx(FieldFooter, {
|
|
13674
|
-
name: _this.props.name,
|
|
13675
|
-
value: _this.props.value,
|
|
13676
|
-
lang: lang,
|
|
13677
|
-
footerProps: _this.props.footerProps,
|
|
13678
|
-
disabled: _this.props.disabled
|
|
13679
|
-
})
|
|
13680
|
-
}) : null]
|
|
13681
|
-
}, lang);
|
|
13682
|
-
})
|
|
13683
|
-
});
|
|
13684
|
-
};
|
|
13685
|
-
_this.renderModalWarning = function () {
|
|
13686
|
-
return _this.props.modalWarningMessage ? jsx("div", {
|
|
13687
|
-
className: styles$2.warning,
|
|
13688
|
-
children: _this.props.modalWarningMessage
|
|
13689
|
-
}) : null;
|
|
13690
|
-
};
|
|
13691
|
-
_this.renderEditModal = function () {
|
|
13692
|
-
var overlayClassName = styles$2['transition-modal-overlay'];
|
|
13693
|
-
var contentClassName = classnames(styles$2['transition-modal-content'], _this.state.activeModalCount === 0 ? styles$2['second-layer'] : styles$2['third-layer']);
|
|
13694
|
-
return jsx(ModalContainer, {
|
|
13695
|
-
isOpen: _this.state.modalIsOpen,
|
|
13696
|
-
closeTimeoutMS: 150,
|
|
13697
|
-
onRequestClose: _this.closeModal,
|
|
13698
|
-
overlayClassName: overlayClassName,
|
|
13699
|
-
className: contentClassName,
|
|
13700
|
-
contentLabel: "localized-field",
|
|
13701
|
-
children: jsxs(ModalContentLayout, {
|
|
13702
|
-
title: _this.props.modalTitle,
|
|
13703
|
-
subtitle: _this.props.modalSubtitle,
|
|
13704
|
-
onClose: _this.closeModal,
|
|
13705
|
-
"data-track-component": _this.props.name,
|
|
13706
|
-
children: [_this.renderModalWarning(), _this.renderInputGroups(_this.props.languages)]
|
|
13707
|
-
})
|
|
13708
|
-
});
|
|
13709
|
-
};
|
|
13710
|
-
return _this;
|
|
13711
|
-
}
|
|
13712
|
-
_createClass(LocalizedField, [{
|
|
13713
|
-
key: "render",
|
|
13714
|
-
value: function render() {
|
|
13715
|
-
return this.renderInputGroups([this.props.selectedLanguage], true);
|
|
13716
|
-
}
|
|
13717
|
-
}]);
|
|
13718
|
-
return LocalizedField;
|
|
13719
|
-
}(PureComponent);
|
|
13720
|
-
LocalizedField.displayName = 'LocalizedField';
|
|
13721
|
-
LocalizedField.defaultProps = {
|
|
13722
|
-
placeholder: '',
|
|
13723
|
-
value: {},
|
|
13724
|
-
definition: {},
|
|
13725
|
-
isSearch: false,
|
|
13726
|
-
isValid: true,
|
|
13727
|
-
disabled: false,
|
|
13728
|
-
modalSubtitle: null,
|
|
13729
|
-
modalTitle: null
|
|
13730
|
-
};
|
|
13731
|
-
return injectIntl(LocalizedField);
|
|
13732
|
-
}
|
|
13733
|
-
|
|
13734
|
-
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; }
|
|
13735
|
-
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; }
|
|
13736
|
-
var LocalizedInput = function LocalizedInput(props) {
|
|
13737
|
-
return jsx(ThrottledField, _objectSpread$7(_objectSpread$7({}, props), {}, {
|
|
13738
|
-
onKeyUp: noop$1
|
|
13739
|
-
}));
|
|
13740
|
-
};
|
|
13741
|
-
LocalizedInput.displayName = 'LocalizedInput';
|
|
13742
|
-
LocalizedInput.defaultProps = {
|
|
13743
|
-
// text inputs don't respond to changes with null or undefined
|
|
13744
|
-
// https://github.com/facebook/react/issues/2533
|
|
13745
|
-
value: ''
|
|
13746
|
-
};
|
|
13747
|
-
var localizedInput = localizedField(LocalizedInput);
|
|
13748
|
-
function noop$1() {}
|
|
13749
|
-
|
|
13750
|
-
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; }
|
|
13751
|
-
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; }
|
|
13752
|
-
var LocalizedTextarea = function LocalizedTextarea(props) {
|
|
13753
|
-
return (
|
|
13754
|
-
// If there is a `onToggle` function, we assume that the toggle state
|
|
13755
|
-
// will be handled outside of this component (e.g. settings).
|
|
13756
|
-
// If not, we keep a local state using the `Collapsible` component.
|
|
13757
|
-
props.onToggle ? jsx(ExpandableField$1, _objectSpread$6(_objectSpread$6({}, props), {}, {
|
|
13758
|
-
onKeyUp: noop // For ThrottledField
|
|
13759
|
-
,
|
|
13760
|
-
isExpanded: props.autoExpand || props.isExpanded,
|
|
13761
|
-
onToggle: props.onToggle
|
|
13762
|
-
})) : jsx(Collapsible, {
|
|
13763
|
-
isDefaultClosed: true,
|
|
13764
|
-
children: function children(_ref) {
|
|
13765
|
-
var isOpen = _ref.isOpen,
|
|
13766
|
-
toggle = _ref.toggle;
|
|
13767
|
-
return jsx(ExpandableField$1, _objectSpread$6(_objectSpread$6({}, props), {}, {
|
|
13768
|
-
onKeyUp: noop // For ThrottledField
|
|
13769
|
-
,
|
|
13770
|
-
isExpanded: isOpen,
|
|
13771
|
-
onToggle: toggle
|
|
13772
|
-
}));
|
|
13773
|
-
}
|
|
13774
|
-
})
|
|
13775
|
-
);
|
|
13776
|
-
};
|
|
13777
|
-
LocalizedTextarea.displayName = 'LocalizedTextarea';
|
|
13778
|
-
LocalizedTextarea.defaultProps = {
|
|
13779
|
-
// Returning `null` or `undefined` doesn't update the `textarea`.
|
|
13780
|
-
// See https://github.com/facebook/react/issues/2533
|
|
13781
|
-
value: '',
|
|
13782
|
-
isExpanded: false,
|
|
13783
|
-
disabled: false
|
|
13784
|
-
};
|
|
13785
|
-
var localizedTextarea = localizedField(LocalizedTextarea);
|
|
13786
|
-
function noop() {}
|
|
13787
|
-
|
|
13788
13409
|
var messages$1 = defineMessages({
|
|
13789
13410
|
filterWholeInput: {
|
|
13790
13411
|
id: 'MultiValueSearchInput.buttonLabel',
|
|
@@ -14481,17 +14102,17 @@ function isValidISODateTime(_ref3) {
|
|
|
14481
14102
|
}
|
|
14482
14103
|
|
|
14483
14104
|
var validateSingleOptionEnum = function validateSingleOptionEnum(selectedOption, intl) {
|
|
14484
|
-
if (validateSingleFilter(selectedOption)) return intl.formatMessage(messages$
|
|
14105
|
+
if (validateSingleFilter(selectedOption)) return intl.formatMessage(messages$J.required);
|
|
14485
14106
|
return null;
|
|
14486
14107
|
};
|
|
14487
14108
|
var validateMultiOptionEnum = function validateMultiOptionEnum(selectedOption, intl) {
|
|
14488
|
-
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);
|
|
14489
14110
|
return null;
|
|
14490
14111
|
};
|
|
14491
14112
|
|
|
14492
14113
|
// eslint-disable-next-line import/prefer-default-export
|
|
14493
14114
|
var validateText = function validateText(text, intl) {
|
|
14494
|
-
if (validateSingleFilter(text)) return intl.formatMessage(messages$
|
|
14115
|
+
if (validateSingleFilter(text)) return intl.formatMessage(messages$J.required);
|
|
14495
14116
|
return null;
|
|
14496
14117
|
};
|
|
14497
14118
|
|
|
@@ -14991,4 +14612,4 @@ function withPendingRequests() {
|
|
|
14991
14612
|
|
|
14992
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 } } } };
|
|
14993
14614
|
|
|
14994
|
-
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 };
|