@commercetools-frontend/experimental-components 5.1.0 → 5.2.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 +535 -392
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +529 -392
- package/dist/commercetools-frontend-experimental-components.esm.js +535 -393
- package/dist/styles.css +243 -243
- package/package.json +12 -12
|
@@ -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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1676
|
+
function _objectSpread$1l(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1l(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1l(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1958
|
+
function _objectSpread$1k(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1k(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1k(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1985
|
+
function _objectSpread$1j(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1j(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1j(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2010
|
+
function _objectSpread$1i(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1i(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1i(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2024
|
+
function _objectSpread$1h(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1h(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1h(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2058
|
+
function _objectSpread$1g(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1g(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1g(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2076
|
+
function _objectSpread$1f(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1f(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1f(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2094
|
+
function _objectSpread$1e(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1e(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1e(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2161
|
+
function _objectSpread$1d(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1d(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1d(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2233
|
+
function _objectSpread$1c(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1c(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1c(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2408
|
+
function _objectSpread$1b(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1b(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1b(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2501
|
+
function _objectSpread$1a(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1a(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2688
|
+
function _objectSpread$19(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$19(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$19(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2816
|
+
function _objectSpread$18(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$18(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$18(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2999
|
+
function _objectSpread$17(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$17(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$17(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3150
|
+
function _objectSpread$16(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$16(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$16(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3192
|
+
function _objectSpread$15(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$15(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$15(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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);
|
|
@@ -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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3681
|
+
function _objectSpread$14(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$14(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$14(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3710
|
+
function _objectSpread$13(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$13(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$13(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3732
|
+
function _objectSpread$12(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$12(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$12(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4067
|
+
function _objectSpread$11(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$11(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$11(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4207
|
+
function _objectSpread$10(target) { for (var i = 1; i < arguments.length; i++) { var _context8, _context9; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$10(Object(source), !0)).call(_context8, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$10(Object(source))).call(_context9, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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$$(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4743
|
+
function _objectSpread$$(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$$(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$$(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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$_(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4829
|
+
function _objectSpread$_(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$_(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$_(Object(source))).call(_context6, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4898
|
+
function _objectSpread$Z(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$Z(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$Z(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4990
|
+
function _objectSpread$Y(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$Y(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$Y(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5079
|
+
function _objectSpread$X(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$X(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$X(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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
|
});
|
|
@@ -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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5265
|
+
function _objectSpread$W(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$W(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$W(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5361
|
+
function _objectSpread$V(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$V(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$V(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5453
|
+
function _objectSpread$U(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$U(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$U(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5823
|
+
function _objectSpread$T(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$T(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$T(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5865
|
+
function _objectSpread$S(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$S(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$S(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6014
|
+
function _objectSpread$R(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$R(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$R(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6043
|
+
function _objectSpread$Q(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$Q(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$Q(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6540
|
+
function _objectSpread$P(target) { for (var i = 1; i < arguments.length; i++) { var _context7, _context8; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys$P(Object(source), !0)).call(_context7, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys$P(Object(source))).call(_context8, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6688
|
+
function _objectSpread$O(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$O(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$O(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6825
|
+
function _objectSpread$N(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$N(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$N(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7083
|
+
function _objectSpread$M(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$M(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$M(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7309
|
+
function _objectSpread$L(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$L(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$L(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7358
|
+
function _objectSpread$K(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$K(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$K(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7417
|
+
function _objectSpread$J(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$J(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$J(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
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
|
|
@@ -7630,23 +7669,23 @@ var pickerMessages = reactIntl.defineMessages({
|
|
|
7630
7669
|
}
|
|
7631
7670
|
});
|
|
7632
7671
|
|
|
7633
|
-
function ownKeys$
|
|
7634
|
-
function _objectSpread$
|
|
7635
|
-
const
|
|
7636
|
-
INCLUSION: '
|
|
7637
|
-
EXCLUSION: '
|
|
7672
|
+
function ownKeys$I(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7673
|
+
function _objectSpread$I(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$I(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$I(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
7674
|
+
const PRODUCT_SELECTION_MODES = {
|
|
7675
|
+
INCLUSION: 'Individual',
|
|
7676
|
+
EXCLUSION: 'IndividualExclusion'
|
|
7638
7677
|
};
|
|
7639
|
-
const
|
|
7678
|
+
const PRODUCT_SELECTION_MODES_LABELS = {
|
|
7640
7679
|
INCLUSION: 'inclusion',
|
|
7641
7680
|
EXCLUSION: 'exclusion'
|
|
7642
7681
|
};
|
|
7643
|
-
const
|
|
7644
|
-
const
|
|
7682
|
+
const getMode = mode => mode === PRODUCT_SELECTION_MODES.INCLUSION || mode === PRODUCT_SELECTION_MODES_LABELS.INCLUSION ? 'inclusion' : 'exclusion';
|
|
7683
|
+
const addModeToLabel = function (ps) {
|
|
7645
7684
|
var _context;
|
|
7646
7685
|
let enableExcludingProducts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
7647
7686
|
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(
|
|
7687
|
+
return _objectSpread$I(_objectSpread$I({}, ps), {}, {
|
|
7688
|
+
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
7689
|
});
|
|
7651
7690
|
};
|
|
7652
7691
|
|
|
@@ -7667,9 +7706,9 @@ const mapProductSelectionsToOptions$1 = memoize__default["default"](function ()
|
|
|
7667
7706
|
return {
|
|
7668
7707
|
id: productSelection.id,
|
|
7669
7708
|
value: productSelection.id,
|
|
7670
|
-
label: _concatInstanceProperty__default["default"](_context = "".concat(label)).call(_context, _includesInstanceProperty__default["default"](selectedPSList).call(selectedPSList, productSelection.id) && enableExcludingProducts ? " (type: ".concat(
|
|
7709
|
+
label: _concatInstanceProperty__default["default"](_context = "".concat(label)).call(_context, _includesInstanceProperty__default["default"](selectedPSList).call(selectedPSList, productSelection.id) && enableExcludingProducts ? " (type: ".concat(getMode(productSelection.mode), ")") : ''),
|
|
7671
7710
|
key: productSelection.key,
|
|
7672
|
-
|
|
7711
|
+
mode: getMode(productSelection.mode)
|
|
7673
7712
|
};
|
|
7674
7713
|
});
|
|
7675
7714
|
});
|
|
@@ -7739,11 +7778,11 @@ const getValueFromOptions$3 = _ref => {
|
|
|
7739
7778
|
// handle async-select-field value transformation
|
|
7740
7779
|
if (isMulti) {
|
|
7741
7780
|
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 =>
|
|
7781
|
+
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
7782
|
}
|
|
7744
7783
|
|
|
7745
7784
|
// 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
|
|
7785
|
+
return addModeToLabel(_findInstanceProperty__default["default"](allProductSelectionOptions).call(allProductSelectionOptions, ps => currentlySelectedProductSelections === ps.value), enableExcludingProducts);
|
|
7747
7786
|
};
|
|
7748
7787
|
const emptyStoreOption$1 = intl => [{
|
|
7749
7788
|
label: intl.formatMessage(pickerMessages.asyncSelectDropdownTypeAheadPrompt),
|
|
@@ -7790,7 +7829,7 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
7790
7829
|
value: productSelection.id,
|
|
7791
7830
|
name: localizedName,
|
|
7792
7831
|
key: productSelection.key,
|
|
7793
|
-
|
|
7832
|
+
mode: getMode(productSelection.mode)
|
|
7794
7833
|
};
|
|
7795
7834
|
});
|
|
7796
7835
|
}, [dataLocale, projectLanguages, filteredProductSelections]);
|
|
@@ -7845,7 +7884,7 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
7845
7884
|
});
|
|
7846
7885
|
}
|
|
7847
7886
|
|
|
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: "
|
|
7887
|
+
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
7888
|
const createQueryVariables$4 = (productSelections, predicateField) => {
|
|
7850
7889
|
var _context;
|
|
7851
7890
|
return {
|
|
@@ -7869,7 +7908,7 @@ const useProductSelectionsByFieldFetcher = (productSelections, predicateField) =
|
|
|
7869
7908
|
};
|
|
7870
7909
|
};
|
|
7871
7910
|
|
|
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: "
|
|
7911
|
+
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
7912
|
const mapProductSelectionsToOptions = memoize__default["default"](_ref => {
|
|
7874
7913
|
let _ref$productSelection = _ref.productSelections,
|
|
7875
7914
|
productSelections = _ref$productSelection === void 0 ? [] : _ref$productSelection,
|
|
@@ -7884,7 +7923,7 @@ const mapProductSelectionsToOptions = memoize__default["default"](_ref => {
|
|
|
7884
7923
|
fallbackOrder: projectLanguages
|
|
7885
7924
|
}),
|
|
7886
7925
|
key: productSelection.key,
|
|
7887
|
-
|
|
7926
|
+
mode: getMode(productSelection.mode)
|
|
7888
7927
|
}));
|
|
7889
7928
|
});
|
|
7890
7929
|
const getValueFromOptions$2 = _ref2 => {
|
|
@@ -7896,10 +7935,10 @@ const getValueFromOptions$2 = _ref2 => {
|
|
|
7896
7935
|
return undefined;
|
|
7897
7936
|
}
|
|
7898
7937
|
if (isMulti) {
|
|
7899
|
-
return _mapInstanceProperty__default["default"](productSelectionFieldOptions).call(productSelectionFieldOptions, ps =>
|
|
7938
|
+
return _mapInstanceProperty__default["default"](productSelectionFieldOptions).call(productSelectionFieldOptions, ps => addModeToLabel(ps, enableExcludingProducts));
|
|
7900
7939
|
}
|
|
7901
7940
|
// if the input is not multiselect, the AsyncSearchSelect is expecting an object rather than array
|
|
7902
|
-
return
|
|
7941
|
+
return addModeToLabel(productSelectionFieldOptions[0], enableExcludingProducts);
|
|
7903
7942
|
};
|
|
7904
7943
|
const createQueryVariables$3 = _ref3 => {
|
|
7905
7944
|
var _context;
|
|
@@ -7996,12 +8035,12 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
7996
8035
|
});
|
|
7997
8036
|
}
|
|
7998
8037
|
|
|
7999
|
-
function ownKeys$
|
|
8000
|
-
function _objectSpread$
|
|
8001
|
-
function
|
|
8038
|
+
function ownKeys$H(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8039
|
+
function _objectSpread$H(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$H(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$H(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8040
|
+
function ModeSelectInputOption(props) {
|
|
8002
8041
|
const data = props.data;
|
|
8003
8042
|
const noValueFallback = props.noValueFallback || constants.NO_VALUE_FALLBACK;
|
|
8004
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8043
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$H(_objectSpread$H({}, props), {}, {
|
|
8005
8044
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
8006
8045
|
scale: "xs",
|
|
8007
8046
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -8010,24 +8049,24 @@ function TypeSelectInputOption(props) {
|
|
|
8010
8049
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
8011
8050
|
children: ["Key: ", (data === null || data === void 0 ? void 0 : data.key) || noValueFallback]
|
|
8012
8051
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
8013
|
-
children: ["Type: ", (data === null || data === void 0 ? void 0 : data.
|
|
8052
|
+
children: ["Type: ", (data === null || data === void 0 ? void 0 : data.mode) || noValueFallback]
|
|
8014
8053
|
})]
|
|
8015
8054
|
})
|
|
8016
8055
|
}));
|
|
8017
8056
|
}
|
|
8018
8057
|
|
|
8019
|
-
function ownKeys$
|
|
8020
|
-
function _objectSpread$
|
|
8058
|
+
function ownKeys$G(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8059
|
+
function _objectSpread$G(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$G(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$G(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8021
8060
|
function ProductSelectionsPicker(props) {
|
|
8022
8061
|
const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher();
|
|
8023
8062
|
const components = React.useMemo(() => {
|
|
8024
8063
|
return {
|
|
8025
8064
|
Option: optionInnerProps => {
|
|
8026
8065
|
if (optionInnerProps.isDisabled) {
|
|
8027
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8066
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$G({}, optionInnerProps));
|
|
8028
8067
|
}
|
|
8029
8068
|
if (props.optionType === TYPE_PROPERTY) {
|
|
8030
|
-
return jsxRuntime.jsx(
|
|
8069
|
+
return jsxRuntime.jsx(ModeSelectInputOption, _objectSpread$G({}, optionInnerProps));
|
|
8031
8070
|
}
|
|
8032
8071
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8033
8072
|
optionType: props.optionType,
|
|
@@ -8039,7 +8078,7 @@ function ProductSelectionsPicker(props) {
|
|
|
8039
8078
|
if (productSelectionsTotalFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8040
8079
|
const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= props.lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= props.upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
|
|
8041
8080
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8042
|
-
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$
|
|
8081
|
+
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$G(_objectSpread$G({}, props), {}, {
|
|
8043
8082
|
components: components
|
|
8044
8083
|
}))
|
|
8045
8084
|
});
|
|
@@ -8100,8 +8139,8 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
8100
8139
|
});
|
|
8101
8140
|
}
|
|
8102
8141
|
|
|
8103
|
-
function ownKeys$
|
|
8104
|
-
function _objectSpread$
|
|
8142
|
+
function ownKeys$F(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8143
|
+
function _objectSpread$F(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$F(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$F(Object(source))).call(_context5, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8105
8144
|
const emptyCountryOption = intl => [{
|
|
8106
8145
|
label: intl.formatMessage(messages$u.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
8107
8146
|
value: undefined,
|
|
@@ -8128,7 +8167,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8128
8167
|
const onOptionChange = event => {
|
|
8129
8168
|
const countries = event.target.value;
|
|
8130
8169
|
props.onChange({
|
|
8131
|
-
target: _objectSpread$
|
|
8170
|
+
target: _objectSpread$F(_objectSpread$F({}, event.target), {}, {
|
|
8132
8171
|
value: _mapInstanceProperty__default["default"](countries).call(countries, country => {
|
|
8133
8172
|
var _country$value;
|
|
8134
8173
|
return (_country$value = country === null || country === void 0 ? void 0 : country.value) !== null && _country$value !== void 0 ? _country$value : country;
|
|
@@ -8159,13 +8198,13 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8159
8198
|
});
|
|
8160
8199
|
}
|
|
8161
8200
|
|
|
8162
|
-
function ownKeys$
|
|
8163
|
-
function _objectSpread$
|
|
8201
|
+
function ownKeys$E(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8202
|
+
function _objectSpread$E(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$E(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$E(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8164
8203
|
function CountriesPicker(props) {
|
|
8165
8204
|
var _props$options;
|
|
8166
8205
|
const CustomCountriesPicker = ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.length) <= props.countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
|
|
8167
8206
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8168
|
-
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$
|
|
8207
|
+
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$E({}, props))
|
|
8169
8208
|
});
|
|
8170
8209
|
}
|
|
8171
8210
|
CountriesPicker.defaultProps = {
|
|
@@ -8385,8 +8424,8 @@ var messages$s = reactIntl.defineMessages({
|
|
|
8385
8424
|
}
|
|
8386
8425
|
});
|
|
8387
8426
|
|
|
8388
|
-
function ownKeys$
|
|
8389
|
-
function _objectSpread$
|
|
8427
|
+
function ownKeys$D(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8428
|
+
function _objectSpread$D(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$D(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$D(Object(source))).call(_context6, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8390
8429
|
const hasErrors$2 = errors => {
|
|
8391
8430
|
var _context;
|
|
8392
8431
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8458,7 +8497,7 @@ const StoresAsyncSelectInput = props => {
|
|
|
8458
8497
|
};
|
|
8459
8498
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8460
8499
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8461
|
-
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$
|
|
8500
|
+
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$D(_objectSpread$D({
|
|
8462
8501
|
id: props.id,
|
|
8463
8502
|
name: props.name,
|
|
8464
8503
|
placeholder: intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
@@ -8501,8 +8540,8 @@ StoresAsyncSelectInput.defaultProps = {
|
|
|
8501
8540
|
shouldFetchProductSelections: false
|
|
8502
8541
|
};
|
|
8503
8542
|
|
|
8504
|
-
function ownKeys$
|
|
8505
|
-
function _objectSpread$
|
|
8543
|
+
function ownKeys$C(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8544
|
+
function _objectSpread$C(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$C(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$C(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8506
8545
|
const hasErrors$1 = errors => {
|
|
8507
8546
|
var _context;
|
|
8508
8547
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8550,7 +8589,7 @@ const StoresBasicSelectInput = props => {
|
|
|
8550
8589
|
};
|
|
8551
8590
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8552
8591
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8553
|
-
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$
|
|
8592
|
+
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$C(_objectSpread$C({
|
|
8554
8593
|
id: props.id,
|
|
8555
8594
|
name: props.name,
|
|
8556
8595
|
placeholder: intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
@@ -8646,8 +8685,8 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
8646
8685
|
};
|
|
8647
8686
|
};
|
|
8648
8687
|
|
|
8649
|
-
function ownKeys$
|
|
8650
|
-
function _objectSpread$
|
|
8688
|
+
function ownKeys$B(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8689
|
+
function _objectSpread$B(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$B(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$B(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8651
8690
|
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
8691
|
const hasErrors = errors => {
|
|
8653
8692
|
var _context;
|
|
@@ -8749,7 +8788,7 @@ const StoresSearchSelectInput = props => {
|
|
|
8749
8788
|
const loadOptionsDebounced = debounce__default["default"](handleLoadOptions, 500);
|
|
8750
8789
|
if (storesByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8751
8790
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8752
|
-
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$
|
|
8791
|
+
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$B(_objectSpread$B({
|
|
8753
8792
|
id: props.id,
|
|
8754
8793
|
name: props.name,
|
|
8755
8794
|
placeholder: intl.formatMessage(messages$s.searchSelectInputPlaceholder),
|
|
@@ -8798,8 +8837,8 @@ StoresSearchSelectInput.defaultProps = {
|
|
|
8798
8837
|
shouldFetchProductSelections: false
|
|
8799
8838
|
};
|
|
8800
8839
|
|
|
8801
|
-
function ownKeys$
|
|
8802
|
-
function _objectSpread$
|
|
8840
|
+
function ownKeys$A(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8841
|
+
function _objectSpread$A(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$A(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$A(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
8803
8842
|
const StoreSelectInput = props => {
|
|
8804
8843
|
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher(props.projectKey);
|
|
8805
8844
|
const components = React.useMemo(() => {
|
|
@@ -8807,7 +8846,7 @@ const StoreSelectInput = props => {
|
|
|
8807
8846
|
// eslint-disable-next-line react/display-name
|
|
8808
8847
|
Option: optionInnerProps => {
|
|
8809
8848
|
if (optionInnerProps.isDisabled) {
|
|
8810
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8849
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$A({}, optionInnerProps));
|
|
8811
8850
|
}
|
|
8812
8851
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8813
8852
|
optionType: props.optionType,
|
|
@@ -8818,7 +8857,7 @@ const StoreSelectInput = props => {
|
|
|
8818
8857
|
}, [props.optionType]);
|
|
8819
8858
|
if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8820
8859
|
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput : StoresSearchSelectInput;
|
|
8821
|
-
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$
|
|
8860
|
+
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$A(_objectSpread$A({
|
|
8822
8861
|
projectKey: props.projectKey,
|
|
8823
8862
|
id: props.id,
|
|
8824
8863
|
name: props.name,
|
|
@@ -9373,10 +9412,10 @@ const RESOURCES_WITH_PLATFORM_LIMITS = {
|
|
|
9373
9412
|
carts: 'carts'
|
|
9374
9413
|
};
|
|
9375
9414
|
|
|
9376
|
-
function ownKeys$
|
|
9377
|
-
function _objectSpread$
|
|
9415
|
+
function ownKeys$z(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9416
|
+
function _objectSpread$z(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$z(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$z(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9378
9417
|
const resourcesWithPlatformLimits = _Object$keys__default["default"](RESOURCES_WITH_PLATFORM_LIMITS);
|
|
9379
|
-
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$
|
|
9418
|
+
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$z({
|
|
9380
9419
|
[camelCase__default["default"]("should include ".concat(nextNameOfLimit))]: platformLimit ? nextNameOfLimit === platformLimit : true
|
|
9381
9420
|
}, previousIncludedLimits), {});
|
|
9382
9421
|
|
|
@@ -9466,8 +9505,8 @@ var messages$n = reactIntl.defineMessages({
|
|
|
9466
9505
|
}
|
|
9467
9506
|
});
|
|
9468
9507
|
|
|
9469
|
-
function ownKeys$
|
|
9470
|
-
function _objectSpread$
|
|
9508
|
+
function ownKeys$y(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9509
|
+
function _objectSpread$y(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$y(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$y(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9471
9510
|
const getCustomerSupportLink$1 = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
9472
9511
|
isExternal: true,
|
|
9473
9512
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -9478,7 +9517,7 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
9478
9517
|
limit = _ref.limit;
|
|
9479
9518
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9480
9519
|
type: "warning",
|
|
9481
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9520
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$y(_objectSpread$y({}, messages$n[resource]), {}, {
|
|
9482
9521
|
values: {
|
|
9483
9522
|
limit,
|
|
9484
9523
|
customersupport: getCustomerSupportLink$1
|
|
@@ -9519,8 +9558,8 @@ var messages$m = reactIntl.defineMessages({
|
|
|
9519
9558
|
}
|
|
9520
9559
|
});
|
|
9521
9560
|
|
|
9522
|
-
function ownKeys$
|
|
9523
|
-
function _objectSpread$
|
|
9561
|
+
function ownKeys$x(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9562
|
+
function _objectSpread$x(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$x(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$x(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9524
9563
|
const getCustomerSupportLink = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
9525
9564
|
isExternal: true,
|
|
9526
9565
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -9531,7 +9570,7 @@ const PlatformLimitErrorNotification = _ref => {
|
|
|
9531
9570
|
limit = _ref.limit;
|
|
9532
9571
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9533
9572
|
type: "error",
|
|
9534
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9573
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$x(_objectSpread$x({}, messages$m[resource]), {}, {
|
|
9535
9574
|
values: {
|
|
9536
9575
|
limit,
|
|
9537
9576
|
customersupport: getCustomerSupportLink
|
|
@@ -9549,8 +9588,8 @@ const Notifications = {
|
|
|
9549
9588
|
Error: PlatformLimitErrorNotification
|
|
9550
9589
|
};
|
|
9551
9590
|
|
|
9552
|
-
function ownKeys$
|
|
9553
|
-
function _objectSpread$
|
|
9591
|
+
function ownKeys$w(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9592
|
+
function _objectSpread$w(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$w(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$w(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9554
9593
|
const PlatformLimitsStatusText = _ref => {
|
|
9555
9594
|
let intlMessage = _ref.intlMessage,
|
|
9556
9595
|
children = _ref.children;
|
|
@@ -9559,7 +9598,7 @@ const PlatformLimitsStatusText = _ref => {
|
|
|
9559
9598
|
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
9560
9599
|
size: "xs",
|
|
9561
9600
|
children: [jsxRuntime.jsx("span", {
|
|
9562
|
-
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9601
|
+
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$w({}, intlMessage))
|
|
9563
9602
|
}), jsxRuntime.jsx("span", {
|
|
9564
9603
|
children: children
|
|
9565
9604
|
})]
|
|
@@ -9668,11 +9707,11 @@ var messages$l = reactIntl.defineMessages({
|
|
|
9668
9707
|
}
|
|
9669
9708
|
});
|
|
9670
9709
|
|
|
9671
|
-
function ownKeys$
|
|
9672
|
-
function _objectSpread$
|
|
9710
|
+
function ownKeys$v(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9711
|
+
function _objectSpread$v(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$v(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$v(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9673
9712
|
const PlatformLimitsShippingMethodsTooltip = props => {
|
|
9674
9713
|
const intl = reactIntl.useIntl();
|
|
9675
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
9714
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$v(_objectSpread$v({}, props), {}, {
|
|
9676
9715
|
title: intl.formatMessage(messages$l.shippingMethodsPlatformLimitReached)
|
|
9677
9716
|
}));
|
|
9678
9717
|
};
|
|
@@ -9726,15 +9765,15 @@ const useShippingMethodsLimits = () => {
|
|
|
9726
9765
|
};
|
|
9727
9766
|
};
|
|
9728
9767
|
|
|
9729
|
-
function ownKeys$
|
|
9730
|
-
function _objectSpread$
|
|
9768
|
+
function ownKeys$u(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9769
|
+
function _objectSpread$u(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$u(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$u(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9731
9770
|
const injectShippingMethodsPlatformLimits = () => WrappedComponent => {
|
|
9732
9771
|
const WithShippingMethodsPlatformLimits = props => {
|
|
9733
9772
|
const shippingMethodsPlatformLimits = useShippingMethodsLimits();
|
|
9734
9773
|
const shippingMethodsProps = {
|
|
9735
9774
|
platformLimits: shippingMethodsPlatformLimits
|
|
9736
9775
|
};
|
|
9737
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
9776
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$u(_objectSpread$u({}, props), shippingMethodsProps));
|
|
9738
9777
|
};
|
|
9739
9778
|
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
9740
9779
|
return WithShippingMethodsPlatformLimits;
|
|
@@ -9815,11 +9854,11 @@ var messages$j = reactIntl.defineMessages({
|
|
|
9815
9854
|
}
|
|
9816
9855
|
});
|
|
9817
9856
|
|
|
9818
|
-
function ownKeys$
|
|
9819
|
-
function _objectSpread$
|
|
9857
|
+
function ownKeys$t(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9858
|
+
function _objectSpread$t(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$t(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$t(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9820
9859
|
const PlatformLimitsTaxCategoriesTooltip = props => {
|
|
9821
9860
|
const intl = reactIntl.useIntl();
|
|
9822
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
9861
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
9823
9862
|
title: intl.formatMessage(messages$j.taxCategoriesPlatformLimitReached)
|
|
9824
9863
|
}));
|
|
9825
9864
|
};
|
|
@@ -9873,15 +9912,15 @@ const useTaxCategoriesLimits = () => {
|
|
|
9873
9912
|
};
|
|
9874
9913
|
};
|
|
9875
9914
|
|
|
9876
|
-
function ownKeys$
|
|
9877
|
-
function _objectSpread$
|
|
9915
|
+
function ownKeys$s(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9916
|
+
function _objectSpread$s(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$s(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$s(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9878
9917
|
const injectTaxCategoriesPlatformLimits = WrappedComponent => {
|
|
9879
9918
|
const WithTaxCategoriesPlatformLimits = props => {
|
|
9880
9919
|
const taxCategoriesPlatformLimits = useTaxCategoriesLimits();
|
|
9881
9920
|
const taxCategoriesProps = {
|
|
9882
9921
|
platformLimits: taxCategoriesPlatformLimits
|
|
9883
9922
|
};
|
|
9884
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
9923
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$s(_objectSpread$s({}, props), taxCategoriesProps));
|
|
9885
9924
|
};
|
|
9886
9925
|
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
9887
9926
|
return WithTaxCategoriesPlatformLimits;
|
|
@@ -9962,11 +10001,11 @@ var messages$h = reactIntl.defineMessages({
|
|
|
9962
10001
|
}
|
|
9963
10002
|
});
|
|
9964
10003
|
|
|
9965
|
-
function ownKeys$
|
|
9966
|
-
function _objectSpread$
|
|
10004
|
+
function ownKeys$r(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10005
|
+
function _objectSpread$r(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$r(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$r(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
9967
10006
|
const PlatformLimitsZonesTooltip = props => {
|
|
9968
10007
|
const intl = reactIntl.useIntl();
|
|
9969
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10008
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$r(_objectSpread$r({}, props), {}, {
|
|
9970
10009
|
title: intl.formatMessage(messages$h.zonesPlatformLimitReached)
|
|
9971
10010
|
}));
|
|
9972
10011
|
};
|
|
@@ -10020,15 +10059,15 @@ const useZonesLimits = () => {
|
|
|
10020
10059
|
};
|
|
10021
10060
|
};
|
|
10022
10061
|
|
|
10023
|
-
function ownKeys$
|
|
10024
|
-
function _objectSpread$
|
|
10062
|
+
function ownKeys$q(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10063
|
+
function _objectSpread$q(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$q(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$q(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10025
10064
|
const injectZonesPlatformLimits = () => WrappedComponent => {
|
|
10026
10065
|
const WithZonesPlatformLimits = props => {
|
|
10027
10066
|
const zonesPlatformLimits = useZonesLimits();
|
|
10028
10067
|
const zonesProps = {
|
|
10029
10068
|
platformLimits: zonesPlatformLimits
|
|
10030
10069
|
};
|
|
10031
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10070
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$q(_objectSpread$q({}, props), zonesProps));
|
|
10032
10071
|
};
|
|
10033
10072
|
WithZonesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithZonesPlatformLimits');
|
|
10034
10073
|
return WithZonesPlatformLimits;
|
|
@@ -10122,11 +10161,11 @@ var messages$f = reactIntl.defineMessages({
|
|
|
10122
10161
|
}
|
|
10123
10162
|
});
|
|
10124
10163
|
|
|
10125
|
-
function ownKeys$
|
|
10126
|
-
function _objectSpread$
|
|
10164
|
+
function ownKeys$p(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10165
|
+
function _objectSpread$p(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$p(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$p(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10127
10166
|
const PlatformLimitsCustomersTooltip = props => {
|
|
10128
10167
|
const intl = reactIntl.useIntl();
|
|
10129
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10168
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
10130
10169
|
title: intl.formatMessage(messages$f.customersPlatformLimitReached)
|
|
10131
10170
|
}));
|
|
10132
10171
|
};
|
|
@@ -10140,8 +10179,8 @@ var messages$e = reactIntl.defineMessages({
|
|
|
10140
10179
|
}
|
|
10141
10180
|
});
|
|
10142
10181
|
|
|
10143
|
-
function ownKeys$
|
|
10144
|
-
function _objectSpread$
|
|
10182
|
+
function ownKeys$o(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10183
|
+
function _objectSpread$o(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$o(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$o(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10145
10184
|
var styles$b = {
|
|
10146
10185
|
"status": "platform-limits-customers-status-module__status___3rXYM"
|
|
10147
10186
|
};
|
|
@@ -10161,7 +10200,7 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
10161
10200
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
10162
10201
|
tone: "secondary",
|
|
10163
10202
|
isInline: true,
|
|
10164
|
-
intlMessage: _objectSpread$
|
|
10203
|
+
intlMessage: _objectSpread$o(_objectSpread$o({}, messages$e.customersStatus), {}, {
|
|
10165
10204
|
values: {
|
|
10166
10205
|
current: intl.formatNumber(current),
|
|
10167
10206
|
limit: intl.formatNumber(limit)
|
|
@@ -10185,10 +10224,10 @@ var messages$d = reactIntl.defineMessages({
|
|
|
10185
10224
|
}
|
|
10186
10225
|
});
|
|
10187
10226
|
|
|
10188
|
-
function ownKeys$
|
|
10189
|
-
function _objectSpread$
|
|
10227
|
+
function ownKeys$n(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10228
|
+
function _objectSpread$n(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$n(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$n(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10190
10229
|
var LimitsReachedErrorGraphic$1 = function LimitsReachedErrorGraphic(props) {
|
|
10191
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
10230
|
+
return jsxRuntime.jsxs("svg", _objectSpread$n(_objectSpread$n({}, props), {}, {
|
|
10192
10231
|
children: [jsxRuntime.jsx("defs", {
|
|
10193
10232
|
children: jsxRuntime.jsx("path", {
|
|
10194
10233
|
id: "a",
|
|
@@ -10360,15 +10399,15 @@ const useCustomersPlatformLimits = () => {
|
|
|
10360
10399
|
};
|
|
10361
10400
|
};
|
|
10362
10401
|
|
|
10363
|
-
function ownKeys$
|
|
10364
|
-
function _objectSpread$
|
|
10402
|
+
function ownKeys$m(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10403
|
+
function _objectSpread$m(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$m(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$m(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10365
10404
|
const injectCustomersPlatformLimits = () => WrappedComponent => {
|
|
10366
10405
|
const WithCustomersPlatformLimits = props => {
|
|
10367
10406
|
const CustomersPlatformLimits = useCustomersPlatformLimits();
|
|
10368
10407
|
const customersProps = {
|
|
10369
10408
|
platformLimits: CustomersPlatformLimits
|
|
10370
10409
|
};
|
|
10371
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10410
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$m(_objectSpread$m({}, props), customersProps));
|
|
10372
10411
|
};
|
|
10373
10412
|
WithCustomersPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
10374
10413
|
return WithCustomersPlatformLimits;
|
|
@@ -10462,11 +10501,11 @@ var messages$c = reactIntl.defineMessages({
|
|
|
10462
10501
|
}
|
|
10463
10502
|
});
|
|
10464
10503
|
|
|
10465
|
-
function ownKeys$
|
|
10466
|
-
function _objectSpread$
|
|
10504
|
+
function ownKeys$l(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10505
|
+
function _objectSpread$l(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$l(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$l(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10467
10506
|
const PlatformLimitsCustomerGroupsTooltip = props => {
|
|
10468
10507
|
const intl = reactIntl.useIntl();
|
|
10469
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10508
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
10470
10509
|
title: intl.formatMessage(messages$c.customerGroupsPlatformLimitReached)
|
|
10471
10510
|
}));
|
|
10472
10511
|
};
|
|
@@ -10480,8 +10519,8 @@ var messages$b = reactIntl.defineMessages({
|
|
|
10480
10519
|
}
|
|
10481
10520
|
});
|
|
10482
10521
|
|
|
10483
|
-
function ownKeys$
|
|
10484
|
-
function _objectSpread$
|
|
10522
|
+
function ownKeys$k(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10523
|
+
function _objectSpread$k(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$k(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$k(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10485
10524
|
var styles$9 = {
|
|
10486
10525
|
"status": "platform-limits-customer-groups-status-module__status___6099G"
|
|
10487
10526
|
};
|
|
@@ -10501,7 +10540,7 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
10501
10540
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
10502
10541
|
tone: "secondary",
|
|
10503
10542
|
isInline: true,
|
|
10504
|
-
intlMessage: _objectSpread$
|
|
10543
|
+
intlMessage: _objectSpread$k(_objectSpread$k({}, messages$b.customerGroupsStatus), {}, {
|
|
10505
10544
|
values: {
|
|
10506
10545
|
current: intl.formatNumber(current),
|
|
10507
10546
|
limit: intl.formatNumber(limit)
|
|
@@ -10525,10 +10564,10 @@ var messages$a = reactIntl.defineMessages({
|
|
|
10525
10564
|
}
|
|
10526
10565
|
});
|
|
10527
10566
|
|
|
10528
|
-
function ownKeys$
|
|
10529
|
-
function _objectSpread$
|
|
10567
|
+
function ownKeys$j(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10568
|
+
function _objectSpread$j(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$j(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$j(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10530
10569
|
var LimitsReachedErrorGraphic = function LimitsReachedErrorGraphic(props) {
|
|
10531
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
10570
|
+
return jsxRuntime.jsxs("svg", _objectSpread$j(_objectSpread$j({}, props), {}, {
|
|
10532
10571
|
children: [jsxRuntime.jsx("defs", {
|
|
10533
10572
|
children: jsxRuntime.jsx("path", {
|
|
10534
10573
|
id: "a",
|
|
@@ -10700,15 +10739,15 @@ const useCustomerGroupsPlatformLimits = () => {
|
|
|
10700
10739
|
};
|
|
10701
10740
|
};
|
|
10702
10741
|
|
|
10703
|
-
function ownKeys$
|
|
10704
|
-
function _objectSpread$
|
|
10742
|
+
function ownKeys$i(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10743
|
+
function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$i(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$i(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10705
10744
|
const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
|
|
10706
10745
|
const WithCustomerGroupsPlatformLimits = props => {
|
|
10707
10746
|
const CustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits();
|
|
10708
10747
|
const customersProps = {
|
|
10709
10748
|
platformLimits: CustomerGroupsPlatformLimits
|
|
10710
10749
|
};
|
|
10711
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10750
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$i(_objectSpread$i({}, props), customersProps));
|
|
10712
10751
|
};
|
|
10713
10752
|
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
10714
10753
|
return WithCustomerGroupsPlatformLimits;
|
|
@@ -10801,8 +10840,8 @@ const defaultValue = {
|
|
|
10801
10840
|
*/
|
|
10802
10841
|
const PimIndexerContext = /*#__PURE__*/React.createContext(defaultValue);
|
|
10803
10842
|
|
|
10804
|
-
function ownKeys$
|
|
10805
|
-
function _objectSpread$
|
|
10843
|
+
function ownKeys$h(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10844
|
+
function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$h(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$h(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
10806
10845
|
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
10846
|
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
10847
|
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 +11017,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10978
11017
|
shouldIndexProductTypes: isIndexingProductTypes
|
|
10979
11018
|
}
|
|
10980
11019
|
});
|
|
10981
|
-
_this.setState(_objectSpread$
|
|
11020
|
+
_this.setState(_objectSpread$h(_objectSpread$h({
|
|
10982
11021
|
isLoading: false,
|
|
10983
11022
|
isProjectBeingIndexedByPim: true
|
|
10984
11023
|
}, getIndexingJobIds(indexMutationResult)), {}, {
|
|
@@ -11003,7 +11042,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11003
11042
|
key: "render",
|
|
11004
11043
|
value: function render() {
|
|
11005
11044
|
return jsxRuntime.jsx(PimIndexerContext.Provider, {
|
|
11006
|
-
value: _objectSpread$
|
|
11045
|
+
value: _objectSpread$h(_objectSpread$h({}, this.state), {}, {
|
|
11007
11046
|
attemptToRefreshProducts: this.attemptToRefreshProducts,
|
|
11008
11047
|
indexProject: this.indexProject
|
|
11009
11048
|
}),
|
|
@@ -11045,13 +11084,13 @@ let WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
|
11045
11084
|
}(React.PureComponent);
|
|
11046
11085
|
WithPimIndexer.displayName = 'WithPimIndexer';
|
|
11047
11086
|
|
|
11048
|
-
function ownKeys$
|
|
11049
|
-
function _objectSpread$
|
|
11087
|
+
function ownKeys$g(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11088
|
+
function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$g(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$g(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11050
11089
|
var injectPimIndexer = (function () {
|
|
11051
11090
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pimIndexer';
|
|
11052
11091
|
return Component => {
|
|
11053
11092
|
const WrappedComponent = props => jsxRuntime.jsx(WithPimIndexer, {
|
|
11054
|
-
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$
|
|
11093
|
+
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$g(_objectSpread$g({}, props), {}, {
|
|
11055
11094
|
[propName]: pimIndexerProps
|
|
11056
11095
|
}))
|
|
11057
11096
|
});
|
|
@@ -11133,20 +11172,20 @@ var messages$7 = reactIntl.defineMessages({
|
|
|
11133
11172
|
}
|
|
11134
11173
|
});
|
|
11135
11174
|
|
|
11136
|
-
function ownKeys$
|
|
11137
|
-
function _objectSpread$
|
|
11175
|
+
function ownKeys$f(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11176
|
+
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$f(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$f(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11138
11177
|
const MissingValueField = props => jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
11139
11178
|
name: "missing-value",
|
|
11140
11179
|
isChecked: props.isChecked,
|
|
11141
11180
|
onChange: props.onChange,
|
|
11142
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11181
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$f({}, messages$7.label))
|
|
11143
11182
|
});
|
|
11144
11183
|
MissingValueField.defaultProps = {
|
|
11145
11184
|
isChecked: false
|
|
11146
11185
|
};
|
|
11147
11186
|
|
|
11148
|
-
function ownKeys$
|
|
11149
|
-
function _objectSpread$
|
|
11187
|
+
function ownKeys$e(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11188
|
+
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$e(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$e(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11150
11189
|
var styles$7 = {
|
|
11151
11190
|
"button": "button-module__button___1OzVf",
|
|
11152
11191
|
"cancel": "button-module__cancel___1-jYL button-module__button___1OzVf",
|
|
@@ -11180,7 +11219,7 @@ const Button = props => {
|
|
|
11180
11219
|
|
|
11181
11220
|
// Pass only `data-*` props
|
|
11182
11221
|
const dataProps = filterDataAttributes(props);
|
|
11183
|
-
return jsxRuntime.jsx("button", _objectSpread$
|
|
11222
|
+
return jsxRuntime.jsx("button", _objectSpread$e(_objectSpread$e({
|
|
11184
11223
|
onClick: isDisabled ? null : onClick,
|
|
11185
11224
|
type: props.type,
|
|
11186
11225
|
className: classnames__default["default"](styles$7.button, isDisabled ? styles$7.disabled : null, className),
|
|
@@ -11203,8 +11242,8 @@ var messages$6 = reactIntl.defineMessages({
|
|
|
11203
11242
|
}
|
|
11204
11243
|
});
|
|
11205
11244
|
|
|
11206
|
-
function ownKeys$
|
|
11207
|
-
function _objectSpread$
|
|
11245
|
+
function ownKeys$d(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11246
|
+
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$d(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$d(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11208
11247
|
var styles$6 = {
|
|
11209
11248
|
"button": "file-input-module__button___2KypN",
|
|
11210
11249
|
"input": "file-input-module__input___3MP4D"
|
|
@@ -11224,7 +11263,7 @@ const FileInput = props => jsxRuntime.jsx("label", {
|
|
|
11224
11263
|
});
|
|
11225
11264
|
FileInput.displayName = 'FileInput';
|
|
11226
11265
|
FileInput.defaultProps = {
|
|
11227
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11266
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$d({}, messages$6.chooseFile)),
|
|
11228
11267
|
allowMultiple: false,
|
|
11229
11268
|
acceptTypes: 'image/png,image/jpeg,image/gif'
|
|
11230
11269
|
};
|
|
@@ -11333,8 +11372,8 @@ const SelectableFieldSearchInput = props => {
|
|
|
11333
11372
|
};
|
|
11334
11373
|
SelectableFieldSearchInput.displayName = 'SelectableFieldSearchInput';
|
|
11335
11374
|
|
|
11336
|
-
function ownKeys$
|
|
11337
|
-
function _objectSpread$
|
|
11375
|
+
function ownKeys$c(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11376
|
+
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$c(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$c(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11338
11377
|
const StoreSelectField = props => {
|
|
11339
11378
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
11340
11379
|
max: props.horizontalConstraint,
|
|
@@ -11348,7 +11387,7 @@ const StoreSelectField = props => {
|
|
|
11348
11387
|
htmlFor: props.id,
|
|
11349
11388
|
hasRequiredIndicator: props.isRequired,
|
|
11350
11389
|
isBold: true
|
|
11351
|
-
}), jsxRuntime.jsx(StoreSelectInput, _objectSpread$
|
|
11390
|
+
}), jsxRuntime.jsx(StoreSelectInput, _objectSpread$c(_objectSpread$c({
|
|
11352
11391
|
projectKey: props.projectKey,
|
|
11353
11392
|
id: props.id,
|
|
11354
11393
|
name: props.name,
|
|
@@ -11388,8 +11427,8 @@ StoreSelectField.defaultProps = {
|
|
|
11388
11427
|
};
|
|
11389
11428
|
|
|
11390
11429
|
var _templateObject;
|
|
11391
|
-
function ownKeys$
|
|
11392
|
-
function _objectSpread$
|
|
11430
|
+
function ownKeys$b(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11431
|
+
function _objectSpread$b(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$b(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$b(Object(source))).call(_context6, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11393
11432
|
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
11433
|
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
11434
|
var styles$3 = {
|
|
@@ -11533,7 +11572,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11533
11572
|
* so it must be an invalid numeric value
|
|
11534
11573
|
*/
|
|
11535
11574
|
_this.handleInvalid = () => {
|
|
11536
|
-
const nextValidStatus = _objectSpread$
|
|
11575
|
+
const nextValidStatus = _objectSpread$b({}, _this.state.validStatus);
|
|
11537
11576
|
if (has__default["default"](nextValidStatus, 'numeric')) {
|
|
11538
11577
|
nextValidStatus.numeric = false;
|
|
11539
11578
|
_this.conditionalSetValidStatus(nextValidStatus);
|
|
@@ -11583,7 +11622,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11583
11622
|
if (prev) return this.state.validStatus[v.name];
|
|
11584
11623
|
return prev;
|
|
11585
11624
|
}, true);
|
|
11586
|
-
const componentProps = _objectSpread$
|
|
11625
|
+
const componentProps = _objectSpread$b(_objectSpread$b({}, this.props), {}, {
|
|
11587
11626
|
[blurHandler || 'onBlurValue']: this.handleBlur,
|
|
11588
11627
|
[changeHandler || 'onChange']: this.handleChange,
|
|
11589
11628
|
onInvalidValue: this.handleInvalid,
|
|
@@ -11600,7 +11639,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11600
11639
|
components: {
|
|
11601
11640
|
WrapperComponent: ToolTipWrapperComponent
|
|
11602
11641
|
},
|
|
11603
|
-
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$
|
|
11642
|
+
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$b({}, componentProps))
|
|
11604
11643
|
})
|
|
11605
11644
|
});
|
|
11606
11645
|
}
|
|
@@ -11663,14 +11702,14 @@ var messages$4 = reactIntl.defineMessages({
|
|
|
11663
11702
|
}
|
|
11664
11703
|
});
|
|
11665
11704
|
|
|
11666
|
-
function ownKeys$
|
|
11667
|
-
function _objectSpread$
|
|
11705
|
+
function ownKeys$a(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11706
|
+
function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$a(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$a(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11668
11707
|
const CustomFieldsErrorTextNotification = props => {
|
|
11669
11708
|
var _context;
|
|
11670
11709
|
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
11671
11710
|
scale: "s",
|
|
11672
11711
|
children: [jsxRuntime.jsx(uiKit.Text.Wrap, {
|
|
11673
|
-
intlMessage: _objectSpread$
|
|
11712
|
+
intlMessage: _objectSpread$a({}, messages$4.customFieldsError)
|
|
11674
11713
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
11675
11714
|
scale: "xs",
|
|
11676
11715
|
children: _mapInstanceProperty__default["default"](_context = props.formErrors).call(_context, formError => jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -11695,8 +11734,8 @@ const messages$3 = reactIntl.defineMessages({
|
|
|
11695
11734
|
}
|
|
11696
11735
|
});
|
|
11697
11736
|
|
|
11698
|
-
function ownKeys$
|
|
11699
|
-
function _objectSpread$
|
|
11737
|
+
function ownKeys$9(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11738
|
+
function _objectSpread$9(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$9(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$9(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11700
11739
|
var styles$2 = {
|
|
11701
11740
|
"label": "label-range-module__label___3Tb0p"
|
|
11702
11741
|
};
|
|
@@ -11704,7 +11743,7 @@ const LabelRange = _ref => {
|
|
|
11704
11743
|
let type = _ref.type;
|
|
11705
11744
|
return jsxRuntime.jsx("label", {
|
|
11706
11745
|
className: styles$2.label,
|
|
11707
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11746
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$9({}, messages$3[type]))
|
|
11708
11747
|
});
|
|
11709
11748
|
};
|
|
11710
11749
|
LabelRange.displayName = 'LabelRange';
|
|
@@ -11722,8 +11761,8 @@ var messages$2 = reactIntl.defineMessages({
|
|
|
11722
11761
|
}
|
|
11723
11762
|
});
|
|
11724
11763
|
|
|
11725
|
-
function ownKeys$
|
|
11726
|
-
function _objectSpread$
|
|
11764
|
+
function ownKeys$8(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11765
|
+
function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$8(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$8(Object(source))).call(_context3, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11727
11766
|
var styles$1 = {
|
|
11728
11767
|
"container": "multi-value-search-input-module__container___2u64d",
|
|
11729
11768
|
"searchInput": "multi-value-search-input-module__searchInput___363nj",
|
|
@@ -11747,7 +11786,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11747
11786
|
}),
|
|
11748
11787
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11749
11788
|
truncate: true,
|
|
11750
|
-
intlMessage: _objectSpread$
|
|
11789
|
+
intlMessage: _objectSpread$8(_objectSpread$8({}, messages$2.filterWholeInput), {}, {
|
|
11751
11790
|
values: {
|
|
11752
11791
|
values: "\"".concat(props.value, "\"")
|
|
11753
11792
|
}
|
|
@@ -11760,7 +11799,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11760
11799
|
}),
|
|
11761
11800
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11762
11801
|
truncate: true,
|
|
11763
|
-
intlMessage: _objectSpread$
|
|
11802
|
+
intlMessage: _objectSpread$8(_objectSpread$8({}, messages$2.filterSeparateValues), {}, {
|
|
11764
11803
|
values: {
|
|
11765
11804
|
values: "\"".concat(props.multiValue.join('", "'), "\"") || props.value
|
|
11766
11805
|
}
|
|
@@ -11871,8 +11910,8 @@ const MultiValueSearchInput = props => {
|
|
|
11871
11910
|
};
|
|
11872
11911
|
MultiValueSearchInput.displayName = 'MultiValueSearchInput';
|
|
11873
11912
|
|
|
11874
|
-
function ownKeys$
|
|
11875
|
-
function _objectSpread$
|
|
11913
|
+
function ownKeys$7(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11914
|
+
function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$7(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$7(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
11876
11915
|
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
11916
|
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
11917
|
var styles = {
|
|
@@ -11894,7 +11933,9 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11894
11933
|
args[_key] = arguments[_key];
|
|
11895
11934
|
}
|
|
11896
11935
|
_this = _super.call(this, ...args);
|
|
11897
|
-
_this.
|
|
11936
|
+
_this.state = {
|
|
11937
|
+
parsedValue: _this.props.value
|
|
11938
|
+
};
|
|
11898
11939
|
_this.setValue = value => {
|
|
11899
11940
|
if (!isValidValue(value)) return;
|
|
11900
11941
|
const newValue = !isUndefined__default["default"](value) ? _this.props.formatNumber(value) : undefined;
|
|
@@ -11907,8 +11948,10 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11907
11948
|
_this.handleChange = event => {
|
|
11908
11949
|
const value = event.target.rawValue;
|
|
11909
11950
|
const parsedNumber = _this.props.parseNumber(value);
|
|
11910
|
-
if (_this.parsedValue === parsedNumber) return;
|
|
11911
|
-
_this.
|
|
11951
|
+
if (_this.state.parsedValue === parsedNumber) return;
|
|
11952
|
+
_this.setState({
|
|
11953
|
+
parsedValue: parsedNumber
|
|
11954
|
+
});
|
|
11912
11955
|
_this.props.onChangeValue(parsedNumber);
|
|
11913
11956
|
if (!isNumberish(value) && _this.props.onInvalidValue) _this.props.onInvalidValue(value);
|
|
11914
11957
|
};
|
|
@@ -11922,12 +11965,10 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11922
11965
|
return _this;
|
|
11923
11966
|
}
|
|
11924
11967
|
_createClass(NumericFormatInput, [{
|
|
11925
|
-
key: "
|
|
11926
|
-
value:
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
if (this.props.value !== nextProps.value && nextProps.value !== this.parsedValue) {
|
|
11930
|
-
this.setValue(nextProps.value);
|
|
11968
|
+
key: "componentDidUpdate",
|
|
11969
|
+
value: function componentDidUpdate(prevProps) {
|
|
11970
|
+
if (this.props.value !== prevProps.value && this.props.value !== this.state.parsedValue) {
|
|
11971
|
+
this.setValue(this.props.value);
|
|
11931
11972
|
}
|
|
11932
11973
|
}
|
|
11933
11974
|
}, {
|
|
@@ -11935,7 +11976,7 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11935
11976
|
value: function render() {
|
|
11936
11977
|
const separators = getSeparatorsForLocale(this.props.numberFormat);
|
|
11937
11978
|
const dataAttributes = filterDataAttributes(this.props);
|
|
11938
|
-
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$
|
|
11979
|
+
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$7({
|
|
11939
11980
|
placeholder: this.props.placeholder,
|
|
11940
11981
|
htmlRef: this.registerInputRef,
|
|
11941
11982
|
options: {
|
|
@@ -12231,8 +12272,8 @@ const createNextSortDefinition = _ref => {
|
|
|
12231
12272
|
}
|
|
12232
12273
|
};
|
|
12233
12274
|
|
|
12234
|
-
function ownKeys$
|
|
12235
|
-
function _objectSpread$
|
|
12275
|
+
function ownKeys$6(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12276
|
+
function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$6(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12236
12277
|
/**
|
|
12237
12278
|
* Creates reducer
|
|
12238
12279
|
* @param {Object} initialState
|
|
@@ -12248,13 +12289,13 @@ function createReducer(initialState, actionHandlers) {
|
|
|
12248
12289
|
|
|
12249
12290
|
// In case reducer ignored action, avoid creating new object
|
|
12250
12291
|
const newSubstate = reduce(newState, action);
|
|
12251
|
-
if (newSubstate) return _objectSpread$
|
|
12292
|
+
if (newSubstate) return _objectSpread$6(_objectSpread$6({}, newState), newSubstate);
|
|
12252
12293
|
return newState;
|
|
12253
12294
|
};
|
|
12254
12295
|
}
|
|
12255
12296
|
|
|
12256
|
-
function ownKeys$
|
|
12257
|
-
function _objectSpread$
|
|
12297
|
+
function ownKeys$5(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12298
|
+
function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$5(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$5(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12258
12299
|
function updateStatusInList(mergeData) {
|
|
12259
12300
|
return (state, _ref) => {
|
|
12260
12301
|
let payload = _ref.payload;
|
|
@@ -12263,15 +12304,15 @@ function updateStatusInList(mergeData) {
|
|
|
12263
12304
|
results[index] = mergeData(payload, results[index]);
|
|
12264
12305
|
results[index].checked = false;
|
|
12265
12306
|
return {
|
|
12266
|
-
currentQueryResult: _objectSpread$
|
|
12307
|
+
currentQueryResult: _objectSpread$5(_objectSpread$5({}, state.currentQueryResult), {}, {
|
|
12267
12308
|
results
|
|
12268
12309
|
})
|
|
12269
12310
|
};
|
|
12270
12311
|
};
|
|
12271
12312
|
}
|
|
12272
12313
|
|
|
12273
|
-
function ownKeys$
|
|
12274
|
-
function _objectSpread$
|
|
12314
|
+
function ownKeys$4(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12315
|
+
function _objectSpread$4(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12275
12316
|
const identity = value => value;
|
|
12276
12317
|
function createResourceReducer(options) {
|
|
12277
12318
|
const _options$constantsPre = options.constantsPrefix,
|
|
@@ -12281,7 +12322,7 @@ function createResourceReducer(options) {
|
|
|
12281
12322
|
_options$initialState = options.initialState,
|
|
12282
12323
|
extendInitialState = _options$initialState === void 0 ? {} : _options$initialState;
|
|
12283
12324
|
const mergeData = options.mergeData || identity;
|
|
12284
|
-
const initialState = _objectSpread$
|
|
12325
|
+
const initialState = _objectSpread$4({
|
|
12285
12326
|
currentQueryResult: {
|
|
12286
12327
|
count: 0,
|
|
12287
12328
|
offset: 0,
|
|
@@ -12301,7 +12342,7 @@ function createResourceReducer(options) {
|
|
|
12301
12342
|
let payload = _ref.payload;
|
|
12302
12343
|
const results = state.currentQueryResult.results;
|
|
12303
12344
|
return {
|
|
12304
|
-
currentQueryResult: _objectSpread$
|
|
12345
|
+
currentQueryResult: _objectSpread$4(_objectSpread$4({}, state.currentQueryResult), {}, {
|
|
12305
12346
|
results: _filterInstanceProperty__default["default"](results).call(results, _ref2 => {
|
|
12306
12347
|
let id = _ref2.id;
|
|
12307
12348
|
return id !== payload.id;
|
|
@@ -12822,8 +12863,8 @@ const getTimeZoneLabel = memoize__default["default"]((selectedTimeZone, timeZone
|
|
|
12822
12863
|
return _concatInstanceProperty__default["default"](_context4 = "(GMT ".concat(timeZoneData.offset, ") ")).call(_context4, timeZoneData.name);
|
|
12823
12864
|
});
|
|
12824
12865
|
|
|
12825
|
-
function ownKeys$
|
|
12826
|
-
function _objectSpread$
|
|
12866
|
+
function ownKeys$3(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12867
|
+
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$3(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12827
12868
|
function withPendingRequests() {
|
|
12828
12869
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pendingRequests';
|
|
12829
12870
|
return Component => {
|
|
@@ -12832,7 +12873,7 @@ function withPendingRequests() {
|
|
|
12832
12873
|
const pendingProp = {
|
|
12833
12874
|
[propName]: pendingRequests
|
|
12834
12875
|
};
|
|
12835
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
12876
|
+
return jsxRuntime.jsx(Component, _objectSpread$3(_objectSpread$3({}, props), pendingProp));
|
|
12836
12877
|
};
|
|
12837
12878
|
WrappedComponent.displayName = wrapDisplayName(Component, 'withPendingRequests');
|
|
12838
12879
|
return WrappedComponent;
|
|
@@ -12867,8 +12908,10 @@ var messages = reactIntl.defineMessages({
|
|
|
12867
12908
|
}
|
|
12868
12909
|
});
|
|
12869
12910
|
|
|
12870
|
-
|
|
12871
|
-
|
|
12911
|
+
const FIELD_NAME = 'custom';
|
|
12912
|
+
|
|
12913
|
+
function ownKeys$2(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12914
|
+
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$2(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$2(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12872
12915
|
const typeDefinitionsExist = typeDefinitions => {
|
|
12873
12916
|
return typeDefinitions.length > 0;
|
|
12874
12917
|
};
|
|
@@ -12885,13 +12928,13 @@ const CustomFieldsInputWrapper = _ref => {
|
|
|
12885
12928
|
const _useFormikContext = formik.useFormikContext(),
|
|
12886
12929
|
formValues = _valuesInstanceProperty__default["default"](_useFormikContext);
|
|
12887
12930
|
if (!typeDefinitionsExist(typeDefinitions)) {
|
|
12888
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12931
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noTypes));
|
|
12889
12932
|
}
|
|
12890
12933
|
if (!typeDefinitionSelected(formValues)) {
|
|
12891
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12934
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noCustomType));
|
|
12892
12935
|
}
|
|
12893
12936
|
if (!typeDefinitionContainsFieldDefinitions(formValues)) {
|
|
12894
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12937
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noCustomFields));
|
|
12895
12938
|
}
|
|
12896
12939
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
12897
12940
|
max: "scale",
|
|
@@ -12904,11 +12947,8 @@ const CustomFieldsInputWrapper = _ref => {
|
|
|
12904
12947
|
};
|
|
12905
12948
|
CustomFieldsInputWrapper.displayName = 'CustomFieldsInputWrapper';
|
|
12906
12949
|
|
|
12907
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12908
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12909
|
-
const FIELD_NAME = 'custom';
|
|
12910
|
-
|
|
12911
|
-
// Creates dropdown options
|
|
12950
|
+
function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12951
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(source))).call(_context2, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
12912
12952
|
const mapTypeDefinitionsToOptions = (typeDefinitions, language, languages, selectedTypeDefinitionId) => {
|
|
12913
12953
|
return _mapInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => ({
|
|
12914
12954
|
isDisabled: selectedTypeDefinitionId && selectedTypeDefinitionId === typeDefinition.type.id,
|
|
@@ -12937,10 +12977,12 @@ const createFormStateFromTypeDefinition = selectedTypeDefinition => {
|
|
|
12937
12977
|
const CustomTypeSubform = _ref => {
|
|
12938
12978
|
var _formValues$FIELD_NAM, _formValues$FIELD_NAM2;
|
|
12939
12979
|
let typeDefinitions = _ref.typeDefinitions,
|
|
12940
|
-
isReadOnly = _ref.isReadOnly
|
|
12980
|
+
isReadOnly = _ref.isReadOnly,
|
|
12981
|
+
isCondensed = _ref.isCondensed;
|
|
12941
12982
|
const _useFormikContext = formik.useFormikContext(),
|
|
12942
12983
|
formValues = _valuesInstanceProperty__default["default"](_useFormikContext),
|
|
12943
|
-
setFieldValue = _useFormikContext.setFieldValue
|
|
12984
|
+
setFieldValue = _useFormikContext.setFieldValue,
|
|
12985
|
+
validateForm = _useFormikContext.validateForm;
|
|
12944
12986
|
const _useIntl = reactIntl.useIntl(),
|
|
12945
12987
|
formatMessage = _useIntl.formatMessage;
|
|
12946
12988
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -12953,19 +12995,23 @@ const CustomTypeSubform = _ref => {
|
|
|
12953
12995
|
const selectedTypeDefinition = _findInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => typeDefinition.type.key === event.target.value);
|
|
12954
12996
|
if (selectedTypeDefinition) {
|
|
12955
12997
|
const nextCustom = createFormStateFromTypeDefinition(selectedTypeDefinition);
|
|
12956
|
-
setFieldValue(FIELD_NAME, nextCustom)
|
|
12998
|
+
setFieldValue(FIELD_NAME, nextCustom).then(() => {
|
|
12999
|
+
validateForm();
|
|
13000
|
+
});
|
|
12957
13001
|
} else {
|
|
12958
|
-
// if the dropdown selector is cleared
|
|
12959
|
-
|
|
12960
|
-
|
|
13002
|
+
// if the dropdown selector is cleared, remove the `custom` field from the form state entirely
|
|
13003
|
+
setFieldValue(FIELD_NAME, undefined).then(() => {
|
|
13004
|
+
validateForm();
|
|
13005
|
+
});
|
|
12961
13006
|
}
|
|
12962
|
-
}, [typeDefinitions, setFieldValue,
|
|
13007
|
+
}, [typeDefinitions, setFieldValue, validateForm]);
|
|
12963
13008
|
return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
12964
13009
|
header: jsxRuntime.jsx(uiKit.CollapsiblePanel.Header, {
|
|
12965
|
-
|
|
13010
|
+
isCondensed: isCondensed,
|
|
13011
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1({}, messages.title))
|
|
12966
13012
|
}),
|
|
12967
13013
|
headerControls: typeDefinitions.length > 0 && jsxRuntime.jsx("div", {
|
|
12968
|
-
css: /*#__PURE__*/react$1.css("min-width:", uiKit.designTokens.
|
|
13014
|
+
css: /*#__PURE__*/react$1.css("min-width:", uiKit.designTokens.constraint11, ";" + ("" ), "" ),
|
|
12969
13015
|
children: jsxRuntime.jsx(uiKit.SelectInput, {
|
|
12970
13016
|
isClearable: true,
|
|
12971
13017
|
"data-testid": "custom-type-select",
|
|
@@ -12977,7 +13023,7 @@ const CustomTypeSubform = _ref => {
|
|
|
12977
13023
|
isReadOnly: isReadOnly
|
|
12978
13024
|
})
|
|
12979
13025
|
}),
|
|
12980
|
-
headerControlsAlignment: "
|
|
13026
|
+
headerControlsAlignment: "right",
|
|
12981
13027
|
children: jsxRuntime.jsx(CustomFieldsInputWrapper, {
|
|
12982
13028
|
typeDefinitions: typeDefinitions,
|
|
12983
13029
|
isReadOnly: isReadOnly
|
|
@@ -12986,9 +13032,97 @@ const CustomTypeSubform = _ref => {
|
|
|
12986
13032
|
};
|
|
12987
13033
|
CustomTypeSubform.displayName = 'CustomTypeSubform';
|
|
12988
13034
|
|
|
13035
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13036
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context6, _context7; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(source), !0)).call(_context6, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(source))).call(_context7, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
13037
|
+
const transformFieldType = fieldDefinition => {
|
|
13038
|
+
var _fieldDefinition$type, _fieldDefinition$type2;
|
|
13039
|
+
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') {
|
|
13040
|
+
var _context;
|
|
13041
|
+
return _objectSpread(_objectSpread({}, fieldDefinition.type), {}, {
|
|
13042
|
+
elementType: _objectSpread(_objectSpread({}, fieldDefinition.type.elementType), {}, {
|
|
13043
|
+
values: _mapInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context, value => ({
|
|
13044
|
+
key: value.key,
|
|
13045
|
+
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
13046
|
+
}))
|
|
13047
|
+
})
|
|
13048
|
+
});
|
|
13049
|
+
} else if (((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum') {
|
|
13050
|
+
var _context2;
|
|
13051
|
+
return _objectSpread(_objectSpread({}, fieldDefinition.type), {}, {
|
|
13052
|
+
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context2, value => ({
|
|
13053
|
+
key: value.key,
|
|
13054
|
+
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
13055
|
+
}))
|
|
13056
|
+
});
|
|
13057
|
+
} else {
|
|
13058
|
+
return fieldDefinition.type;
|
|
13059
|
+
}
|
|
13060
|
+
};
|
|
13061
|
+
const convertCustomField = resource => {
|
|
13062
|
+
var _context3, _context4;
|
|
13063
|
+
return {
|
|
13064
|
+
type: {
|
|
13065
|
+
typeId: 'type',
|
|
13066
|
+
id: resource.custom.type.id,
|
|
13067
|
+
obj: {
|
|
13068
|
+
key: resource.custom.type.key,
|
|
13069
|
+
name: l10n.transformLocalizedFieldToLocalizedString(resource.custom.type.nameAllLocales),
|
|
13070
|
+
fieldDefinitions: _mapInstanceProperty__default["default"](_context3 = resource.custom.type.fieldDefinitions).call(_context3, fieldDefinition => ({
|
|
13071
|
+
name: fieldDefinition.name,
|
|
13072
|
+
required: fieldDefinition.required,
|
|
13073
|
+
inputHint: fieldDefinition.inputHint,
|
|
13074
|
+
type: transformFieldType(fieldDefinition),
|
|
13075
|
+
label: l10n.transformLocalizedFieldToLocalizedString(fieldDefinition.labelAllLocales)
|
|
13076
|
+
}))
|
|
13077
|
+
}
|
|
13078
|
+
},
|
|
13079
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread(_objectSpread({}, fields), {}, {
|
|
13080
|
+
[customField.name]: customField.value
|
|
13081
|
+
}), {})
|
|
13082
|
+
};
|
|
13083
|
+
};
|
|
13084
|
+
const createFormStateFromResource = resource => {
|
|
13085
|
+
// If there are no custom fields on the resource, don't create a form state
|
|
13086
|
+
if (!resource[FIELD_NAME]) {
|
|
13087
|
+
return {
|
|
13088
|
+
[FIELD_NAME]: undefined
|
|
13089
|
+
};
|
|
13090
|
+
}
|
|
13091
|
+
return {
|
|
13092
|
+
[FIELD_NAME]: convertCustomField(resource)
|
|
13093
|
+
};
|
|
13094
|
+
};
|
|
13095
|
+
const createGraphQlDocFromFormState = formState => {
|
|
13096
|
+
var _context5;
|
|
13097
|
+
// Unset the custom type if it's not in the form state
|
|
13098
|
+
if (!formState[FIELD_NAME]) {
|
|
13099
|
+
return {
|
|
13100
|
+
[FIELD_NAME]: {}
|
|
13101
|
+
};
|
|
13102
|
+
}
|
|
13103
|
+
return {
|
|
13104
|
+
[FIELD_NAME]: {
|
|
13105
|
+
type: {
|
|
13106
|
+
id: formState[FIELD_NAME].type.id,
|
|
13107
|
+
typeId: 'type'
|
|
13108
|
+
},
|
|
13109
|
+
fields: _mapInstanceProperty__default["default"](_context5 = _Object$entries__default["default"](formState[FIELD_NAME].fields)).call(_context5, _ref => {
|
|
13110
|
+
let _ref2 = _slicedToArray(_ref, 2),
|
|
13111
|
+
name = _ref2[0],
|
|
13112
|
+
value = _ref2[1];
|
|
13113
|
+
return {
|
|
13114
|
+
name,
|
|
13115
|
+
value: _JSON$stringify__default["default"](value)
|
|
13116
|
+
};
|
|
13117
|
+
})
|
|
13118
|
+
}
|
|
13119
|
+
};
|
|
13120
|
+
};
|
|
13121
|
+
|
|
12989
13122
|
const CustomFieldsFormField = _ref => {
|
|
12990
13123
|
let resources = _ref.resources,
|
|
12991
|
-
isReadOnly = _ref.isReadOnly
|
|
13124
|
+
isReadOnly = _ref.isReadOnly,
|
|
13125
|
+
isCondensed = _ref.isCondensed;
|
|
12992
13126
|
const projectKey = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.project.key);
|
|
12993
13127
|
return jsxRuntime.jsx(CustomFieldTypeDefinitionsConnector$1, {
|
|
12994
13128
|
resources: resources,
|
|
@@ -13004,11 +13138,14 @@ const CustomFieldsFormField = _ref => {
|
|
|
13004
13138
|
const typeDefinitions = _mapInstanceProperty__default["default"](_context = customFieldTypeDefinitions.results).call(_context, CustomFieldTypeDefinitionsConnector$1.graphQlDocToForm);
|
|
13005
13139
|
return jsxRuntime.jsx(CustomTypeSubform, {
|
|
13006
13140
|
typeDefinitions: typeDefinitions,
|
|
13007
|
-
isReadOnly: isReadOnly
|
|
13141
|
+
isReadOnly: isReadOnly,
|
|
13142
|
+
isCondensed: isCondensed
|
|
13008
13143
|
});
|
|
13009
13144
|
}
|
|
13010
13145
|
});
|
|
13011
13146
|
};
|
|
13147
|
+
CustomFieldsFormField.createFormStateFromResource = createFormStateFromResource;
|
|
13148
|
+
CustomFieldsFormField.createGraphQlDocFromFormState = createGraphQlDocFromFormState;
|
|
13012
13149
|
|
|
13013
13150
|
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
13151
|
|