@commercetools-frontend/experimental-components 5.1.0 → 5.3.0
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 +583 -433
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +577 -433
- package/dist/commercetools-frontend-experimental-components.esm.js +583 -434
- package/dist/styles.css +284 -284
- package/package.json +18 -18
|
@@ -99,6 +99,7 @@ var merge = require('lodash/merge');
|
|
|
99
99
|
var set = require('lodash/set');
|
|
100
100
|
var uuid = require('uuid');
|
|
101
101
|
var _ = require('@commercetools-frontend/ui-kit/');
|
|
102
|
+
var ReactDOM = require('react-dom');
|
|
102
103
|
var selectUtils = require('@commercetools-uikit/select-utils');
|
|
103
104
|
var memoize = require('memoize-one');
|
|
104
105
|
var utils = require('@commercetools-uikit/utils');
|
|
@@ -182,6 +183,7 @@ var keyBy__default = /*#__PURE__*/_interopDefault(keyBy);
|
|
|
182
183
|
var times__default = /*#__PURE__*/_interopDefault(times);
|
|
183
184
|
var merge__default = /*#__PURE__*/_interopDefault(merge);
|
|
184
185
|
var set__default = /*#__PURE__*/_interopDefault(set);
|
|
186
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefault(ReactDOM);
|
|
185
187
|
var memoize__default = /*#__PURE__*/_interopDefault(memoize);
|
|
186
188
|
var flatMap__default = /*#__PURE__*/_interopDefault(flatMap);
|
|
187
189
|
var _Math$trunc__default = /*#__PURE__*/_interopDefault(_Math$trunc);
|
|
@@ -1670,8 +1672,8 @@ const getData = (code, field) => {
|
|
|
1670
1672
|
};
|
|
1671
1673
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
1672
1674
|
|
|
1673
|
-
function ownKeys$
|
|
1674
|
-
function _objectSpread$
|
|
1675
|
+
function ownKeys$1l(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1676
|
+
function _objectSpread$1l(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1l(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1l(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1675
1677
|
function formatMoneyRangeValue(value, intl) {
|
|
1676
1678
|
var _context;
|
|
1677
1679
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
@@ -1681,7 +1683,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
1681
1683
|
return '';
|
|
1682
1684
|
}
|
|
1683
1685
|
function formatMoneyValue(amount, currency, intl) {
|
|
1684
|
-
return formatMoney$1(_objectSpread$
|
|
1686
|
+
return formatMoney$1(_objectSpread$1l({
|
|
1685
1687
|
centAmount: amount,
|
|
1686
1688
|
fractionDigits: getFractionDigit(currency)
|
|
1687
1689
|
}, currency ? {
|
|
@@ -1698,7 +1700,7 @@ function getFractionedAmount(moneyValue) {
|
|
|
1698
1700
|
}
|
|
1699
1701
|
function formatMoney$1(moneyValue, intl, options) {
|
|
1700
1702
|
var _moneyValue$fractione;
|
|
1701
|
-
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$
|
|
1703
|
+
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$1l({
|
|
1702
1704
|
style: 'currency',
|
|
1703
1705
|
currency: moneyValue.currencyCode,
|
|
1704
1706
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
@@ -1952,8 +1954,8 @@ const wrapDisplayName = (BaseComponent, hocName) => {
|
|
|
1952
1954
|
return _concatInstanceProperty__default["default"](_context = "".concat(hocName, "(")).call(_context, getDisplayName(BaseComponent), ")");
|
|
1953
1955
|
};
|
|
1954
1956
|
|
|
1955
|
-
function ownKeys$
|
|
1956
|
-
function _objectSpread$
|
|
1957
|
+
function ownKeys$1k(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1958
|
+
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__default["default"](_context = ownKeys$1k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1957
1959
|
const injectDataTablePaginationState = initialValues => Component => {
|
|
1958
1960
|
const WithDataTablePaginationState = props => {
|
|
1959
1961
|
var _initialValues$tableS, _initialValues$tableS2;
|
|
@@ -1967,7 +1969,7 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1967
1969
|
key: initialValues === null || initialValues === void 0 || (_initialValues$tableS = initialValues.tableSorting) === null || _initialValues$tableS === void 0 ? void 0 : _initialValues$tableS.key,
|
|
1968
1970
|
order: initialValues === null || initialValues === void 0 || (_initialValues$tableS2 = initialValues.tableSorting) === null || _initialValues$tableS2 === void 0 ? void 0 : _initialValues$tableS2.order
|
|
1969
1971
|
});
|
|
1970
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1972
|
+
return jsxRuntime.jsx(Component, _objectSpread$1k(_objectSpread$1k({}, props), {}, {
|
|
1971
1973
|
dataTablePaginationState: {
|
|
1972
1974
|
page,
|
|
1973
1975
|
perPage,
|
|
@@ -1979,8 +1981,8 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1979
1981
|
return WithDataTablePaginationState;
|
|
1980
1982
|
};
|
|
1981
1983
|
|
|
1982
|
-
function ownKeys$
|
|
1983
|
-
function _objectSpread$
|
|
1984
|
+
function ownKeys$1j(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1985
|
+
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__default["default"](_context = ownKeys$1j(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1j(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1984
1986
|
const injectNotifications = function () {
|
|
1985
1987
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
1986
1988
|
return Component => {
|
|
@@ -1995,7 +1997,7 @@ const injectNotifications = function () {
|
|
|
1995
1997
|
onActionError,
|
|
1996
1998
|
hideAllPageNotifications
|
|
1997
1999
|
};
|
|
1998
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2000
|
+
return jsxRuntime.jsx(Component, _objectSpread$1j(_objectSpread$1j({}, props), {}, {
|
|
1999
2001
|
[propName]: notifications
|
|
2000
2002
|
}));
|
|
2001
2003
|
};
|
|
@@ -2004,22 +2006,22 @@ const injectNotifications = function () {
|
|
|
2004
2006
|
};
|
|
2005
2007
|
};
|
|
2006
2008
|
|
|
2007
|
-
function ownKeys$
|
|
2008
|
-
function _objectSpread$
|
|
2009
|
+
function ownKeys$1i(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2010
|
+
function _objectSpread$1i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2009
2011
|
function isPropsMapper(mapProps) {
|
|
2010
2012
|
return typeof mapProps === 'function';
|
|
2011
2013
|
}
|
|
2012
2014
|
const withProps = mapProps => Component => {
|
|
2013
2015
|
const EnhancedWithProps = ownProps => {
|
|
2014
|
-
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
2015
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2016
|
+
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1i(_objectSpread$1i({}, ownProps), mapProps(ownProps)) : _objectSpread$1i(_objectSpread$1i({}, ownProps), mapProps);
|
|
2017
|
+
return jsxRuntime.jsx(Component, _objectSpread$1i({}, enhancedProps));
|
|
2016
2018
|
};
|
|
2017
2019
|
EnhancedWithProps.displayName = wrapDisplayName(Component, 'withProps');
|
|
2018
2020
|
return EnhancedWithProps;
|
|
2019
2021
|
};
|
|
2020
2022
|
|
|
2021
|
-
function ownKeys$
|
|
2022
|
-
function _objectSpread$
|
|
2023
|
+
function ownKeys$1h(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2024
|
+
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__default["default"](_context = ownKeys$1h(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1h(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2023
2025
|
const useRedirectEffect = _ref => {
|
|
2024
2026
|
let goTo = _ref.goTo;
|
|
2025
2027
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -2039,30 +2041,30 @@ const defaultOptions$5 = {
|
|
|
2039
2041
|
skip: () => false
|
|
2040
2042
|
};
|
|
2041
2043
|
const withRedirectTo = options => Component => {
|
|
2042
|
-
const mergedOptions = _objectSpread$
|
|
2044
|
+
const mergedOptions = _objectSpread$1h(_objectSpread$1h({}, defaultOptions$5), options);
|
|
2043
2045
|
const WithRedirectTo = props => {
|
|
2044
2046
|
if (!mergedOptions.skip(props)) {
|
|
2045
2047
|
return jsxRuntime.jsx(RedirectTo, {
|
|
2046
2048
|
goTo: options.selectGoTo(props)
|
|
2047
2049
|
});
|
|
2048
2050
|
}
|
|
2049
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2051
|
+
return jsxRuntime.jsx(Component, _objectSpread$1h({}, props));
|
|
2050
2052
|
};
|
|
2051
2053
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
2052
2054
|
return WithRedirectTo;
|
|
2053
2055
|
};
|
|
2054
2056
|
|
|
2055
|
-
function ownKeys$
|
|
2056
|
-
function _objectSpread$
|
|
2057
|
+
function ownKeys$1g(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2058
|
+
function _objectSpread$1g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1g(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2057
2059
|
const defaultOptions$4 = {
|
|
2058
2060
|
propName: 'modalState',
|
|
2059
2061
|
isInitiallyOpen: false
|
|
2060
2062
|
};
|
|
2061
2063
|
const injectModalState$1 = options => Component => {
|
|
2062
|
-
const mergedOptions = _objectSpread$
|
|
2064
|
+
const mergedOptions = _objectSpread$1g(_objectSpread$1g({}, defaultOptions$4), options);
|
|
2063
2065
|
const WithModalState = props => {
|
|
2064
2066
|
const modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
2065
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2067
|
+
return jsxRuntime.jsx(Component, _objectSpread$1g(_objectSpread$1g({}, props), {}, {
|
|
2066
2068
|
[mergedOptions.propName]: modalState
|
|
2067
2069
|
}));
|
|
2068
2070
|
};
|
|
@@ -2070,17 +2072,17 @@ const injectModalState$1 = options => Component => {
|
|
|
2070
2072
|
return WithModalState;
|
|
2071
2073
|
};
|
|
2072
2074
|
|
|
2073
|
-
function ownKeys$
|
|
2074
|
-
function _objectSpread$
|
|
2075
|
+
function ownKeys$1f(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2076
|
+
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__default["default"](_context = ownKeys$1f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1f(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2075
2077
|
const defaultOptions$3 = {
|
|
2076
2078
|
propName: 'toggleState',
|
|
2077
2079
|
isInitiallyOpen: false
|
|
2078
2080
|
};
|
|
2079
2081
|
const injectModalState = options => Component => {
|
|
2080
|
-
const mergedOptions = _objectSpread$
|
|
2082
|
+
const mergedOptions = _objectSpread$1f(_objectSpread$1f({}, defaultOptions$3), options);
|
|
2081
2083
|
const WithToggleState = props => {
|
|
2082
2084
|
const toggleState = uiKit.useToggleState(mergedOptions.isInitiallyOpen);
|
|
2083
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2085
|
+
return jsxRuntime.jsx(Component, _objectSpread$1f(_objectSpread$1f({}, props), {}, {
|
|
2084
2086
|
[mergedOptions.propName]: toggleState
|
|
2085
2087
|
}));
|
|
2086
2088
|
};
|
|
@@ -2088,8 +2090,8 @@ const injectModalState = options => Component => {
|
|
|
2088
2090
|
return WithToggleState;
|
|
2089
2091
|
};
|
|
2090
2092
|
|
|
2091
|
-
function ownKeys$
|
|
2092
|
-
function _objectSpread$
|
|
2093
|
+
function ownKeys$1e(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2094
|
+
function _objectSpread$1e(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1e(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1e(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2093
2095
|
const defaultOptions$2 = {
|
|
2094
2096
|
storageType: 'local',
|
|
2095
2097
|
segregateByUser: true
|
|
@@ -2107,7 +2109,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
|
|
|
2107
2109
|
const isNil = value => typeof value === 'undefined' || value === null;
|
|
2108
2110
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
2109
2111
|
var _context;
|
|
2110
|
-
const mergedOptions = _objectSpread$
|
|
2112
|
+
const mergedOptions = _objectSpread$1e(_objectSpread$1e({}, defaultOptions$2), options);
|
|
2111
2113
|
const userId = applicationShellConnectors.useApplicationContext(context => {
|
|
2112
2114
|
var _context$user;
|
|
2113
2115
|
return (_context$user = context.user) === null || _context$user === void 0 ? void 0 : _context$user.id;
|
|
@@ -2155,8 +2157,8 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
2155
2157
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
2156
2158
|
};
|
|
2157
2159
|
|
|
2158
|
-
function ownKeys$
|
|
2159
|
-
function _objectSpread$
|
|
2160
|
+
function ownKeys$1d(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2161
|
+
function _objectSpread$1d(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1d(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1d(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2160
2162
|
const defaultOptions$1 = {
|
|
2161
2163
|
propName: 'storage',
|
|
2162
2164
|
storageKey: '',
|
|
@@ -2169,7 +2171,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
2169
2171
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
2170
2172
|
* argument position does not allow passing specification of option(s).
|
|
2171
2173
|
*/
|
|
2172
|
-
const mergedOptions = _objectSpread$
|
|
2174
|
+
const mergedOptions = _objectSpread$1d(_objectSpread$1d({}, defaultOptions$1), options);
|
|
2173
2175
|
const WithStorage = props => {
|
|
2174
2176
|
const _useStorage = useStorage(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
2175
2177
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -2183,7 +2185,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
2183
2185
|
readFromStorage
|
|
2184
2186
|
}
|
|
2185
2187
|
};
|
|
2186
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
2188
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1d(_objectSpread$1d({}, props), storageProp));
|
|
2187
2189
|
};
|
|
2188
2190
|
WithStorage.displayName = wrapDisplayName(WrappedComponent, 'WithStorage');
|
|
2189
2191
|
return WithStorage;
|
|
@@ -2227,9 +2229,9 @@ const usePrevious = value => {
|
|
|
2227
2229
|
return ref.current;
|
|
2228
2230
|
};
|
|
2229
2231
|
|
|
2230
|
-
function ownKeys$
|
|
2231
|
-
function _objectSpread$
|
|
2232
|
-
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: "
|
|
2232
|
+
function ownKeys$1c(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2233
|
+
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__default["default"](_context2 = ownKeys$1c(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1c(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2234
|
+
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 } } } };
|
|
2233
2235
|
const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
2234
2236
|
var _storesQueryResult$re;
|
|
2235
2237
|
if (!storesQueryResult) return null;
|
|
@@ -2239,7 +2241,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
2239
2241
|
offset: storesQueryResult.offset,
|
|
2240
2242
|
results: (_storesQueryResult$re = storesQueryResult.results) === null || _storesQueryResult$re === void 0 ? void 0 : _mapInstanceProperty__default["default"](_storesQueryResult$re).call(_storesQueryResult$re, store => {
|
|
2241
2243
|
var _store$productSelecti;
|
|
2242
|
-
return _objectSpread$
|
|
2244
|
+
return _objectSpread$1c(_objectSpread$1c({}, store), {}, {
|
|
2243
2245
|
productSelections: (_store$productSelecti = store.productSelections) === null || _store$productSelecti === void 0 ? void 0 : _filterInstanceProperty__default["default"](_store$productSelecti).call(_store$productSelecti, productSelectionRef => Boolean(productSelectionRef.productSelection))
|
|
2244
2246
|
});
|
|
2245
2247
|
})
|
|
@@ -2247,7 +2249,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
2247
2249
|
};
|
|
2248
2250
|
const createQueryVariables$6 = ownProps => {
|
|
2249
2251
|
var _context;
|
|
2250
|
-
return _objectSpread$
|
|
2252
|
+
return _objectSpread$1c(_objectSpread$1c({
|
|
2251
2253
|
limit: ownProps.limit,
|
|
2252
2254
|
offset: ownProps.offset,
|
|
2253
2255
|
sort: _sortInstanceProperty__default["default"](ownProps)
|
|
@@ -2402,8 +2404,8 @@ function useDidFormValidationFail() {
|
|
|
2402
2404
|
return Boolean(didFormValidationFail);
|
|
2403
2405
|
}
|
|
2404
2406
|
|
|
2405
|
-
function ownKeys$
|
|
2406
|
-
function _objectSpread$
|
|
2407
|
+
function ownKeys$1b(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2408
|
+
function _objectSpread$1b(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1b(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1b(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2407
2409
|
const TEN_MINUTES_IN_MS = 600000;
|
|
2408
2410
|
const defaultOptions = {
|
|
2409
2411
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -2431,7 +2433,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
2431
2433
|
};
|
|
2432
2434
|
const usePersistedReminder = function () {
|
|
2433
2435
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2434
|
-
const mergedOptions = _objectSpread$
|
|
2436
|
+
const mergedOptions = _objectSpread$1b(_objectSpread$1b({}, defaultOptions), options);
|
|
2435
2437
|
const _useStorage = useStorage(mergedOptions.storageKey, null),
|
|
2436
2438
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
2437
2439
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -2495,8 +2497,8 @@ var messages$I = reactIntl.defineMessages({
|
|
|
2495
2497
|
}
|
|
2496
2498
|
});
|
|
2497
2499
|
|
|
2498
|
-
function ownKeys$
|
|
2499
|
-
function _objectSpread$
|
|
2500
|
+
function ownKeys$1a(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2501
|
+
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__default["default"](_context = ownKeys$1a(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2500
2502
|
const LinkToProfile = props => {
|
|
2501
2503
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
2502
2504
|
to: "/account/profile",
|
|
@@ -2516,7 +2518,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2516
2518
|
isBold: true,
|
|
2517
2519
|
intlMessage: messages$I.profileUpdated
|
|
2518
2520
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2519
|
-
intlMessage: _objectSpread$
|
|
2521
|
+
intlMessage: _objectSpread$1a(_objectSpread$1a({}, messages$I.addMoreInformation), {}, {
|
|
2520
2522
|
values: {
|
|
2521
2523
|
newline: getNewLine
|
|
2522
2524
|
}
|
|
@@ -2525,7 +2527,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2525
2527
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2526
2528
|
scale: "xs",
|
|
2527
2529
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2528
|
-
intlMessage: _objectSpread$
|
|
2530
|
+
intlMessage: _objectSpread$1a(_objectSpread$1a({}, messages$I.informationAndProfileLink), {}, {
|
|
2529
2531
|
values: {
|
|
2530
2532
|
newline: getNewLine,
|
|
2531
2533
|
link: getLinkToProfile
|
|
@@ -2682,8 +2684,8 @@ const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
|
2682
2684
|
// eslint-disable-next-line testing-library/await-async-utils
|
|
2683
2685
|
React.useCallback(debounce__default["default"](promiseCallback, wait), [promiseCallback]);
|
|
2684
2686
|
|
|
2685
|
-
function ownKeys$
|
|
2686
|
-
function _objectSpread$
|
|
2687
|
+
function ownKeys$19(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2688
|
+
function _objectSpread$19(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$19(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$19(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2687
2689
|
const prepareMutableColumnProps = (columnConfig, mutableColumnProps) => {
|
|
2688
2690
|
const updatedColumnProps = {};
|
|
2689
2691
|
_forEachInstanceProperty__default["default"](mutableColumnProps).call(mutableColumnProps, columnProp => {
|
|
@@ -2703,14 +2705,14 @@ const retrieveColumnsWithCachedConfiguration = _ref => {
|
|
|
2703
2705
|
mutableColumnProps = _ref.mutableColumnProps;
|
|
2704
2706
|
return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](cachedVisibleTableConfiguration).call(cachedVisibleTableConfiguration, cachedColumn => _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedColumn.key))).call(_context, cachedConfig => {
|
|
2705
2707
|
const initialColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedConfig.key);
|
|
2706
|
-
return _objectSpread$
|
|
2708
|
+
return _objectSpread$19(_objectSpread$19({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2707
2709
|
});
|
|
2708
2710
|
};
|
|
2709
2711
|
const handleCacheUpdate = _ref2 => {
|
|
2710
2712
|
let update = _ref2.update,
|
|
2711
2713
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2712
2714
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2713
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2715
|
+
return updateCachedTableConfiguration(_objectSpread$19(_objectSpread$19({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2714
2716
|
};
|
|
2715
2717
|
|
|
2716
2718
|
// Signature:
|
|
@@ -2739,7 +2741,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2739
2741
|
return {
|
|
2740
2742
|
columnsConfig: _mapInstanceProperty__default["default"](initialVisibleColumnKeys).call(initialVisibleColumnKeys, visibleColumnKey => {
|
|
2741
2743
|
const visibleColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, columnConfig => columnConfig.key === visibleColumnKey);
|
|
2742
|
-
return _objectSpread$
|
|
2744
|
+
return _objectSpread$19({
|
|
2743
2745
|
key: visibleColumnKey
|
|
2744
2746
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2745
2747
|
}),
|
|
@@ -2810,21 +2812,21 @@ const handlers$4 = {
|
|
|
2810
2812
|
}
|
|
2811
2813
|
};
|
|
2812
2814
|
|
|
2813
|
-
function ownKeys$
|
|
2814
|
-
function _objectSpread$
|
|
2815
|
+
function ownKeys$18(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2816
|
+
function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$18(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$18(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2815
2817
|
|
|
2816
2818
|
// eslint-disable-next-line import/prefer-default-export
|
|
2817
2819
|
const convertProductSelectionsFromGraphQl = productSelections => {
|
|
2818
2820
|
var _context;
|
|
2819
|
-
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$
|
|
2820
|
-
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$
|
|
2821
|
+
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$18(_objectSpread$18({}, productSelections), {}, {
|
|
2822
|
+
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$18({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
2821
2823
|
from: 'nameAllLocales',
|
|
2822
2824
|
to: 'name'
|
|
2823
2825
|
}])))
|
|
2824
2826
|
});
|
|
2825
2827
|
};
|
|
2826
2828
|
|
|
2827
|
-
var FetchProductSelections = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductSelections" }, 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: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, 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" } } }], 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: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, 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: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastModifiedAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "
|
|
2829
|
+
var FetchProductSelections = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductSelections" }, 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: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, 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" } } }], 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: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, 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: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastModifiedAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 341, source: { body: "query FetchProductSelections($limit: Int, $offset: Int, $sort: [String!]) {\n productSelections(limit: $limit, offset: $offset, sort: $sort) {\n total\n count\n offset\n results {\n id\n version\n key\n nameAllLocales {\n locale\n value\n }\n createdAt\n lastModifiedAt\n mode\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
2828
2830
|
const createQueryVariables$5 = ownProps => ({
|
|
2829
2831
|
limit: ownProps.limit,
|
|
2830
2832
|
offset: ownProps.offset,
|
|
@@ -2993,8 +2995,8 @@ var commonPickerMessages = reactIntl.defineMessages({
|
|
|
2993
2995
|
}
|
|
2994
2996
|
});
|
|
2995
2997
|
|
|
2996
|
-
function ownKeys$
|
|
2997
|
-
function _objectSpread$
|
|
2998
|
+
function ownKeys$17(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2999
|
+
function _objectSpread$17(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$17(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$17(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2998
3000
|
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 } } } };
|
|
2999
3001
|
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 } } } };
|
|
3000
3002
|
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 } } } };
|
|
@@ -3015,7 +3017,7 @@ const ChannelPickerInput = _ref => {
|
|
|
3015
3017
|
const _useIntl = reactIntl.useIntl(),
|
|
3016
3018
|
formatMessage = _useIntl.formatMessage;
|
|
3017
3019
|
const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
|
|
3018
|
-
const variables = React.useMemo(() => _objectSpread$
|
|
3020
|
+
const variables = React.useMemo(() => _objectSpread$17({
|
|
3019
3021
|
sortByNamePath: "name.".concat(dataLocale)
|
|
3020
3022
|
}, role && {
|
|
3021
3023
|
where: "roles contains any (\"".concat(role, "\")")
|
|
@@ -3144,8 +3146,8 @@ var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
|
3144
3146
|
|
|
3145
3147
|
const keepDisplayName = component => setDisplayName(getDisplayName(component));
|
|
3146
3148
|
|
|
3147
|
-
function ownKeys$
|
|
3148
|
-
function _objectSpread$
|
|
3149
|
+
function ownKeys$16(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3150
|
+
function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$16(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$16(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3149
3151
|
function _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3150
3152
|
function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3151
3153
|
const withMouseOverState = BaseComponent => {
|
|
@@ -3177,7 +3179,7 @@ const withMouseOverState = BaseComponent => {
|
|
|
3177
3179
|
handleMouseOver: this.handleMouseOver,
|
|
3178
3180
|
handleMouseOut: this.handleMouseOut
|
|
3179
3181
|
};
|
|
3180
|
-
return jsxRuntime.jsx(BaseComponent, _objectSpread$
|
|
3182
|
+
return jsxRuntime.jsx(BaseComponent, _objectSpread$16({}, _objectSpread$16(_objectSpread$16({}, this.props), injectedProps)));
|
|
3181
3183
|
}
|
|
3182
3184
|
}]);
|
|
3183
3185
|
return WithMouseOverState;
|
|
@@ -3186,8 +3188,8 @@ const withMouseOverState = BaseComponent => {
|
|
|
3186
3188
|
return WithMouseOverState;
|
|
3187
3189
|
};
|
|
3188
3190
|
|
|
3189
|
-
function ownKeys$
|
|
3190
|
-
function _objectSpread$
|
|
3191
|
+
function ownKeys$15(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3192
|
+
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__default["default"](_context = ownKeys$15(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$15(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3191
3193
|
function _createSuper$7(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$7(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3192
3194
|
function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3193
3195
|
var styles$h = {
|
|
@@ -3213,7 +3215,8 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3213
3215
|
}
|
|
3214
3216
|
_this = _super.call(this, ...args);
|
|
3215
3217
|
_this.state = {
|
|
3216
|
-
draftValue:
|
|
3218
|
+
draftValue: '',
|
|
3219
|
+
prevValue: ''
|
|
3217
3220
|
};
|
|
3218
3221
|
_this.clearPendingUpdates = () => {
|
|
3219
3222
|
clearTimeout(_this.changeTimeout);
|
|
@@ -3260,8 +3263,8 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3260
3263
|
};
|
|
3261
3264
|
_this.doDelayedUpdate = (updateFunction, event, eventType) => {
|
|
3262
3265
|
const self = _assertThisInitialized(_this);
|
|
3263
|
-
// TODO: can't we just use one variable?
|
|
3264
3266
|
const timeoutKey = "".concat(eventType, "Timeout");
|
|
3267
|
+
// TODO: can't we just use one variable?
|
|
3265
3268
|
clearTimeout(_this[timeoutKey]);
|
|
3266
3269
|
_this[timeoutKey] = _setTimeout__default["default"](() => {
|
|
3267
3270
|
updateFunction.call(self, event);
|
|
@@ -3271,26 +3274,6 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3271
3274
|
return _this;
|
|
3272
3275
|
}
|
|
3273
3276
|
_createClass(ThrottledField, [{
|
|
3274
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
3275
|
-
value:
|
|
3276
|
-
// eslint-disable-next-line camelcase
|
|
3277
|
-
function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
3278
|
-
if (!has__default["default"](nextProps, 'value')) return;
|
|
3279
|
-
if (!nextProps.value && nextProps.value !== 0) {
|
|
3280
|
-
// let new value from props take precedence over pending updates
|
|
3281
|
-
this.clearPendingUpdates();
|
|
3282
|
-
this.setState({
|
|
3283
|
-
draftValue: ''
|
|
3284
|
-
});
|
|
3285
|
-
} else if (nextProps.value !== this.state.draftValue) {
|
|
3286
|
-
// let new value from props take precedence over pending updates
|
|
3287
|
-
this.clearPendingUpdates();
|
|
3288
|
-
this.setState({
|
|
3289
|
-
draftValue: nextProps.value
|
|
3290
|
-
});
|
|
3291
|
-
}
|
|
3292
|
-
}
|
|
3293
|
-
}, {
|
|
3294
3277
|
key: "componentWillUnmount",
|
|
3295
3278
|
value: function componentWillUnmount() {
|
|
3296
3279
|
this.clearPendingUpdates();
|
|
@@ -3298,7 +3281,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3298
3281
|
}, {
|
|
3299
3282
|
key: "render",
|
|
3300
3283
|
value: function render() {
|
|
3301
|
-
const commonProps = _objectSpread$
|
|
3284
|
+
const commonProps = _objectSpread$15(_objectSpread$15({
|
|
3302
3285
|
value: this.state.draftValue,
|
|
3303
3286
|
autoComplete: this.props.autoComplete,
|
|
3304
3287
|
onChange: this.handleChange,
|
|
@@ -3317,7 +3300,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3317
3300
|
htmlFor: inputId,
|
|
3318
3301
|
children: this.props.label
|
|
3319
3302
|
})
|
|
3320
|
-
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$
|
|
3303
|
+
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$15(_objectSpread$15({}, commonProps), {}, {
|
|
3321
3304
|
id: inputId,
|
|
3322
3305
|
className: classnames__default["default"](styles$h.textarea, styles$h["textarea-".concat(this.props.style)], {
|
|
3323
3306
|
[styles$h.invalid]: !this.props.isValid,
|
|
@@ -3326,7 +3309,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3326
3309
|
rows: 1,
|
|
3327
3310
|
maxRows: this.props.autoSize ? undefined : 1,
|
|
3328
3311
|
cacheMeasurements: true
|
|
3329
|
-
})) : jsxRuntime.jsx("input", _objectSpread$
|
|
3312
|
+
})) : jsxRuntime.jsx("input", _objectSpread$15(_objectSpread$15({}, commonProps), {}, {
|
|
3330
3313
|
id: inputId,
|
|
3331
3314
|
ref: this.props.inputRef,
|
|
3332
3315
|
type: this.props.as,
|
|
@@ -3338,6 +3321,17 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3338
3321
|
}))]
|
|
3339
3322
|
});
|
|
3340
3323
|
}
|
|
3324
|
+
}], [{
|
|
3325
|
+
key: "getDerivedStateFromProps",
|
|
3326
|
+
value: function getDerivedStateFromProps(nextProps, prevState) {
|
|
3327
|
+
if (nextProps.value !== prevState.prevValue) {
|
|
3328
|
+
return {
|
|
3329
|
+
draftValue: nextProps.value || nextProps.value === 0 ? nextProps.value : '',
|
|
3330
|
+
prevValue: nextProps.value
|
|
3331
|
+
};
|
|
3332
|
+
}
|
|
3333
|
+
return null;
|
|
3334
|
+
}
|
|
3341
3335
|
}]);
|
|
3342
3336
|
return ThrottledField;
|
|
3343
3337
|
}(React.PureComponent);
|
|
@@ -3420,7 +3414,7 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3420
3414
|
};
|
|
3421
3415
|
_this.handleClear = () => {
|
|
3422
3416
|
var _this$inputRef;
|
|
3423
|
-
(_this$inputRef = _this.inputRef) === null || _this$inputRef === void 0
|
|
3417
|
+
(_this$inputRef = _this.inputRef) === null || _this$inputRef === void 0 || _this$inputRef.focus();
|
|
3424
3418
|
_this.props.onChange(null);
|
|
3425
3419
|
_this.props.onReset();
|
|
3426
3420
|
_this.setState({
|
|
@@ -3683,8 +3677,8 @@ var messages$E = reactIntl.defineMessages({
|
|
|
3683
3677
|
}
|
|
3684
3678
|
});
|
|
3685
3679
|
|
|
3686
|
-
function ownKeys$
|
|
3687
|
-
function _objectSpread$
|
|
3680
|
+
function ownKeys$14(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3681
|
+
function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$14(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$14(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3688
3682
|
const getBottomOption = formatMessage => ({
|
|
3689
3683
|
options: [{
|
|
3690
3684
|
label: formatMessage ? formatMessage(messages$E.bottomOption) : messages$E.bottomOption,
|
|
@@ -3695,7 +3689,7 @@ const getBottomOption = formatMessage => ({
|
|
|
3695
3689
|
const Option$2 = props => {
|
|
3696
3690
|
const _useIntl = reactIntl.useIntl(),
|
|
3697
3691
|
formatMessage = _useIntl.formatMessage;
|
|
3698
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
3692
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$14(_objectSpread$14({}, props), {}, {
|
|
3699
3693
|
children: props.data.isBottomOption ? jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
3700
3694
|
tone: "secondary",
|
|
3701
3695
|
children: formatMessage(props.data.label)
|
|
@@ -3712,8 +3706,8 @@ const Option$2 = props => {
|
|
|
3712
3706
|
};
|
|
3713
3707
|
Option$2.displayName = 'Option';
|
|
3714
3708
|
|
|
3715
|
-
function ownKeys$
|
|
3716
|
-
function _objectSpread$
|
|
3709
|
+
function ownKeys$13(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3710
|
+
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__default["default"](_context = ownKeys$13(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$13(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3717
3711
|
const useHandlers = onChange => {
|
|
3718
3712
|
const _useState = React.useState(),
|
|
3719
3713
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -3724,8 +3718,8 @@ const useHandlers = onChange => {
|
|
|
3724
3718
|
}, []);
|
|
3725
3719
|
const handleChange = useEventCallback(event => {
|
|
3726
3720
|
var _event$target$value;
|
|
3727
|
-
const eventWithExtractedValue = _objectSpread$
|
|
3728
|
-
target: _objectSpread$
|
|
3721
|
+
const eventWithExtractedValue = _objectSpread$13(_objectSpread$13({}, event), {}, {
|
|
3722
|
+
target: _objectSpread$13(_objectSpread$13({}, event.target), {}, {
|
|
3729
3723
|
value: (_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.value
|
|
3730
3724
|
})
|
|
3731
3725
|
});
|
|
@@ -3734,8 +3728,8 @@ const useHandlers = onChange => {
|
|
|
3734
3728
|
return [handleInputChange, handleChange];
|
|
3735
3729
|
};
|
|
3736
3730
|
|
|
3737
|
-
function ownKeys$
|
|
3738
|
-
function _objectSpread$
|
|
3731
|
+
function ownKeys$12(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3732
|
+
function _objectSpread$12(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$12(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$12(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3739
3733
|
const constructPrefixSearchPredicate = function () {
|
|
3740
3734
|
let prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
3741
3735
|
let lowerBound = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -3778,7 +3772,7 @@ const useLoadOptions = _ref => {
|
|
|
3778
3772
|
}();
|
|
3779
3773
|
return client$1.query({
|
|
3780
3774
|
query,
|
|
3781
|
-
variables: _objectSpread$
|
|
3775
|
+
variables: _objectSpread$12({
|
|
3782
3776
|
where
|
|
3783
3777
|
}, variables),
|
|
3784
3778
|
context: {
|
|
@@ -4069,9 +4063,9 @@ const StatePickerInput = _ref => {
|
|
|
4069
4063
|
};
|
|
4070
4064
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
4071
4065
|
|
|
4072
|
-
function ownKeys$
|
|
4073
|
-
function _objectSpread$
|
|
4074
|
-
const TooltipWrapper = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$
|
|
4066
|
+
function ownKeys$11(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4067
|
+
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$11(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$11(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4068
|
+
const TooltipWrapper = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$11({
|
|
4075
4069
|
ref: ref,
|
|
4076
4070
|
style: {
|
|
4077
4071
|
display: 'block',
|
|
@@ -4209,8 +4203,8 @@ const getPrefixSearchBounds = input => {
|
|
|
4209
4203
|
};
|
|
4210
4204
|
|
|
4211
4205
|
const _excluded = ["action"];
|
|
4212
|
-
function ownKeys
|
|
4213
|
-
function _objectSpread
|
|
4206
|
+
function ownKeys$10(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4207
|
+
function _objectSpread$10(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$10(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$10(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4214
4208
|
|
|
4215
4209
|
/**
|
|
4216
4210
|
* Checks if a value is a LocalizedString
|
|
@@ -4232,7 +4226,7 @@ const getIsLocalizedString = maybeLocalizedString => {
|
|
|
4232
4226
|
*/
|
|
4233
4227
|
const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
|
|
4234
4228
|
if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
|
|
4235
|
-
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread
|
|
4229
|
+
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$10(_objectSpread$10({}, customFields), {}, {
|
|
4236
4230
|
[customField.name]: customField.value
|
|
4237
4231
|
}), {});
|
|
4238
4232
|
};
|
|
@@ -4256,7 +4250,7 @@ function transformLocalizedFieldsForCategory(category) {
|
|
|
4256
4250
|
const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
|
|
4257
4251
|
const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
|
|
4258
4252
|
const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
|
|
4259
|
-
return _objectSpread
|
|
4253
|
+
return _objectSpread$10(_objectSpread$10(_objectSpread$10({}, transformedData), parent ? {
|
|
4260
4254
|
parent
|
|
4261
4255
|
} : {}), ancestors ? {
|
|
4262
4256
|
ancestors
|
|
@@ -4481,7 +4475,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4481
4475
|
case 'addAttributeDefinition':
|
|
4482
4476
|
return {
|
|
4483
4477
|
[actionName]: {
|
|
4484
|
-
attributeDefinition: _objectSpread
|
|
4478
|
+
attributeDefinition: _objectSpread$10(_objectSpread$10({}, actionPayload.attribute), {}, {
|
|
4485
4479
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
|
|
4486
4480
|
inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
|
|
4487
4481
|
type: createAttributeTypeValue(actionPayload.attribute)
|
|
@@ -4577,7 +4571,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4577
4571
|
return {
|
|
4578
4572
|
[actionName]: {
|
|
4579
4573
|
attributeName: actionPayload.attributeName,
|
|
4580
|
-
value: _objectSpread
|
|
4574
|
+
value: _objectSpread$10(_objectSpread$10({}, actionPayload.value), {}, {
|
|
4581
4575
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
|
|
4582
4576
|
})
|
|
4583
4577
|
}
|
|
@@ -4586,7 +4580,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4586
4580
|
return {
|
|
4587
4581
|
[actionName]: {
|
|
4588
4582
|
attributeName: actionPayload.attributeName,
|
|
4589
|
-
newValue: _objectSpread
|
|
4583
|
+
newValue: _objectSpread$10(_objectSpread$10({}, actionPayload.newValue), {}, {
|
|
4590
4584
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
|
|
4591
4585
|
})
|
|
4592
4586
|
}
|
|
@@ -4613,7 +4607,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4613
4607
|
name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
|
|
4614
4608
|
taxCategory: actionPayload.taxCategory,
|
|
4615
4609
|
money: {
|
|
4616
|
-
[actionPayload.money.type]: _objectSpread
|
|
4610
|
+
[actionPayload.money.type]: _objectSpread$10({
|
|
4617
4611
|
centAmount: actionPayload.money.centAmount,
|
|
4618
4612
|
currencyCode: actionPayload.money.currencyCode
|
|
4619
4613
|
}, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4668,8 +4662,8 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4668
4662
|
fields: customFields
|
|
4669
4663
|
} : null;
|
|
4670
4664
|
return {
|
|
4671
|
-
[actionName]: _objectSpread
|
|
4672
|
-
address: _objectSpread
|
|
4665
|
+
[actionName]: _objectSpread$10(_objectSpread$10({}, actionPayload), {}, {
|
|
4666
|
+
address: _objectSpread$10(_objectSpread$10({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
|
|
4673
4667
|
custom
|
|
4674
4668
|
})
|
|
4675
4669
|
})
|
|
@@ -4745,8 +4739,8 @@ function omitDeep(obj, fieldsToOmit) {
|
|
|
4745
4739
|
return originalOmitDeep__default["default"](obj, fieldsToOmit);
|
|
4746
4740
|
}
|
|
4747
4741
|
|
|
4748
|
-
function ownKeys
|
|
4749
|
-
function _objectSpread
|
|
4742
|
+
function ownKeys$$(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4743
|
+
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$$(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$$(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4750
4744
|
function getPriceChannelName(price) {
|
|
4751
4745
|
var _ref, _price$channel$name, _price$channel, _price$channel2;
|
|
4752
4746
|
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;
|
|
@@ -4760,11 +4754,11 @@ function getDiscountValue(price) {
|
|
|
4760
4754
|
} 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) {
|
|
4761
4755
|
fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
|
|
4762
4756
|
}
|
|
4763
|
-
return price.discounted ? _objectSpread
|
|
4757
|
+
return price.discounted ? _objectSpread$$(_objectSpread$$({}, price.value), {}, {
|
|
4764
4758
|
fractionedAmount,
|
|
4765
4759
|
centAmount: price.value.centAmount - price.discounted.value.centAmount,
|
|
4766
4760
|
preciseAmount
|
|
4767
|
-
}) : _objectSpread
|
|
4761
|
+
}) : _objectSpread$$(_objectSpread$$({}, price.value), {}, {
|
|
4768
4762
|
centAmount: 0
|
|
4769
4763
|
});
|
|
4770
4764
|
}
|
|
@@ -4793,7 +4787,7 @@ function getNetUnitPrice(_ref2) {
|
|
|
4793
4787
|
}
|
|
4794
4788
|
let preciseAmount;
|
|
4795
4789
|
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);
|
|
4796
|
-
return _objectSpread
|
|
4790
|
+
return _objectSpread$$(_objectSpread$$({}, price.value), {}, {
|
|
4797
4791
|
centAmount,
|
|
4798
4792
|
preciseAmount
|
|
4799
4793
|
});
|
|
@@ -4810,7 +4804,7 @@ function getNetUnitPrice(_ref2) {
|
|
|
4810
4804
|
}
|
|
4811
4805
|
let preciseAmount;
|
|
4812
4806
|
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);
|
|
4813
|
-
return _objectSpread
|
|
4807
|
+
return _objectSpread$$(_objectSpread$$({}, price.value), {}, {
|
|
4814
4808
|
centAmount,
|
|
4815
4809
|
preciseAmount
|
|
4816
4810
|
});
|
|
@@ -4822,7 +4816,7 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4822
4816
|
const currencyCode = price.value.currencyCode;
|
|
4823
4817
|
const fractionedAmount = getFractionedAmount(price.value);
|
|
4824
4818
|
if (currencyCode && !isNil__default["default"](fractionedAmount)) {
|
|
4825
|
-
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread
|
|
4819
|
+
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$$(_objectSpread$$({}, minPrices), {}, {
|
|
4826
4820
|
[currencyCode]: price.value
|
|
4827
4821
|
});
|
|
4828
4822
|
}
|
|
@@ -4831,8 +4825,8 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4831
4825
|
return _Object$values__default["default"](minPricesByCurrency);
|
|
4832
4826
|
}
|
|
4833
4827
|
|
|
4834
|
-
function ownKeys$
|
|
4835
|
-
function _objectSpread$
|
|
4828
|
+
function ownKeys$_(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4829
|
+
function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$_(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$_(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4836
4830
|
const transformCustomFieldFromGraphQLResponse = resource => {
|
|
4837
4831
|
var _context, _context4;
|
|
4838
4832
|
return {
|
|
@@ -4847,14 +4841,14 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4847
4841
|
return {
|
|
4848
4842
|
name: fieldDefinition.name,
|
|
4849
4843
|
required: fieldDefinition.required,
|
|
4850
|
-
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$
|
|
4851
|
-
elementType: _objectSpread$
|
|
4844
|
+
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), {}, {
|
|
4845
|
+
elementType: _objectSpread$_(_objectSpread$_({}, fieldDefinition.type.elementType), {}, {
|
|
4852
4846
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
4853
4847
|
key: value.key,
|
|
4854
4848
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
4855
4849
|
}))
|
|
4856
4850
|
})
|
|
4857
|
-
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$
|
|
4851
|
+
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$_(_objectSpread$_({}, fieldDefinition.type), {}, {
|
|
4858
4852
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
4859
4853
|
key: value.key,
|
|
4860
4854
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -4865,7 +4859,7 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4865
4859
|
})
|
|
4866
4860
|
}
|
|
4867
4861
|
},
|
|
4868
|
-
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$
|
|
4862
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$_(_objectSpread$_({}, fields), {}, {
|
|
4869
4863
|
[customField.name]: customField.value
|
|
4870
4864
|
}), {})
|
|
4871
4865
|
};
|
|
@@ -4877,7 +4871,7 @@ const convertProductSelectionFromGraphQl = productSelection => {
|
|
|
4877
4871
|
// Incase the product selection is not missing or if the current project dose not yet have access to the feature,
|
|
4878
4872
|
// in either case we return null
|
|
4879
4873
|
if (!productSelection) return null;
|
|
4880
|
-
return _objectSpread$
|
|
4874
|
+
return _objectSpread$_(_objectSpread$_({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
4881
4875
|
from: 'nameAllLocales',
|
|
4882
4876
|
to: 'name'
|
|
4883
4877
|
}])), {}, {
|
|
@@ -4900,8 +4894,8 @@ const transformAllToProperNounCase = text => {
|
|
|
4900
4894
|
return _mapInstanceProperty__default["default"](_context = text.split(' ')).call(_context, term => transformToProperNounCase(term)).join(' ');
|
|
4901
4895
|
};
|
|
4902
4896
|
|
|
4903
|
-
function ownKeys$
|
|
4904
|
-
function _objectSpread$
|
|
4897
|
+
function ownKeys$Z(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4898
|
+
function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$Z(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$Z(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4905
4899
|
const REGEX_ISO8601 = /(\d{4}-\d{2}-\d{2}[T]\d{2}:\d{2}:\d{2}(\.\d{3}[Z]?))/;
|
|
4906
4900
|
const REGEX_TIME = /\d{2}:\d{2}/;
|
|
4907
4901
|
const REGEX_DATE = /\d{4}-\d{2}-\d{2}/;
|
|
@@ -4918,7 +4912,7 @@ function filterCustomTypeUpdateActionValues() {
|
|
|
4918
4912
|
if (updateAction.action === 'setCustomField' && _Array$isArray__default["default"](updateAction.value)) {
|
|
4919
4913
|
const definition = _findInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, field => field.name === updateAction.name);
|
|
4920
4914
|
const definitionName = definition.type.elementType.name;
|
|
4921
|
-
return _objectSpread$
|
|
4915
|
+
return _objectSpread$Z(_objectSpread$Z({}, updateAction), {}, {
|
|
4922
4916
|
value: filterNotDefinedValues(updateAction.value, definitionName)
|
|
4923
4917
|
});
|
|
4924
4918
|
}
|
|
@@ -4992,8 +4986,8 @@ function omitSetsOfSets() {
|
|
|
4992
4986
|
|
|
4993
4987
|
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 } } } };
|
|
4994
4988
|
|
|
4995
|
-
function ownKeys$
|
|
4996
|
-
function _objectSpread$
|
|
4989
|
+
function ownKeys$Y(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4990
|
+
function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$Y(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$Y(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4997
4991
|
function _createSuper$5(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$5(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4998
4992
|
function _isNativeReflectConstruct$5() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
4999
4993
|
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 } } } };
|
|
@@ -5053,7 +5047,7 @@ const mapDataToProps = _ref => {
|
|
|
5053
5047
|
return {
|
|
5054
5048
|
fetchTypeDefinitionsQuery: {
|
|
5055
5049
|
loading: fetchTypeDefinitionsQuery.loading,
|
|
5056
|
-
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$
|
|
5050
|
+
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$Y({}, l10n.applyTransformedLocalizedFields(omitDeep(fieldDefinition, ['__typename'], {
|
|
5057
5051
|
isImmutable: true
|
|
5058
5052
|
}), [{
|
|
5059
5053
|
from: 'labelAllLocales',
|
|
@@ -5081,12 +5075,12 @@ const handlers$2 = {
|
|
|
5081
5075
|
}
|
|
5082
5076
|
};
|
|
5083
5077
|
|
|
5084
|
-
function ownKeys$
|
|
5085
|
-
function _objectSpread$
|
|
5078
|
+
function ownKeys$X(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5079
|
+
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$X(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$X(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5086
5080
|
const restDocToForm = customFieldsFromRestResponse => {
|
|
5087
5081
|
return {
|
|
5088
5082
|
fields: customFieldsFromRestResponse.fields,
|
|
5089
|
-
type: _objectSpread$
|
|
5083
|
+
type: _objectSpread$X({
|
|
5090
5084
|
id: customFieldsFromRestResponse.type.id
|
|
5091
5085
|
}, customFieldsFromRestResponse.type.obj)
|
|
5092
5086
|
};
|
|
@@ -5105,14 +5099,14 @@ const graphQlDocToForm = typeDefinition => {
|
|
|
5105
5099
|
name: fieldDefinition.name,
|
|
5106
5100
|
required: fieldDefinition.required,
|
|
5107
5101
|
inputHint: fieldDefinition.inputHint,
|
|
5108
|
-
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$
|
|
5109
|
-
elementType: _objectSpread$
|
|
5102
|
+
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$X(_objectSpread$X({}, fieldDefinition.type), {}, {
|
|
5103
|
+
elementType: _objectSpread$X(_objectSpread$X({}, fieldDefinition.type.elementType), {}, {
|
|
5110
5104
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
5111
5105
|
key: value.key,
|
|
5112
5106
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
5113
5107
|
}))
|
|
5114
5108
|
})
|
|
5115
|
-
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$
|
|
5109
|
+
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$X(_objectSpread$X({}, fieldDefinition.type), {}, {
|
|
5116
5110
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
5117
5111
|
key: value.key,
|
|
5118
5112
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -5128,7 +5122,7 @@ const formToRestDoc = formCustomFields => ({
|
|
|
5128
5122
|
type: {
|
|
5129
5123
|
id: formCustomFields.type.id,
|
|
5130
5124
|
typeId: 'type',
|
|
5131
|
-
obj: _objectSpread$
|
|
5125
|
+
obj: _objectSpread$X({}, formCustomFields.type)
|
|
5132
5126
|
},
|
|
5133
5127
|
fields: formCustomFields.fields
|
|
5134
5128
|
});
|
|
@@ -5136,7 +5130,7 @@ const formToGraphQlDoc = formCustomFields => ({
|
|
|
5136
5130
|
type: {
|
|
5137
5131
|
id: formCustomFields.type.id,
|
|
5138
5132
|
typeId: 'type',
|
|
5139
|
-
obj: _objectSpread$
|
|
5133
|
+
obj: _objectSpread$X({}, omit__default["default"](formCustomFields.type, ['id']))
|
|
5140
5134
|
},
|
|
5141
5135
|
fields: omitBy__default["default"](formCustomFields.fields || {}, isNil__default["default"])
|
|
5142
5136
|
});
|
|
@@ -5152,7 +5146,7 @@ const createEmptyCustomFields = typeDefinition => ({
|
|
|
5152
5146
|
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5153
5147
|
function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5154
5148
|
var FetchTypeDefinitionsWithNamesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsWithNamesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "required" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 1445, source: { body: "query FetchTypeDefinitionsWithNamesQuery(\n $where: String\n $limit: Int\n $offset: Int\n) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n id\n key\n nameAllLocales {\n value\n locale\n }\n fieldDefinitions {\n required\n type {\n name\n ... on ReferenceType {\n referenceTypeId\n }\n ... on SetType {\n elementType {\n name\n ... on ReferenceType {\n referenceTypeId\n name\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n inputHint\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
5155
|
-
const customizableResources = ['asset', 'address', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection'];
|
|
5149
|
+
const customizableResources = ['asset', 'address', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item'];
|
|
5156
5150
|
const emptyTypeDefinitions = {
|
|
5157
5151
|
total: 0,
|
|
5158
5152
|
count: 0,
|
|
@@ -5216,7 +5210,7 @@ var CustomFieldTypeDefinitionsConnector$1 = hoistNonReactStatics__default["defau
|
|
|
5216
5210
|
options: createGraphQlOptions
|
|
5217
5211
|
})(CustomFieldTypeDefinitionsConnector), CustomFieldTypeDefinitionsConnector);
|
|
5218
5212
|
|
|
5219
|
-
const getType
|
|
5213
|
+
const getType = fieldDefinition => {
|
|
5220
5214
|
const fieldDefinitionType = fieldDefinition.type.name.toLowerCase() === 'set' ? fieldDefinition.type.elementType : fieldDefinition.type;
|
|
5221
5215
|
return fieldDefinitionType;
|
|
5222
5216
|
};
|
|
@@ -5267,8 +5261,8 @@ const REFERENCED_TYPES = {
|
|
|
5267
5261
|
zone: 'zone'
|
|
5268
5262
|
};
|
|
5269
5263
|
|
|
5270
|
-
function ownKeys$
|
|
5271
|
-
function _objectSpread$
|
|
5264
|
+
function ownKeys$W(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5265
|
+
function _objectSpread$W(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$W(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$W(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5272
5266
|
const extractDuplicatedValues = (values, type, language, languages) => {
|
|
5273
5267
|
let validatedValues = [];
|
|
5274
5268
|
if (type.name.toLowerCase() === 'money') {
|
|
@@ -5281,7 +5275,7 @@ const extractDuplicatedValues = (values, type, language, languages) => {
|
|
|
5281
5275
|
const setDuplicatedIfSet = (formValues, fieldDefinition, language, languages) => {
|
|
5282
5276
|
const fieldValue = formValues.custom.fields[fieldDefinition.name];
|
|
5283
5277
|
if (fieldDefinition.type.name.toLowerCase() === 'set' && _Array$isArray__default["default"](fieldValue)) {
|
|
5284
|
-
const duplicatedValues = extractDuplicatedValues(fieldValue, getType
|
|
5278
|
+
const duplicatedValues = extractDuplicatedValues(fieldValue, getType(fieldDefinition), language, languages);
|
|
5285
5279
|
return {
|
|
5286
5280
|
duplicated: {
|
|
5287
5281
|
// although this is mixing concerns, we pass down `duplicatedValues` to the form.
|
|
@@ -5335,8 +5329,8 @@ function validations (formValues, language, languages) {
|
|
|
5335
5329
|
var _context2;
|
|
5336
5330
|
// Collect all required and set type fields
|
|
5337
5331
|
const fieldDefinitionsToValidate = _filterInstanceProperty__default["default"](_context2 = formValues.custom.type.fieldDefinitions).call(_context2, fieldDefinition => fieldDefinition.required || fieldDefinition.type.name.toLowerCase() === 'set');
|
|
5338
|
-
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$
|
|
5339
|
-
[fieldDefinition.name]: _objectSpread$
|
|
5332
|
+
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$W(_objectSpread$W({}, acc), {}, {
|
|
5333
|
+
[fieldDefinition.name]: _objectSpread$W(_objectSpread$W({}, setMissingIfRequired(formValues, fieldDefinition)), setDuplicatedIfSet(formValues, fieldDefinition, language, languages))
|
|
5340
5334
|
}), {});
|
|
5341
5335
|
return withoutEmptyErrorsByField(errors);
|
|
5342
5336
|
}
|
|
@@ -5363,8 +5357,8 @@ function CustomTextInput(props) {
|
|
|
5363
5357
|
}
|
|
5364
5358
|
CustomTextInput.displayName = 'CustomTextInput';
|
|
5365
5359
|
|
|
5366
|
-
function ownKeys$
|
|
5367
|
-
function _objectSpread$
|
|
5360
|
+
function ownKeys$V(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5361
|
+
function _objectSpread$V(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$V(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$V(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5368
5362
|
const getSubfieldLanguage = subfieldName => {
|
|
5369
5363
|
const lastDotIndex = _lastIndexOfInstanceProperty__default["default"](subfieldName).call(subfieldName, '.');
|
|
5370
5364
|
return subfieldName.substring(lastDotIndex + 1);
|
|
@@ -5388,7 +5382,7 @@ function CustomLocalizedTextInput(props) {
|
|
|
5388
5382
|
// as a whole.
|
|
5389
5383
|
|
|
5390
5384
|
const fieldLanguage = getSubfieldLanguage(subfieldName);
|
|
5391
|
-
const newValue = _objectSpread$
|
|
5385
|
+
const newValue = _objectSpread$V(_objectSpread$V({}, props.value), {}, {
|
|
5392
5386
|
[fieldLanguage]: rawValue
|
|
5393
5387
|
});
|
|
5394
5388
|
const nullifiedIfNeeded = uiKit.LocalizedTextInput.isEmpty(newValue) ? undefined : newValue;
|
|
@@ -5455,21 +5449,21 @@ function CustomNumberInput(props) {
|
|
|
5455
5449
|
}
|
|
5456
5450
|
CustomNumberInput.displayName = 'CustomNumberInput';
|
|
5457
5451
|
|
|
5458
|
-
function ownKeys$
|
|
5459
|
-
function _objectSpread$
|
|
5452
|
+
function ownKeys$U(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5453
|
+
function _objectSpread$U(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$U(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$U(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5460
5454
|
var styles$f = {
|
|
5461
5455
|
"container": "custom-money-input-module__container___1fdO2"
|
|
5462
5456
|
};
|
|
5463
5457
|
const fixCurrencyCode = (value, currencies) => {
|
|
5464
5458
|
if (value.currencyCode) return value;
|
|
5465
5459
|
const firstCurrency = currencies[0];
|
|
5466
|
-
return _objectSpread$
|
|
5460
|
+
return _objectSpread$U(_objectSpread$U({}, value), {}, {
|
|
5467
5461
|
currencyCode: firstCurrency
|
|
5468
5462
|
});
|
|
5469
5463
|
};
|
|
5470
5464
|
const fixAmount = value => {
|
|
5471
5465
|
if (!value.amount) {
|
|
5472
|
-
return _objectSpread$
|
|
5466
|
+
return _objectSpread$U(_objectSpread$U({}, value), {}, {
|
|
5473
5467
|
amount: '0'
|
|
5474
5468
|
});
|
|
5475
5469
|
}
|
|
@@ -5511,7 +5505,7 @@ function CustomMoneyInput(props) {
|
|
|
5511
5505
|
}
|
|
5512
5506
|
const handleChange = makeChangeHandler((rawValue, subfieldName) => {
|
|
5513
5507
|
const isAmount = _endsWithInstanceProperty__default["default"](subfieldName).call(subfieldName, 'amount');
|
|
5514
|
-
const newValue = _objectSpread$
|
|
5508
|
+
const newValue = _objectSpread$U({}, internalValue.current);
|
|
5515
5509
|
if (isAmount) newValue.amount = rawValue;else newValue.currencyCode = rawValue;
|
|
5516
5510
|
const fixedValue = fixEnteredValue(newValue, internalValue.current, currencies);
|
|
5517
5511
|
internalValue.current = fixedValue;
|
|
@@ -5825,8 +5819,8 @@ const messages$B = reactIntl.defineMessages({
|
|
|
5825
5819
|
}
|
|
5826
5820
|
});
|
|
5827
5821
|
|
|
5828
|
-
function ownKeys$
|
|
5829
|
-
function _objectSpread$
|
|
5822
|
+
function ownKeys$T(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5823
|
+
function _objectSpread$T(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$T(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$T(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5830
5824
|
function Option$1(props) {
|
|
5831
5825
|
var _context, _context2;
|
|
5832
5826
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -5838,7 +5832,7 @@ function Option$1(props) {
|
|
|
5838
5832
|
const _useIntl = reactIntl.useIntl(),
|
|
5839
5833
|
formatMessage = _useIntl.formatMessage;
|
|
5840
5834
|
const category = props.data;
|
|
5841
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
5835
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$T(_objectSpread$T({}, props), {}, {
|
|
5842
5836
|
children: jsxRuntime.jsxs("div", {
|
|
5843
5837
|
"data-testid": "category-option",
|
|
5844
5838
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -5867,8 +5861,8 @@ function Option$1(props) {
|
|
|
5867
5861
|
}));
|
|
5868
5862
|
}
|
|
5869
5863
|
|
|
5870
|
-
function ownKeys$
|
|
5871
|
-
function _objectSpread$
|
|
5864
|
+
function ownKeys$S(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5865
|
+
function _objectSpread$S(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$S(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$S(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5872
5866
|
const filterOption$1 = () => true;
|
|
5873
5867
|
function CategoryReferenceSearch(props) {
|
|
5874
5868
|
const _useIntl = reactIntl.useIntl(),
|
|
@@ -5880,7 +5874,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5880
5874
|
})),
|
|
5881
5875
|
language = _useApplicationContex.language,
|
|
5882
5876
|
languages = _useApplicationContex.languages;
|
|
5883
|
-
const mapItemToOption = React.useCallback(category => _objectSpread$
|
|
5877
|
+
const mapItemToOption = React.useCallback(category => _objectSpread$S(_objectSpread$S({}, category), {}, {
|
|
5884
5878
|
value: category.id,
|
|
5885
5879
|
label: l10n.formatLocalizedString(category, {
|
|
5886
5880
|
key: 'name',
|
|
@@ -5898,7 +5892,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5898
5892
|
}), [apolloClient]);
|
|
5899
5893
|
return jsxRuntime.jsx(ReferenceSearch, {
|
|
5900
5894
|
id: props.id,
|
|
5901
|
-
components: _objectSpread$
|
|
5895
|
+
components: _objectSpread$S({
|
|
5902
5896
|
Option: Option$1
|
|
5903
5897
|
}, props.components),
|
|
5904
5898
|
isClearable: props.isClearable,
|
|
@@ -6016,8 +6010,8 @@ const messages$A = reactIntl.defineMessages({
|
|
|
6016
6010
|
}
|
|
6017
6011
|
});
|
|
6018
6012
|
|
|
6019
|
-
function ownKeys$
|
|
6020
|
-
function _objectSpread$
|
|
6013
|
+
function ownKeys$R(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6014
|
+
function _objectSpread$R(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$R(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$R(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6021
6015
|
function Option(props) {
|
|
6022
6016
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
6023
6017
|
language: applicationContext.dataLocale,
|
|
@@ -6028,7 +6022,7 @@ function Option(props) {
|
|
|
6028
6022
|
const _useIntl = reactIntl.useIntl(),
|
|
6029
6023
|
formatMessage = _useIntl.formatMessage;
|
|
6030
6024
|
const cartDiscount = props.data;
|
|
6031
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
6025
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$R(_objectSpread$R({}, props), {}, {
|
|
6032
6026
|
children: jsxRuntime.jsxs("div", {
|
|
6033
6027
|
"data-testid": "cart-discount-option",
|
|
6034
6028
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -6045,8 +6039,8 @@ function Option(props) {
|
|
|
6045
6039
|
}));
|
|
6046
6040
|
}
|
|
6047
6041
|
|
|
6048
|
-
function ownKeys$
|
|
6049
|
-
function _objectSpread$
|
|
6042
|
+
function ownKeys$Q(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6043
|
+
function _objectSpread$Q(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$Q(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$Q(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6050
6044
|
var CartDiscountsCount$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "CartDiscountsCount" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 425, source: { body: "query SearchCartDiscount($where: String) {\n cartDiscounts(limit: 500, where: $where) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n\nquery FetchCartDiscountById($cartDiscountId: String!) {\n cartDiscount(id: $cartDiscountId) {\n id\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
6051
6045
|
const returnNullIfEmpty = value => value && value.id === '' ? null : value;
|
|
6052
6046
|
const filterOption = (option, text) => {
|
|
@@ -6072,7 +6066,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
6072
6066
|
})),
|
|
6073
6067
|
language = _useApplicationContex.language,
|
|
6074
6068
|
languages = _useApplicationContex.languages;
|
|
6075
|
-
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$
|
|
6069
|
+
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$Q(_objectSpread$Q({}, cartDiscount), {}, {
|
|
6076
6070
|
value: cartDiscount.id,
|
|
6077
6071
|
key: cartDiscount.key,
|
|
6078
6072
|
label: l10n.formatLocalizedString(cartDiscount, {
|
|
@@ -6542,8 +6536,8 @@ function CustomBooleanInputSet(props) {
|
|
|
6542
6536
|
}
|
|
6543
6537
|
CustomBooleanInputSet.displayName = 'CustomBooleanInputSet';
|
|
6544
6538
|
|
|
6545
|
-
function ownKeys$
|
|
6546
|
-
function _objectSpread$
|
|
6539
|
+
function ownKeys$P(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6540
|
+
function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys$P(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys$P(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6547
6541
|
const getTypeName = type => type.name.toLowerCase();
|
|
6548
6542
|
const findLabel = (enumType, key) => {
|
|
6549
6543
|
var _enumType$values$find, _enumType$values$find2, _context;
|
|
@@ -6587,12 +6581,13 @@ const attributeDefinitionToFieldDefinition = attributeDefinition => ({
|
|
|
6587
6581
|
inputHint: attributeDefinition.inputHint,
|
|
6588
6582
|
inputTip: attributeDefinition.inputTip,
|
|
6589
6583
|
required: attributeDefinition.isRequired,
|
|
6590
|
-
type: attributeDefinition.type
|
|
6584
|
+
type: attributeDefinition.type,
|
|
6585
|
+
assignedAttributeGroups: attributeDefinition.assignedAttributeGroups
|
|
6591
6586
|
});
|
|
6592
6587
|
const nameValuePairsToMap = pairs => _reduceInstanceProperty__default["default"](pairs).call(pairs, (result, _ref2) => {
|
|
6593
6588
|
let name = _ref2.name,
|
|
6594
6589
|
value = _ref2.value;
|
|
6595
|
-
return _objectSpread$
|
|
6590
|
+
return _objectSpread$P(_objectSpread$P({}, result), {}, {
|
|
6596
6591
|
[name]: value
|
|
6597
6592
|
});
|
|
6598
6593
|
}, {});
|
|
@@ -6689,23 +6684,23 @@ const messages$y = reactIntl.defineMessages({
|
|
|
6689
6684
|
}
|
|
6690
6685
|
});
|
|
6691
6686
|
|
|
6692
|
-
function ownKeys$
|
|
6693
|
-
function _objectSpread$
|
|
6687
|
+
function ownKeys$O(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6688
|
+
function _objectSpread$O(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$O(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$O(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6694
6689
|
var FetchProductTypeQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductTypeQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productType" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "attributeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "100" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "isRequired" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputTipAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "NestedAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizableEnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "NestedAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizableEnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1905, source: { body: "query FetchProductTypeQuery($id: String!) {\n productType(id: $id) {\n name\n attributeDefinitions(limit: 100) {\n results {\n name\n isRequired\n inputHint\n inputTipAllLocales {\n value\n locale\n }\n labelAllLocales {\n value\n locale\n }\n type {\n name\n ... on SetAttributeDefinitionType {\n elementType {\n name\n ... on NestedAttributeDefinitionType {\n typeRef {\n id\n }\n }\n ... on EnumAttributeDefinitionType {\n values {\n results {\n key\n label\n }\n }\n }\n ... on LocalizableEnumAttributeDefinitionType {\n values {\n results {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n ... on ReferenceAttributeDefinitionType {\n referenceTypeId\n }\n }\n }\n ... on ReferenceAttributeDefinitionType {\n referenceTypeId\n }\n ... on NestedAttributeDefinitionType {\n typeRef {\n id\n }\n }\n ... on EnumAttributeDefinitionType {\n values {\n results {\n key\n label\n }\n }\n }\n ... on LocalizableEnumAttributeDefinitionType {\n values {\n results {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
6695
6690
|
const mapAttributeDefinition = definition => {
|
|
6696
6691
|
var _context, _definition$type, _context2, _context3, _definition$type2, _context4;
|
|
6697
|
-
return _objectSpread$
|
|
6692
|
+
return _objectSpread$O(_objectSpread$O({}, definition), {}, {
|
|
6698
6693
|
required: definition.isRequired,
|
|
6699
6694
|
inputTip: l10n.transformLocalizedFieldToLocalizedString(definition.inputTipAllLocales),
|
|
6700
6695
|
label: l10n.transformLocalizedFieldToLocalizedString(definition.labelAllLocales),
|
|
6701
|
-
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, (_definition$type = definition.type) === null || _definition$type === void 0 || (_definition$type = _definition$type.elementType) === null || _definition$type === void 0 ? void 0 : _definition$type.name) ? _objectSpread$
|
|
6702
|
-
elementType: _objectSpread$
|
|
6696
|
+
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, (_definition$type = definition.type) === null || _definition$type === void 0 || (_definition$type = _definition$type.elementType) === null || _definition$type === void 0 ? void 0 : _definition$type.name) ? _objectSpread$O(_objectSpread$O({}, definition.type), {}, {
|
|
6697
|
+
elementType: _objectSpread$O(_objectSpread$O({}, definition.type.elementType), {}, {
|
|
6703
6698
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](definition.type.elementType).results).call(_context2, value => ({
|
|
6704
6699
|
key: value.key,
|
|
6705
6700
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
6706
6701
|
}))
|
|
6707
6702
|
})
|
|
6708
|
-
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, (_definition$type2 = definition.type) === null || _definition$type2 === void 0 ? void 0 : _definition$type2.name) ? _objectSpread$
|
|
6703
|
+
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, (_definition$type2 = definition.type) === null || _definition$type2 === void 0 ? void 0 : _definition$type2.name) ? _objectSpread$O(_objectSpread$O({}, definition.type), {}, {
|
|
6709
6704
|
values: _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](definition.type).results).call(_context4, value => ({
|
|
6710
6705
|
key: value.key,
|
|
6711
6706
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -6826,8 +6821,8 @@ var messages$x = reactIntl.defineMessages({
|
|
|
6826
6821
|
|
|
6827
6822
|
const NestingLevelContext = /*#__PURE__*/React.createContext(0);
|
|
6828
6823
|
|
|
6829
|
-
function ownKeys$
|
|
6830
|
-
function _objectSpread$
|
|
6824
|
+
function ownKeys$N(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6825
|
+
function _objectSpread$N(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$N(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$N(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6831
6826
|
const EditButton = props => {
|
|
6832
6827
|
const _useIntl = reactIntl.useIntl(),
|
|
6833
6828
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -6974,13 +6969,13 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
6974
6969
|
const valuesAsMap = nameValuePairsToMap(value);
|
|
6975
6970
|
const initialValues = omitUnknownValues(valuesAsMap, attributeDefinitionsAsMap);
|
|
6976
6971
|
const openNestedAttributesForm = () => {
|
|
6977
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
6972
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$N(_objectSpread$N({}, parentFormik.status), {}, {
|
|
6978
6973
|
hideSaveToolbar: true
|
|
6979
6974
|
}));
|
|
6980
6975
|
attributesForm.openModal();
|
|
6981
6976
|
};
|
|
6982
6977
|
const closeNestedAttributesForm = () => {
|
|
6983
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
6978
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$N(_objectSpread$N({}, parentFormik.status), {}, {
|
|
6984
6979
|
hideSaveToolbar: false
|
|
6985
6980
|
}));
|
|
6986
6981
|
attributesForm.closeModal();
|
|
@@ -7084,8 +7079,8 @@ const SetButtons = props => {
|
|
|
7084
7079
|
};
|
|
7085
7080
|
SetButtons.displayName = 'SetButtons';
|
|
7086
7081
|
|
|
7087
|
-
function ownKeys$
|
|
7088
|
-
function _objectSpread$
|
|
7082
|
+
function ownKeys$M(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7083
|
+
function _objectSpread$M(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$M(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$M(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7089
7084
|
const getDuplicateErrors = setValues => {
|
|
7090
7085
|
/* eslint-disable no-plusplus */
|
|
7091
7086
|
const result = [];
|
|
@@ -7142,7 +7137,7 @@ function CustomInputSet(props) {
|
|
|
7142
7137
|
touched = _useFormikContext.touched,
|
|
7143
7138
|
isSubmitting = _useFormikContext.isSubmitting,
|
|
7144
7139
|
dirty = _useFormikContext.dirty;
|
|
7145
|
-
const itemFieldDefinition = _objectSpread$
|
|
7140
|
+
const itemFieldDefinition = _objectSpread$M(_objectSpread$M({}, props.fieldDefinition), {}, {
|
|
7146
7141
|
type: props.fieldDefinition.type.elementType
|
|
7147
7142
|
});
|
|
7148
7143
|
const value = React.useMemo(() => props.value || [undefined], [props.value]);
|
|
@@ -7200,7 +7195,7 @@ function CustomInputSet(props) {
|
|
|
7200
7195
|
// TODO(pa3): I don't like this bool. Feels like decision should happen
|
|
7201
7196
|
// in <CustomFieldComponent /> where proper component for given field/attribute
|
|
7202
7197
|
// type is selected.
|
|
7203
|
-
const type = getType
|
|
7198
|
+
const type = getType(props.fieldDefinition);
|
|
7204
7199
|
const typeName = type === null || type === void 0 ? void 0 : type.name.toLowerCase();
|
|
7205
7200
|
const areButtonsTopAligned = _includesInstanceProperty__default["default"](_context2 = [CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.localizedenum, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.string, CUSTOM_FIELD_TYPES.text, CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.reference]).call(_context2, typeName);
|
|
7206
7201
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -7280,7 +7275,7 @@ const CustomFieldInput = /*#__PURE__*/React.memo(props => {
|
|
|
7280
7275
|
// Boolean is the only set element with peculiarities (i.e. way more
|
|
7281
7276
|
// convenient for user to work with it as with select input with three values:
|
|
7282
7277
|
// [true], [false] and [true, false]).
|
|
7283
|
-
if (((_getSetElementType = getType
|
|
7278
|
+
if (((_getSetElementType = getType(props.fieldDefinition)) === null || _getSetElementType === void 0 ? void 0 : _getSetElementType.name.toLowerCase()) === CUSTOM_FIELD_TYPES.boolean) {
|
|
7284
7279
|
return CustomBooleanInputSet;
|
|
7285
7280
|
}
|
|
7286
7281
|
// All the rest sets are just a fancy wrapper around single-item components
|
|
@@ -7310,10 +7305,10 @@ var messages$w = reactIntl.defineMessages({
|
|
|
7310
7305
|
}
|
|
7311
7306
|
});
|
|
7312
7307
|
|
|
7313
|
-
function ownKeys$
|
|
7314
|
-
function _objectSpread$
|
|
7308
|
+
function ownKeys$L(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7309
|
+
function _objectSpread$L(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$L(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$L(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7315
7310
|
function ProductTypeReference(props) {
|
|
7316
|
-
const productTypeMessage = _objectSpread$
|
|
7311
|
+
const productTypeMessage = _objectSpread$L(_objectSpread$L({}, messages$w.referencedProductType), {}, {
|
|
7317
7312
|
values: {
|
|
7318
7313
|
productTypeName: props.productType.name
|
|
7319
7314
|
}
|
|
@@ -7359,9 +7354,9 @@ function CustomNestedFieldInput(props) {
|
|
|
7359
7354
|
}
|
|
7360
7355
|
CustomNestedFieldInput.displayName = 'CustomNestedFieldInput';
|
|
7361
7356
|
|
|
7362
|
-
function ownKeys$
|
|
7363
|
-
function _objectSpread$
|
|
7364
|
-
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$
|
|
7357
|
+
function ownKeys$K(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7358
|
+
function _objectSpread$K(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$K(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$K(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7359
|
+
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$K(_objectSpread$K({}, result), itemErrors), {});
|
|
7365
7360
|
|
|
7366
7361
|
// TODO(pa3): worth splitting in two components: one of set errors and one for
|
|
7367
7362
|
// all the other types of fields. So that there will be no isArray check.
|
|
@@ -7410,16 +7405,21 @@ var messages$v = reactIntl.defineMessages({
|
|
|
7410
7405
|
id: 'cartDiscountMoreThan500',
|
|
7411
7406
|
description: 'Cart discounts must be selected by exact match of name, ID or key.',
|
|
7412
7407
|
defaultMessage: 'Cart discounts must be selected by exact match of name, ID or key.'
|
|
7408
|
+
},
|
|
7409
|
+
attributeGroupCountTooltip: {
|
|
7410
|
+
id: 'CustomFieldsLabel.attributeGroupCountTooltip',
|
|
7411
|
+
description: 'Tooltip message to display when the same attribute is assigned to multiple attribute groups',
|
|
7412
|
+
defaultMessage: 'Synced with {count} Attribute groups: {attributeGroups}'
|
|
7413
7413
|
}
|
|
7414
7414
|
});
|
|
7415
7415
|
|
|
7416
|
-
function ownKeys$
|
|
7417
|
-
function _objectSpread$
|
|
7416
|
+
function ownKeys$J(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7417
|
+
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$J(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$J(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7418
7418
|
var CartDiscountsCount = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "CartDiscountsCount" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 61, source: { body: "query CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
7419
|
-
const CustomFieldsLabelHint =
|
|
7419
|
+
const CustomFieldsLabelHint = _ref2 => {
|
|
7420
7420
|
var _type$name;
|
|
7421
|
-
let fieldDefinition =
|
|
7422
|
-
const type = getType
|
|
7421
|
+
let fieldDefinition = _ref2.fieldDefinition;
|
|
7422
|
+
const type = getType(fieldDefinition);
|
|
7423
7423
|
const isReference = ((_type$name = type.name) === null || _type$name === void 0 ? void 0 : _type$name.toLowerCase()) === 'reference';
|
|
7424
7424
|
const referenceTypeId = type.referenceTypeId;
|
|
7425
7425
|
const isCartDiscountsReference = isReference && referenceTypeId === SEARCHABLE_REFERENCES.cartDiscount;
|
|
@@ -7444,7 +7444,7 @@ const CustomFieldsLabelHint = _ref => {
|
|
|
7444
7444
|
children: [jsxRuntime.jsx(uiKit.WarningIcon, {
|
|
7445
7445
|
size: "medium",
|
|
7446
7446
|
color: "warning"
|
|
7447
|
-
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
7447
|
+
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$J({}, messages$v.cartDiscountMoreThan500))]
|
|
7448
7448
|
});
|
|
7449
7449
|
}
|
|
7450
7450
|
return l10n.formatLocalizedString(fieldDefinition, {
|
|
@@ -7464,12 +7464,12 @@ function CustomFieldsProductTypeReferenceSubtitle() {
|
|
|
7464
7464
|
|
|
7465
7465
|
// TODO(pa3): this logic may be misplaced and probably
|
|
7466
7466
|
// should belong to <CustomReferenceInput /> component instead.
|
|
7467
|
-
function CustomFieldsLabelSubtitle(
|
|
7467
|
+
function CustomFieldsLabelSubtitle(_ref3) {
|
|
7468
7468
|
var _type$name2, _context;
|
|
7469
|
-
let fieldDefinition =
|
|
7469
|
+
let fieldDefinition = _ref3.fieldDefinition;
|
|
7470
7470
|
const _useIntl2 = reactIntl.useIntl(),
|
|
7471
7471
|
formatMessage = _useIntl2.formatMessage;
|
|
7472
|
-
const type = getType
|
|
7472
|
+
const type = getType(fieldDefinition);
|
|
7473
7473
|
const isReference = ((_type$name2 = type.name) === null || _type$name2 === void 0 ? void 0 : _type$name2.toLowerCase()) === 'reference';
|
|
7474
7474
|
if (!isReference) return null;
|
|
7475
7475
|
const referenceTypeId = type.referenceTypeId;
|
|
@@ -7477,9 +7477,37 @@ function CustomFieldsLabelSubtitle(_ref2) {
|
|
|
7477
7477
|
if (_includesInstanceProperty__default["default"](_context = [SEARCHABLE_REFERENCES.category, SEARCHABLE_REFERENCES.cartDiscount]).call(_context, referenceTypeId)) return referenceTypeName;
|
|
7478
7478
|
return referenceTypeId === SEARCHABLE_REFERENCES.product ? formatMessage(messages$v.productReferenceLabel) : referenceTypeId === SEARCHABLE_REFERENCES.productType ? jsxRuntime.jsx(CustomFieldsProductTypeReferenceSubtitle, {}) : referenceTypeId === SEARCHABLE_REFERENCES.channel ? formatMessage(messages$v.channelReferenceLabel) : referenceTypeId === SEARCHABLE_REFERENCES.state ? formatMessage(messages$v.stateReferenceLabel) : "".concat(referenceTypeName, " ID");
|
|
7479
7479
|
}
|
|
7480
|
-
const
|
|
7481
|
-
|
|
7482
|
-
|
|
7480
|
+
const Portal = props => /*#__PURE__*/ReactDOM__default["default"].createPortal(props.children, document.body);
|
|
7481
|
+
var _ref = {
|
|
7482
|
+
name: "ar8y70",
|
|
7483
|
+
styles: "cursor:pointer;line-height:normal"
|
|
7484
|
+
} ;
|
|
7485
|
+
function CustomFieldsCountIndicator(_ref4) {
|
|
7486
|
+
let assignedAttributeGroups = _ref4.assignedAttributeGroups;
|
|
7487
|
+
const formatLocalizedField = useFormatLocalizedFieldToString();
|
|
7488
|
+
const _useIntl3 = reactIntl.useIntl(),
|
|
7489
|
+
formatMessage = _useIntl3.formatMessage;
|
|
7490
|
+
return (assignedAttributeGroups === null || assignedAttributeGroups === void 0 ? void 0 : assignedAttributeGroups.length) > 1 ? jsxRuntime.jsx(uiKit.Tooltip, {
|
|
7491
|
+
title: formatMessage(messages$v.attributeGroupCountTooltip, {
|
|
7492
|
+
attributeGroups: _mapInstanceProperty__default["default"](assignedAttributeGroups).call(assignedAttributeGroups, assignedAttributeGroup => formatLocalizedField(assignedAttributeGroup.nameAllLocales)).join(', '),
|
|
7493
|
+
count: assignedAttributeGroups.length
|
|
7494
|
+
}),
|
|
7495
|
+
horizontalConstraint: 7,
|
|
7496
|
+
components: {
|
|
7497
|
+
TooltipWrapperComponent: Portal
|
|
7498
|
+
},
|
|
7499
|
+
children: jsxRuntime.jsx("div", {
|
|
7500
|
+
css: _ref,
|
|
7501
|
+
children: jsxRuntime.jsx(uiKit.SwitcherIcon, {
|
|
7502
|
+
color: "info",
|
|
7503
|
+
size: "medium"
|
|
7504
|
+
})
|
|
7505
|
+
})
|
|
7506
|
+
}) : null;
|
|
7507
|
+
}
|
|
7508
|
+
const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref5 => {
|
|
7509
|
+
let name = _ref5.name,
|
|
7510
|
+
fieldDefinition = _ref5.fieldDefinition;
|
|
7483
7511
|
const _useApplicationContex2 = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
7484
7512
|
languages: applicationContext.project.languages,
|
|
7485
7513
|
language: applicationContext.dataLocale
|
|
@@ -7488,11 +7516,22 @@ const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref3 => {
|
|
|
7488
7516
|
language = _useApplicationContex2.language;
|
|
7489
7517
|
return jsxRuntime.jsx(uiKit.FieldLabel, {
|
|
7490
7518
|
htmlFor: name,
|
|
7491
|
-
title:
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7519
|
+
title: jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
7520
|
+
max: "scale",
|
|
7521
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
7522
|
+
scale: "s",
|
|
7523
|
+
alignItems: "flex-end",
|
|
7524
|
+
children: [jsxRuntime.jsx("div", {
|
|
7525
|
+
children: l10n.formatLocalizedString(fieldDefinition, {
|
|
7526
|
+
key: 'label',
|
|
7527
|
+
locale: language,
|
|
7528
|
+
fallbackOrder: languages,
|
|
7529
|
+
fallback: fieldDefinition.name
|
|
7530
|
+
})
|
|
7531
|
+
}), jsxRuntime.jsx(CustomFieldsCountIndicator, {
|
|
7532
|
+
assignedAttributeGroups: fieldDefinition.assignedAttributeGroups
|
|
7533
|
+
})]
|
|
7534
|
+
})
|
|
7496
7535
|
}),
|
|
7497
7536
|
description: jsxRuntime.jsx(CustomFieldsLabelSubtitle, {
|
|
7498
7537
|
fieldDefinition: fieldDefinition
|
|
@@ -7546,37 +7585,44 @@ const CustomFieldsInternal = props => {
|
|
|
7546
7585
|
return jsxRuntime.jsx(formik.FastField, {
|
|
7547
7586
|
name: fieldName,
|
|
7548
7587
|
validate: validate,
|
|
7549
|
-
children: () =>
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
name: fieldName,
|
|
7553
|
-
fieldDefinition: fieldDefinition
|
|
7554
|
-
}), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
7588
|
+
children: () => {
|
|
7589
|
+
var _context3;
|
|
7590
|
+
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
7555
7591
|
scale: "xs",
|
|
7556
|
-
|
|
7557
|
-
children: [isNested(fieldDefinition) ? jsxRuntime.jsx(CustomNestedFieldInput, {
|
|
7558
|
-
name: fieldName,
|
|
7559
|
-
value: value,
|
|
7560
|
-
fieldDefinition: fieldDefinition,
|
|
7561
|
-
isDisabled: props.isDisabled,
|
|
7562
|
-
isReadOnly: props.isReadOnly,
|
|
7563
|
-
onBlur: handleBlur,
|
|
7564
|
-
setFieldValue: props.setFieldValue
|
|
7565
|
-
}) : jsxRuntime.jsx(CustomFieldInput, {
|
|
7592
|
+
children: [jsxRuntime.jsx(CustomFieldsLabel, {
|
|
7566
7593
|
name: fieldName,
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7594
|
+
fieldDefinition: fieldDefinition
|
|
7595
|
+
}), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
7596
|
+
scale: "xs",
|
|
7597
|
+
alignItems: "stretch",
|
|
7598
|
+
children: [isNested(fieldDefinition) ? jsxRuntime.jsx(CustomNestedFieldInput, {
|
|
7599
|
+
name: fieldName,
|
|
7600
|
+
value: value,
|
|
7601
|
+
fieldDefinition: fieldDefinition,
|
|
7602
|
+
isDisabled: props.isDisabled,
|
|
7603
|
+
isReadOnly: props.isReadOnly,
|
|
7604
|
+
onBlur: handleBlur,
|
|
7605
|
+
setFieldValue: props.setFieldValue
|
|
7606
|
+
}) : jsxRuntime.jsx("div", {
|
|
7607
|
+
"aria-invalid": _Object$keys__default["default"](fieldErrors !== null && fieldErrors !== void 0 ? fieldErrors : {}).length > 0,
|
|
7608
|
+
"aria-errormessage": "".concat(fieldName, "-error"),
|
|
7609
|
+
children: jsxRuntime.jsx(CustomFieldInput, {
|
|
7610
|
+
name: fieldName,
|
|
7611
|
+
value: value,
|
|
7612
|
+
fieldDefinition: fieldDefinition,
|
|
7613
|
+
isDisabled: props.isDisabled,
|
|
7614
|
+
isReadOnly: props.isReadOnly,
|
|
7615
|
+
onBlur: handleBlur,
|
|
7616
|
+
setFieldValue: props.setFieldValue,
|
|
7617
|
+
hasError: hasError
|
|
7618
|
+
})
|
|
7619
|
+
}, _concatInstanceProperty__default["default"](_context3 = "".concat(fieldName, "-")).call(_context3, index)), jsxRuntime.jsx(CustomFieldErrors, {
|
|
7620
|
+
isTouched: isTouched,
|
|
7621
|
+
errors: fieldErrors
|
|
7622
|
+
})]
|
|
7577
7623
|
})]
|
|
7578
|
-
})
|
|
7579
|
-
}
|
|
7624
|
+
});
|
|
7625
|
+
}
|
|
7580
7626
|
}, _concatInstanceProperty__default["default"](_context2 = "".concat(fieldName, "-")).call(_context2, index));
|
|
7581
7627
|
})
|
|
7582
7628
|
});
|
|
@@ -7630,23 +7676,23 @@ var pickerMessages = reactIntl.defineMessages({
|
|
|
7630
7676
|
}
|
|
7631
7677
|
});
|
|
7632
7678
|
|
|
7633
|
-
function ownKeys$
|
|
7634
|
-
function _objectSpread$
|
|
7635
|
-
const
|
|
7636
|
-
INCLUSION: '
|
|
7637
|
-
EXCLUSION: '
|
|
7679
|
+
function ownKeys$I(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7680
|
+
function _objectSpread$I(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$I(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$I(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7681
|
+
const PRODUCT_SELECTION_MODES = {
|
|
7682
|
+
INCLUSION: 'Individual',
|
|
7683
|
+
EXCLUSION: 'IndividualExclusion'
|
|
7638
7684
|
};
|
|
7639
|
-
const
|
|
7685
|
+
const PRODUCT_SELECTION_MODES_LABELS = {
|
|
7640
7686
|
INCLUSION: 'inclusion',
|
|
7641
7687
|
EXCLUSION: 'exclusion'
|
|
7642
7688
|
};
|
|
7643
|
-
const
|
|
7644
|
-
const
|
|
7689
|
+
const getMode = mode => mode === PRODUCT_SELECTION_MODES.INCLUSION || mode === PRODUCT_SELECTION_MODES_LABELS.INCLUSION ? 'inclusion' : 'exclusion';
|
|
7690
|
+
const addModeToLabel = function (ps) {
|
|
7645
7691
|
var _context;
|
|
7646
7692
|
let enableExcludingProducts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
7647
7693
|
if (!ps) return undefined;
|
|
7648
|
-
return _objectSpread$
|
|
7649
|
-
label: _concatInstanceProperty__default["default"](_context = "".concat(ps === null || ps === void 0 ? void 0 : ps.label)).call(_context, enableExcludingProducts ? " (type: ".concat(
|
|
7694
|
+
return _objectSpread$I(_objectSpread$I({}, ps), {}, {
|
|
7695
|
+
label: _concatInstanceProperty__default["default"](_context = "".concat(ps === null || ps === void 0 ? void 0 : ps.label)).call(_context, enableExcludingProducts ? " (type: ".concat(getMode(ps === null || ps === void 0 ? void 0 : ps.mode), ")") : '')
|
|
7650
7696
|
});
|
|
7651
7697
|
};
|
|
7652
7698
|
|
|
@@ -7667,9 +7713,9 @@ const mapProductSelectionsToOptions$1 = memoize__default["default"](function ()
|
|
|
7667
7713
|
return {
|
|
7668
7714
|
id: productSelection.id,
|
|
7669
7715
|
value: productSelection.id,
|
|
7670
|
-
label: _concatInstanceProperty__default["default"](_context = "".concat(label)).call(_context, _includesInstanceProperty__default["default"](selectedPSList).call(selectedPSList, productSelection.id) && enableExcludingProducts ? " (type: ".concat(
|
|
7716
|
+
label: _concatInstanceProperty__default["default"](_context = "".concat(label)).call(_context, _includesInstanceProperty__default["default"](selectedPSList).call(selectedPSList, productSelection.id) && enableExcludingProducts ? " (type: ".concat(getMode(productSelection.mode), ")") : ''),
|
|
7671
7717
|
key: productSelection.key,
|
|
7672
|
-
|
|
7718
|
+
mode: getMode(productSelection.mode)
|
|
7673
7719
|
};
|
|
7674
7720
|
});
|
|
7675
7721
|
});
|
|
@@ -7739,11 +7785,11 @@ const getValueFromOptions$3 = _ref => {
|
|
|
7739
7785
|
// handle async-select-field value transformation
|
|
7740
7786
|
if (isMulti) {
|
|
7741
7787
|
var _context;
|
|
7742
|
-
return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](allProductSelectionOptions).call(allProductSelectionOptions, ps => currentlySelectedProductSelections === null || currentlySelectedProductSelections === void 0 ? void 0 : _includesInstanceProperty__default["default"](currentlySelectedProductSelections).call(currentlySelectedProductSelections, ps.value))).call(_context, ps =>
|
|
7788
|
+
return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](allProductSelectionOptions).call(allProductSelectionOptions, ps => currentlySelectedProductSelections === null || currentlySelectedProductSelections === void 0 ? void 0 : _includesInstanceProperty__default["default"](currentlySelectedProductSelections).call(currentlySelectedProductSelections, ps.value))).call(_context, ps => addModeToLabel(ps, enableExcludingProducts));
|
|
7743
7789
|
}
|
|
7744
7790
|
|
|
7745
7791
|
// in case it is not multiselect, then a single valued async-select-input is being requested and the value should have proper format
|
|
7746
|
-
return
|
|
7792
|
+
return addModeToLabel(_findInstanceProperty__default["default"](allProductSelectionOptions).call(allProductSelectionOptions, ps => currentlySelectedProductSelections === ps.value), enableExcludingProducts);
|
|
7747
7793
|
};
|
|
7748
7794
|
const emptyStoreOption$1 = intl => [{
|
|
7749
7795
|
label: intl.formatMessage(pickerMessages.asyncSelectDropdownTypeAheadPrompt),
|
|
@@ -7790,7 +7836,7 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
7790
7836
|
value: productSelection.id,
|
|
7791
7837
|
name: localizedName,
|
|
7792
7838
|
key: productSelection.key,
|
|
7793
|
-
|
|
7839
|
+
mode: getMode(productSelection.mode)
|
|
7794
7840
|
};
|
|
7795
7841
|
});
|
|
7796
7842
|
}, [dataLocale, projectLanguages, filteredProductSelections]);
|
|
@@ -7845,7 +7891,7 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
7845
7891
|
});
|
|
7846
7892
|
}
|
|
7847
7893
|
|
|
7848
|
-
var ProductSelectionsPickerFetcher$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "ProductSelectionsPickerFetcher" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "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: "
|
|
7894
|
+
var ProductSelectionsPickerFetcher$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "ProductSelectionsPickerFetcher" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "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: "mode" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 223, source: { body: "query ProductSelectionsPickerFetcher($where: String!) {\n productSelections(where: $where) {\n results {\n id\n key\n version\n nameAllLocales {\n locale\n value\n }\n mode\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
7849
7895
|
const createQueryVariables$4 = (productSelections, predicateField) => {
|
|
7850
7896
|
var _context;
|
|
7851
7897
|
return {
|
|
@@ -7869,7 +7915,7 @@ const useProductSelectionsByFieldFetcher = (productSelections, predicateField) =
|
|
|
7869
7915
|
};
|
|
7870
7916
|
};
|
|
7871
7917
|
|
|
7872
|
-
var ProductSelectionsPickerFetcher = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "ProductSelectionsPickerFetcher" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "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: "
|
|
7918
|
+
var ProductSelectionsPickerFetcher = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "ProductSelectionsPickerFetcher" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "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: "mode" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 223, source: { body: "query ProductSelectionsPickerFetcher($where: String!) {\n productSelections(where: $where) {\n results {\n id\n key\n version\n nameAllLocales {\n locale\n value\n }\n mode\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
7873
7919
|
const mapProductSelectionsToOptions = memoize__default["default"](_ref => {
|
|
7874
7920
|
let _ref$productSelection = _ref.productSelections,
|
|
7875
7921
|
productSelections = _ref$productSelection === void 0 ? [] : _ref$productSelection,
|
|
@@ -7884,7 +7930,7 @@ const mapProductSelectionsToOptions = memoize__default["default"](_ref => {
|
|
|
7884
7930
|
fallbackOrder: projectLanguages
|
|
7885
7931
|
}),
|
|
7886
7932
|
key: productSelection.key,
|
|
7887
|
-
|
|
7933
|
+
mode: getMode(productSelection.mode)
|
|
7888
7934
|
}));
|
|
7889
7935
|
});
|
|
7890
7936
|
const getValueFromOptions$2 = _ref2 => {
|
|
@@ -7896,10 +7942,10 @@ const getValueFromOptions$2 = _ref2 => {
|
|
|
7896
7942
|
return undefined;
|
|
7897
7943
|
}
|
|
7898
7944
|
if (isMulti) {
|
|
7899
|
-
return _mapInstanceProperty__default["default"](productSelectionFieldOptions).call(productSelectionFieldOptions, ps =>
|
|
7945
|
+
return _mapInstanceProperty__default["default"](productSelectionFieldOptions).call(productSelectionFieldOptions, ps => addModeToLabel(ps, enableExcludingProducts));
|
|
7900
7946
|
}
|
|
7901
7947
|
// if the input is not multiselect, the AsyncSearchSelect is expecting an object rather than array
|
|
7902
|
-
return
|
|
7948
|
+
return addModeToLabel(productSelectionFieldOptions[0], enableExcludingProducts);
|
|
7903
7949
|
};
|
|
7904
7950
|
const createQueryVariables$3 = _ref3 => {
|
|
7905
7951
|
var _context;
|
|
@@ -7996,12 +8042,12 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
7996
8042
|
});
|
|
7997
8043
|
}
|
|
7998
8044
|
|
|
7999
|
-
function ownKeys$
|
|
8000
|
-
function _objectSpread$
|
|
8001
|
-
function
|
|
8045
|
+
function ownKeys$H(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8046
|
+
function _objectSpread$H(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$H(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$H(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8047
|
+
function ModeSelectInputOption(props) {
|
|
8002
8048
|
const data = props.data;
|
|
8003
8049
|
const noValueFallback = props.noValueFallback || constants.NO_VALUE_FALLBACK;
|
|
8004
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8050
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$H(_objectSpread$H({}, props), {}, {
|
|
8005
8051
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
8006
8052
|
scale: "xs",
|
|
8007
8053
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -8010,24 +8056,24 @@ function TypeSelectInputOption(props) {
|
|
|
8010
8056
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
8011
8057
|
children: ["Key: ", (data === null || data === void 0 ? void 0 : data.key) || noValueFallback]
|
|
8012
8058
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
8013
|
-
children: ["Type: ", (data === null || data === void 0 ? void 0 : data.
|
|
8059
|
+
children: ["Type: ", (data === null || data === void 0 ? void 0 : data.mode) || noValueFallback]
|
|
8014
8060
|
})]
|
|
8015
8061
|
})
|
|
8016
8062
|
}));
|
|
8017
8063
|
}
|
|
8018
8064
|
|
|
8019
|
-
function ownKeys$
|
|
8020
|
-
function _objectSpread$
|
|
8065
|
+
function ownKeys$G(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8066
|
+
function _objectSpread$G(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$G(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$G(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8021
8067
|
function ProductSelectionsPicker(props) {
|
|
8022
8068
|
const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher();
|
|
8023
8069
|
const components = React.useMemo(() => {
|
|
8024
8070
|
return {
|
|
8025
8071
|
Option: optionInnerProps => {
|
|
8026
8072
|
if (optionInnerProps.isDisabled) {
|
|
8027
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8073
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$G({}, optionInnerProps));
|
|
8028
8074
|
}
|
|
8029
8075
|
if (props.optionType === TYPE_PROPERTY) {
|
|
8030
|
-
return jsxRuntime.jsx(
|
|
8076
|
+
return jsxRuntime.jsx(ModeSelectInputOption, _objectSpread$G({}, optionInnerProps));
|
|
8031
8077
|
}
|
|
8032
8078
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8033
8079
|
optionType: props.optionType,
|
|
@@ -8039,7 +8085,7 @@ function ProductSelectionsPicker(props) {
|
|
|
8039
8085
|
if (productSelectionsTotalFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8040
8086
|
const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= props.lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= props.upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
|
|
8041
8087
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8042
|
-
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$
|
|
8088
|
+
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$G(_objectSpread$G({}, props), {}, {
|
|
8043
8089
|
components: components
|
|
8044
8090
|
}))
|
|
8045
8091
|
});
|
|
@@ -8100,8 +8146,8 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
8100
8146
|
});
|
|
8101
8147
|
}
|
|
8102
8148
|
|
|
8103
|
-
function ownKeys$
|
|
8104
|
-
function _objectSpread$
|
|
8149
|
+
function ownKeys$F(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8150
|
+
function _objectSpread$F(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$F(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$F(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8105
8151
|
const emptyCountryOption = intl => [{
|
|
8106
8152
|
label: intl.formatMessage(messages$u.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
8107
8153
|
value: undefined,
|
|
@@ -8128,7 +8174,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8128
8174
|
const onOptionChange = event => {
|
|
8129
8175
|
const countries = event.target.value;
|
|
8130
8176
|
props.onChange({
|
|
8131
|
-
target: _objectSpread$
|
|
8177
|
+
target: _objectSpread$F(_objectSpread$F({}, event.target), {}, {
|
|
8132
8178
|
value: _mapInstanceProperty__default["default"](countries).call(countries, country => {
|
|
8133
8179
|
var _country$value;
|
|
8134
8180
|
return (_country$value = country === null || country === void 0 ? void 0 : country.value) !== null && _country$value !== void 0 ? _country$value : country;
|
|
@@ -8159,13 +8205,13 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8159
8205
|
});
|
|
8160
8206
|
}
|
|
8161
8207
|
|
|
8162
|
-
function ownKeys$
|
|
8163
|
-
function _objectSpread$
|
|
8208
|
+
function ownKeys$E(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8209
|
+
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$E(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$E(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8164
8210
|
function CountriesPicker(props) {
|
|
8165
8211
|
var _props$options;
|
|
8166
8212
|
const CustomCountriesPicker = ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.length) <= props.countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
|
|
8167
8213
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8168
|
-
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$
|
|
8214
|
+
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$E({}, props))
|
|
8169
8215
|
});
|
|
8170
8216
|
}
|
|
8171
8217
|
CountriesPicker.defaultProps = {
|
|
@@ -8385,8 +8431,8 @@ var messages$s = reactIntl.defineMessages({
|
|
|
8385
8431
|
}
|
|
8386
8432
|
});
|
|
8387
8433
|
|
|
8388
|
-
function ownKeys$
|
|
8389
|
-
function _objectSpread$
|
|
8434
|
+
function ownKeys$D(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8435
|
+
function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$D(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$D(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8390
8436
|
const hasErrors$2 = errors => {
|
|
8391
8437
|
var _context;
|
|
8392
8438
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8458,7 +8504,7 @@ const StoresAsyncSelectInput = props => {
|
|
|
8458
8504
|
};
|
|
8459
8505
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8460
8506
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8461
|
-
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$
|
|
8507
|
+
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$D(_objectSpread$D({
|
|
8462
8508
|
id: props.id,
|
|
8463
8509
|
name: props.name,
|
|
8464
8510
|
placeholder: intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
@@ -8501,8 +8547,8 @@ StoresAsyncSelectInput.defaultProps = {
|
|
|
8501
8547
|
shouldFetchProductSelections: false
|
|
8502
8548
|
};
|
|
8503
8549
|
|
|
8504
|
-
function ownKeys$
|
|
8505
|
-
function _objectSpread$
|
|
8550
|
+
function ownKeys$C(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8551
|
+
function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$C(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$C(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8506
8552
|
const hasErrors$1 = errors => {
|
|
8507
8553
|
var _context;
|
|
8508
8554
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8550,7 +8596,7 @@ const StoresBasicSelectInput = props => {
|
|
|
8550
8596
|
};
|
|
8551
8597
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8552
8598
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8553
|
-
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$
|
|
8599
|
+
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$C(_objectSpread$C({
|
|
8554
8600
|
id: props.id,
|
|
8555
8601
|
name: props.name,
|
|
8556
8602
|
placeholder: intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
@@ -8646,8 +8692,8 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
8646
8692
|
};
|
|
8647
8693
|
};
|
|
8648
8694
|
|
|
8649
|
-
function ownKeys$
|
|
8650
|
-
function _objectSpread$
|
|
8695
|
+
function ownKeys$B(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8696
|
+
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$B(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$B(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8651
8697
|
var FetchStoresByWherePredicate = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresByWherePredicate" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "storesByWherePredicate" }, name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelection" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 525, source: { body: "query FetchStoresByWherePredicate(\n $where: String!\n $skipFetchingStores: Boolean!\n $excludeProductSelections: Boolean!\n) {\n storesByWherePredicate: stores(where: $where) @skip(if: $skipFetchingStores) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n productSelections @skip(if: $excludeProductSelections) {\n active\n productSelection {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8652
8698
|
const hasErrors = errors => {
|
|
8653
8699
|
var _context;
|
|
@@ -8749,7 +8795,7 @@ const StoresSearchSelectInput = props => {
|
|
|
8749
8795
|
const loadOptionsDebounced = debounce__default["default"](handleLoadOptions, 500);
|
|
8750
8796
|
if (storesByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8751
8797
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8752
|
-
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$
|
|
8798
|
+
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$B(_objectSpread$B({
|
|
8753
8799
|
id: props.id,
|
|
8754
8800
|
name: props.name,
|
|
8755
8801
|
placeholder: intl.formatMessage(messages$s.searchSelectInputPlaceholder),
|
|
@@ -8798,8 +8844,8 @@ StoresSearchSelectInput.defaultProps = {
|
|
|
8798
8844
|
shouldFetchProductSelections: false
|
|
8799
8845
|
};
|
|
8800
8846
|
|
|
8801
|
-
function ownKeys$
|
|
8802
|
-
function _objectSpread$
|
|
8847
|
+
function ownKeys$A(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8848
|
+
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$A(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$A(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8803
8849
|
const StoreSelectInput = props => {
|
|
8804
8850
|
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher(props.projectKey);
|
|
8805
8851
|
const components = React.useMemo(() => {
|
|
@@ -8807,7 +8853,7 @@ const StoreSelectInput = props => {
|
|
|
8807
8853
|
// eslint-disable-next-line react/display-name
|
|
8808
8854
|
Option: optionInnerProps => {
|
|
8809
8855
|
if (optionInnerProps.isDisabled) {
|
|
8810
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8856
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$A({}, optionInnerProps));
|
|
8811
8857
|
}
|
|
8812
8858
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8813
8859
|
optionType: props.optionType,
|
|
@@ -8818,7 +8864,7 @@ const StoreSelectInput = props => {
|
|
|
8818
8864
|
}, [props.optionType]);
|
|
8819
8865
|
if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8820
8866
|
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput : StoresSearchSelectInput;
|
|
8821
|
-
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$
|
|
8867
|
+
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$A(_objectSpread$A({
|
|
8822
8868
|
projectKey: props.projectKey,
|
|
8823
8869
|
id: props.id,
|
|
8824
8870
|
name: props.name,
|
|
@@ -9373,10 +9419,10 @@ const RESOURCES_WITH_PLATFORM_LIMITS = {
|
|
|
9373
9419
|
carts: 'carts'
|
|
9374
9420
|
};
|
|
9375
9421
|
|
|
9376
|
-
function ownKeys$
|
|
9377
|
-
function _objectSpread$
|
|
9422
|
+
function ownKeys$z(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9423
|
+
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__default["default"](_context = ownKeys$z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$z(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9378
9424
|
const resourcesWithPlatformLimits = _Object$keys__default["default"](RESOURCES_WITH_PLATFORM_LIMITS);
|
|
9379
|
-
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$
|
|
9425
|
+
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$z({
|
|
9380
9426
|
[camelCase__default["default"]("should include ".concat(nextNameOfLimit))]: platformLimit ? nextNameOfLimit === platformLimit : true
|
|
9381
9427
|
}, previousIncludedLimits), {});
|
|
9382
9428
|
|
|
@@ -9466,8 +9512,8 @@ var messages$n = reactIntl.defineMessages({
|
|
|
9466
9512
|
}
|
|
9467
9513
|
});
|
|
9468
9514
|
|
|
9469
|
-
function ownKeys$
|
|
9470
|
-
function _objectSpread$
|
|
9515
|
+
function ownKeys$y(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9516
|
+
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__default["default"](_context = ownKeys$y(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$y(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9471
9517
|
const getCustomerSupportLink$1 = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
9472
9518
|
isExternal: true,
|
|
9473
9519
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -9478,7 +9524,7 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
9478
9524
|
limit = _ref.limit;
|
|
9479
9525
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9480
9526
|
type: "warning",
|
|
9481
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9527
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$y(_objectSpread$y({}, messages$n[resource]), {}, {
|
|
9482
9528
|
values: {
|
|
9483
9529
|
limit,
|
|
9484
9530
|
customersupport: getCustomerSupportLink$1
|
|
@@ -9519,8 +9565,8 @@ var messages$m = reactIntl.defineMessages({
|
|
|
9519
9565
|
}
|
|
9520
9566
|
});
|
|
9521
9567
|
|
|
9522
|
-
function ownKeys$
|
|
9523
|
-
function _objectSpread$
|
|
9568
|
+
function ownKeys$x(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9569
|
+
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__default["default"](_context = ownKeys$x(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$x(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9524
9570
|
const getCustomerSupportLink = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
9525
9571
|
isExternal: true,
|
|
9526
9572
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -9531,7 +9577,7 @@ const PlatformLimitErrorNotification = _ref => {
|
|
|
9531
9577
|
limit = _ref.limit;
|
|
9532
9578
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9533
9579
|
type: "error",
|
|
9534
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9580
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$x(_objectSpread$x({}, messages$m[resource]), {}, {
|
|
9535
9581
|
values: {
|
|
9536
9582
|
limit,
|
|
9537
9583
|
customersupport: getCustomerSupportLink
|
|
@@ -9549,8 +9595,8 @@ const Notifications = {
|
|
|
9549
9595
|
Error: PlatformLimitErrorNotification
|
|
9550
9596
|
};
|
|
9551
9597
|
|
|
9552
|
-
function ownKeys$
|
|
9553
|
-
function _objectSpread$
|
|
9598
|
+
function ownKeys$w(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9599
|
+
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__default["default"](_context = ownKeys$w(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$w(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9554
9600
|
const PlatformLimitsStatusText = _ref => {
|
|
9555
9601
|
let intlMessage = _ref.intlMessage,
|
|
9556
9602
|
children = _ref.children;
|
|
@@ -9559,7 +9605,7 @@ const PlatformLimitsStatusText = _ref => {
|
|
|
9559
9605
|
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
9560
9606
|
size: "xs",
|
|
9561
9607
|
children: [jsxRuntime.jsx("span", {
|
|
9562
|
-
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9608
|
+
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$w({}, intlMessage))
|
|
9563
9609
|
}), jsxRuntime.jsx("span", {
|
|
9564
9610
|
children: children
|
|
9565
9611
|
})]
|
|
@@ -9668,11 +9714,11 @@ var messages$l = reactIntl.defineMessages({
|
|
|
9668
9714
|
}
|
|
9669
9715
|
});
|
|
9670
9716
|
|
|
9671
|
-
function ownKeys$
|
|
9672
|
-
function _objectSpread$
|
|
9717
|
+
function ownKeys$v(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9718
|
+
function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$v(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$v(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9673
9719
|
const PlatformLimitsShippingMethodsTooltip = props => {
|
|
9674
9720
|
const intl = reactIntl.useIntl();
|
|
9675
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
9721
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$v(_objectSpread$v({}, props), {}, {
|
|
9676
9722
|
title: intl.formatMessage(messages$l.shippingMethodsPlatformLimitReached)
|
|
9677
9723
|
}));
|
|
9678
9724
|
};
|
|
@@ -9726,15 +9772,15 @@ const useShippingMethodsLimits = () => {
|
|
|
9726
9772
|
};
|
|
9727
9773
|
};
|
|
9728
9774
|
|
|
9729
|
-
function ownKeys$
|
|
9730
|
-
function _objectSpread$
|
|
9775
|
+
function ownKeys$u(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9776
|
+
function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$u(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$u(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9731
9777
|
const injectShippingMethodsPlatformLimits = () => WrappedComponent => {
|
|
9732
9778
|
const WithShippingMethodsPlatformLimits = props => {
|
|
9733
9779
|
const shippingMethodsPlatformLimits = useShippingMethodsLimits();
|
|
9734
9780
|
const shippingMethodsProps = {
|
|
9735
9781
|
platformLimits: shippingMethodsPlatformLimits
|
|
9736
9782
|
};
|
|
9737
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
9783
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$u(_objectSpread$u({}, props), shippingMethodsProps));
|
|
9738
9784
|
};
|
|
9739
9785
|
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
9740
9786
|
return WithShippingMethodsPlatformLimits;
|
|
@@ -9815,11 +9861,11 @@ var messages$j = reactIntl.defineMessages({
|
|
|
9815
9861
|
}
|
|
9816
9862
|
});
|
|
9817
9863
|
|
|
9818
|
-
function ownKeys$
|
|
9819
|
-
function _objectSpread$
|
|
9864
|
+
function ownKeys$t(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9865
|
+
function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$t(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$t(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9820
9866
|
const PlatformLimitsTaxCategoriesTooltip = props => {
|
|
9821
9867
|
const intl = reactIntl.useIntl();
|
|
9822
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
9868
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
9823
9869
|
title: intl.formatMessage(messages$j.taxCategoriesPlatformLimitReached)
|
|
9824
9870
|
}));
|
|
9825
9871
|
};
|
|
@@ -9873,15 +9919,15 @@ const useTaxCategoriesLimits = () => {
|
|
|
9873
9919
|
};
|
|
9874
9920
|
};
|
|
9875
9921
|
|
|
9876
|
-
function ownKeys$
|
|
9877
|
-
function _objectSpread$
|
|
9922
|
+
function ownKeys$s(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9923
|
+
function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$s(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$s(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9878
9924
|
const injectTaxCategoriesPlatformLimits = WrappedComponent => {
|
|
9879
9925
|
const WithTaxCategoriesPlatformLimits = props => {
|
|
9880
9926
|
const taxCategoriesPlatformLimits = useTaxCategoriesLimits();
|
|
9881
9927
|
const taxCategoriesProps = {
|
|
9882
9928
|
platformLimits: taxCategoriesPlatformLimits
|
|
9883
9929
|
};
|
|
9884
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
9930
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$s(_objectSpread$s({}, props), taxCategoriesProps));
|
|
9885
9931
|
};
|
|
9886
9932
|
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
9887
9933
|
return WithTaxCategoriesPlatformLimits;
|
|
@@ -9962,11 +10008,11 @@ var messages$h = reactIntl.defineMessages({
|
|
|
9962
10008
|
}
|
|
9963
10009
|
});
|
|
9964
10010
|
|
|
9965
|
-
function ownKeys$
|
|
9966
|
-
function _objectSpread$
|
|
10011
|
+
function ownKeys$r(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10012
|
+
function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$r(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$r(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9967
10013
|
const PlatformLimitsZonesTooltip = props => {
|
|
9968
10014
|
const intl = reactIntl.useIntl();
|
|
9969
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10015
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$r(_objectSpread$r({}, props), {}, {
|
|
9970
10016
|
title: intl.formatMessage(messages$h.zonesPlatformLimitReached)
|
|
9971
10017
|
}));
|
|
9972
10018
|
};
|
|
@@ -10020,15 +10066,15 @@ const useZonesLimits = () => {
|
|
|
10020
10066
|
};
|
|
10021
10067
|
};
|
|
10022
10068
|
|
|
10023
|
-
function ownKeys$
|
|
10024
|
-
function _objectSpread$
|
|
10069
|
+
function ownKeys$q(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10070
|
+
function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$q(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$q(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10025
10071
|
const injectZonesPlatformLimits = () => WrappedComponent => {
|
|
10026
10072
|
const WithZonesPlatformLimits = props => {
|
|
10027
10073
|
const zonesPlatformLimits = useZonesLimits();
|
|
10028
10074
|
const zonesProps = {
|
|
10029
10075
|
platformLimits: zonesPlatformLimits
|
|
10030
10076
|
};
|
|
10031
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10077
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$q(_objectSpread$q({}, props), zonesProps));
|
|
10032
10078
|
};
|
|
10033
10079
|
WithZonesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithZonesPlatformLimits');
|
|
10034
10080
|
return WithZonesPlatformLimits;
|
|
@@ -10122,11 +10168,11 @@ var messages$f = reactIntl.defineMessages({
|
|
|
10122
10168
|
}
|
|
10123
10169
|
});
|
|
10124
10170
|
|
|
10125
|
-
function ownKeys$
|
|
10126
|
-
function _objectSpread$
|
|
10171
|
+
function ownKeys$p(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10172
|
+
function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$p(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$p(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10127
10173
|
const PlatformLimitsCustomersTooltip = props => {
|
|
10128
10174
|
const intl = reactIntl.useIntl();
|
|
10129
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10175
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
10130
10176
|
title: intl.formatMessage(messages$f.customersPlatformLimitReached)
|
|
10131
10177
|
}));
|
|
10132
10178
|
};
|
|
@@ -10140,8 +10186,8 @@ var messages$e = reactIntl.defineMessages({
|
|
|
10140
10186
|
}
|
|
10141
10187
|
});
|
|
10142
10188
|
|
|
10143
|
-
function ownKeys$
|
|
10144
|
-
function _objectSpread$
|
|
10189
|
+
function ownKeys$o(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10190
|
+
function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$o(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$o(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10145
10191
|
var styles$b = {
|
|
10146
10192
|
"status": "platform-limits-customers-status-module__status___3rXYM"
|
|
10147
10193
|
};
|
|
@@ -10161,7 +10207,7 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
10161
10207
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
10162
10208
|
tone: "secondary",
|
|
10163
10209
|
isInline: true,
|
|
10164
|
-
intlMessage: _objectSpread$
|
|
10210
|
+
intlMessage: _objectSpread$o(_objectSpread$o({}, messages$e.customersStatus), {}, {
|
|
10165
10211
|
values: {
|
|
10166
10212
|
current: intl.formatNumber(current),
|
|
10167
10213
|
limit: intl.formatNumber(limit)
|
|
@@ -10185,10 +10231,10 @@ var messages$d = reactIntl.defineMessages({
|
|
|
10185
10231
|
}
|
|
10186
10232
|
});
|
|
10187
10233
|
|
|
10188
|
-
function ownKeys$
|
|
10189
|
-
function _objectSpread$
|
|
10234
|
+
function ownKeys$n(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10235
|
+
function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$n(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$n(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10190
10236
|
var LimitsReachedErrorGraphic$1 = function LimitsReachedErrorGraphic(props) {
|
|
10191
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
10237
|
+
return jsxRuntime.jsxs("svg", _objectSpread$n(_objectSpread$n({}, props), {}, {
|
|
10192
10238
|
children: [jsxRuntime.jsx("defs", {
|
|
10193
10239
|
children: jsxRuntime.jsx("path", {
|
|
10194
10240
|
id: "a",
|
|
@@ -10360,15 +10406,15 @@ const useCustomersPlatformLimits = () => {
|
|
|
10360
10406
|
};
|
|
10361
10407
|
};
|
|
10362
10408
|
|
|
10363
|
-
function ownKeys$
|
|
10364
|
-
function _objectSpread$
|
|
10409
|
+
function ownKeys$m(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10410
|
+
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$m(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$m(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10365
10411
|
const injectCustomersPlatformLimits = () => WrappedComponent => {
|
|
10366
10412
|
const WithCustomersPlatformLimits = props => {
|
|
10367
10413
|
const CustomersPlatformLimits = useCustomersPlatformLimits();
|
|
10368
10414
|
const customersProps = {
|
|
10369
10415
|
platformLimits: CustomersPlatformLimits
|
|
10370
10416
|
};
|
|
10371
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10417
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$m(_objectSpread$m({}, props), customersProps));
|
|
10372
10418
|
};
|
|
10373
10419
|
WithCustomersPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
10374
10420
|
return WithCustomersPlatformLimits;
|
|
@@ -10462,11 +10508,11 @@ var messages$c = reactIntl.defineMessages({
|
|
|
10462
10508
|
}
|
|
10463
10509
|
});
|
|
10464
10510
|
|
|
10465
|
-
function ownKeys$
|
|
10466
|
-
function _objectSpread$
|
|
10511
|
+
function ownKeys$l(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10512
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$l(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$l(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10467
10513
|
const PlatformLimitsCustomerGroupsTooltip = props => {
|
|
10468
10514
|
const intl = reactIntl.useIntl();
|
|
10469
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10515
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
10470
10516
|
title: intl.formatMessage(messages$c.customerGroupsPlatformLimitReached)
|
|
10471
10517
|
}));
|
|
10472
10518
|
};
|
|
@@ -10480,8 +10526,8 @@ var messages$b = reactIntl.defineMessages({
|
|
|
10480
10526
|
}
|
|
10481
10527
|
});
|
|
10482
10528
|
|
|
10483
|
-
function ownKeys$
|
|
10484
|
-
function _objectSpread$
|
|
10529
|
+
function ownKeys$k(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10530
|
+
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10485
10531
|
var styles$9 = {
|
|
10486
10532
|
"status": "platform-limits-customer-groups-status-module__status___6099G"
|
|
10487
10533
|
};
|
|
@@ -10501,7 +10547,7 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
10501
10547
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
10502
10548
|
tone: "secondary",
|
|
10503
10549
|
isInline: true,
|
|
10504
|
-
intlMessage: _objectSpread$
|
|
10550
|
+
intlMessage: _objectSpread$k(_objectSpread$k({}, messages$b.customerGroupsStatus), {}, {
|
|
10505
10551
|
values: {
|
|
10506
10552
|
current: intl.formatNumber(current),
|
|
10507
10553
|
limit: intl.formatNumber(limit)
|
|
@@ -10525,10 +10571,10 @@ var messages$a = reactIntl.defineMessages({
|
|
|
10525
10571
|
}
|
|
10526
10572
|
});
|
|
10527
10573
|
|
|
10528
|
-
function ownKeys$
|
|
10529
|
-
function _objectSpread$
|
|
10574
|
+
function ownKeys$j(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10575
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$j(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$j(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10530
10576
|
var LimitsReachedErrorGraphic = function LimitsReachedErrorGraphic(props) {
|
|
10531
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
10577
|
+
return jsxRuntime.jsxs("svg", _objectSpread$j(_objectSpread$j({}, props), {}, {
|
|
10532
10578
|
children: [jsxRuntime.jsx("defs", {
|
|
10533
10579
|
children: jsxRuntime.jsx("path", {
|
|
10534
10580
|
id: "a",
|
|
@@ -10700,15 +10746,15 @@ const useCustomerGroupsPlatformLimits = () => {
|
|
|
10700
10746
|
};
|
|
10701
10747
|
};
|
|
10702
10748
|
|
|
10703
|
-
function ownKeys$
|
|
10704
|
-
function _objectSpread$
|
|
10749
|
+
function ownKeys$i(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10750
|
+
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10705
10751
|
const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
|
|
10706
10752
|
const WithCustomerGroupsPlatformLimits = props => {
|
|
10707
10753
|
const CustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits();
|
|
10708
10754
|
const customersProps = {
|
|
10709
10755
|
platformLimits: CustomerGroupsPlatformLimits
|
|
10710
10756
|
};
|
|
10711
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10757
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$i(_objectSpread$i({}, props), customersProps));
|
|
10712
10758
|
};
|
|
10713
10759
|
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
10714
10760
|
return WithCustomerGroupsPlatformLimits;
|
|
@@ -10801,8 +10847,8 @@ const defaultValue = {
|
|
|
10801
10847
|
*/
|
|
10802
10848
|
const PimIndexerContext = /*#__PURE__*/React.createContext(defaultValue);
|
|
10803
10849
|
|
|
10804
|
-
function ownKeys$
|
|
10805
|
-
function _objectSpread$
|
|
10850
|
+
function ownKeys$h(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10851
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$h(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$h(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10806
10852
|
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10807
10853
|
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10808
10854
|
var RefreshProductIndices = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "RefreshProductIndices" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "ids" } }, type: { kind: "NonNullType", type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "refreshProducts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "ids" }, value: { kind: "Variable", name: { kind: "Name", value: "ids" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updatedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "deletedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "notFoundDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "unchangedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "failedRefreshedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "reason" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 1119, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -10978,7 +11024,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10978
11024
|
shouldIndexProductTypes: isIndexingProductTypes
|
|
10979
11025
|
}
|
|
10980
11026
|
});
|
|
10981
|
-
_this.setState(_objectSpread$
|
|
11027
|
+
_this.setState(_objectSpread$h(_objectSpread$h({
|
|
10982
11028
|
isLoading: false,
|
|
10983
11029
|
isProjectBeingIndexedByPim: true
|
|
10984
11030
|
}, getIndexingJobIds(indexMutationResult)), {}, {
|
|
@@ -11003,7 +11049,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11003
11049
|
key: "render",
|
|
11004
11050
|
value: function render() {
|
|
11005
11051
|
return jsxRuntime.jsx(PimIndexerContext.Provider, {
|
|
11006
|
-
value: _objectSpread$
|
|
11052
|
+
value: _objectSpread$h(_objectSpread$h({}, this.state), {}, {
|
|
11007
11053
|
attemptToRefreshProducts: this.attemptToRefreshProducts,
|
|
11008
11054
|
indexProject: this.indexProject
|
|
11009
11055
|
}),
|
|
@@ -11045,13 +11091,13 @@ let WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
|
11045
11091
|
}(React.PureComponent);
|
|
11046
11092
|
WithPimIndexer.displayName = 'WithPimIndexer';
|
|
11047
11093
|
|
|
11048
|
-
function ownKeys$
|
|
11049
|
-
function _objectSpread$
|
|
11094
|
+
function ownKeys$g(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11095
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$g(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11050
11096
|
var injectPimIndexer = (function () {
|
|
11051
11097
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pimIndexer';
|
|
11052
11098
|
return Component => {
|
|
11053
11099
|
const WrappedComponent = props => jsxRuntime.jsx(WithPimIndexer, {
|
|
11054
|
-
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$
|
|
11100
|
+
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$g(_objectSpread$g({}, props), {}, {
|
|
11055
11101
|
[propName]: pimIndexerProps
|
|
11056
11102
|
}))
|
|
11057
11103
|
});
|
|
@@ -11133,20 +11179,20 @@ var messages$7 = reactIntl.defineMessages({
|
|
|
11133
11179
|
}
|
|
11134
11180
|
});
|
|
11135
11181
|
|
|
11136
|
-
function ownKeys$e
|
|
11137
|
-
function _objectSpread$e
|
|
11182
|
+
function ownKeys$f(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11183
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$f(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11138
11184
|
const MissingValueField = props => jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
11139
11185
|
name: "missing-value",
|
|
11140
11186
|
isChecked: props.isChecked,
|
|
11141
11187
|
onChange: props.onChange,
|
|
11142
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11188
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$f({}, messages$7.label))
|
|
11143
11189
|
});
|
|
11144
11190
|
MissingValueField.defaultProps = {
|
|
11145
11191
|
isChecked: false
|
|
11146
11192
|
};
|
|
11147
11193
|
|
|
11148
|
-
function ownKeys$
|
|
11149
|
-
function _objectSpread$
|
|
11194
|
+
function ownKeys$e(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11195
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$e(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$e(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11150
11196
|
var styles$7 = {
|
|
11151
11197
|
"button": "button-module__button___1OzVf",
|
|
11152
11198
|
"cancel": "button-module__cancel___1-jYL button-module__button___1OzVf",
|
|
@@ -11180,7 +11226,7 @@ const Button = props => {
|
|
|
11180
11226
|
|
|
11181
11227
|
// Pass only `data-*` props
|
|
11182
11228
|
const dataProps = filterDataAttributes(props);
|
|
11183
|
-
return jsxRuntime.jsx("button", _objectSpread$
|
|
11229
|
+
return jsxRuntime.jsx("button", _objectSpread$e(_objectSpread$e({
|
|
11184
11230
|
onClick: isDisabled ? null : onClick,
|
|
11185
11231
|
type: props.type,
|
|
11186
11232
|
className: classnames__default["default"](styles$7.button, isDisabled ? styles$7.disabled : null, className),
|
|
@@ -11203,8 +11249,8 @@ var messages$6 = reactIntl.defineMessages({
|
|
|
11203
11249
|
}
|
|
11204
11250
|
});
|
|
11205
11251
|
|
|
11206
|
-
function ownKeys$
|
|
11207
|
-
function _objectSpread$
|
|
11252
|
+
function ownKeys$d(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11253
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$d(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$d(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11208
11254
|
var styles$6 = {
|
|
11209
11255
|
"button": "file-input-module__button___2KypN",
|
|
11210
11256
|
"input": "file-input-module__input___3MP4D"
|
|
@@ -11224,7 +11270,7 @@ const FileInput = props => jsxRuntime.jsx("label", {
|
|
|
11224
11270
|
});
|
|
11225
11271
|
FileInput.displayName = 'FileInput';
|
|
11226
11272
|
FileInput.defaultProps = {
|
|
11227
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11273
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$d({}, messages$6.chooseFile)),
|
|
11228
11274
|
allowMultiple: false,
|
|
11229
11275
|
acceptTypes: 'image/png,image/jpeg,image/gif'
|
|
11230
11276
|
};
|
|
@@ -11263,7 +11309,7 @@ const ScrollToFieldError = () => {
|
|
|
11263
11309
|
|
|
11264
11310
|
// Scroll to the label (if found), otherwise to the input element itself.
|
|
11265
11311
|
const elementToScrollTo = (_ref = (_document$querySelect = document.querySelector("label[for=\"".concat(id, "\"]"))) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector("label#".concat(id))) !== null && _ref !== void 0 ? _ref : firstErrorElement;
|
|
11266
|
-
(_elementToScrollTo$sc = elementToScrollTo.scrollIntoView) === null || _elementToScrollTo$sc === void 0
|
|
11312
|
+
(_elementToScrollTo$sc = elementToScrollTo.scrollIntoView) === null || _elementToScrollTo$sc === void 0 || _elementToScrollTo$sc.call(elementToScrollTo, {
|
|
11267
11313
|
behavior: 'smooth'
|
|
11268
11314
|
});
|
|
11269
11315
|
}
|
|
@@ -11333,8 +11379,8 @@ const SelectableFieldSearchInput = props => {
|
|
|
11333
11379
|
};
|
|
11334
11380
|
SelectableFieldSearchInput.displayName = 'SelectableFieldSearchInput';
|
|
11335
11381
|
|
|
11336
|
-
function ownKeys$
|
|
11337
|
-
function _objectSpread$
|
|
11382
|
+
function ownKeys$c(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11383
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$c(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$c(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11338
11384
|
const StoreSelectField = props => {
|
|
11339
11385
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
11340
11386
|
max: props.horizontalConstraint,
|
|
@@ -11348,7 +11394,7 @@ const StoreSelectField = props => {
|
|
|
11348
11394
|
htmlFor: props.id,
|
|
11349
11395
|
hasRequiredIndicator: props.isRequired,
|
|
11350
11396
|
isBold: true
|
|
11351
|
-
}), jsxRuntime.jsx(StoreSelectInput, _objectSpread$
|
|
11397
|
+
}), jsxRuntime.jsx(StoreSelectInput, _objectSpread$c(_objectSpread$c({
|
|
11352
11398
|
projectKey: props.projectKey,
|
|
11353
11399
|
id: props.id,
|
|
11354
11400
|
name: props.name,
|
|
@@ -11388,8 +11434,8 @@ StoreSelectField.defaultProps = {
|
|
|
11388
11434
|
};
|
|
11389
11435
|
|
|
11390
11436
|
var _templateObject;
|
|
11391
|
-
function ownKeys$
|
|
11392
|
-
function _objectSpread$
|
|
11437
|
+
function ownKeys$b(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11438
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$b(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$b(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11393
11439
|
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11394
11440
|
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11395
11441
|
var styles$3 = {
|
|
@@ -11533,7 +11579,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11533
11579
|
* so it must be an invalid numeric value
|
|
11534
11580
|
*/
|
|
11535
11581
|
_this.handleInvalid = () => {
|
|
11536
|
-
const nextValidStatus = _objectSpread$
|
|
11582
|
+
const nextValidStatus = _objectSpread$b({}, _this.state.validStatus);
|
|
11537
11583
|
if (has__default["default"](nextValidStatus, 'numeric')) {
|
|
11538
11584
|
nextValidStatus.numeric = false;
|
|
11539
11585
|
_this.conditionalSetValidStatus(nextValidStatus);
|
|
@@ -11583,7 +11629,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11583
11629
|
if (prev) return this.state.validStatus[v.name];
|
|
11584
11630
|
return prev;
|
|
11585
11631
|
}, true);
|
|
11586
|
-
const componentProps = _objectSpread$
|
|
11632
|
+
const componentProps = _objectSpread$b(_objectSpread$b({}, this.props), {}, {
|
|
11587
11633
|
[blurHandler || 'onBlurValue']: this.handleBlur,
|
|
11588
11634
|
[changeHandler || 'onChange']: this.handleChange,
|
|
11589
11635
|
onInvalidValue: this.handleInvalid,
|
|
@@ -11600,7 +11646,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11600
11646
|
components: {
|
|
11601
11647
|
WrapperComponent: ToolTipWrapperComponent
|
|
11602
11648
|
},
|
|
11603
|
-
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$
|
|
11649
|
+
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$b({}, componentProps))
|
|
11604
11650
|
})
|
|
11605
11651
|
});
|
|
11606
11652
|
}
|
|
@@ -11615,13 +11661,13 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11615
11661
|
return reactIntl.injectIntl(ValidatedInput);
|
|
11616
11662
|
}
|
|
11617
11663
|
function simpleInput(type) {
|
|
11618
|
-
var
|
|
11619
|
-
return
|
|
11620
|
-
_inherits(
|
|
11621
|
-
var _super2 = _createSuper$1(
|
|
11622
|
-
function
|
|
11664
|
+
var _class2;
|
|
11665
|
+
return _class2 = /*#__PURE__*/function (_PureComponent2) {
|
|
11666
|
+
_inherits(_class2, _PureComponent2);
|
|
11667
|
+
var _super2 = _createSuper$1(_class2);
|
|
11668
|
+
function _class2() {
|
|
11623
11669
|
var _this2;
|
|
11624
|
-
_classCallCheck(this,
|
|
11670
|
+
_classCallCheck(this, _class2);
|
|
11625
11671
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
11626
11672
|
args[_key2] = arguments[_key2];
|
|
11627
11673
|
}
|
|
@@ -11631,7 +11677,7 @@ function simpleInput(type) {
|
|
|
11631
11677
|
};
|
|
11632
11678
|
return _this2;
|
|
11633
11679
|
}
|
|
11634
|
-
_createClass(
|
|
11680
|
+
_createClass(_class2, [{
|
|
11635
11681
|
key: "render",
|
|
11636
11682
|
value: function render() {
|
|
11637
11683
|
return jsxRuntime.jsx("input", {
|
|
@@ -11648,11 +11694,11 @@ function simpleInput(type) {
|
|
|
11648
11694
|
});
|
|
11649
11695
|
}
|
|
11650
11696
|
}]);
|
|
11651
|
-
return
|
|
11652
|
-
}(React.PureComponent),
|
|
11697
|
+
return _class2;
|
|
11698
|
+
}(React.PureComponent), _class2.displayName = 'SimpleInput', _class2.defaultProps = {
|
|
11653
11699
|
getInputRef: () => {},
|
|
11654
11700
|
name: 'simple-validated-input'
|
|
11655
|
-
},
|
|
11701
|
+
}, _class2;
|
|
11656
11702
|
}
|
|
11657
11703
|
|
|
11658
11704
|
var messages$4 = reactIntl.defineMessages({
|
|
@@ -11663,14 +11709,14 @@ var messages$4 = reactIntl.defineMessages({
|
|
|
11663
11709
|
}
|
|
11664
11710
|
});
|
|
11665
11711
|
|
|
11666
|
-
function ownKeys$
|
|
11667
|
-
function _objectSpread$
|
|
11712
|
+
function ownKeys$a(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11713
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$a(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$a(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11668
11714
|
const CustomFieldsErrorTextNotification = props => {
|
|
11669
11715
|
var _context;
|
|
11670
11716
|
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
11671
11717
|
scale: "s",
|
|
11672
11718
|
children: [jsxRuntime.jsx(uiKit.Text.Wrap, {
|
|
11673
|
-
intlMessage: _objectSpread$
|
|
11719
|
+
intlMessage: _objectSpread$a({}, messages$4.customFieldsError)
|
|
11674
11720
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
11675
11721
|
scale: "xs",
|
|
11676
11722
|
children: _mapInstanceProperty__default["default"](_context = props.formErrors).call(_context, formError => jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -11695,8 +11741,8 @@ const messages$3 = reactIntl.defineMessages({
|
|
|
11695
11741
|
}
|
|
11696
11742
|
});
|
|
11697
11743
|
|
|
11698
|
-
function ownKeys$
|
|
11699
|
-
function _objectSpread$
|
|
11744
|
+
function ownKeys$9(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11745
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$9(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$9(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11700
11746
|
var styles$2 = {
|
|
11701
11747
|
"label": "label-range-module__label___3Tb0p"
|
|
11702
11748
|
};
|
|
@@ -11704,7 +11750,7 @@ const LabelRange = _ref => {
|
|
|
11704
11750
|
let type = _ref.type;
|
|
11705
11751
|
return jsxRuntime.jsx("label", {
|
|
11706
11752
|
className: styles$2.label,
|
|
11707
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11753
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$9({}, messages$3[type]))
|
|
11708
11754
|
});
|
|
11709
11755
|
};
|
|
11710
11756
|
LabelRange.displayName = 'LabelRange';
|
|
@@ -11722,8 +11768,8 @@ var messages$2 = reactIntl.defineMessages({
|
|
|
11722
11768
|
}
|
|
11723
11769
|
});
|
|
11724
11770
|
|
|
11725
|
-
function ownKeys$
|
|
11726
|
-
function _objectSpread$
|
|
11771
|
+
function ownKeys$8(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11772
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$8(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$8(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11727
11773
|
var styles$1 = {
|
|
11728
11774
|
"container": "multi-value-search-input-module__container___2u64d",
|
|
11729
11775
|
"searchInput": "multi-value-search-input-module__searchInput___363nj",
|
|
@@ -11747,7 +11793,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11747
11793
|
}),
|
|
11748
11794
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11749
11795
|
truncate: true,
|
|
11750
|
-
intlMessage: _objectSpread$
|
|
11796
|
+
intlMessage: _objectSpread$8(_objectSpread$8({}, messages$2.filterWholeInput), {}, {
|
|
11751
11797
|
values: {
|
|
11752
11798
|
values: "\"".concat(props.value, "\"")
|
|
11753
11799
|
}
|
|
@@ -11760,7 +11806,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11760
11806
|
}),
|
|
11761
11807
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11762
11808
|
truncate: true,
|
|
11763
|
-
intlMessage: _objectSpread$
|
|
11809
|
+
intlMessage: _objectSpread$8(_objectSpread$8({}, messages$2.filterSeparateValues), {}, {
|
|
11764
11810
|
values: {
|
|
11765
11811
|
values: "\"".concat(props.multiValue.join('", "'), "\"") || props.value
|
|
11766
11812
|
}
|
|
@@ -11871,8 +11917,8 @@ const MultiValueSearchInput = props => {
|
|
|
11871
11917
|
};
|
|
11872
11918
|
MultiValueSearchInput.displayName = 'MultiValueSearchInput';
|
|
11873
11919
|
|
|
11874
|
-
function ownKeys$
|
|
11875
|
-
function _objectSpread$
|
|
11920
|
+
function ownKeys$7(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11921
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$7(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$7(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11876
11922
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11877
11923
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11878
11924
|
var styles = {
|
|
@@ -11894,7 +11940,9 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11894
11940
|
args[_key] = arguments[_key];
|
|
11895
11941
|
}
|
|
11896
11942
|
_this = _super.call(this, ...args);
|
|
11897
|
-
_this.
|
|
11943
|
+
_this.state = {
|
|
11944
|
+
parsedValue: _this.props.value
|
|
11945
|
+
};
|
|
11898
11946
|
_this.setValue = value => {
|
|
11899
11947
|
if (!isValidValue(value)) return;
|
|
11900
11948
|
const newValue = !isUndefined__default["default"](value) ? _this.props.formatNumber(value) : undefined;
|
|
@@ -11907,8 +11955,10 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11907
11955
|
_this.handleChange = event => {
|
|
11908
11956
|
const value = event.target.rawValue;
|
|
11909
11957
|
const parsedNumber = _this.props.parseNumber(value);
|
|
11910
|
-
if (_this.parsedValue === parsedNumber) return;
|
|
11911
|
-
_this.
|
|
11958
|
+
if (_this.state.parsedValue === parsedNumber) return;
|
|
11959
|
+
_this.setState({
|
|
11960
|
+
parsedValue: parsedNumber
|
|
11961
|
+
});
|
|
11912
11962
|
_this.props.onChangeValue(parsedNumber);
|
|
11913
11963
|
if (!isNumberish(value) && _this.props.onInvalidValue) _this.props.onInvalidValue(value);
|
|
11914
11964
|
};
|
|
@@ -11922,12 +11972,10 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11922
11972
|
return _this;
|
|
11923
11973
|
}
|
|
11924
11974
|
_createClass(NumericFormatInput, [{
|
|
11925
|
-
key: "
|
|
11926
|
-
value:
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
if (this.props.value !== nextProps.value && nextProps.value !== this.parsedValue) {
|
|
11930
|
-
this.setValue(nextProps.value);
|
|
11975
|
+
key: "componentDidUpdate",
|
|
11976
|
+
value: function componentDidUpdate(prevProps) {
|
|
11977
|
+
if (this.props.value !== prevProps.value && this.props.value !== this.state.parsedValue) {
|
|
11978
|
+
this.setValue(this.props.value);
|
|
11931
11979
|
}
|
|
11932
11980
|
}
|
|
11933
11981
|
}, {
|
|
@@ -11935,7 +11983,7 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11935
11983
|
value: function render() {
|
|
11936
11984
|
const separators = getSeparatorsForLocale(this.props.numberFormat);
|
|
11937
11985
|
const dataAttributes = filterDataAttributes(this.props);
|
|
11938
|
-
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$
|
|
11986
|
+
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$7({
|
|
11939
11987
|
placeholder: this.props.placeholder,
|
|
11940
11988
|
htmlRef: this.registerInputRef,
|
|
11941
11989
|
options: {
|
|
@@ -12231,8 +12279,8 @@ const createNextSortDefinition = _ref => {
|
|
|
12231
12279
|
}
|
|
12232
12280
|
};
|
|
12233
12281
|
|
|
12234
|
-
function ownKeys$
|
|
12235
|
-
function _objectSpread$
|
|
12282
|
+
function ownKeys$6(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12283
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$6(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12236
12284
|
/**
|
|
12237
12285
|
* Creates reducer
|
|
12238
12286
|
* @param {Object} initialState
|
|
@@ -12248,13 +12296,13 @@ function createReducer(initialState, actionHandlers) {
|
|
|
12248
12296
|
|
|
12249
12297
|
// In case reducer ignored action, avoid creating new object
|
|
12250
12298
|
const newSubstate = reduce(newState, action);
|
|
12251
|
-
if (newSubstate) return _objectSpread$
|
|
12299
|
+
if (newSubstate) return _objectSpread$6(_objectSpread$6({}, newState), newSubstate);
|
|
12252
12300
|
return newState;
|
|
12253
12301
|
};
|
|
12254
12302
|
}
|
|
12255
12303
|
|
|
12256
|
-
function ownKeys$
|
|
12257
|
-
function _objectSpread$
|
|
12304
|
+
function ownKeys$5(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12305
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$5(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$5(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12258
12306
|
function updateStatusInList(mergeData) {
|
|
12259
12307
|
return (state, _ref) => {
|
|
12260
12308
|
let payload = _ref.payload;
|
|
@@ -12263,15 +12311,15 @@ function updateStatusInList(mergeData) {
|
|
|
12263
12311
|
results[index] = mergeData(payload, results[index]);
|
|
12264
12312
|
results[index].checked = false;
|
|
12265
12313
|
return {
|
|
12266
|
-
currentQueryResult: _objectSpread$
|
|
12314
|
+
currentQueryResult: _objectSpread$5(_objectSpread$5({}, state.currentQueryResult), {}, {
|
|
12267
12315
|
results
|
|
12268
12316
|
})
|
|
12269
12317
|
};
|
|
12270
12318
|
};
|
|
12271
12319
|
}
|
|
12272
12320
|
|
|
12273
|
-
function ownKeys$
|
|
12274
|
-
function _objectSpread$
|
|
12321
|
+
function ownKeys$4(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12322
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12275
12323
|
const identity = value => value;
|
|
12276
12324
|
function createResourceReducer(options) {
|
|
12277
12325
|
const _options$constantsPre = options.constantsPrefix,
|
|
@@ -12281,7 +12329,7 @@ function createResourceReducer(options) {
|
|
|
12281
12329
|
_options$initialState = options.initialState,
|
|
12282
12330
|
extendInitialState = _options$initialState === void 0 ? {} : _options$initialState;
|
|
12283
12331
|
const mergeData = options.mergeData || identity;
|
|
12284
|
-
const initialState = _objectSpread$
|
|
12332
|
+
const initialState = _objectSpread$4({
|
|
12285
12333
|
currentQueryResult: {
|
|
12286
12334
|
count: 0,
|
|
12287
12335
|
offset: 0,
|
|
@@ -12301,7 +12349,7 @@ function createResourceReducer(options) {
|
|
|
12301
12349
|
let payload = _ref.payload;
|
|
12302
12350
|
const results = state.currentQueryResult.results;
|
|
12303
12351
|
return {
|
|
12304
|
-
currentQueryResult: _objectSpread$
|
|
12352
|
+
currentQueryResult: _objectSpread$4(_objectSpread$4({}, state.currentQueryResult), {}, {
|
|
12305
12353
|
results: _filterInstanceProperty__default["default"](results).call(results, _ref2 => {
|
|
12306
12354
|
let id = _ref2.id;
|
|
12307
12355
|
return id !== payload.id;
|
|
@@ -12822,8 +12870,8 @@ const getTimeZoneLabel = memoize__default["default"]((selectedTimeZone, timeZone
|
|
|
12822
12870
|
return _concatInstanceProperty__default["default"](_context4 = "(GMT ".concat(timeZoneData.offset, ") ")).call(_context4, timeZoneData.name);
|
|
12823
12871
|
});
|
|
12824
12872
|
|
|
12825
|
-
function ownKeys$
|
|
12826
|
-
function _objectSpread$
|
|
12873
|
+
function ownKeys$3(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12874
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$3(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12827
12875
|
function withPendingRequests() {
|
|
12828
12876
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pendingRequests';
|
|
12829
12877
|
return Component => {
|
|
@@ -12832,7 +12880,7 @@ function withPendingRequests() {
|
|
|
12832
12880
|
const pendingProp = {
|
|
12833
12881
|
[propName]: pendingRequests
|
|
12834
12882
|
};
|
|
12835
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
12883
|
+
return jsxRuntime.jsx(Component, _objectSpread$3(_objectSpread$3({}, props), pendingProp));
|
|
12836
12884
|
};
|
|
12837
12885
|
WrappedComponent.displayName = wrapDisplayName(Component, 'withPendingRequests');
|
|
12838
12886
|
return WrappedComponent;
|
|
@@ -12867,8 +12915,10 @@ var messages = reactIntl.defineMessages({
|
|
|
12867
12915
|
}
|
|
12868
12916
|
});
|
|
12869
12917
|
|
|
12870
|
-
|
|
12871
|
-
|
|
12918
|
+
const FIELD_NAME = 'custom';
|
|
12919
|
+
|
|
12920
|
+
function ownKeys$2(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12921
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$2(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$2(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12872
12922
|
const typeDefinitionsExist = typeDefinitions => {
|
|
12873
12923
|
return typeDefinitions.length > 0;
|
|
12874
12924
|
};
|
|
@@ -12885,13 +12935,13 @@ const CustomFieldsInputWrapper = _ref => {
|
|
|
12885
12935
|
const _useFormikContext = formik.useFormikContext(),
|
|
12886
12936
|
formValues = _valuesInstanceProperty__default["default"](_useFormikContext);
|
|
12887
12937
|
if (!typeDefinitionsExist(typeDefinitions)) {
|
|
12888
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12938
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noTypes));
|
|
12889
12939
|
}
|
|
12890
12940
|
if (!typeDefinitionSelected(formValues)) {
|
|
12891
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12941
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noCustomType));
|
|
12892
12942
|
}
|
|
12893
12943
|
if (!typeDefinitionContainsFieldDefinitions(formValues)) {
|
|
12894
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12944
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noCustomFields));
|
|
12895
12945
|
}
|
|
12896
12946
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
12897
12947
|
max: "scale",
|
|
@@ -12904,11 +12954,8 @@ const CustomFieldsInputWrapper = _ref => {
|
|
|
12904
12954
|
};
|
|
12905
12955
|
CustomFieldsInputWrapper.displayName = 'CustomFieldsInputWrapper';
|
|
12906
12956
|
|
|
12907
|
-
function ownKeys(
|
|
12908
|
-
function _objectSpread(
|
|
12909
|
-
const FIELD_NAME = 'custom';
|
|
12910
|
-
|
|
12911
|
-
// Creates dropdown options
|
|
12957
|
+
function ownKeys$1(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12958
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12912
12959
|
const mapTypeDefinitionsToOptions = (typeDefinitions, language, languages, selectedTypeDefinitionId) => {
|
|
12913
12960
|
return _mapInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => ({
|
|
12914
12961
|
isDisabled: selectedTypeDefinitionId && selectedTypeDefinitionId === typeDefinition.type.id,
|
|
@@ -12937,10 +12984,12 @@ const createFormStateFromTypeDefinition = selectedTypeDefinition => {
|
|
|
12937
12984
|
const CustomTypeSubform = _ref => {
|
|
12938
12985
|
var _formValues$FIELD_NAM, _formValues$FIELD_NAM2;
|
|
12939
12986
|
let typeDefinitions = _ref.typeDefinitions,
|
|
12940
|
-
isReadOnly = _ref.isReadOnly
|
|
12987
|
+
isReadOnly = _ref.isReadOnly,
|
|
12988
|
+
isCondensed = _ref.isCondensed;
|
|
12941
12989
|
const _useFormikContext = formik.useFormikContext(),
|
|
12942
12990
|
formValues = _valuesInstanceProperty__default["default"](_useFormikContext),
|
|
12943
|
-
setFieldValue = _useFormikContext.setFieldValue
|
|
12991
|
+
setFieldValue = _useFormikContext.setFieldValue,
|
|
12992
|
+
validateForm = _useFormikContext.validateForm;
|
|
12944
12993
|
const _useIntl = reactIntl.useIntl(),
|
|
12945
12994
|
formatMessage = _useIntl.formatMessage;
|
|
12946
12995
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -12953,19 +13002,23 @@ const CustomTypeSubform = _ref => {
|
|
|
12953
13002
|
const selectedTypeDefinition = _findInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => typeDefinition.type.key === event.target.value);
|
|
12954
13003
|
if (selectedTypeDefinition) {
|
|
12955
13004
|
const nextCustom = createFormStateFromTypeDefinition(selectedTypeDefinition);
|
|
12956
|
-
setFieldValue(FIELD_NAME, nextCustom)
|
|
13005
|
+
setFieldValue(FIELD_NAME, nextCustom).then(() => {
|
|
13006
|
+
validateForm();
|
|
13007
|
+
});
|
|
12957
13008
|
} else {
|
|
12958
|
-
// if the dropdown selector is cleared
|
|
12959
|
-
|
|
12960
|
-
|
|
13009
|
+
// if the dropdown selector is cleared, remove the `custom` field from the form state entirely
|
|
13010
|
+
setFieldValue(FIELD_NAME, undefined).then(() => {
|
|
13011
|
+
validateForm();
|
|
13012
|
+
});
|
|
12961
13013
|
}
|
|
12962
|
-
}, [typeDefinitions, setFieldValue,
|
|
13014
|
+
}, [typeDefinitions, setFieldValue, validateForm]);
|
|
12963
13015
|
return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
12964
13016
|
header: jsxRuntime.jsx(uiKit.CollapsiblePanel.Header, {
|
|
12965
|
-
|
|
13017
|
+
isCondensed: isCondensed,
|
|
13018
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1({}, messages.title))
|
|
12966
13019
|
}),
|
|
12967
13020
|
headerControls: typeDefinitions.length > 0 && jsxRuntime.jsx("div", {
|
|
12968
|
-
css: /*#__PURE__*/react$1.css("min-width:", uiKit.designTokens.
|
|
13021
|
+
css: /*#__PURE__*/react$1.css("min-width:", uiKit.designTokens.constraint11, ";" + ("" ), "" ),
|
|
12969
13022
|
children: jsxRuntime.jsx(uiKit.SelectInput, {
|
|
12970
13023
|
isClearable: true,
|
|
12971
13024
|
"data-testid": "custom-type-select",
|
|
@@ -12977,7 +13030,7 @@ const CustomTypeSubform = _ref => {
|
|
|
12977
13030
|
isReadOnly: isReadOnly
|
|
12978
13031
|
})
|
|
12979
13032
|
}),
|
|
12980
|
-
headerControlsAlignment: "
|
|
13033
|
+
headerControlsAlignment: "right",
|
|
12981
13034
|
children: jsxRuntime.jsx(CustomFieldsInputWrapper, {
|
|
12982
13035
|
typeDefinitions: typeDefinitions,
|
|
12983
13036
|
isReadOnly: isReadOnly
|
|
@@ -12986,9 +13039,97 @@ const CustomTypeSubform = _ref => {
|
|
|
12986
13039
|
};
|
|
12987
13040
|
CustomTypeSubform.displayName = 'CustomTypeSubform';
|
|
12988
13041
|
|
|
13042
|
+
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13043
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
13044
|
+
const transformFieldType = fieldDefinition => {
|
|
13045
|
+
var _fieldDefinition$type, _fieldDefinition$type2;
|
|
13046
|
+
if (((_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') {
|
|
13047
|
+
var _context;
|
|
13048
|
+
return _objectSpread(_objectSpread({}, fieldDefinition.type), {}, {
|
|
13049
|
+
elementType: _objectSpread(_objectSpread({}, fieldDefinition.type.elementType), {}, {
|
|
13050
|
+
values: _mapInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context, value => ({
|
|
13051
|
+
key: value.key,
|
|
13052
|
+
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
13053
|
+
}))
|
|
13054
|
+
})
|
|
13055
|
+
});
|
|
13056
|
+
} else if (((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum') {
|
|
13057
|
+
var _context2;
|
|
13058
|
+
return _objectSpread(_objectSpread({}, fieldDefinition.type), {}, {
|
|
13059
|
+
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context2, value => ({
|
|
13060
|
+
key: value.key,
|
|
13061
|
+
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
13062
|
+
}))
|
|
13063
|
+
});
|
|
13064
|
+
} else {
|
|
13065
|
+
return fieldDefinition.type;
|
|
13066
|
+
}
|
|
13067
|
+
};
|
|
13068
|
+
const convertCustomField = resource => {
|
|
13069
|
+
var _context3, _context4;
|
|
13070
|
+
return {
|
|
13071
|
+
type: {
|
|
13072
|
+
typeId: 'type',
|
|
13073
|
+
id: resource.custom.type.id,
|
|
13074
|
+
obj: {
|
|
13075
|
+
key: resource.custom.type.key,
|
|
13076
|
+
name: l10n.transformLocalizedFieldToLocalizedString(resource.custom.type.nameAllLocales),
|
|
13077
|
+
fieldDefinitions: _mapInstanceProperty__default["default"](_context3 = resource.custom.type.fieldDefinitions).call(_context3, fieldDefinition => ({
|
|
13078
|
+
name: fieldDefinition.name,
|
|
13079
|
+
required: fieldDefinition.required,
|
|
13080
|
+
inputHint: fieldDefinition.inputHint,
|
|
13081
|
+
type: transformFieldType(fieldDefinition),
|
|
13082
|
+
label: l10n.transformLocalizedFieldToLocalizedString(fieldDefinition.labelAllLocales)
|
|
13083
|
+
}))
|
|
13084
|
+
}
|
|
13085
|
+
},
|
|
13086
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread(_objectSpread({}, fields), {}, {
|
|
13087
|
+
[customField.name]: customField.value
|
|
13088
|
+
}), {})
|
|
13089
|
+
};
|
|
13090
|
+
};
|
|
13091
|
+
const createFormStateFromResource = resource => {
|
|
13092
|
+
// If there are no custom fields on the resource, don't create a form state
|
|
13093
|
+
if (!resource[FIELD_NAME]) {
|
|
13094
|
+
return {
|
|
13095
|
+
[FIELD_NAME]: undefined
|
|
13096
|
+
};
|
|
13097
|
+
}
|
|
13098
|
+
return {
|
|
13099
|
+
[FIELD_NAME]: convertCustomField(resource)
|
|
13100
|
+
};
|
|
13101
|
+
};
|
|
13102
|
+
const createGraphQlDocFromFormState = formState => {
|
|
13103
|
+
var _context5;
|
|
13104
|
+
// Unset the custom type if it's not in the form state
|
|
13105
|
+
if (!formState[FIELD_NAME]) {
|
|
13106
|
+
return {
|
|
13107
|
+
[FIELD_NAME]: {}
|
|
13108
|
+
};
|
|
13109
|
+
}
|
|
13110
|
+
return {
|
|
13111
|
+
[FIELD_NAME]: {
|
|
13112
|
+
type: {
|
|
13113
|
+
id: formState[FIELD_NAME].type.id,
|
|
13114
|
+
typeId: 'type'
|
|
13115
|
+
},
|
|
13116
|
+
fields: _mapInstanceProperty__default["default"](_context5 = _Object$entries__default["default"](formState[FIELD_NAME].fields)).call(_context5, _ref => {
|
|
13117
|
+
let _ref2 = _slicedToArray(_ref, 2),
|
|
13118
|
+
name = _ref2[0],
|
|
13119
|
+
value = _ref2[1];
|
|
13120
|
+
return {
|
|
13121
|
+
name,
|
|
13122
|
+
value: _JSON$stringify__default["default"](value)
|
|
13123
|
+
};
|
|
13124
|
+
})
|
|
13125
|
+
}
|
|
13126
|
+
};
|
|
13127
|
+
};
|
|
13128
|
+
|
|
12989
13129
|
const CustomFieldsFormField = _ref => {
|
|
12990
13130
|
let resources = _ref.resources,
|
|
12991
|
-
isReadOnly = _ref.isReadOnly
|
|
13131
|
+
isReadOnly = _ref.isReadOnly,
|
|
13132
|
+
isCondensed = _ref.isCondensed;
|
|
12992
13133
|
const projectKey = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.project.key);
|
|
12993
13134
|
return jsxRuntime.jsx(CustomFieldTypeDefinitionsConnector$1, {
|
|
12994
13135
|
resources: resources,
|
|
@@ -13004,11 +13145,14 @@ const CustomFieldsFormField = _ref => {
|
|
|
13004
13145
|
const typeDefinitions = _mapInstanceProperty__default["default"](_context = customFieldTypeDefinitions.results).call(_context, CustomFieldTypeDefinitionsConnector$1.graphQlDocToForm);
|
|
13005
13146
|
return jsxRuntime.jsx(CustomTypeSubform, {
|
|
13006
13147
|
typeDefinitions: typeDefinitions,
|
|
13007
|
-
isReadOnly: isReadOnly
|
|
13148
|
+
isReadOnly: isReadOnly,
|
|
13149
|
+
isCondensed: isCondensed
|
|
13008
13150
|
});
|
|
13009
13151
|
}
|
|
13010
13152
|
});
|
|
13011
13153
|
};
|
|
13154
|
+
CustomFieldsFormField.createFormStateFromResource = createFormStateFromResource;
|
|
13155
|
+
CustomFieldsFormField.createGraphQlDocFromFormState = createGraphQlDocFromFormState;
|
|
13012
13156
|
|
|
13013
13157
|
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 } } } };
|
|
13014
13158
|
|