@commercetools-frontend/experimental-components 5.4.2 → 5.4.3
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 +293 -158
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +293 -158
- package/dist/commercetools-frontend-experimental-components.esm.js +294 -160
- package/dist/styles.css +127 -127
- package/package.json +16 -15
|
@@ -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, useRef, useMemo, PureComponent, Component, createContext, memo,
|
|
19
|
+
import React, { useEffect, useCallback, useState, useRef, useMemo, PureComponent, Component, useContext, createContext, memo, forwardRef } 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, SUPP
|
|
|
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, MoneyInput, TextInput, MultilineTextInput, LocalizedTextInput, LocalizedMultilineTextInput, SelectInput, NumberInput, SearchSelectInput, DateInput, DateTimeInput, TimeInput, SecondaryButton, RevertIcon,
|
|
44
|
+
import { usePaginationState, useDataTableSortingState, useToggleState, Spacings, Text, Link, LoadingSpinner, Constraints, AsyncSelectInput, AccessibleHidden, SecondaryIconButton, CloseIcon, SearchIcon, Tooltip, MoneyInput, TextInput, IconButton, DragIcon, Grid, customProperties, MultilineTextInput, LocalizedTextInput, LocalizedMultilineTextInput, SelectInput, NumberInput, SearchSelectInput, DateInput, DateTimeInput, TimeInput, SecondaryButton, RevertIcon, SubdirectoryArrowIcon, Tag, EditIcon, FieldLabel, WarningIcon, FlatButton, AngleUpIcon, AngleDownIcon, BinLinearIcon, PlusBoldIcon, ErrorIcon, SwitcherIcon, SelectField, AsyncSelectField, SearchSelectField, FieldErrors, ContentNotification, ListIcon, CheckboxInput, SelectableSearchInput, SearchTextInput, CollapsiblePanel, designTokens } 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';
|
|
@@ -85,6 +85,8 @@ import omitBy from 'lodash/omitBy';
|
|
|
85
85
|
import _everyInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/every';
|
|
86
86
|
import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim';
|
|
87
87
|
import { css } from '@emotion/react';
|
|
88
|
+
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
|
|
89
|
+
import ReactDOM from 'react-dom';
|
|
88
90
|
import _endsWithInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/ends-with';
|
|
89
91
|
import { defaultMemoize } from 'reselect';
|
|
90
92
|
import _Map from '@babel/runtime-corejs3/core-js-stable/map';
|
|
@@ -95,7 +97,6 @@ import merge from 'lodash/merge';
|
|
|
95
97
|
import set from 'lodash/set';
|
|
96
98
|
import { v4 } from 'uuid';
|
|
97
99
|
import { ErrorMessage } from '@commercetools-frontend/ui-kit/';
|
|
98
|
-
import ReactDOM from 'react-dom';
|
|
99
100
|
import { CustomSelectInputOption } from '@commercetools-uikit/select-utils';
|
|
100
101
|
import memoize from 'memoize-one';
|
|
101
102
|
import { filterAriaAttributes, filterDataAttributes as filterDataAttributes$1 } from '@commercetools-uikit/utils';
|
|
@@ -1590,8 +1591,8 @@ const getData = (code, field) => {
|
|
|
1590
1591
|
};
|
|
1591
1592
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
1592
1593
|
|
|
1593
|
-
function ownKeys$
|
|
1594
|
-
function _objectSpread$
|
|
1594
|
+
function ownKeys$1p(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1595
|
+
function _objectSpread$1p(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1p(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1p(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1595
1596
|
function formatMoneyRangeValue(value, intl) {
|
|
1596
1597
|
var _context;
|
|
1597
1598
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
@@ -1601,7 +1602,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
1601
1602
|
return '';
|
|
1602
1603
|
}
|
|
1603
1604
|
function formatMoneyValue(amount, currency, intl) {
|
|
1604
|
-
return formatMoney$2(_objectSpread$
|
|
1605
|
+
return formatMoney$2(_objectSpread$1p({
|
|
1605
1606
|
centAmount: amount,
|
|
1606
1607
|
fractionDigits: getFractionDigit(currency)
|
|
1607
1608
|
}, currency ? {
|
|
@@ -1618,7 +1619,7 @@ function getFractionedAmount(moneyValue) {
|
|
|
1618
1619
|
}
|
|
1619
1620
|
function formatMoney$2(moneyValue, intl, options) {
|
|
1620
1621
|
var _moneyValue$fractione;
|
|
1621
|
-
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$
|
|
1622
|
+
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$1p({
|
|
1622
1623
|
style: 'currency',
|
|
1623
1624
|
currency: moneyValue.currencyCode,
|
|
1624
1625
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
@@ -1872,8 +1873,8 @@ const wrapDisplayName = (BaseComponent, hocName) => {
|
|
|
1872
1873
|
return _concatInstanceProperty(_context = "".concat(hocName, "(")).call(_context, getDisplayName(BaseComponent), ")");
|
|
1873
1874
|
};
|
|
1874
1875
|
|
|
1875
|
-
function ownKeys$
|
|
1876
|
-
function _objectSpread$
|
|
1876
|
+
function ownKeys$1o(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1877
|
+
function _objectSpread$1o(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1o(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1o(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1877
1878
|
const injectDataTablePaginationState = initialValues => Component => {
|
|
1878
1879
|
const WithDataTablePaginationState = props => {
|
|
1879
1880
|
var _initialValues$tableS, _initialValues$tableS2;
|
|
@@ -1887,7 +1888,7 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1887
1888
|
key: initialValues === null || initialValues === void 0 || (_initialValues$tableS = initialValues.tableSorting) === null || _initialValues$tableS === void 0 ? void 0 : _initialValues$tableS.key,
|
|
1888
1889
|
order: initialValues === null || initialValues === void 0 || (_initialValues$tableS2 = initialValues.tableSorting) === null || _initialValues$tableS2 === void 0 ? void 0 : _initialValues$tableS2.order
|
|
1889
1890
|
});
|
|
1890
|
-
return jsx(Component, _objectSpread$
|
|
1891
|
+
return jsx(Component, _objectSpread$1o(_objectSpread$1o({}, props), {}, {
|
|
1891
1892
|
dataTablePaginationState: {
|
|
1892
1893
|
page,
|
|
1893
1894
|
perPage,
|
|
@@ -1899,8 +1900,8 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1899
1900
|
return WithDataTablePaginationState;
|
|
1900
1901
|
};
|
|
1901
1902
|
|
|
1902
|
-
function ownKeys$
|
|
1903
|
-
function _objectSpread$
|
|
1903
|
+
function ownKeys$1n(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1904
|
+
function _objectSpread$1n(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1n(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1n(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1904
1905
|
const injectNotifications = function () {
|
|
1905
1906
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
1906
1907
|
return Component => {
|
|
@@ -1915,7 +1916,7 @@ const injectNotifications = function () {
|
|
|
1915
1916
|
onActionError,
|
|
1916
1917
|
hideAllPageNotifications
|
|
1917
1918
|
};
|
|
1918
|
-
return jsx(Component, _objectSpread$
|
|
1919
|
+
return jsx(Component, _objectSpread$1n(_objectSpread$1n({}, props), {}, {
|
|
1919
1920
|
[propName]: notifications
|
|
1920
1921
|
}));
|
|
1921
1922
|
};
|
|
@@ -1924,22 +1925,22 @@ const injectNotifications = function () {
|
|
|
1924
1925
|
};
|
|
1925
1926
|
};
|
|
1926
1927
|
|
|
1927
|
-
function ownKeys$
|
|
1928
|
-
function _objectSpread$
|
|
1928
|
+
function ownKeys$1m(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1929
|
+
function _objectSpread$1m(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1m(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1m(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1929
1930
|
function isPropsMapper(mapProps) {
|
|
1930
1931
|
return typeof mapProps === 'function';
|
|
1931
1932
|
}
|
|
1932
1933
|
const withProps = mapProps => Component => {
|
|
1933
1934
|
const EnhancedWithProps = ownProps => {
|
|
1934
|
-
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
1935
|
-
return jsx(Component, _objectSpread$
|
|
1935
|
+
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1m(_objectSpread$1m({}, ownProps), mapProps(ownProps)) : _objectSpread$1m(_objectSpread$1m({}, ownProps), mapProps);
|
|
1936
|
+
return jsx(Component, _objectSpread$1m({}, enhancedProps));
|
|
1936
1937
|
};
|
|
1937
1938
|
EnhancedWithProps.displayName = wrapDisplayName(Component, 'withProps');
|
|
1938
1939
|
return EnhancedWithProps;
|
|
1939
1940
|
};
|
|
1940
1941
|
|
|
1941
|
-
function ownKeys$
|
|
1942
|
-
function _objectSpread$
|
|
1942
|
+
function ownKeys$1l(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1943
|
+
function _objectSpread$1l(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1l(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1l(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1943
1944
|
const useRedirectEffect = _ref => {
|
|
1944
1945
|
let goTo = _ref.goTo;
|
|
1945
1946
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -1959,30 +1960,30 @@ const defaultOptions$5 = {
|
|
|
1959
1960
|
skip: () => false
|
|
1960
1961
|
};
|
|
1961
1962
|
const withRedirectTo = options => Component => {
|
|
1962
|
-
const mergedOptions = _objectSpread$
|
|
1963
|
+
const mergedOptions = _objectSpread$1l(_objectSpread$1l({}, defaultOptions$5), options);
|
|
1963
1964
|
const WithRedirectTo = props => {
|
|
1964
1965
|
if (!mergedOptions.skip(props)) {
|
|
1965
1966
|
return jsx(RedirectTo, {
|
|
1966
1967
|
goTo: options.selectGoTo(props)
|
|
1967
1968
|
});
|
|
1968
1969
|
}
|
|
1969
|
-
return jsx(Component, _objectSpread$
|
|
1970
|
+
return jsx(Component, _objectSpread$1l({}, props));
|
|
1970
1971
|
};
|
|
1971
1972
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
1972
1973
|
return WithRedirectTo;
|
|
1973
1974
|
};
|
|
1974
1975
|
|
|
1975
|
-
function ownKeys$
|
|
1976
|
-
function _objectSpread$
|
|
1976
|
+
function ownKeys$1k(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1977
|
+
function _objectSpread$1k(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1k(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1977
1978
|
const defaultOptions$4 = {
|
|
1978
1979
|
propName: 'modalState',
|
|
1979
1980
|
isInitiallyOpen: false
|
|
1980
1981
|
};
|
|
1981
1982
|
const injectModalState$1 = options => Component => {
|
|
1982
|
-
const mergedOptions = _objectSpread$
|
|
1983
|
+
const mergedOptions = _objectSpread$1k(_objectSpread$1k({}, defaultOptions$4), options);
|
|
1983
1984
|
const WithModalState = props => {
|
|
1984
1985
|
const modalState = useModalState(mergedOptions.isInitiallyOpen);
|
|
1985
|
-
return jsx(Component, _objectSpread$
|
|
1986
|
+
return jsx(Component, _objectSpread$1k(_objectSpread$1k({}, props), {}, {
|
|
1986
1987
|
[mergedOptions.propName]: modalState
|
|
1987
1988
|
}));
|
|
1988
1989
|
};
|
|
@@ -1990,17 +1991,17 @@ const injectModalState$1 = options => Component => {
|
|
|
1990
1991
|
return WithModalState;
|
|
1991
1992
|
};
|
|
1992
1993
|
|
|
1993
|
-
function ownKeys$
|
|
1994
|
-
function _objectSpread$
|
|
1994
|
+
function ownKeys$1j(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1995
|
+
function _objectSpread$1j(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1j(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1j(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1995
1996
|
const defaultOptions$3 = {
|
|
1996
1997
|
propName: 'toggleState',
|
|
1997
1998
|
isInitiallyOpen: false
|
|
1998
1999
|
};
|
|
1999
2000
|
const injectModalState = options => Component => {
|
|
2000
|
-
const mergedOptions = _objectSpread$
|
|
2001
|
+
const mergedOptions = _objectSpread$1j(_objectSpread$1j({}, defaultOptions$3), options);
|
|
2001
2002
|
const WithToggleState = props => {
|
|
2002
2003
|
const toggleState = useToggleState(mergedOptions.isInitiallyOpen);
|
|
2003
|
-
return jsx(Component, _objectSpread$
|
|
2004
|
+
return jsx(Component, _objectSpread$1j(_objectSpread$1j({}, props), {}, {
|
|
2004
2005
|
[mergedOptions.propName]: toggleState
|
|
2005
2006
|
}));
|
|
2006
2007
|
};
|
|
@@ -2008,8 +2009,8 @@ const injectModalState = options => Component => {
|
|
|
2008
2009
|
return WithToggleState;
|
|
2009
2010
|
};
|
|
2010
2011
|
|
|
2011
|
-
function ownKeys$
|
|
2012
|
-
function _objectSpread$
|
|
2012
|
+
function ownKeys$1i(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2013
|
+
function _objectSpread$1i(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1i(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1i(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2013
2014
|
const defaultOptions$2 = {
|
|
2014
2015
|
storageType: 'local',
|
|
2015
2016
|
segregateByUser: true
|
|
@@ -2027,7 +2028,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
|
|
|
2027
2028
|
const isNil = value => typeof value === 'undefined' || value === null;
|
|
2028
2029
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
2029
2030
|
var _context;
|
|
2030
|
-
const mergedOptions = _objectSpread$
|
|
2031
|
+
const mergedOptions = _objectSpread$1i(_objectSpread$1i({}, defaultOptions$2), options);
|
|
2031
2032
|
const userId = useApplicationContext(context => {
|
|
2032
2033
|
var _context$user;
|
|
2033
2034
|
return (_context$user = context.user) === null || _context$user === void 0 ? void 0 : _context$user.id;
|
|
@@ -2075,8 +2076,8 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
2075
2076
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
2076
2077
|
};
|
|
2077
2078
|
|
|
2078
|
-
function ownKeys$
|
|
2079
|
-
function _objectSpread$
|
|
2079
|
+
function ownKeys$1h(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2080
|
+
function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1h(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1h(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2080
2081
|
const defaultOptions$1 = {
|
|
2081
2082
|
propName: 'storage',
|
|
2082
2083
|
storageKey: '',
|
|
@@ -2089,7 +2090,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
2089
2090
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
2090
2091
|
* argument position does not allow passing specification of option(s).
|
|
2091
2092
|
*/
|
|
2092
|
-
const mergedOptions = _objectSpread$
|
|
2093
|
+
const mergedOptions = _objectSpread$1h(_objectSpread$1h({}, defaultOptions$1), options);
|
|
2093
2094
|
const WithStorage = props => {
|
|
2094
2095
|
const _useStorage = useStorage(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
2095
2096
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -2103,7 +2104,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
2103
2104
|
readFromStorage
|
|
2104
2105
|
}
|
|
2105
2106
|
};
|
|
2106
|
-
return jsx(WrappedComponent, _objectSpread$
|
|
2107
|
+
return jsx(WrappedComponent, _objectSpread$1h(_objectSpread$1h({}, props), storageProp));
|
|
2107
2108
|
};
|
|
2108
2109
|
WithStorage.displayName = wrapDisplayName(WrappedComponent, 'WithStorage');
|
|
2109
2110
|
return WithStorage;
|
|
@@ -2147,8 +2148,8 @@ const usePrevious = value => {
|
|
|
2147
2148
|
return ref.current;
|
|
2148
2149
|
};
|
|
2149
2150
|
|
|
2150
|
-
function ownKeys$
|
|
2151
|
-
function _objectSpread$
|
|
2151
|
+
function ownKeys$1g(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2152
|
+
function _objectSpread$1g(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1g(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1g(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2152
2153
|
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: "mode" }, 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: 1089, 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 mode\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
2153
2154
|
const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
2154
2155
|
var _storesQueryResult$re;
|
|
@@ -2159,7 +2160,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
2159
2160
|
offset: storesQueryResult.offset,
|
|
2160
2161
|
results: (_storesQueryResult$re = storesQueryResult.results) === null || _storesQueryResult$re === void 0 ? void 0 : _mapInstanceProperty(_storesQueryResult$re).call(_storesQueryResult$re, store => {
|
|
2161
2162
|
var _store$productSelecti;
|
|
2162
|
-
return _objectSpread$
|
|
2163
|
+
return _objectSpread$1g(_objectSpread$1g({}, store), {}, {
|
|
2163
2164
|
productSelections: (_store$productSelecti = store.productSelections) === null || _store$productSelecti === void 0 ? void 0 : _filterInstanceProperty(_store$productSelecti).call(_store$productSelecti, productSelectionRef => Boolean(productSelectionRef.productSelection))
|
|
2164
2165
|
});
|
|
2165
2166
|
})
|
|
@@ -2167,7 +2168,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
2167
2168
|
};
|
|
2168
2169
|
const createQueryVariables$6 = ownProps => {
|
|
2169
2170
|
var _context;
|
|
2170
|
-
return _objectSpread$
|
|
2171
|
+
return _objectSpread$1g(_objectSpread$1g({
|
|
2171
2172
|
limit: ownProps.limit,
|
|
2172
2173
|
offset: ownProps.offset,
|
|
2173
2174
|
sort: _sortInstanceProperty(ownProps)
|
|
@@ -2322,8 +2323,8 @@ function useDidFormValidationFail() {
|
|
|
2322
2323
|
return Boolean(didFormValidationFail);
|
|
2323
2324
|
}
|
|
2324
2325
|
|
|
2325
|
-
function ownKeys$
|
|
2326
|
-
function _objectSpread$
|
|
2326
|
+
function ownKeys$1f(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2327
|
+
function _objectSpread$1f(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1f(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2327
2328
|
const TEN_MINUTES_IN_MS = 600000;
|
|
2328
2329
|
const defaultOptions = {
|
|
2329
2330
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -2351,7 +2352,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
2351
2352
|
};
|
|
2352
2353
|
const usePersistedReminder = function () {
|
|
2353
2354
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2354
|
-
const mergedOptions = _objectSpread$
|
|
2355
|
+
const mergedOptions = _objectSpread$1f(_objectSpread$1f({}, defaultOptions), options);
|
|
2355
2356
|
const _useStorage = useStorage(mergedOptions.storageKey, null),
|
|
2356
2357
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
2357
2358
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -2415,8 +2416,8 @@ var messages$I = defineMessages({
|
|
|
2415
2416
|
}
|
|
2416
2417
|
});
|
|
2417
2418
|
|
|
2418
|
-
function ownKeys$
|
|
2419
|
-
function _objectSpread$
|
|
2419
|
+
function ownKeys$1e(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2420
|
+
function _objectSpread$1e(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1e(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1e(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2420
2421
|
const LinkToProfile = props => {
|
|
2421
2422
|
return jsx(Link, {
|
|
2422
2423
|
to: "/account/profile",
|
|
@@ -2436,7 +2437,7 @@ const NotificationText = () => jsxs(Spacings.Stack, {
|
|
|
2436
2437
|
isBold: true,
|
|
2437
2438
|
intlMessage: messages$I.profileUpdated
|
|
2438
2439
|
}), jsx(Text.Body, {
|
|
2439
|
-
intlMessage: _objectSpread$
|
|
2440
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$I.addMoreInformation), {}, {
|
|
2440
2441
|
values: {
|
|
2441
2442
|
newline: getNewLine
|
|
2442
2443
|
}
|
|
@@ -2445,7 +2446,7 @@ const NotificationText = () => jsxs(Spacings.Stack, {
|
|
|
2445
2446
|
}), jsx(Spacings.Stack, {
|
|
2446
2447
|
scale: "xs",
|
|
2447
2448
|
children: jsx(Text.Body, {
|
|
2448
|
-
intlMessage: _objectSpread$
|
|
2449
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$I.informationAndProfileLink), {}, {
|
|
2449
2450
|
values: {
|
|
2450
2451
|
newline: getNewLine,
|
|
2451
2452
|
link: getLinkToProfile
|
|
@@ -2602,8 +2603,8 @@ const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
|
2602
2603
|
// eslint-disable-next-line testing-library/await-async-utils
|
|
2603
2604
|
useCallback(debounce(promiseCallback, wait), [promiseCallback]);
|
|
2604
2605
|
|
|
2605
|
-
function ownKeys$
|
|
2606
|
-
function _objectSpread$
|
|
2606
|
+
function ownKeys$1d(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2607
|
+
function _objectSpread$1d(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1d(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1d(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2607
2608
|
const prepareMutableColumnProps = (columnConfig, mutableColumnProps) => {
|
|
2608
2609
|
const updatedColumnProps = {};
|
|
2609
2610
|
_forEachInstanceProperty(mutableColumnProps).call(mutableColumnProps, columnProp => {
|
|
@@ -2623,14 +2624,14 @@ const retrieveColumnsWithCachedConfiguration = _ref => {
|
|
|
2623
2624
|
mutableColumnProps = _ref.mutableColumnProps;
|
|
2624
2625
|
return _mapInstanceProperty(_context = _filterInstanceProperty(cachedVisibleTableConfiguration).call(cachedVisibleTableConfiguration, cachedColumn => _findInstanceProperty(allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedColumn.key))).call(_context, cachedConfig => {
|
|
2625
2626
|
const initialColumnConfig = _findInstanceProperty(allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedConfig.key);
|
|
2626
|
-
return _objectSpread$
|
|
2627
|
+
return _objectSpread$1d(_objectSpread$1d({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2627
2628
|
});
|
|
2628
2629
|
};
|
|
2629
2630
|
const handleCacheUpdate = _ref2 => {
|
|
2630
2631
|
let update = _ref2.update,
|
|
2631
2632
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2632
2633
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2633
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2634
|
+
return updateCachedTableConfiguration(_objectSpread$1d(_objectSpread$1d({}, pick(cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2634
2635
|
};
|
|
2635
2636
|
|
|
2636
2637
|
// Signature:
|
|
@@ -2659,7 +2660,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2659
2660
|
return {
|
|
2660
2661
|
columnsConfig: _mapInstanceProperty(initialVisibleColumnKeys).call(initialVisibleColumnKeys, visibleColumnKey => {
|
|
2661
2662
|
const visibleColumnConfig = _findInstanceProperty(allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, columnConfig => columnConfig.key === visibleColumnKey);
|
|
2662
|
-
return _objectSpread$
|
|
2663
|
+
return _objectSpread$1d({
|
|
2663
2664
|
key: visibleColumnKey
|
|
2664
2665
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2665
2666
|
}),
|
|
@@ -2730,14 +2731,14 @@ const handlers$4 = {
|
|
|
2730
2731
|
}
|
|
2731
2732
|
};
|
|
2732
2733
|
|
|
2733
|
-
function ownKeys$
|
|
2734
|
-
function _objectSpread$
|
|
2734
|
+
function ownKeys$1c(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2735
|
+
function _objectSpread$1c(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1c(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1c(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2735
2736
|
|
|
2736
2737
|
// eslint-disable-next-line import/prefer-default-export
|
|
2737
2738
|
const convertProductSelectionsFromGraphQl = productSelections => {
|
|
2738
2739
|
var _context;
|
|
2739
|
-
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$
|
|
2740
|
-
results: _mapInstanceProperty(_context = productSelections.results).call(_context, productSelection => _objectSpread$
|
|
2740
|
+
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$1c(_objectSpread$1c({}, productSelections), {}, {
|
|
2741
|
+
results: _mapInstanceProperty(_context = productSelections.results).call(_context, productSelection => _objectSpread$1c({}, applyTransformedLocalizedFields(productSelection, [{
|
|
2741
2742
|
from: 'nameAllLocales',
|
|
2742
2743
|
to: 'name'
|
|
2743
2744
|
}])))
|
|
@@ -2913,8 +2914,8 @@ var commonPickerMessages = defineMessages({
|
|
|
2913
2914
|
}
|
|
2914
2915
|
});
|
|
2915
2916
|
|
|
2916
|
-
function ownKeys$
|
|
2917
|
-
function _objectSpread$
|
|
2917
|
+
function ownKeys$1b(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2918
|
+
function _objectSpread$1b(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1b(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1b(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2918
2919
|
var GetChannelsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channels" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "ListValue", values: [{ kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, { kind: "StringValue", value: "key", block: false }] } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "60" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
2919
2920
|
var GetChannelQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channel" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
2920
2921
|
var PickerInputChannel = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -2935,7 +2936,7 @@ const ChannelPickerInput = _ref => {
|
|
|
2935
2936
|
const _useIntl = useIntl(),
|
|
2936
2937
|
formatMessage = _useIntl.formatMessage;
|
|
2937
2938
|
const dataLocale = useApplicationContext(applicationContext => applicationContext.dataLocale);
|
|
2938
|
-
const variables = useMemo(() => _objectSpread$
|
|
2939
|
+
const variables = useMemo(() => _objectSpread$1b({
|
|
2939
2940
|
sortByNamePath: "name.".concat(dataLocale)
|
|
2940
2941
|
}, role && {
|
|
2941
2942
|
where: "roles contains any (\"".concat(role, "\")")
|
|
@@ -3064,8 +3065,8 @@ var FormattedDateTime$1 = injectIntl(FormattedDateTime);
|
|
|
3064
3065
|
|
|
3065
3066
|
const keepDisplayName = component => setDisplayName(getDisplayName(component));
|
|
3066
3067
|
|
|
3067
|
-
function ownKeys$
|
|
3068
|
-
function _objectSpread$
|
|
3068
|
+
function ownKeys$1a(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3069
|
+
function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1a(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1a(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3069
3070
|
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); }; }
|
|
3070
3071
|
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; } }
|
|
3071
3072
|
const withMouseOverState = BaseComponent => {
|
|
@@ -3097,7 +3098,7 @@ const withMouseOverState = BaseComponent => {
|
|
|
3097
3098
|
handleMouseOver: this.handleMouseOver,
|
|
3098
3099
|
handleMouseOut: this.handleMouseOut
|
|
3099
3100
|
};
|
|
3100
|
-
return jsx(BaseComponent, _objectSpread$
|
|
3101
|
+
return jsx(BaseComponent, _objectSpread$1a({}, _objectSpread$1a(_objectSpread$1a({}, this.props), injectedProps)));
|
|
3101
3102
|
}
|
|
3102
3103
|
}]);
|
|
3103
3104
|
return WithMouseOverState;
|
|
@@ -3106,8 +3107,8 @@ const withMouseOverState = BaseComponent => {
|
|
|
3106
3107
|
return WithMouseOverState;
|
|
3107
3108
|
};
|
|
3108
3109
|
|
|
3109
|
-
function ownKeys$
|
|
3110
|
-
function _objectSpread$
|
|
3110
|
+
function ownKeys$19(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3111
|
+
function _objectSpread$19(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$19(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$19(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3111
3112
|
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); }; }
|
|
3112
3113
|
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; } }
|
|
3113
3114
|
var styles$h = {
|
|
@@ -3199,7 +3200,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3199
3200
|
}, {
|
|
3200
3201
|
key: "render",
|
|
3201
3202
|
value: function render() {
|
|
3202
|
-
const commonProps = _objectSpread$
|
|
3203
|
+
const commonProps = _objectSpread$19(_objectSpread$19({
|
|
3203
3204
|
value: this.state.draftValue,
|
|
3204
3205
|
autoComplete: this.props.autoComplete,
|
|
3205
3206
|
onChange: this.handleChange,
|
|
@@ -3218,7 +3219,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3218
3219
|
htmlFor: inputId,
|
|
3219
3220
|
children: this.props.label
|
|
3220
3221
|
})
|
|
3221
|
-
}), this.props.as === 'textarea' ? jsx(Textarea, _objectSpread$
|
|
3222
|
+
}), this.props.as === 'textarea' ? jsx(Textarea, _objectSpread$19(_objectSpread$19({}, commonProps), {}, {
|
|
3222
3223
|
id: inputId,
|
|
3223
3224
|
className: classnames(styles$h.textarea, styles$h["textarea-".concat(this.props.style)], {
|
|
3224
3225
|
[styles$h.invalid]: !this.props.isValid,
|
|
@@ -3227,7 +3228,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3227
3228
|
rows: 1,
|
|
3228
3229
|
maxRows: this.props.autoSize ? undefined : 1,
|
|
3229
3230
|
cacheMeasurements: true
|
|
3230
|
-
})) : jsx("input", _objectSpread$
|
|
3231
|
+
})) : jsx("input", _objectSpread$19(_objectSpread$19({}, commonProps), {}, {
|
|
3231
3232
|
id: inputId,
|
|
3232
3233
|
ref: this.props.inputRef,
|
|
3233
3234
|
type: this.props.as,
|
|
@@ -3595,8 +3596,8 @@ var messages$E = defineMessages({
|
|
|
3595
3596
|
}
|
|
3596
3597
|
});
|
|
3597
3598
|
|
|
3598
|
-
function ownKeys$
|
|
3599
|
-
function _objectSpread$
|
|
3599
|
+
function ownKeys$18(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3600
|
+
function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$18(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$18(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3600
3601
|
const getBottomOption = formatMessage => ({
|
|
3601
3602
|
options: [{
|
|
3602
3603
|
label: formatMessage ? formatMessage(messages$E.bottomOption) : messages$E.bottomOption,
|
|
@@ -3607,7 +3608,7 @@ const getBottomOption = formatMessage => ({
|
|
|
3607
3608
|
const Option$2 = props => {
|
|
3608
3609
|
const _useIntl = useIntl(),
|
|
3609
3610
|
formatMessage = _useIntl.formatMessage;
|
|
3610
|
-
return jsx(AsyncSelectInput.Option, _objectSpread$
|
|
3611
|
+
return jsx(AsyncSelectInput.Option, _objectSpread$18(_objectSpread$18({}, props), {}, {
|
|
3611
3612
|
children: props.data.isBottomOption ? jsx(Text.Detail, {
|
|
3612
3613
|
tone: "secondary",
|
|
3613
3614
|
children: formatMessage(props.data.label)
|
|
@@ -3624,8 +3625,8 @@ const Option$2 = props => {
|
|
|
3624
3625
|
};
|
|
3625
3626
|
Option$2.displayName = 'Option';
|
|
3626
3627
|
|
|
3627
|
-
function ownKeys$
|
|
3628
|
-
function _objectSpread$
|
|
3628
|
+
function ownKeys$17(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3629
|
+
function _objectSpread$17(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$17(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$17(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3629
3630
|
const useHandlers = onChange => {
|
|
3630
3631
|
const _useState = useState(),
|
|
3631
3632
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -3636,8 +3637,8 @@ const useHandlers = onChange => {
|
|
|
3636
3637
|
}, []);
|
|
3637
3638
|
const handleChange = useEventCallback(event => {
|
|
3638
3639
|
var _event$target$value;
|
|
3639
|
-
const eventWithExtractedValue = _objectSpread$
|
|
3640
|
-
target: _objectSpread$
|
|
3640
|
+
const eventWithExtractedValue = _objectSpread$17(_objectSpread$17({}, event), {}, {
|
|
3641
|
+
target: _objectSpread$17(_objectSpread$17({}, event.target), {}, {
|
|
3641
3642
|
value: (_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.value
|
|
3642
3643
|
})
|
|
3643
3644
|
});
|
|
@@ -3646,8 +3647,8 @@ const useHandlers = onChange => {
|
|
|
3646
3647
|
return [handleInputChange, handleChange];
|
|
3647
3648
|
};
|
|
3648
3649
|
|
|
3649
|
-
function ownKeys$
|
|
3650
|
-
function _objectSpread$
|
|
3650
|
+
function ownKeys$16(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3651
|
+
function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context6 = ownKeys$16(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context7 = ownKeys$16(Object(t))).call(_context7, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3651
3652
|
const constructPrefixSearchPredicate = function () {
|
|
3652
3653
|
let prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
3653
3654
|
let lowerBound = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -3690,7 +3691,7 @@ const useLoadOptions = _ref => {
|
|
|
3690
3691
|
}();
|
|
3691
3692
|
return client.query({
|
|
3692
3693
|
query,
|
|
3693
|
-
variables: _objectSpread$
|
|
3694
|
+
variables: _objectSpread$16({
|
|
3694
3695
|
where
|
|
3695
3696
|
}, variables),
|
|
3696
3697
|
context: {
|
|
@@ -3981,9 +3982,9 @@ const StatePickerInput = _ref => {
|
|
|
3981
3982
|
};
|
|
3982
3983
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
3983
3984
|
|
|
3984
|
-
function ownKeys$
|
|
3985
|
-
function _objectSpread$
|
|
3986
|
-
const TooltipWrapper = /*#__PURE__*/React.forwardRef((props, ref) => jsx("div", _objectSpread$
|
|
3985
|
+
function ownKeys$15(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3986
|
+
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$15(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$15(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3987
|
+
const TooltipWrapper = /*#__PURE__*/React.forwardRef((props, ref) => jsx("div", _objectSpread$15({
|
|
3987
3988
|
ref: ref,
|
|
3988
3989
|
style: {
|
|
3989
3990
|
display: 'block',
|
|
@@ -4121,8 +4122,8 @@ const getPrefixSearchBounds = input => {
|
|
|
4121
4122
|
};
|
|
4122
4123
|
|
|
4123
4124
|
const _excluded = ["action"];
|
|
4124
|
-
function ownKeys$
|
|
4125
|
-
function _objectSpread$
|
|
4125
|
+
function ownKeys$14(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4126
|
+
function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context8 = ownKeys$14(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context9 = ownKeys$14(Object(t))).call(_context9, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4126
4127
|
|
|
4127
4128
|
/**
|
|
4128
4129
|
* Checks if a value is a LocalizedString
|
|
@@ -4144,7 +4145,7 @@ const getIsLocalizedString = maybeLocalizedString => {
|
|
|
4144
4145
|
*/
|
|
4145
4146
|
const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
|
|
4146
4147
|
if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
|
|
4147
|
-
return _reduceInstanceProperty(customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$
|
|
4148
|
+
return _reduceInstanceProperty(customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$14(_objectSpread$14({}, customFields), {}, {
|
|
4148
4149
|
[customField.name]: customField.value
|
|
4149
4150
|
}), {});
|
|
4150
4151
|
};
|
|
@@ -4168,7 +4169,7 @@ function transformLocalizedFieldsForCategory(category) {
|
|
|
4168
4169
|
const transformedData = applyTransformedLocalizedFields(category, transformationOptions);
|
|
4169
4170
|
const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
|
|
4170
4171
|
const ancestors = category.ancestors ? _mapInstanceProperty(_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
|
|
4171
|
-
return _objectSpread$
|
|
4172
|
+
return _objectSpread$14(_objectSpread$14(_objectSpread$14({}, transformedData), parent ? {
|
|
4172
4173
|
parent
|
|
4173
4174
|
} : {}), ancestors ? {
|
|
4174
4175
|
ancestors
|
|
@@ -4259,7 +4260,7 @@ const createAttributeTypeValue = attribute => {
|
|
|
4259
4260
|
const formatMoney = valueType => money => {
|
|
4260
4261
|
if (valueType === 'fixed') {
|
|
4261
4262
|
return {
|
|
4262
|
-
[money.type]: _objectSpread$
|
|
4263
|
+
[money.type]: _objectSpread$14({
|
|
4263
4264
|
centAmount: money.centAmount,
|
|
4264
4265
|
currencyCode: money.currencyCode
|
|
4265
4266
|
}, money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4424,7 +4425,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4424
4425
|
case 'addAttributeDefinition':
|
|
4425
4426
|
return {
|
|
4426
4427
|
[actionName]: {
|
|
4427
|
-
attributeDefinition: _objectSpread$
|
|
4428
|
+
attributeDefinition: _objectSpread$14(_objectSpread$14({}, actionPayload.attribute), {}, {
|
|
4428
4429
|
label: transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
|
|
4429
4430
|
inputTip: transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
|
|
4430
4431
|
type: createAttributeTypeValue(actionPayload.attribute)
|
|
@@ -4520,7 +4521,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4520
4521
|
return {
|
|
4521
4522
|
[actionName]: {
|
|
4522
4523
|
attributeName: actionPayload.attributeName,
|
|
4523
|
-
value: _objectSpread$
|
|
4524
|
+
value: _objectSpread$14(_objectSpread$14({}, actionPayload.value), {}, {
|
|
4524
4525
|
label: transformLocalizedStringToLocalizedField(actionPayload.value.label)
|
|
4525
4526
|
})
|
|
4526
4527
|
}
|
|
@@ -4529,7 +4530,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4529
4530
|
return {
|
|
4530
4531
|
[actionName]: {
|
|
4531
4532
|
attributeName: actionPayload.attributeName,
|
|
4532
|
-
newValue: _objectSpread$
|
|
4533
|
+
newValue: _objectSpread$14(_objectSpread$14({}, actionPayload.newValue), {}, {
|
|
4533
4534
|
label: transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
|
|
4534
4535
|
})
|
|
4535
4536
|
}
|
|
@@ -4556,7 +4557,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4556
4557
|
name: transformLocalizedStringToLocalizedField(actionPayload.name),
|
|
4557
4558
|
taxCategory: actionPayload.taxCategory,
|
|
4558
4559
|
money: {
|
|
4559
|
-
[actionPayload.money.type]: _objectSpread$
|
|
4560
|
+
[actionPayload.money.type]: _objectSpread$14({
|
|
4560
4561
|
centAmount: actionPayload.money.centAmount,
|
|
4561
4562
|
currencyCode: actionPayload.money.currencyCode
|
|
4562
4563
|
}, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4611,8 +4612,8 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4611
4612
|
fields: customFields
|
|
4612
4613
|
} : null;
|
|
4613
4614
|
return {
|
|
4614
|
-
[actionName]: _objectSpread$
|
|
4615
|
-
address: _objectSpread$
|
|
4615
|
+
[actionName]: _objectSpread$14(_objectSpread$14({}, actionPayload), {}, {
|
|
4616
|
+
address: _objectSpread$14(_objectSpread$14({}, omit(actionPayload.address, ['__typename'])), {}, {
|
|
4616
4617
|
custom
|
|
4617
4618
|
})
|
|
4618
4619
|
})
|
|
@@ -4688,8 +4689,8 @@ function omitDeep(obj, fieldsToOmit) {
|
|
|
4688
4689
|
return originalOmitDeep(obj, fieldsToOmit);
|
|
4689
4690
|
}
|
|
4690
4691
|
|
|
4691
|
-
function ownKeys
|
|
4692
|
-
function _objectSpread
|
|
4692
|
+
function ownKeys$13(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4693
|
+
function _objectSpread$13(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$13(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$13(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4693
4694
|
function getPriceChannelName(price) {
|
|
4694
4695
|
var _ref, _price$channel$name, _price$channel, _price$channel2;
|
|
4695
4696
|
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;
|
|
@@ -4703,11 +4704,11 @@ function getDiscountValue(price) {
|
|
|
4703
4704
|
} 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 || (_price$discounted = _price$discounted.value) === null || _price$discounted === void 0 ? void 0 : _price$discounted.type) === PRECISION_TYPES.centPrecision) {
|
|
4704
4705
|
fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
|
|
4705
4706
|
}
|
|
4706
|
-
return price.discounted ? _objectSpread
|
|
4707
|
+
return price.discounted ? _objectSpread$13(_objectSpread$13({}, price.value), {}, {
|
|
4707
4708
|
fractionedAmount,
|
|
4708
4709
|
centAmount: price.value.centAmount - price.discounted.value.centAmount,
|
|
4709
4710
|
preciseAmount
|
|
4710
|
-
}) : _objectSpread
|
|
4711
|
+
}) : _objectSpread$13(_objectSpread$13({}, price.value), {}, {
|
|
4711
4712
|
centAmount: 0
|
|
4712
4713
|
});
|
|
4713
4714
|
}
|
|
@@ -4736,7 +4737,7 @@ function getNetUnitPrice(_ref2) {
|
|
|
4736
4737
|
}
|
|
4737
4738
|
let preciseAmount;
|
|
4738
4739
|
if (((_price$value4 = price.value) === null || _price$value4 === void 0 ? void 0 : _price$value4.type) === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + taxRate.amount);
|
|
4739
|
-
return _objectSpread
|
|
4740
|
+
return _objectSpread$13(_objectSpread$13({}, price.value), {}, {
|
|
4740
4741
|
centAmount,
|
|
4741
4742
|
preciseAmount
|
|
4742
4743
|
});
|
|
@@ -4753,7 +4754,7 @@ function getNetUnitPrice(_ref2) {
|
|
|
4753
4754
|
}
|
|
4754
4755
|
let preciseAmount;
|
|
4755
4756
|
if (((_price$value6 = price.value) === null || _price$value6 === void 0 ? void 0 : _price$value6.type) === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + lineItem.taxRate.amount);
|
|
4756
|
-
return _objectSpread
|
|
4757
|
+
return _objectSpread$13(_objectSpread$13({}, price.value), {}, {
|
|
4757
4758
|
centAmount,
|
|
4758
4759
|
preciseAmount
|
|
4759
4760
|
});
|
|
@@ -4765,7 +4766,7 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4765
4766
|
const currencyCode = price.value.currencyCode;
|
|
4766
4767
|
const fractionedAmount = getFractionedAmount(price.value);
|
|
4767
4768
|
if (currencyCode && !isNil$1(fractionedAmount)) {
|
|
4768
|
-
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread
|
|
4769
|
+
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$13(_objectSpread$13({}, minPrices), {}, {
|
|
4769
4770
|
[currencyCode]: price.value
|
|
4770
4771
|
});
|
|
4771
4772
|
}
|
|
@@ -4774,8 +4775,8 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4774
4775
|
return _Object$values(minPricesByCurrency);
|
|
4775
4776
|
}
|
|
4776
4777
|
|
|
4777
|
-
function ownKeys$
|
|
4778
|
-
function _objectSpread$
|
|
4778
|
+
function ownKeys$12(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4779
|
+
function _objectSpread$12(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context5 = ownKeys$12(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context6 = ownKeys$12(Object(t))).call(_context6, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4779
4780
|
const transformCustomFieldFromGraphQLResponse = resource => {
|
|
4780
4781
|
var _context, _context4;
|
|
4781
4782
|
return {
|
|
@@ -4790,14 +4791,14 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4790
4791
|
return {
|
|
4791
4792
|
name: fieldDefinition.name,
|
|
4792
4793
|
required: fieldDefinition.required,
|
|
4793
|
-
type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0 || (_fieldDefinition$type = _fieldDefinition$type.elementType) === null || _fieldDefinition$type === void 0 ? void 0 : _fieldDefinition$type.name) === 'LocalizedEnum' ? _objectSpread$
|
|
4794
|
-
elementType: _objectSpread$
|
|
4794
|
+
type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0 || (_fieldDefinition$type = _fieldDefinition$type.elementType) === null || _fieldDefinition$type === void 0 ? void 0 : _fieldDefinition$type.name) === 'LocalizedEnum' ? _objectSpread$12(_objectSpread$12({}, fieldDefinition.type), {}, {
|
|
4795
|
+
elementType: _objectSpread$12(_objectSpread$12({}, fieldDefinition.type.elementType), {}, {
|
|
4795
4796
|
values: _mapInstanceProperty(_context2 = _valuesInstanceProperty(fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
4796
4797
|
key: value.key,
|
|
4797
4798
|
label: transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
4798
4799
|
}))
|
|
4799
4800
|
})
|
|
4800
|
-
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$
|
|
4801
|
+
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$12(_objectSpread$12({}, fieldDefinition.type), {}, {
|
|
4801
4802
|
values: _mapInstanceProperty(_context3 = _valuesInstanceProperty(fieldDefinition.type)).call(_context3, value => ({
|
|
4802
4803
|
key: value.key,
|
|
4803
4804
|
label: transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -4808,7 +4809,7 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4808
4809
|
})
|
|
4809
4810
|
}
|
|
4810
4811
|
},
|
|
4811
|
-
fields: _reduceInstanceProperty(_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$
|
|
4812
|
+
fields: _reduceInstanceProperty(_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$12(_objectSpread$12({}, fields), {}, {
|
|
4812
4813
|
[customField.name]: customField.value
|
|
4813
4814
|
}), {})
|
|
4814
4815
|
};
|
|
@@ -4820,7 +4821,7 @@ const convertProductSelectionFromGraphQl = productSelection => {
|
|
|
4820
4821
|
// Incase the product selection is not missing or if the current project dose not yet have access to the feature,
|
|
4821
4822
|
// in either case we return null
|
|
4822
4823
|
if (!productSelection) return null;
|
|
4823
|
-
return _objectSpread$
|
|
4824
|
+
return _objectSpread$12(_objectSpread$12({}, applyTransformedLocalizedFields(productSelection, [{
|
|
4824
4825
|
from: 'nameAllLocales',
|
|
4825
4826
|
to: 'name'
|
|
4826
4827
|
}])), {}, {
|
|
@@ -4843,8 +4844,8 @@ const transformAllToProperNounCase = text => {
|
|
|
4843
4844
|
return _mapInstanceProperty(_context = text.split(' ')).call(_context, term => transformToProperNounCase(term)).join(' ');
|
|
4844
4845
|
};
|
|
4845
4846
|
|
|
4846
|
-
function ownKeys$
|
|
4847
|
-
function _objectSpread$
|
|
4847
|
+
function ownKeys$11(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4848
|
+
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$11(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$11(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4848
4849
|
const REGEX_ISO8601 = /(\d{4}-\d{2}-\d{2}[T]\d{2}:\d{2}:\d{2}(\.\d{3}[Z]?))/;
|
|
4849
4850
|
const REGEX_TIME = /\d{2}:\d{2}/;
|
|
4850
4851
|
const REGEX_DATE = /\d{4}-\d{2}-\d{2}/;
|
|
@@ -4861,7 +4862,7 @@ function filterCustomTypeUpdateActionValues() {
|
|
|
4861
4862
|
if (updateAction.action === 'setCustomField' && _Array$isArray(updateAction.value)) {
|
|
4862
4863
|
const definition = _findInstanceProperty(fieldDefinitions).call(fieldDefinitions, field => field.name === updateAction.name);
|
|
4863
4864
|
const definitionName = definition.type.elementType.name;
|
|
4864
|
-
return _objectSpread$
|
|
4865
|
+
return _objectSpread$11(_objectSpread$11({}, updateAction), {}, {
|
|
4865
4866
|
value: filterNotDefinedValues(updateAction.value, definitionName)
|
|
4866
4867
|
});
|
|
4867
4868
|
}
|
|
@@ -4935,8 +4936,8 @@ function omitSetsOfSets() {
|
|
|
4935
4936
|
|
|
4936
4937
|
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 } } } };
|
|
4937
4938
|
|
|
4938
|
-
function ownKeys$
|
|
4939
|
-
function _objectSpread$
|
|
4939
|
+
function ownKeys$10(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4940
|
+
function _objectSpread$10(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context4 = ownKeys$10(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context5 = ownKeys$10(Object(t))).call(_context5, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4940
4941
|
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); }; }
|
|
4941
4942
|
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; } }
|
|
4942
4943
|
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 } } } };
|
|
@@ -4996,7 +4997,7 @@ const mapDataToProps = _ref => {
|
|
|
4996
4997
|
return {
|
|
4997
4998
|
fetchTypeDefinitionsQuery: {
|
|
4998
4999
|
loading: fetchTypeDefinitionsQuery.loading,
|
|
4999
|
-
customFieldDefinitions: uniqBy(_mapInstanceProperty(fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$
|
|
5000
|
+
customFieldDefinitions: uniqBy(_mapInstanceProperty(fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$10({}, applyTransformedLocalizedFields(omitDeep(fieldDefinition, ['__typename'], {
|
|
5000
5001
|
isImmutable: true
|
|
5001
5002
|
}), [{
|
|
5002
5003
|
from: 'labelAllLocales',
|
|
@@ -5024,12 +5025,12 @@ const handlers$2 = {
|
|
|
5024
5025
|
}
|
|
5025
5026
|
};
|
|
5026
5027
|
|
|
5027
|
-
function ownKeys
|
|
5028
|
-
function _objectSpread
|
|
5028
|
+
function ownKeys$$(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5029
|
+
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context4 = ownKeys$$(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context5 = ownKeys$$(Object(t))).call(_context5, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5029
5030
|
const restDocToForm = customFieldsFromRestResponse => {
|
|
5030
5031
|
return {
|
|
5031
5032
|
fields: customFieldsFromRestResponse.fields,
|
|
5032
|
-
type: _objectSpread
|
|
5033
|
+
type: _objectSpread$$({
|
|
5033
5034
|
id: customFieldsFromRestResponse.type.id
|
|
5034
5035
|
}, customFieldsFromRestResponse.type.obj)
|
|
5035
5036
|
};
|
|
@@ -5048,14 +5049,14 @@ const graphQlDocToForm = typeDefinition => {
|
|
|
5048
5049
|
name: fieldDefinition.name,
|
|
5049
5050
|
required: fieldDefinition.required,
|
|
5050
5051
|
inputHint: fieldDefinition.inputHint,
|
|
5051
|
-
type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0 || (_fieldDefinition$type = _fieldDefinition$type.elementType) === null || _fieldDefinition$type === void 0 ? void 0 : _fieldDefinition$type.name) === 'LocalizedEnum' ? _objectSpread
|
|
5052
|
-
elementType: _objectSpread
|
|
5052
|
+
type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0 || (_fieldDefinition$type = _fieldDefinition$type.elementType) === null || _fieldDefinition$type === void 0 ? void 0 : _fieldDefinition$type.name) === 'LocalizedEnum' ? _objectSpread$$(_objectSpread$$({}, fieldDefinition.type), {}, {
|
|
5053
|
+
elementType: _objectSpread$$(_objectSpread$$({}, fieldDefinition.type.elementType), {}, {
|
|
5053
5054
|
values: _mapInstanceProperty(_context2 = _valuesInstanceProperty(fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
5054
5055
|
key: value.key,
|
|
5055
5056
|
label: transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
5056
5057
|
}))
|
|
5057
5058
|
})
|
|
5058
|
-
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread
|
|
5059
|
+
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$$(_objectSpread$$({}, fieldDefinition.type), {}, {
|
|
5059
5060
|
values: _mapInstanceProperty(_context3 = _valuesInstanceProperty(fieldDefinition.type)).call(_context3, value => ({
|
|
5060
5061
|
key: value.key,
|
|
5061
5062
|
label: transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -5071,7 +5072,7 @@ const formToRestDoc = formCustomFields => ({
|
|
|
5071
5072
|
type: {
|
|
5072
5073
|
id: formCustomFields.type.id,
|
|
5073
5074
|
typeId: 'type',
|
|
5074
|
-
obj: _objectSpread
|
|
5075
|
+
obj: _objectSpread$$({}, formCustomFields.type)
|
|
5075
5076
|
},
|
|
5076
5077
|
fields: formCustomFields.fields
|
|
5077
5078
|
});
|
|
@@ -5079,7 +5080,7 @@ const formToGraphQlDoc = formCustomFields => ({
|
|
|
5079
5080
|
type: {
|
|
5080
5081
|
id: formCustomFields.type.id,
|
|
5081
5082
|
typeId: 'type',
|
|
5082
|
-
obj: _objectSpread
|
|
5083
|
+
obj: _objectSpread$$({}, omit(formCustomFields.type, ['id']))
|
|
5083
5084
|
},
|
|
5084
5085
|
fields: omitBy(formCustomFields.fields || {}, isNil$1)
|
|
5085
5086
|
});
|
|
@@ -5210,8 +5211,8 @@ const REFERENCED_TYPES = {
|
|
|
5210
5211
|
zone: 'zone'
|
|
5211
5212
|
};
|
|
5212
5213
|
|
|
5213
|
-
function ownKeys$
|
|
5214
|
-
function _objectSpread$
|
|
5214
|
+
function ownKeys$_(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5215
|
+
function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$_(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$_(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5215
5216
|
const extractDuplicatedValues = (values, type, language, languages) => {
|
|
5216
5217
|
let validatedValues = [];
|
|
5217
5218
|
if (type.name.toLowerCase() === 'money') {
|
|
@@ -5278,12 +5279,131 @@ function validations (formValues, language, languages) {
|
|
|
5278
5279
|
var _context2;
|
|
5279
5280
|
// Collect all required and set type fields
|
|
5280
5281
|
const fieldDefinitionsToValidate = _filterInstanceProperty(_context2 = formValues.custom.type.fieldDefinitions).call(_context2, fieldDefinition => fieldDefinition.required || fieldDefinition.type.name.toLowerCase() === 'set');
|
|
5281
|
-
const errors = _reduceInstanceProperty(fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$
|
|
5282
|
-
[fieldDefinition.name]: _objectSpread$
|
|
5282
|
+
const errors = _reduceInstanceProperty(fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$_(_objectSpread$_({}, acc), {}, {
|
|
5283
|
+
[fieldDefinition.name]: _objectSpread$_(_objectSpread$_({}, setMissingIfRequired(formValues, fieldDefinition)), setDuplicatedIfSet(formValues, fieldDefinition, language, languages))
|
|
5283
5284
|
}), {});
|
|
5284
5285
|
return withoutEmptyErrorsByField(errors);
|
|
5285
5286
|
}
|
|
5286
5287
|
|
|
5288
|
+
function ownKeys$Z(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5289
|
+
function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$Z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$Z(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5290
|
+
const DroppableWrapper = _ref => {
|
|
5291
|
+
let children = _ref.children,
|
|
5292
|
+
onDragEnd = _ref.onDragEnd;
|
|
5293
|
+
return jsx(DragDropContext, {
|
|
5294
|
+
onDragEnd: onDragEnd,
|
|
5295
|
+
children: jsx(Droppable, {
|
|
5296
|
+
droppableId: "droppable",
|
|
5297
|
+
children: provided => jsxs("div", _objectSpread$Z(_objectSpread$Z({
|
|
5298
|
+
ref: provided.innerRef
|
|
5299
|
+
}, provided.droppableProps), {}, {
|
|
5300
|
+
children: [children, provided.placeholder]
|
|
5301
|
+
}))
|
|
5302
|
+
})
|
|
5303
|
+
});
|
|
5304
|
+
};
|
|
5305
|
+
|
|
5306
|
+
function ownKeys$Y(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5307
|
+
function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$Y(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$Y(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5308
|
+
function DragHandle(props) {
|
|
5309
|
+
return jsx("div", _objectSpread$Y(_objectSpread$Y({}, props), {}, {
|
|
5310
|
+
children: jsx(IconButton, {
|
|
5311
|
+
icon: jsx(DragIcon, {}),
|
|
5312
|
+
size: "medium",
|
|
5313
|
+
label: "reorder drag handle"
|
|
5314
|
+
})
|
|
5315
|
+
}));
|
|
5316
|
+
}
|
|
5317
|
+
DragHandle.displayName = 'DragHandle';
|
|
5318
|
+
|
|
5319
|
+
function ownKeys$X(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5320
|
+
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$X(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$X(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5321
|
+
const DraggableWrapper = _ref => {
|
|
5322
|
+
let children = _ref.children,
|
|
5323
|
+
draggableKey = _ref.draggableKey,
|
|
5324
|
+
draggableId = _ref.draggableId,
|
|
5325
|
+
index = _ref.index;
|
|
5326
|
+
const portal = document.createElement('div');
|
|
5327
|
+
portal.id = 'drag-rbd-portal';
|
|
5328
|
+
document.body.appendChild(portal);
|
|
5329
|
+
return jsx(Draggable, {
|
|
5330
|
+
draggableId: draggableId,
|
|
5331
|
+
index: index,
|
|
5332
|
+
children: (provided, snapshot) => {
|
|
5333
|
+
const child = jsx("div", _objectSpread$X(_objectSpread$X({
|
|
5334
|
+
ref: provided.innerRef
|
|
5335
|
+
}, provided.draggableProps), {}, {
|
|
5336
|
+
children: jsxs(Grid, {
|
|
5337
|
+
gridTemplateColumns: '1fr 20fr',
|
|
5338
|
+
gridTemplateRows: "auto 1fr auto",
|
|
5339
|
+
gridGap: customProperties.spacingL,
|
|
5340
|
+
children: [jsx(Grid.Item, {
|
|
5341
|
+
children: jsx(DragHandle, _objectSpread$X({}, provided.dragHandleProps))
|
|
5342
|
+
}), jsx(Grid.Item, {
|
|
5343
|
+
children: children
|
|
5344
|
+
})]
|
|
5345
|
+
})
|
|
5346
|
+
}));
|
|
5347
|
+
if (!snapshot.isDragging) {
|
|
5348
|
+
return child;
|
|
5349
|
+
}
|
|
5350
|
+
|
|
5351
|
+
// render the draggable in the portal when it's being dragged
|
|
5352
|
+
return /*#__PURE__*/ReactDOM.createPortal(jsx("div", {
|
|
5353
|
+
children: child
|
|
5354
|
+
}), portal);
|
|
5355
|
+
}
|
|
5356
|
+
}, draggableKey);
|
|
5357
|
+
};
|
|
5358
|
+
|
|
5359
|
+
function ownKeys$W(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5360
|
+
function _objectSpread$W(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$W(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$W(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5361
|
+
const DefaultWrapper = _ref => {
|
|
5362
|
+
let children = _ref.children;
|
|
5363
|
+
return jsx(Fragment, {
|
|
5364
|
+
children: children
|
|
5365
|
+
});
|
|
5366
|
+
};
|
|
5367
|
+
DefaultWrapper.propTypes = {
|
|
5368
|
+
children: PropTypes.node.isRequired
|
|
5369
|
+
};
|
|
5370
|
+
const dndContextDefaultValues = {
|
|
5371
|
+
onDragEnd: () => {},
|
|
5372
|
+
DroppableWrapper: DefaultWrapper,
|
|
5373
|
+
DraggableWrapper: DefaultWrapper
|
|
5374
|
+
};
|
|
5375
|
+
const DnDContext = /*#__PURE__*/createContext(dndContextDefaultValues);
|
|
5376
|
+
const DndProvider = _ref2 => {
|
|
5377
|
+
let onDragEnd = _ref2.onDragEnd,
|
|
5378
|
+
children = _ref2.children;
|
|
5379
|
+
const _useToggleState = useToggleState(false),
|
|
5380
|
+
_useToggleState2 = _slicedToArray(_useToggleState, 2),
|
|
5381
|
+
isDragAndDropMode = _useToggleState2[0],
|
|
5382
|
+
setDragAndDropMode = _useToggleState2[1];
|
|
5383
|
+
if (isDragAndDropMode) {
|
|
5384
|
+
return jsx(DnDContext.Provider, {
|
|
5385
|
+
value: {
|
|
5386
|
+
onDragEnd,
|
|
5387
|
+
DroppableWrapper,
|
|
5388
|
+
DraggableWrapper,
|
|
5389
|
+
setDragAndDropMode,
|
|
5390
|
+
isDragAndDropMode
|
|
5391
|
+
},
|
|
5392
|
+
children: children
|
|
5393
|
+
});
|
|
5394
|
+
}
|
|
5395
|
+
return jsx(DnDContext.Provider, {
|
|
5396
|
+
value: _objectSpread$W(_objectSpread$W({}, dndContextDefaultValues), {}, {
|
|
5397
|
+
isDragAndDropMode,
|
|
5398
|
+
setDragAndDropMode
|
|
5399
|
+
}),
|
|
5400
|
+
children: children
|
|
5401
|
+
});
|
|
5402
|
+
};
|
|
5403
|
+
const useDnDContext = () => {
|
|
5404
|
+
return useContext(DnDContext);
|
|
5405
|
+
};
|
|
5406
|
+
|
|
5287
5407
|
function CustomTextInput(props) {
|
|
5288
5408
|
const isMultiLine = props.fieldDefinition.inputHint === 'MultiLine';
|
|
5289
5409
|
const InputComponent = isMultiLine ? MultilineTextInput : TextInput;
|
|
@@ -7528,7 +7648,11 @@ const CustomFieldsInternal = props => {
|
|
|
7528
7648
|
handleBlur = _useFormikContext.handleBlur;
|
|
7529
7649
|
const didFormValidationFail = useDidFormValidationFail();
|
|
7530
7650
|
const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
|
|
7531
|
-
|
|
7651
|
+
const _useDnDContext = useDnDContext(),
|
|
7652
|
+
DroppableWrapper = _useDnDContext.DroppableWrapper,
|
|
7653
|
+
DraggableWrapper = _useDnDContext.DraggableWrapper,
|
|
7654
|
+
isDragAndDropMode = _useDnDContext.isDragAndDropMode;
|
|
7655
|
+
return jsx(DroppableWrapper, {
|
|
7532
7656
|
children: _mapInstanceProperty(fieldDefinitions).call(fieldDefinitions, (fieldDefinition, index) => {
|
|
7533
7657
|
var _context2;
|
|
7534
7658
|
const fieldName = getFieldName(props.name, fieldDefinition.name);
|
|
@@ -7547,42 +7671,50 @@ const CustomFieldsInternal = props => {
|
|
|
7547
7671
|
return jsx(FastField, {
|
|
7548
7672
|
name: fieldName,
|
|
7549
7673
|
validate: validate,
|
|
7550
|
-
children: () =>
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
children:
|
|
7557
|
-
name: fieldName,
|
|
7558
|
-
fieldDefinition: fieldDefinition
|
|
7559
|
-
}), jsxs(Spacings.Stack, {
|
|
7674
|
+
children: () => {
|
|
7675
|
+
var _context3, _context4;
|
|
7676
|
+
return jsx(DraggableWrapper, {
|
|
7677
|
+
draggableKey: _concatInstanceProperty(_context3 = "".concat(fieldName, "-")).call(_context3, index),
|
|
7678
|
+
draggableId: _concatInstanceProperty(_context4 = "".concat(fieldName, "-")).call(_context4, index),
|
|
7679
|
+
index: index,
|
|
7680
|
+
children: jsx(Spacings.Stack, {
|
|
7560
7681
|
scale: "xs",
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
|
|
7682
|
+
children: jsxs("div", {
|
|
7683
|
+
"aria-invalid": _Object$keys(fieldErrors !== null && fieldErrors !== void 0 ? fieldErrors : {}).length > 0,
|
|
7684
|
+
"aria-errormessage": "".concat(fieldName, "-error"),
|
|
7685
|
+
id: "".concat(fieldName, "-error"),
|
|
7686
|
+
children: [jsx(CustomFieldsLabel, {
|
|
7687
|
+
name: fieldName,
|
|
7688
|
+
fieldDefinition: fieldDefinition
|
|
7689
|
+
}), jsxs(Spacings.Stack, {
|
|
7690
|
+
scale: "xs",
|
|
7691
|
+
alignItems: "stretch",
|
|
7692
|
+
children: [isNested(fieldDefinition) ? jsx(CustomNestedFieldInput, {
|
|
7693
|
+
name: fieldName,
|
|
7694
|
+
value: value,
|
|
7695
|
+
fieldDefinition: fieldDefinition,
|
|
7696
|
+
isDisabled: props.isDisabled || isDragAndDropMode,
|
|
7697
|
+
isReadOnly: props.isReadOnly,
|
|
7698
|
+
onBlur: handleBlur,
|
|
7699
|
+
setFieldValue: props.setFieldValue
|
|
7700
|
+
}) : jsx(CustomFieldInput, {
|
|
7701
|
+
name: fieldName,
|
|
7702
|
+
value: value,
|
|
7703
|
+
fieldDefinition: fieldDefinition,
|
|
7704
|
+
isDisabled: props.isDisabled || isDragAndDropMode,
|
|
7705
|
+
isReadOnly: props.isReadOnly,
|
|
7706
|
+
onBlur: handleBlur,
|
|
7707
|
+
setFieldValue: props.setFieldValue,
|
|
7708
|
+
hasError: hasError
|
|
7709
|
+
}), jsx(CustomFieldErrors, {
|
|
7710
|
+
isTouched: isTouched,
|
|
7711
|
+
errors: fieldErrors
|
|
7712
|
+
})]
|
|
7713
|
+
})]
|
|
7714
|
+
})
|
|
7715
|
+
})
|
|
7716
|
+
});
|
|
7717
|
+
}
|
|
7586
7718
|
}, _concatInstanceProperty(_context2 = "".concat(fieldName, "-")).call(_context2, index));
|
|
7587
7719
|
})
|
|
7588
7720
|
});
|
|
@@ -7613,6 +7745,8 @@ const CustomFields = props => {
|
|
|
7613
7745
|
};
|
|
7614
7746
|
CustomFields.displayName = 'CustomFields';
|
|
7615
7747
|
|
|
7748
|
+
CustomFields.DndProvider = DndProvider;
|
|
7749
|
+
|
|
7616
7750
|
var pickerMessages = defineMessages({
|
|
7617
7751
|
productSelectionsBasicSelectPlaceholder: {
|
|
7618
7752
|
id: 'ProductSelectionPicker.productSelectionsBasicSelectPlaceholder',
|
|
@@ -13162,4 +13296,4 @@ CustomFieldsFormField.createGraphQlDocFromFormState = createGraphQlDocFromFormSt
|
|
|
13162
13296
|
|
|
13163
13297
|
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 } } } };
|
|
13164
13298
|
|
|
13165
|
-
export { booleanField as BooleanField, Button, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner, ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields, CustomFieldsErrorTextNotification, CustomFieldsFormField, CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FileInput, FormattedDateTime$1 as FormattedDateTime, LabelRange, MissingValueField, MultiValueSearchInput, numericFormatInput as NumericFormatInput, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, ProductAttributeInput, ProductAttributes, ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, RequestCache, RequiredIndicator, ScrollToFieldError, searchInput as SearchInput, SelectableFieldSearchInput, StoreSelectField, StoreSelectInput, ThrottledField, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer, allowedProperties, and, attributesMapToNameValuePairs, base64ToString, messages$8 as booleanMessages, buildSearchQuery, businessRoleConstants, messages$r as businessRoleMessages, businessRoleKeys as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition, createReducer, createResourceReducer, handlers$2 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$2 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, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$7 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, commonPickerMessages as pickerMessages, handlers as platformLimitsMockHandlers, handlers$3 as productSelectionsFetcherMockHandler, handlers$4 as productSelectionsTotalFetcherMockHandler, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$F as searchInputMessages, setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, handlers$5 as storesListConnectorMockHandlers, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useCustomerGroupsPlatformLimits, useCustomersPlatformLimits, useDebouncedPromiseCallback, useFormatLocalizedFieldToString, useLocalizedKeyFallback, usePendingRequests, usePersistedTableConfiguration, usePimIndexer, usePrevious, useProductSelectionsFetcher, useProductSelectionsTotalFetcher, useRoleNotificationEffect, useShippingMethodsLimits as useShippingMethodsPlatformLimits, useStorage, useStoreKeysInDataFences, useStoresListFetcher, useTaxCategoriesLimits as useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher, handlers$1 as useTotalNumberOfStoresFetcherHandlers, validateFilter$2 as validateCustomField, validations as validateCustomFields, validateFilter$1 as validateDate, validateMultiOptionEnum, validateFilter as validateNumber, validateSingleOptionEnum, validateText, validatedInput, messages$K as validationMessages, withPendingRequests, withProps, withRedirectTo, withoutEmptyErrorsByField, wrapDisplayName };
|
|
13299
|
+
export { booleanField as BooleanField, Button, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner, ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields, CustomFieldsErrorTextNotification, CustomFieldsFormField, CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FileInput, FormattedDateTime$1 as FormattedDateTime, LabelRange, MissingValueField, MultiValueSearchInput, numericFormatInput as NumericFormatInput, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, ProductAttributeInput, ProductAttributes, ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, RequestCache, RequiredIndicator, ScrollToFieldError, searchInput as SearchInput, SelectableFieldSearchInput, StoreSelectField, StoreSelectInput, ThrottledField, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer, allowedProperties, and, attributesMapToNameValuePairs, base64ToString, messages$8 as booleanMessages, buildSearchQuery, businessRoleConstants, messages$r as businessRoleMessages, businessRoleKeys as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition, createReducer, createResourceReducer, handlers$2 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$2 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, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$7 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, commonPickerMessages as pickerMessages, handlers as platformLimitsMockHandlers, handlers$3 as productSelectionsFetcherMockHandler, handlers$4 as productSelectionsTotalFetcherMockHandler, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$F as searchInputMessages, setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, handlers$5 as storesListConnectorMockHandlers, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useDnDContext as useCustomFieldsDnDContext, useCustomerGroupsPlatformLimits, useCustomersPlatformLimits, useDebouncedPromiseCallback, useFormatLocalizedFieldToString, useLocalizedKeyFallback, usePendingRequests, usePersistedTableConfiguration, usePimIndexer, usePrevious, useProductSelectionsFetcher, useProductSelectionsTotalFetcher, useRoleNotificationEffect, useShippingMethodsLimits as useShippingMethodsPlatformLimits, useStorage, useStoreKeysInDataFences, useStoresListFetcher, useTaxCategoriesLimits as useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher, handlers$1 as useTotalNumberOfStoresFetcherHandlers, validateFilter$2 as validateCustomField, validations as validateCustomFields, validateFilter$1 as validateDate, validateMultiOptionEnum, validateFilter as validateNumber, validateSingleOptionEnum, validateText, validatedInput, messages$K as validationMessages, withPendingRequests, withProps, withRedirectTo, withoutEmptyErrorsByField, wrapDisplayName };
|