@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 warning__default = /*#__PURE__*/_interopDefault(warning);
|
|
@@ -1671,8 +1673,8 @@ const getData = (code, field) => {
|
|
|
1671
1673
|
};
|
|
1672
1674
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
1673
1675
|
|
|
1674
|
-
function ownKeys$
|
|
1675
|
-
function _objectSpread$
|
|
1676
|
+
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; }
|
|
1677
|
+
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; }
|
|
1676
1678
|
function formatMoneyRangeValue(value, intl) {
|
|
1677
1679
|
var _context;
|
|
1678
1680
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
@@ -1682,7 +1684,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
1682
1684
|
return '';
|
|
1683
1685
|
}
|
|
1684
1686
|
function formatMoneyValue(amount, currency, intl) {
|
|
1685
|
-
return formatMoney$1(_objectSpread$
|
|
1687
|
+
return formatMoney$1(_objectSpread$1l({
|
|
1686
1688
|
centAmount: amount,
|
|
1687
1689
|
fractionDigits: getFractionDigit(currency)
|
|
1688
1690
|
}, currency ? {
|
|
@@ -1699,7 +1701,7 @@ function getFractionedAmount(moneyValue) {
|
|
|
1699
1701
|
}
|
|
1700
1702
|
function formatMoney$1(moneyValue, intl, options) {
|
|
1701
1703
|
var _moneyValue$fractione;
|
|
1702
|
-
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$
|
|
1704
|
+
return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$1l({
|
|
1703
1705
|
style: 'currency',
|
|
1704
1706
|
currency: moneyValue.currencyCode,
|
|
1705
1707
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
@@ -1953,8 +1955,8 @@ const wrapDisplayName = (BaseComponent, hocName) => {
|
|
|
1953
1955
|
return _concatInstanceProperty__default["default"](_context = "".concat(hocName, "(")).call(_context, getDisplayName(BaseComponent), ")");
|
|
1954
1956
|
};
|
|
1955
1957
|
|
|
1956
|
-
function ownKeys$
|
|
1957
|
-
function _objectSpread$
|
|
1958
|
+
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; }
|
|
1959
|
+
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; }
|
|
1958
1960
|
const injectDataTablePaginationState = initialValues => Component => {
|
|
1959
1961
|
const WithDataTablePaginationState = props => {
|
|
1960
1962
|
var _initialValues$tableS, _initialValues$tableS2;
|
|
@@ -1968,7 +1970,7 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1968
1970
|
key: initialValues === null || initialValues === void 0 || (_initialValues$tableS = initialValues.tableSorting) === null || _initialValues$tableS === void 0 ? void 0 : _initialValues$tableS.key,
|
|
1969
1971
|
order: initialValues === null || initialValues === void 0 || (_initialValues$tableS2 = initialValues.tableSorting) === null || _initialValues$tableS2 === void 0 ? void 0 : _initialValues$tableS2.order
|
|
1970
1972
|
});
|
|
1971
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1973
|
+
return jsxRuntime.jsx(Component, _objectSpread$1k(_objectSpread$1k({}, props), {}, {
|
|
1972
1974
|
dataTablePaginationState: {
|
|
1973
1975
|
page,
|
|
1974
1976
|
perPage,
|
|
@@ -1980,8 +1982,8 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1980
1982
|
return WithDataTablePaginationState;
|
|
1981
1983
|
};
|
|
1982
1984
|
|
|
1983
|
-
function ownKeys$
|
|
1984
|
-
function _objectSpread$
|
|
1985
|
+
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; }
|
|
1986
|
+
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; }
|
|
1985
1987
|
const injectNotifications = function () {
|
|
1986
1988
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
1987
1989
|
return Component => {
|
|
@@ -1996,7 +1998,7 @@ const injectNotifications = function () {
|
|
|
1996
1998
|
onActionError,
|
|
1997
1999
|
hideAllPageNotifications
|
|
1998
2000
|
};
|
|
1999
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2001
|
+
return jsxRuntime.jsx(Component, _objectSpread$1j(_objectSpread$1j({}, props), {}, {
|
|
2000
2002
|
[propName]: notifications
|
|
2001
2003
|
}));
|
|
2002
2004
|
};
|
|
@@ -2005,22 +2007,22 @@ const injectNotifications = function () {
|
|
|
2005
2007
|
};
|
|
2006
2008
|
};
|
|
2007
2009
|
|
|
2008
|
-
function ownKeys$
|
|
2009
|
-
function _objectSpread$
|
|
2010
|
+
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; }
|
|
2011
|
+
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; }
|
|
2010
2012
|
function isPropsMapper(mapProps) {
|
|
2011
2013
|
return typeof mapProps === 'function';
|
|
2012
2014
|
}
|
|
2013
2015
|
const withProps = mapProps => Component => {
|
|
2014
2016
|
const EnhancedWithProps = ownProps => {
|
|
2015
|
-
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
2016
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2017
|
+
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1i(_objectSpread$1i({}, ownProps), mapProps(ownProps)) : _objectSpread$1i(_objectSpread$1i({}, ownProps), mapProps);
|
|
2018
|
+
return jsxRuntime.jsx(Component, _objectSpread$1i({}, enhancedProps));
|
|
2017
2019
|
};
|
|
2018
2020
|
EnhancedWithProps.displayName = wrapDisplayName(Component, 'withProps');
|
|
2019
2021
|
return EnhancedWithProps;
|
|
2020
2022
|
};
|
|
2021
2023
|
|
|
2022
|
-
function ownKeys$
|
|
2023
|
-
function _objectSpread$
|
|
2024
|
+
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; }
|
|
2025
|
+
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; }
|
|
2024
2026
|
const useRedirectEffect = _ref => {
|
|
2025
2027
|
let goTo = _ref.goTo;
|
|
2026
2028
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -2040,30 +2042,30 @@ const defaultOptions$5 = {
|
|
|
2040
2042
|
skip: () => false
|
|
2041
2043
|
};
|
|
2042
2044
|
const withRedirectTo = options => Component => {
|
|
2043
|
-
const mergedOptions = _objectSpread$
|
|
2045
|
+
const mergedOptions = _objectSpread$1h(_objectSpread$1h({}, defaultOptions$5), options);
|
|
2044
2046
|
const WithRedirectTo = props => {
|
|
2045
2047
|
if (!mergedOptions.skip(props)) {
|
|
2046
2048
|
return jsxRuntime.jsx(RedirectTo, {
|
|
2047
2049
|
goTo: options.selectGoTo(props)
|
|
2048
2050
|
});
|
|
2049
2051
|
}
|
|
2050
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2052
|
+
return jsxRuntime.jsx(Component, _objectSpread$1h({}, props));
|
|
2051
2053
|
};
|
|
2052
2054
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
2053
2055
|
return WithRedirectTo;
|
|
2054
2056
|
};
|
|
2055
2057
|
|
|
2056
|
-
function ownKeys$
|
|
2057
|
-
function _objectSpread$
|
|
2058
|
+
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; }
|
|
2059
|
+
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; }
|
|
2058
2060
|
const defaultOptions$4 = {
|
|
2059
2061
|
propName: 'modalState',
|
|
2060
2062
|
isInitiallyOpen: false
|
|
2061
2063
|
};
|
|
2062
2064
|
const injectModalState$1 = options => Component => {
|
|
2063
|
-
const mergedOptions = _objectSpread$
|
|
2065
|
+
const mergedOptions = _objectSpread$1g(_objectSpread$1g({}, defaultOptions$4), options);
|
|
2064
2066
|
const WithModalState = props => {
|
|
2065
2067
|
const modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
2066
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2068
|
+
return jsxRuntime.jsx(Component, _objectSpread$1g(_objectSpread$1g({}, props), {}, {
|
|
2067
2069
|
[mergedOptions.propName]: modalState
|
|
2068
2070
|
}));
|
|
2069
2071
|
};
|
|
@@ -2071,17 +2073,17 @@ const injectModalState$1 = options => Component => {
|
|
|
2071
2073
|
return WithModalState;
|
|
2072
2074
|
};
|
|
2073
2075
|
|
|
2074
|
-
function ownKeys$
|
|
2075
|
-
function _objectSpread$
|
|
2076
|
+
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; }
|
|
2077
|
+
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; }
|
|
2076
2078
|
const defaultOptions$3 = {
|
|
2077
2079
|
propName: 'toggleState',
|
|
2078
2080
|
isInitiallyOpen: false
|
|
2079
2081
|
};
|
|
2080
2082
|
const injectModalState = options => Component => {
|
|
2081
|
-
const mergedOptions = _objectSpread$
|
|
2083
|
+
const mergedOptions = _objectSpread$1f(_objectSpread$1f({}, defaultOptions$3), options);
|
|
2082
2084
|
const WithToggleState = props => {
|
|
2083
2085
|
const toggleState = uiKit.useToggleState(mergedOptions.isInitiallyOpen);
|
|
2084
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
2086
|
+
return jsxRuntime.jsx(Component, _objectSpread$1f(_objectSpread$1f({}, props), {}, {
|
|
2085
2087
|
[mergedOptions.propName]: toggleState
|
|
2086
2088
|
}));
|
|
2087
2089
|
};
|
|
@@ -2089,8 +2091,8 @@ const injectModalState = options => Component => {
|
|
|
2089
2091
|
return WithToggleState;
|
|
2090
2092
|
};
|
|
2091
2093
|
|
|
2092
|
-
function ownKeys$
|
|
2093
|
-
function _objectSpread$
|
|
2094
|
+
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; }
|
|
2095
|
+
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; }
|
|
2094
2096
|
const defaultOptions$2 = {
|
|
2095
2097
|
storageType: 'local',
|
|
2096
2098
|
segregateByUser: true
|
|
@@ -2108,7 +2110,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
|
|
|
2108
2110
|
const isNil = value => typeof value === 'undefined' || value === null;
|
|
2109
2111
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
2110
2112
|
var _context;
|
|
2111
|
-
const mergedOptions = _objectSpread$
|
|
2113
|
+
const mergedOptions = _objectSpread$1e(_objectSpread$1e({}, defaultOptions$2), options);
|
|
2112
2114
|
const userId = applicationShellConnectors.useApplicationContext(context => {
|
|
2113
2115
|
var _context$user;
|
|
2114
2116
|
return (_context$user = context.user) === null || _context$user === void 0 ? void 0 : _context$user.id;
|
|
@@ -2156,8 +2158,8 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
2156
2158
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
2157
2159
|
};
|
|
2158
2160
|
|
|
2159
|
-
function ownKeys$
|
|
2160
|
-
function _objectSpread$
|
|
2161
|
+
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; }
|
|
2162
|
+
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; }
|
|
2161
2163
|
const defaultOptions$1 = {
|
|
2162
2164
|
propName: 'storage',
|
|
2163
2165
|
storageKey: '',
|
|
@@ -2170,7 +2172,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
2170
2172
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
2171
2173
|
* argument position does not allow passing specification of option(s).
|
|
2172
2174
|
*/
|
|
2173
|
-
const mergedOptions = _objectSpread$
|
|
2175
|
+
const mergedOptions = _objectSpread$1d(_objectSpread$1d({}, defaultOptions$1), options);
|
|
2174
2176
|
const WithStorage = props => {
|
|
2175
2177
|
const _useStorage = useStorage(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
2176
2178
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -2184,7 +2186,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
2184
2186
|
readFromStorage
|
|
2185
2187
|
}
|
|
2186
2188
|
};
|
|
2187
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
2189
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1d(_objectSpread$1d({}, props), storageProp));
|
|
2188
2190
|
};
|
|
2189
2191
|
WithStorage.displayName = wrapDisplayName(WrappedComponent, 'WithStorage');
|
|
2190
2192
|
return WithStorage;
|
|
@@ -2228,9 +2230,9 @@ const usePrevious = value => {
|
|
|
2228
2230
|
return ref.current;
|
|
2229
2231
|
};
|
|
2230
2232
|
|
|
2231
|
-
function ownKeys$
|
|
2232
|
-
function _objectSpread$
|
|
2233
|
-
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: "
|
|
2233
|
+
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; }
|
|
2234
|
+
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; }
|
|
2235
|
+
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 } } } };
|
|
2234
2236
|
const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
2235
2237
|
var _storesQueryResult$re;
|
|
2236
2238
|
if (!storesQueryResult) return null;
|
|
@@ -2240,7 +2242,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
2240
2242
|
offset: storesQueryResult.offset,
|
|
2241
2243
|
results: (_storesQueryResult$re = storesQueryResult.results) === null || _storesQueryResult$re === void 0 ? void 0 : _mapInstanceProperty__default["default"](_storesQueryResult$re).call(_storesQueryResult$re, store => {
|
|
2242
2244
|
var _store$productSelecti;
|
|
2243
|
-
return _objectSpread$
|
|
2245
|
+
return _objectSpread$1c(_objectSpread$1c({}, store), {}, {
|
|
2244
2246
|
productSelections: (_store$productSelecti = store.productSelections) === null || _store$productSelecti === void 0 ? void 0 : _filterInstanceProperty__default["default"](_store$productSelecti).call(_store$productSelecti, productSelectionRef => Boolean(productSelectionRef.productSelection))
|
|
2245
2247
|
});
|
|
2246
2248
|
})
|
|
@@ -2248,7 +2250,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
2248
2250
|
};
|
|
2249
2251
|
const createQueryVariables$6 = ownProps => {
|
|
2250
2252
|
var _context;
|
|
2251
|
-
return _objectSpread$
|
|
2253
|
+
return _objectSpread$1c(_objectSpread$1c({
|
|
2252
2254
|
limit: ownProps.limit,
|
|
2253
2255
|
offset: ownProps.offset,
|
|
2254
2256
|
sort: _sortInstanceProperty__default["default"](ownProps)
|
|
@@ -2403,8 +2405,8 @@ function useDidFormValidationFail() {
|
|
|
2403
2405
|
return Boolean(didFormValidationFail);
|
|
2404
2406
|
}
|
|
2405
2407
|
|
|
2406
|
-
function ownKeys$
|
|
2407
|
-
function _objectSpread$
|
|
2408
|
+
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; }
|
|
2409
|
+
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; }
|
|
2408
2410
|
const TEN_MINUTES_IN_MS = 600000;
|
|
2409
2411
|
const defaultOptions = {
|
|
2410
2412
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -2432,7 +2434,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
2432
2434
|
};
|
|
2433
2435
|
const usePersistedReminder = function () {
|
|
2434
2436
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2435
|
-
const mergedOptions = _objectSpread$
|
|
2437
|
+
const mergedOptions = _objectSpread$1b(_objectSpread$1b({}, defaultOptions), options);
|
|
2436
2438
|
const _useStorage = useStorage(mergedOptions.storageKey, null),
|
|
2437
2439
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
2438
2440
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -2496,8 +2498,8 @@ var messages$I = reactIntl.defineMessages({
|
|
|
2496
2498
|
}
|
|
2497
2499
|
});
|
|
2498
2500
|
|
|
2499
|
-
function ownKeys$
|
|
2500
|
-
function _objectSpread$
|
|
2501
|
+
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; }
|
|
2502
|
+
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; }
|
|
2501
2503
|
const LinkToProfile = props => {
|
|
2502
2504
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
2503
2505
|
to: "/account/profile",
|
|
@@ -2517,7 +2519,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2517
2519
|
isBold: true,
|
|
2518
2520
|
intlMessage: messages$I.profileUpdated
|
|
2519
2521
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2520
|
-
intlMessage: _objectSpread$
|
|
2522
|
+
intlMessage: _objectSpread$1a(_objectSpread$1a({}, messages$I.addMoreInformation), {}, {
|
|
2521
2523
|
values: {
|
|
2522
2524
|
newline: getNewLine
|
|
2523
2525
|
}
|
|
@@ -2526,7 +2528,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2526
2528
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2527
2529
|
scale: "xs",
|
|
2528
2530
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2529
|
-
intlMessage: _objectSpread$
|
|
2531
|
+
intlMessage: _objectSpread$1a(_objectSpread$1a({}, messages$I.informationAndProfileLink), {}, {
|
|
2530
2532
|
values: {
|
|
2531
2533
|
newline: getNewLine,
|
|
2532
2534
|
link: getLinkToProfile
|
|
@@ -2683,8 +2685,8 @@ const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
|
2683
2685
|
// eslint-disable-next-line testing-library/await-async-utils
|
|
2684
2686
|
React.useCallback(debounce__default["default"](promiseCallback, wait), [promiseCallback]);
|
|
2685
2687
|
|
|
2686
|
-
function ownKeys$
|
|
2687
|
-
function _objectSpread$
|
|
2688
|
+
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; }
|
|
2689
|
+
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; }
|
|
2688
2690
|
const prepareMutableColumnProps = (columnConfig, mutableColumnProps) => {
|
|
2689
2691
|
const updatedColumnProps = {};
|
|
2690
2692
|
_forEachInstanceProperty__default["default"](mutableColumnProps).call(mutableColumnProps, columnProp => {
|
|
@@ -2704,14 +2706,14 @@ const retrieveColumnsWithCachedConfiguration = _ref => {
|
|
|
2704
2706
|
mutableColumnProps = _ref.mutableColumnProps;
|
|
2705
2707
|
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 => {
|
|
2706
2708
|
const initialColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedConfig.key);
|
|
2707
|
-
return _objectSpread$
|
|
2709
|
+
return _objectSpread$19(_objectSpread$19({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2708
2710
|
});
|
|
2709
2711
|
};
|
|
2710
2712
|
const handleCacheUpdate = _ref2 => {
|
|
2711
2713
|
let update = _ref2.update,
|
|
2712
2714
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2713
2715
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2714
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2716
|
+
return updateCachedTableConfiguration(_objectSpread$19(_objectSpread$19({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2715
2717
|
};
|
|
2716
2718
|
|
|
2717
2719
|
// Signature:
|
|
@@ -2740,7 +2742,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2740
2742
|
return {
|
|
2741
2743
|
columnsConfig: _mapInstanceProperty__default["default"](initialVisibleColumnKeys).call(initialVisibleColumnKeys, visibleColumnKey => {
|
|
2742
2744
|
const visibleColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, columnConfig => columnConfig.key === visibleColumnKey);
|
|
2743
|
-
return _objectSpread$
|
|
2745
|
+
return _objectSpread$19({
|
|
2744
2746
|
key: visibleColumnKey
|
|
2745
2747
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2746
2748
|
}),
|
|
@@ -2811,21 +2813,21 @@ const handlers$4 = {
|
|
|
2811
2813
|
}
|
|
2812
2814
|
};
|
|
2813
2815
|
|
|
2814
|
-
function ownKeys$
|
|
2815
|
-
function _objectSpread$
|
|
2816
|
+
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; }
|
|
2817
|
+
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; }
|
|
2816
2818
|
|
|
2817
2819
|
// eslint-disable-next-line import/prefer-default-export
|
|
2818
2820
|
const convertProductSelectionsFromGraphQl = productSelections => {
|
|
2819
2821
|
var _context;
|
|
2820
|
-
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$
|
|
2821
|
-
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$
|
|
2822
|
+
return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$18(_objectSpread$18({}, productSelections), {}, {
|
|
2823
|
+
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$18({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
2822
2824
|
from: 'nameAllLocales',
|
|
2823
2825
|
to: 'name'
|
|
2824
2826
|
}])))
|
|
2825
2827
|
});
|
|
2826
2828
|
};
|
|
2827
2829
|
|
|
2828
|
-
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: "
|
|
2830
|
+
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 } } } };
|
|
2829
2831
|
const createQueryVariables$5 = ownProps => ({
|
|
2830
2832
|
limit: ownProps.limit,
|
|
2831
2833
|
offset: ownProps.offset,
|
|
@@ -2994,8 +2996,8 @@ var commonPickerMessages = reactIntl.defineMessages({
|
|
|
2994
2996
|
}
|
|
2995
2997
|
});
|
|
2996
2998
|
|
|
2997
|
-
function ownKeys$
|
|
2998
|
-
function _objectSpread$
|
|
2999
|
+
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; }
|
|
3000
|
+
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; }
|
|
2999
3001
|
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 } } } };
|
|
3000
3002
|
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 } } } };
|
|
3001
3003
|
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 } } } };
|
|
@@ -3016,7 +3018,7 @@ const ChannelPickerInput = _ref => {
|
|
|
3016
3018
|
const _useIntl = reactIntl.useIntl(),
|
|
3017
3019
|
formatMessage = _useIntl.formatMessage;
|
|
3018
3020
|
const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
|
|
3019
|
-
const variables = React.useMemo(() => _objectSpread$
|
|
3021
|
+
const variables = React.useMemo(() => _objectSpread$17({
|
|
3020
3022
|
sortByNamePath: "name.".concat(dataLocale)
|
|
3021
3023
|
}, role && {
|
|
3022
3024
|
where: "roles contains any (\"".concat(role, "\")")
|
|
@@ -3145,8 +3147,8 @@ var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
|
3145
3147
|
|
|
3146
3148
|
const keepDisplayName = component => setDisplayName(getDisplayName(component));
|
|
3147
3149
|
|
|
3148
|
-
function ownKeys$
|
|
3149
|
-
function _objectSpread$
|
|
3150
|
+
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; }
|
|
3151
|
+
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; }
|
|
3150
3152
|
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); }; }
|
|
3151
3153
|
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; } }
|
|
3152
3154
|
const withMouseOverState = BaseComponent => {
|
|
@@ -3178,7 +3180,7 @@ const withMouseOverState = BaseComponent => {
|
|
|
3178
3180
|
handleMouseOver: this.handleMouseOver,
|
|
3179
3181
|
handleMouseOut: this.handleMouseOut
|
|
3180
3182
|
};
|
|
3181
|
-
return jsxRuntime.jsx(BaseComponent, _objectSpread$
|
|
3183
|
+
return jsxRuntime.jsx(BaseComponent, _objectSpread$16({}, _objectSpread$16(_objectSpread$16({}, this.props), injectedProps)));
|
|
3182
3184
|
}
|
|
3183
3185
|
}]);
|
|
3184
3186
|
return WithMouseOverState;
|
|
@@ -3187,8 +3189,8 @@ const withMouseOverState = BaseComponent => {
|
|
|
3187
3189
|
return WithMouseOverState;
|
|
3188
3190
|
};
|
|
3189
3191
|
|
|
3190
|
-
function ownKeys$
|
|
3191
|
-
function _objectSpread$
|
|
3192
|
+
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; }
|
|
3193
|
+
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; }
|
|
3192
3194
|
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); }; }
|
|
3193
3195
|
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; } }
|
|
3194
3196
|
var styles$h = {
|
|
@@ -3214,7 +3216,8 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3214
3216
|
}
|
|
3215
3217
|
_this = _super.call(this, ...args);
|
|
3216
3218
|
_this.state = {
|
|
3217
|
-
draftValue:
|
|
3219
|
+
draftValue: '',
|
|
3220
|
+
prevValue: ''
|
|
3218
3221
|
};
|
|
3219
3222
|
_this.clearPendingUpdates = () => {
|
|
3220
3223
|
clearTimeout(_this.changeTimeout);
|
|
@@ -3261,8 +3264,8 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3261
3264
|
};
|
|
3262
3265
|
_this.doDelayedUpdate = (updateFunction, event, eventType) => {
|
|
3263
3266
|
const self = _assertThisInitialized(_this);
|
|
3264
|
-
// TODO: can't we just use one variable?
|
|
3265
3267
|
const timeoutKey = "".concat(eventType, "Timeout");
|
|
3268
|
+
// TODO: can't we just use one variable?
|
|
3266
3269
|
clearTimeout(_this[timeoutKey]);
|
|
3267
3270
|
_this[timeoutKey] = _setTimeout__default["default"](() => {
|
|
3268
3271
|
updateFunction.call(self, event);
|
|
@@ -3272,26 +3275,6 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3272
3275
|
return _this;
|
|
3273
3276
|
}
|
|
3274
3277
|
_createClass(ThrottledField, [{
|
|
3275
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
3276
|
-
value:
|
|
3277
|
-
// eslint-disable-next-line camelcase
|
|
3278
|
-
function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
3279
|
-
if (!has__default["default"](nextProps, 'value')) return;
|
|
3280
|
-
if (!nextProps.value && nextProps.value !== 0) {
|
|
3281
|
-
// let new value from props take precedence over pending updates
|
|
3282
|
-
this.clearPendingUpdates();
|
|
3283
|
-
this.setState({
|
|
3284
|
-
draftValue: ''
|
|
3285
|
-
});
|
|
3286
|
-
} else if (nextProps.value !== this.state.draftValue) {
|
|
3287
|
-
// let new value from props take precedence over pending updates
|
|
3288
|
-
this.clearPendingUpdates();
|
|
3289
|
-
this.setState({
|
|
3290
|
-
draftValue: nextProps.value
|
|
3291
|
-
});
|
|
3292
|
-
}
|
|
3293
|
-
}
|
|
3294
|
-
}, {
|
|
3295
3278
|
key: "componentWillUnmount",
|
|
3296
3279
|
value: function componentWillUnmount() {
|
|
3297
3280
|
this.clearPendingUpdates();
|
|
@@ -3299,7 +3282,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3299
3282
|
}, {
|
|
3300
3283
|
key: "render",
|
|
3301
3284
|
value: function render() {
|
|
3302
|
-
const commonProps = _objectSpread$
|
|
3285
|
+
const commonProps = _objectSpread$15(_objectSpread$15({
|
|
3303
3286
|
value: this.state.draftValue,
|
|
3304
3287
|
autoComplete: this.props.autoComplete,
|
|
3305
3288
|
onChange: this.handleChange,
|
|
@@ -3318,7 +3301,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3318
3301
|
htmlFor: inputId,
|
|
3319
3302
|
children: this.props.label
|
|
3320
3303
|
})
|
|
3321
|
-
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$
|
|
3304
|
+
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$15(_objectSpread$15({}, commonProps), {}, {
|
|
3322
3305
|
id: inputId,
|
|
3323
3306
|
className: classnames__default["default"](styles$h.textarea, styles$h["textarea-".concat(this.props.style)], {
|
|
3324
3307
|
[styles$h.invalid]: !this.props.isValid,
|
|
@@ -3327,7 +3310,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3327
3310
|
rows: 1,
|
|
3328
3311
|
maxRows: this.props.autoSize ? undefined : 1,
|
|
3329
3312
|
cacheMeasurements: true
|
|
3330
|
-
})) : jsxRuntime.jsx("input", _objectSpread$
|
|
3313
|
+
})) : jsxRuntime.jsx("input", _objectSpread$15(_objectSpread$15({}, commonProps), {}, {
|
|
3331
3314
|
id: inputId,
|
|
3332
3315
|
ref: this.props.inputRef,
|
|
3333
3316
|
type: this.props.as,
|
|
@@ -3339,6 +3322,17 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
3339
3322
|
}))]
|
|
3340
3323
|
});
|
|
3341
3324
|
}
|
|
3325
|
+
}], [{
|
|
3326
|
+
key: "getDerivedStateFromProps",
|
|
3327
|
+
value: function getDerivedStateFromProps(nextProps, prevState) {
|
|
3328
|
+
if (nextProps.value !== prevState.prevValue) {
|
|
3329
|
+
return {
|
|
3330
|
+
draftValue: nextProps.value || nextProps.value === 0 ? nextProps.value : '',
|
|
3331
|
+
prevValue: nextProps.value
|
|
3332
|
+
};
|
|
3333
|
+
}
|
|
3334
|
+
return null;
|
|
3335
|
+
}
|
|
3342
3336
|
}]);
|
|
3343
3337
|
return ThrottledField;
|
|
3344
3338
|
}(React.PureComponent);
|
|
@@ -3684,8 +3678,8 @@ var messages$E = reactIntl.defineMessages({
|
|
|
3684
3678
|
}
|
|
3685
3679
|
});
|
|
3686
3680
|
|
|
3687
|
-
function ownKeys$
|
|
3688
|
-
function _objectSpread$
|
|
3681
|
+
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; }
|
|
3682
|
+
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; }
|
|
3689
3683
|
const getBottomOption = formatMessage => ({
|
|
3690
3684
|
options: [{
|
|
3691
3685
|
label: formatMessage ? formatMessage(messages$E.bottomOption) : messages$E.bottomOption,
|
|
@@ -3696,7 +3690,7 @@ const getBottomOption = formatMessage => ({
|
|
|
3696
3690
|
const Option$2 = props => {
|
|
3697
3691
|
const _useIntl = reactIntl.useIntl(),
|
|
3698
3692
|
formatMessage = _useIntl.formatMessage;
|
|
3699
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
3693
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$14(_objectSpread$14({}, props), {}, {
|
|
3700
3694
|
children: props.data.isBottomOption ? jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
3701
3695
|
tone: "secondary",
|
|
3702
3696
|
children: formatMessage(props.data.label)
|
|
@@ -3713,8 +3707,8 @@ const Option$2 = props => {
|
|
|
3713
3707
|
};
|
|
3714
3708
|
Option$2.displayName = 'Option';
|
|
3715
3709
|
|
|
3716
|
-
function ownKeys$
|
|
3717
|
-
function _objectSpread$
|
|
3710
|
+
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; }
|
|
3711
|
+
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; }
|
|
3718
3712
|
const useHandlers = onChange => {
|
|
3719
3713
|
const _useState = React.useState(),
|
|
3720
3714
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -3725,8 +3719,8 @@ const useHandlers = onChange => {
|
|
|
3725
3719
|
}, []);
|
|
3726
3720
|
const handleChange = useEventCallback(event => {
|
|
3727
3721
|
var _event$target$value;
|
|
3728
|
-
const eventWithExtractedValue = _objectSpread$
|
|
3729
|
-
target: _objectSpread$
|
|
3722
|
+
const eventWithExtractedValue = _objectSpread$13(_objectSpread$13({}, event), {}, {
|
|
3723
|
+
target: _objectSpread$13(_objectSpread$13({}, event.target), {}, {
|
|
3730
3724
|
value: (_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.value
|
|
3731
3725
|
})
|
|
3732
3726
|
});
|
|
@@ -3735,8 +3729,8 @@ const useHandlers = onChange => {
|
|
|
3735
3729
|
return [handleInputChange, handleChange];
|
|
3736
3730
|
};
|
|
3737
3731
|
|
|
3738
|
-
function ownKeys$
|
|
3739
|
-
function _objectSpread$
|
|
3732
|
+
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; }
|
|
3733
|
+
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; }
|
|
3740
3734
|
const constructPrefixSearchPredicate = function () {
|
|
3741
3735
|
let prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
3742
3736
|
let lowerBound = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -3779,7 +3773,7 @@ const useLoadOptions = _ref => {
|
|
|
3779
3773
|
}();
|
|
3780
3774
|
return client$1.query({
|
|
3781
3775
|
query,
|
|
3782
|
-
variables: _objectSpread$
|
|
3776
|
+
variables: _objectSpread$12({
|
|
3783
3777
|
where
|
|
3784
3778
|
}, variables),
|
|
3785
3779
|
context: {
|
|
@@ -4070,9 +4064,9 @@ const StatePickerInput = _ref => {
|
|
|
4070
4064
|
};
|
|
4071
4065
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
4072
4066
|
|
|
4073
|
-
function ownKeys$
|
|
4074
|
-
function _objectSpread$
|
|
4075
|
-
const TooltipWrapper = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$
|
|
4067
|
+
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; }
|
|
4068
|
+
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; }
|
|
4069
|
+
const TooltipWrapper = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$11({
|
|
4076
4070
|
ref: ref,
|
|
4077
4071
|
style: {
|
|
4078
4072
|
display: 'block',
|
|
@@ -4210,8 +4204,8 @@ const getPrefixSearchBounds = input => {
|
|
|
4210
4204
|
};
|
|
4211
4205
|
|
|
4212
4206
|
const _excluded = ["action"];
|
|
4213
|
-
function ownKeys
|
|
4214
|
-
function _objectSpread
|
|
4207
|
+
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; }
|
|
4208
|
+
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; }
|
|
4215
4209
|
|
|
4216
4210
|
/**
|
|
4217
4211
|
* Checks if a value is a LocalizedString
|
|
@@ -4233,7 +4227,7 @@ const getIsLocalizedString = maybeLocalizedString => {
|
|
|
4233
4227
|
*/
|
|
4234
4228
|
const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
|
|
4235
4229
|
if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
|
|
4236
|
-
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread
|
|
4230
|
+
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$10(_objectSpread$10({}, customFields), {}, {
|
|
4237
4231
|
[customField.name]: customField.value
|
|
4238
4232
|
}), {});
|
|
4239
4233
|
};
|
|
@@ -4257,7 +4251,7 @@ function transformLocalizedFieldsForCategory(category) {
|
|
|
4257
4251
|
const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
|
|
4258
4252
|
const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
|
|
4259
4253
|
const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
|
|
4260
|
-
return _objectSpread
|
|
4254
|
+
return _objectSpread$10(_objectSpread$10(_objectSpread$10({}, transformedData), parent ? {
|
|
4261
4255
|
parent
|
|
4262
4256
|
} : {}), ancestors ? {
|
|
4263
4257
|
ancestors
|
|
@@ -4482,7 +4476,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4482
4476
|
case 'addAttributeDefinition':
|
|
4483
4477
|
return {
|
|
4484
4478
|
[actionName]: {
|
|
4485
|
-
attributeDefinition: _objectSpread
|
|
4479
|
+
attributeDefinition: _objectSpread$10(_objectSpread$10({}, actionPayload.attribute), {}, {
|
|
4486
4480
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
|
|
4487
4481
|
inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
|
|
4488
4482
|
type: createAttributeTypeValue(actionPayload.attribute)
|
|
@@ -4578,7 +4572,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4578
4572
|
return {
|
|
4579
4573
|
[actionName]: {
|
|
4580
4574
|
attributeName: actionPayload.attributeName,
|
|
4581
|
-
value: _objectSpread
|
|
4575
|
+
value: _objectSpread$10(_objectSpread$10({}, actionPayload.value), {}, {
|
|
4582
4576
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
|
|
4583
4577
|
})
|
|
4584
4578
|
}
|
|
@@ -4587,7 +4581,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4587
4581
|
return {
|
|
4588
4582
|
[actionName]: {
|
|
4589
4583
|
attributeName: actionPayload.attributeName,
|
|
4590
|
-
newValue: _objectSpread
|
|
4584
|
+
newValue: _objectSpread$10(_objectSpread$10({}, actionPayload.newValue), {}, {
|
|
4591
4585
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
|
|
4592
4586
|
})
|
|
4593
4587
|
}
|
|
@@ -4614,7 +4608,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4614
4608
|
name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
|
|
4615
4609
|
taxCategory: actionPayload.taxCategory,
|
|
4616
4610
|
money: {
|
|
4617
|
-
[actionPayload.money.type]: _objectSpread
|
|
4611
|
+
[actionPayload.money.type]: _objectSpread$10({
|
|
4618
4612
|
centAmount: actionPayload.money.centAmount,
|
|
4619
4613
|
currencyCode: actionPayload.money.currencyCode
|
|
4620
4614
|
}, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4669,8 +4663,8 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4669
4663
|
fields: customFields
|
|
4670
4664
|
} : null;
|
|
4671
4665
|
return {
|
|
4672
|
-
[actionName]: _objectSpread
|
|
4673
|
-
address: _objectSpread
|
|
4666
|
+
[actionName]: _objectSpread$10(_objectSpread$10({}, actionPayload), {}, {
|
|
4667
|
+
address: _objectSpread$10(_objectSpread$10({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
|
|
4674
4668
|
custom
|
|
4675
4669
|
})
|
|
4676
4670
|
})
|
|
@@ -4746,8 +4740,8 @@ function omitDeep(obj, fieldsToOmit) {
|
|
|
4746
4740
|
return originalOmitDeep__default["default"](obj, fieldsToOmit);
|
|
4747
4741
|
}
|
|
4748
4742
|
|
|
4749
|
-
function ownKeys
|
|
4750
|
-
function _objectSpread
|
|
4743
|
+
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; }
|
|
4744
|
+
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; }
|
|
4751
4745
|
function getPriceChannelName(price) {
|
|
4752
4746
|
var _ref, _price$channel$name, _price$channel, _price$channel2;
|
|
4753
4747
|
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;
|
|
@@ -4761,11 +4755,11 @@ function getDiscountValue(price) {
|
|
|
4761
4755
|
} 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) {
|
|
4762
4756
|
fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
|
|
4763
4757
|
}
|
|
4764
|
-
return price.discounted ? _objectSpread
|
|
4758
|
+
return price.discounted ? _objectSpread$$(_objectSpread$$({}, price.value), {}, {
|
|
4765
4759
|
fractionedAmount,
|
|
4766
4760
|
centAmount: price.value.centAmount - price.discounted.value.centAmount,
|
|
4767
4761
|
preciseAmount
|
|
4768
|
-
}) : _objectSpread
|
|
4762
|
+
}) : _objectSpread$$(_objectSpread$$({}, price.value), {}, {
|
|
4769
4763
|
centAmount: 0
|
|
4770
4764
|
});
|
|
4771
4765
|
}
|
|
@@ -4794,7 +4788,7 @@ function getNetUnitPrice(_ref2) {
|
|
|
4794
4788
|
}
|
|
4795
4789
|
let preciseAmount;
|
|
4796
4790
|
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);
|
|
4797
|
-
return _objectSpread
|
|
4791
|
+
return _objectSpread$$(_objectSpread$$({}, price.value), {}, {
|
|
4798
4792
|
centAmount,
|
|
4799
4793
|
preciseAmount
|
|
4800
4794
|
});
|
|
@@ -4811,7 +4805,7 @@ function getNetUnitPrice(_ref2) {
|
|
|
4811
4805
|
}
|
|
4812
4806
|
let preciseAmount;
|
|
4813
4807
|
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);
|
|
4814
|
-
return _objectSpread
|
|
4808
|
+
return _objectSpread$$(_objectSpread$$({}, price.value), {}, {
|
|
4815
4809
|
centAmount,
|
|
4816
4810
|
preciseAmount
|
|
4817
4811
|
});
|
|
@@ -4823,7 +4817,7 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4823
4817
|
const currencyCode = price.value.currencyCode;
|
|
4824
4818
|
const fractionedAmount = getFractionedAmount(price.value);
|
|
4825
4819
|
if (currencyCode && !isNil__default["default"](fractionedAmount)) {
|
|
4826
|
-
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread
|
|
4820
|
+
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$$(_objectSpread$$({}, minPrices), {}, {
|
|
4827
4821
|
[currencyCode]: price.value
|
|
4828
4822
|
});
|
|
4829
4823
|
}
|
|
@@ -4832,8 +4826,8 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4832
4826
|
return _Object$values__default["default"](minPricesByCurrency);
|
|
4833
4827
|
}
|
|
4834
4828
|
|
|
4835
|
-
function ownKeys$
|
|
4836
|
-
function _objectSpread$
|
|
4829
|
+
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; }
|
|
4830
|
+
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; }
|
|
4837
4831
|
const transformCustomFieldFromGraphQLResponse = resource => {
|
|
4838
4832
|
var _context, _context4;
|
|
4839
4833
|
return {
|
|
@@ -4848,14 +4842,14 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4848
4842
|
return {
|
|
4849
4843
|
name: fieldDefinition.name,
|
|
4850
4844
|
required: fieldDefinition.required,
|
|
4851
|
-
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$
|
|
4852
|
-
elementType: _objectSpread$
|
|
4845
|
+
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), {}, {
|
|
4846
|
+
elementType: _objectSpread$_(_objectSpread$_({}, fieldDefinition.type.elementType), {}, {
|
|
4853
4847
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
4854
4848
|
key: value.key,
|
|
4855
4849
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
4856
4850
|
}))
|
|
4857
4851
|
})
|
|
4858
|
-
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$
|
|
4852
|
+
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$_(_objectSpread$_({}, fieldDefinition.type), {}, {
|
|
4859
4853
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
4860
4854
|
key: value.key,
|
|
4861
4855
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -4866,7 +4860,7 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4866
4860
|
})
|
|
4867
4861
|
}
|
|
4868
4862
|
},
|
|
4869
|
-
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$
|
|
4863
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$_(_objectSpread$_({}, fields), {}, {
|
|
4870
4864
|
[customField.name]: customField.value
|
|
4871
4865
|
}), {})
|
|
4872
4866
|
};
|
|
@@ -4878,7 +4872,7 @@ const convertProductSelectionFromGraphQl = productSelection => {
|
|
|
4878
4872
|
// Incase the product selection is not missing or if the current project dose not yet have access to the feature,
|
|
4879
4873
|
// in either case we return null
|
|
4880
4874
|
if (!productSelection) return null;
|
|
4881
|
-
return _objectSpread$
|
|
4875
|
+
return _objectSpread$_(_objectSpread$_({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
4882
4876
|
from: 'nameAllLocales',
|
|
4883
4877
|
to: 'name'
|
|
4884
4878
|
}])), {}, {
|
|
@@ -4901,8 +4895,8 @@ const transformAllToProperNounCase = text => {
|
|
|
4901
4895
|
return _mapInstanceProperty__default["default"](_context = text.split(' ')).call(_context, term => transformToProperNounCase(term)).join(' ');
|
|
4902
4896
|
};
|
|
4903
4897
|
|
|
4904
|
-
function ownKeys$
|
|
4905
|
-
function _objectSpread$
|
|
4898
|
+
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; }
|
|
4899
|
+
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; }
|
|
4906
4900
|
const REGEX_ISO8601 = /(\d{4}-\d{2}-\d{2}[T]\d{2}:\d{2}:\d{2}(\.\d{3}[Z]?))/;
|
|
4907
4901
|
const REGEX_TIME = /\d{2}:\d{2}/;
|
|
4908
4902
|
const REGEX_DATE = /\d{4}-\d{2}-\d{2}/;
|
|
@@ -4919,7 +4913,7 @@ function filterCustomTypeUpdateActionValues() {
|
|
|
4919
4913
|
if (updateAction.action === 'setCustomField' && _Array$isArray__default["default"](updateAction.value)) {
|
|
4920
4914
|
const definition = _findInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, field => field.name === updateAction.name);
|
|
4921
4915
|
const definitionName = definition.type.elementType.name;
|
|
4922
|
-
return _objectSpread$
|
|
4916
|
+
return _objectSpread$Z(_objectSpread$Z({}, updateAction), {}, {
|
|
4923
4917
|
value: filterNotDefinedValues(updateAction.value, definitionName)
|
|
4924
4918
|
});
|
|
4925
4919
|
}
|
|
@@ -4993,8 +4987,8 @@ function omitSetsOfSets() {
|
|
|
4993
4987
|
|
|
4994
4988
|
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 } } } };
|
|
4995
4989
|
|
|
4996
|
-
function ownKeys$
|
|
4997
|
-
function _objectSpread$
|
|
4990
|
+
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; }
|
|
4991
|
+
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; }
|
|
4998
4992
|
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); }; }
|
|
4999
4993
|
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; } }
|
|
5000
4994
|
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 } } } };
|
|
@@ -5054,7 +5048,7 @@ const mapDataToProps = _ref => {
|
|
|
5054
5048
|
return {
|
|
5055
5049
|
fetchTypeDefinitionsQuery: {
|
|
5056
5050
|
loading: fetchTypeDefinitionsQuery.loading,
|
|
5057
|
-
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$
|
|
5051
|
+
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$Y({}, l10n.applyTransformedLocalizedFields(omitDeep(fieldDefinition, ['__typename'], {
|
|
5058
5052
|
isImmutable: true
|
|
5059
5053
|
}), [{
|
|
5060
5054
|
from: 'labelAllLocales',
|
|
@@ -5082,12 +5076,12 @@ const handlers$2 = {
|
|
|
5082
5076
|
}
|
|
5083
5077
|
};
|
|
5084
5078
|
|
|
5085
|
-
function ownKeys$
|
|
5086
|
-
function _objectSpread$
|
|
5079
|
+
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; }
|
|
5080
|
+
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; }
|
|
5087
5081
|
const restDocToForm = customFieldsFromRestResponse => {
|
|
5088
5082
|
return {
|
|
5089
5083
|
fields: customFieldsFromRestResponse.fields,
|
|
5090
|
-
type: _objectSpread$
|
|
5084
|
+
type: _objectSpread$X({
|
|
5091
5085
|
id: customFieldsFromRestResponse.type.id
|
|
5092
5086
|
}, customFieldsFromRestResponse.type.obj)
|
|
5093
5087
|
};
|
|
@@ -5106,14 +5100,14 @@ const graphQlDocToForm = typeDefinition => {
|
|
|
5106
5100
|
name: fieldDefinition.name,
|
|
5107
5101
|
required: fieldDefinition.required,
|
|
5108
5102
|
inputHint: fieldDefinition.inputHint,
|
|
5109
|
-
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$
|
|
5110
|
-
elementType: _objectSpread$
|
|
5103
|
+
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), {}, {
|
|
5104
|
+
elementType: _objectSpread$X(_objectSpread$X({}, fieldDefinition.type.elementType), {}, {
|
|
5111
5105
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
5112
5106
|
key: value.key,
|
|
5113
5107
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
5114
5108
|
}))
|
|
5115
5109
|
})
|
|
5116
|
-
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$
|
|
5110
|
+
}) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$X(_objectSpread$X({}, fieldDefinition.type), {}, {
|
|
5117
5111
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
5118
5112
|
key: value.key,
|
|
5119
5113
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -5129,7 +5123,7 @@ const formToRestDoc = formCustomFields => ({
|
|
|
5129
5123
|
type: {
|
|
5130
5124
|
id: formCustomFields.type.id,
|
|
5131
5125
|
typeId: 'type',
|
|
5132
|
-
obj: _objectSpread$
|
|
5126
|
+
obj: _objectSpread$X({}, formCustomFields.type)
|
|
5133
5127
|
},
|
|
5134
5128
|
fields: formCustomFields.fields
|
|
5135
5129
|
});
|
|
@@ -5137,7 +5131,7 @@ const formToGraphQlDoc = formCustomFields => ({
|
|
|
5137
5131
|
type: {
|
|
5138
5132
|
id: formCustomFields.type.id,
|
|
5139
5133
|
typeId: 'type',
|
|
5140
|
-
obj: _objectSpread$
|
|
5134
|
+
obj: _objectSpread$X({}, omit__default["default"](formCustomFields.type, ['id']))
|
|
5141
5135
|
},
|
|
5142
5136
|
fields: omitBy__default["default"](formCustomFields.fields || {}, isNil__default["default"])
|
|
5143
5137
|
});
|
|
@@ -5217,7 +5211,7 @@ var CustomFieldTypeDefinitionsConnector$1 = hoistNonReactStatics__default["defau
|
|
|
5217
5211
|
options: createGraphQlOptions
|
|
5218
5212
|
})(CustomFieldTypeDefinitionsConnector), CustomFieldTypeDefinitionsConnector);
|
|
5219
5213
|
|
|
5220
|
-
const getType
|
|
5214
|
+
const getType = fieldDefinition => {
|
|
5221
5215
|
const fieldDefinitionType = fieldDefinition.type.name.toLowerCase() === 'set' ? fieldDefinition.type.elementType : fieldDefinition.type;
|
|
5222
5216
|
return fieldDefinitionType;
|
|
5223
5217
|
};
|
|
@@ -5268,8 +5262,8 @@ const REFERENCED_TYPES = {
|
|
|
5268
5262
|
zone: 'zone'
|
|
5269
5263
|
};
|
|
5270
5264
|
|
|
5271
|
-
function ownKeys$
|
|
5272
|
-
function _objectSpread$
|
|
5265
|
+
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; }
|
|
5266
|
+
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; }
|
|
5273
5267
|
const extractDuplicatedValues = (values, type, language, languages) => {
|
|
5274
5268
|
let validatedValues = [];
|
|
5275
5269
|
if (type.name.toLowerCase() === 'money') {
|
|
@@ -5282,7 +5276,7 @@ const extractDuplicatedValues = (values, type, language, languages) => {
|
|
|
5282
5276
|
const setDuplicatedIfSet = (formValues, fieldDefinition, language, languages) => {
|
|
5283
5277
|
const fieldValue = formValues.custom.fields[fieldDefinition.name];
|
|
5284
5278
|
if (fieldDefinition.type.name.toLowerCase() === 'set' && _Array$isArray__default["default"](fieldValue)) {
|
|
5285
|
-
const duplicatedValues = extractDuplicatedValues(fieldValue, getType
|
|
5279
|
+
const duplicatedValues = extractDuplicatedValues(fieldValue, getType(fieldDefinition), language, languages);
|
|
5286
5280
|
return {
|
|
5287
5281
|
duplicated: {
|
|
5288
5282
|
// although this is mixing concerns, we pass down `duplicatedValues` to the form.
|
|
@@ -5336,8 +5330,8 @@ function validations (formValues, language, languages) {
|
|
|
5336
5330
|
var _context2;
|
|
5337
5331
|
// Collect all required and set type fields
|
|
5338
5332
|
const fieldDefinitionsToValidate = _filterInstanceProperty__default["default"](_context2 = formValues.custom.type.fieldDefinitions).call(_context2, fieldDefinition => fieldDefinition.required || fieldDefinition.type.name.toLowerCase() === 'set');
|
|
5339
|
-
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$
|
|
5340
|
-
[fieldDefinition.name]: _objectSpread$
|
|
5333
|
+
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$W(_objectSpread$W({}, acc), {}, {
|
|
5334
|
+
[fieldDefinition.name]: _objectSpread$W(_objectSpread$W({}, setMissingIfRequired(formValues, fieldDefinition)), setDuplicatedIfSet(formValues, fieldDefinition, language, languages))
|
|
5341
5335
|
}), {});
|
|
5342
5336
|
return withoutEmptyErrorsByField(errors);
|
|
5343
5337
|
}
|
|
@@ -5364,8 +5358,8 @@ function CustomTextInput(props) {
|
|
|
5364
5358
|
}
|
|
5365
5359
|
CustomTextInput.displayName = 'CustomTextInput';
|
|
5366
5360
|
|
|
5367
|
-
function ownKeys$
|
|
5368
|
-
function _objectSpread$
|
|
5361
|
+
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; }
|
|
5362
|
+
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; }
|
|
5369
5363
|
const getSubfieldLanguage = subfieldName => {
|
|
5370
5364
|
const lastDotIndex = _lastIndexOfInstanceProperty__default["default"](subfieldName).call(subfieldName, '.');
|
|
5371
5365
|
return subfieldName.substring(lastDotIndex + 1);
|
|
@@ -5389,7 +5383,7 @@ function CustomLocalizedTextInput(props) {
|
|
|
5389
5383
|
// as a whole.
|
|
5390
5384
|
|
|
5391
5385
|
const fieldLanguage = getSubfieldLanguage(subfieldName);
|
|
5392
|
-
const newValue = _objectSpread$
|
|
5386
|
+
const newValue = _objectSpread$V(_objectSpread$V({}, props.value), {}, {
|
|
5393
5387
|
[fieldLanguage]: rawValue
|
|
5394
5388
|
});
|
|
5395
5389
|
const nullifiedIfNeeded = uiKit.LocalizedTextInput.isEmpty(newValue) ? undefined : newValue;
|
|
@@ -5456,21 +5450,21 @@ function CustomNumberInput(props) {
|
|
|
5456
5450
|
}
|
|
5457
5451
|
CustomNumberInput.displayName = 'CustomNumberInput';
|
|
5458
5452
|
|
|
5459
|
-
function ownKeys$
|
|
5460
|
-
function _objectSpread$
|
|
5453
|
+
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; }
|
|
5454
|
+
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; }
|
|
5461
5455
|
var styles$f = {
|
|
5462
5456
|
"container": "custom-money-input-module__container___1fdO2"
|
|
5463
5457
|
};
|
|
5464
5458
|
const fixCurrencyCode = (value, currencies) => {
|
|
5465
5459
|
if (value.currencyCode) return value;
|
|
5466
5460
|
const firstCurrency = currencies[0];
|
|
5467
|
-
return _objectSpread$
|
|
5461
|
+
return _objectSpread$U(_objectSpread$U({}, value), {}, {
|
|
5468
5462
|
currencyCode: firstCurrency
|
|
5469
5463
|
});
|
|
5470
5464
|
};
|
|
5471
5465
|
const fixAmount = value => {
|
|
5472
5466
|
if (!value.amount) {
|
|
5473
|
-
return _objectSpread$
|
|
5467
|
+
return _objectSpread$U(_objectSpread$U({}, value), {}, {
|
|
5474
5468
|
amount: '0'
|
|
5475
5469
|
});
|
|
5476
5470
|
}
|
|
@@ -5512,7 +5506,7 @@ function CustomMoneyInput(props) {
|
|
|
5512
5506
|
}
|
|
5513
5507
|
const handleChange = makeChangeHandler((rawValue, subfieldName) => {
|
|
5514
5508
|
const isAmount = _endsWithInstanceProperty__default["default"](subfieldName).call(subfieldName, 'amount');
|
|
5515
|
-
const newValue = _objectSpread$
|
|
5509
|
+
const newValue = _objectSpread$U({}, internalValue.current);
|
|
5516
5510
|
if (isAmount) newValue.amount = rawValue;else newValue.currencyCode = rawValue;
|
|
5517
5511
|
const fixedValue = fixEnteredValue(newValue, internalValue.current, currencies);
|
|
5518
5512
|
internalValue.current = fixedValue;
|
|
@@ -5826,8 +5820,8 @@ const messages$B = reactIntl.defineMessages({
|
|
|
5826
5820
|
}
|
|
5827
5821
|
});
|
|
5828
5822
|
|
|
5829
|
-
function ownKeys$
|
|
5830
|
-
function _objectSpread$
|
|
5823
|
+
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; }
|
|
5824
|
+
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; }
|
|
5831
5825
|
function Option$1(props) {
|
|
5832
5826
|
var _context, _context2;
|
|
5833
5827
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -5839,7 +5833,7 @@ function Option$1(props) {
|
|
|
5839
5833
|
const _useIntl = reactIntl.useIntl(),
|
|
5840
5834
|
formatMessage = _useIntl.formatMessage;
|
|
5841
5835
|
const category = props.data;
|
|
5842
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
5836
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$T(_objectSpread$T({}, props), {}, {
|
|
5843
5837
|
children: jsxRuntime.jsxs("div", {
|
|
5844
5838
|
"data-testid": "category-option",
|
|
5845
5839
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -5868,8 +5862,8 @@ function Option$1(props) {
|
|
|
5868
5862
|
}));
|
|
5869
5863
|
}
|
|
5870
5864
|
|
|
5871
|
-
function ownKeys$
|
|
5872
|
-
function _objectSpread$
|
|
5865
|
+
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; }
|
|
5866
|
+
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; }
|
|
5873
5867
|
const filterOption$1 = () => true;
|
|
5874
5868
|
function CategoryReferenceSearch(props) {
|
|
5875
5869
|
const _useIntl = reactIntl.useIntl(),
|
|
@@ -5881,7 +5875,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5881
5875
|
})),
|
|
5882
5876
|
language = _useApplicationContex.language,
|
|
5883
5877
|
languages = _useApplicationContex.languages;
|
|
5884
|
-
const mapItemToOption = React.useCallback(category => _objectSpread$
|
|
5878
|
+
const mapItemToOption = React.useCallback(category => _objectSpread$S(_objectSpread$S({}, category), {}, {
|
|
5885
5879
|
value: category.id,
|
|
5886
5880
|
label: l10n.formatLocalizedString(category, {
|
|
5887
5881
|
key: 'name',
|
|
@@ -5899,7 +5893,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5899
5893
|
}), [apolloClient]);
|
|
5900
5894
|
return jsxRuntime.jsx(ReferenceSearch, {
|
|
5901
5895
|
id: props.id,
|
|
5902
|
-
components: _objectSpread$
|
|
5896
|
+
components: _objectSpread$S({
|
|
5903
5897
|
Option: Option$1
|
|
5904
5898
|
}, props.components),
|
|
5905
5899
|
isClearable: props.isClearable,
|
|
@@ -6017,8 +6011,8 @@ const messages$A = reactIntl.defineMessages({
|
|
|
6017
6011
|
}
|
|
6018
6012
|
});
|
|
6019
6013
|
|
|
6020
|
-
function ownKeys$
|
|
6021
|
-
function _objectSpread$
|
|
6014
|
+
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; }
|
|
6015
|
+
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; }
|
|
6022
6016
|
function Option(props) {
|
|
6023
6017
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
6024
6018
|
language: applicationContext.dataLocale,
|
|
@@ -6029,7 +6023,7 @@ function Option(props) {
|
|
|
6029
6023
|
const _useIntl = reactIntl.useIntl(),
|
|
6030
6024
|
formatMessage = _useIntl.formatMessage;
|
|
6031
6025
|
const cartDiscount = props.data;
|
|
6032
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
6026
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$R(_objectSpread$R({}, props), {}, {
|
|
6033
6027
|
children: jsxRuntime.jsxs("div", {
|
|
6034
6028
|
"data-testid": "cart-discount-option",
|
|
6035
6029
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -6046,8 +6040,8 @@ function Option(props) {
|
|
|
6046
6040
|
}));
|
|
6047
6041
|
}
|
|
6048
6042
|
|
|
6049
|
-
function ownKeys$
|
|
6050
|
-
function _objectSpread$
|
|
6043
|
+
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; }
|
|
6044
|
+
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; }
|
|
6051
6045
|
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 } } } };
|
|
6052
6046
|
const returnNullIfEmpty = value => value && value.id === '' ? null : value;
|
|
6053
6047
|
const filterOption = (option, text) => {
|
|
@@ -6073,7 +6067,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
6073
6067
|
})),
|
|
6074
6068
|
language = _useApplicationContex.language,
|
|
6075
6069
|
languages = _useApplicationContex.languages;
|
|
6076
|
-
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$
|
|
6070
|
+
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$Q(_objectSpread$Q({}, cartDiscount), {}, {
|
|
6077
6071
|
value: cartDiscount.id,
|
|
6078
6072
|
key: cartDiscount.key,
|
|
6079
6073
|
label: l10n.formatLocalizedString(cartDiscount, {
|
|
@@ -6543,8 +6537,8 @@ function CustomBooleanInputSet(props) {
|
|
|
6543
6537
|
}
|
|
6544
6538
|
CustomBooleanInputSet.displayName = 'CustomBooleanInputSet';
|
|
6545
6539
|
|
|
6546
|
-
function ownKeys$
|
|
6547
|
-
function _objectSpread$
|
|
6540
|
+
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; }
|
|
6541
|
+
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; }
|
|
6548
6542
|
const getTypeName = type => type.name.toLowerCase();
|
|
6549
6543
|
const findLabel = (enumType, key) => {
|
|
6550
6544
|
var _enumType$values$find, _enumType$values$find2, _context;
|
|
@@ -6588,12 +6582,13 @@ const attributeDefinitionToFieldDefinition = attributeDefinition => ({
|
|
|
6588
6582
|
inputHint: attributeDefinition.inputHint,
|
|
6589
6583
|
inputTip: attributeDefinition.inputTip,
|
|
6590
6584
|
required: attributeDefinition.isRequired,
|
|
6591
|
-
type: attributeDefinition.type
|
|
6585
|
+
type: attributeDefinition.type,
|
|
6586
|
+
assignedAttributeGroups: attributeDefinition.assignedAttributeGroups
|
|
6592
6587
|
});
|
|
6593
6588
|
const nameValuePairsToMap = pairs => _reduceInstanceProperty__default["default"](pairs).call(pairs, (result, _ref2) => {
|
|
6594
6589
|
let name = _ref2.name,
|
|
6595
6590
|
value = _ref2.value;
|
|
6596
|
-
return _objectSpread$
|
|
6591
|
+
return _objectSpread$P(_objectSpread$P({}, result), {}, {
|
|
6597
6592
|
[name]: value
|
|
6598
6593
|
});
|
|
6599
6594
|
}, {});
|
|
@@ -6690,23 +6685,23 @@ const messages$y = reactIntl.defineMessages({
|
|
|
6690
6685
|
}
|
|
6691
6686
|
});
|
|
6692
6687
|
|
|
6693
|
-
function ownKeys$
|
|
6694
|
-
function _objectSpread$
|
|
6688
|
+
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; }
|
|
6689
|
+
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; }
|
|
6695
6690
|
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 } } } };
|
|
6696
6691
|
const mapAttributeDefinition = definition => {
|
|
6697
6692
|
var _context, _definition$type, _context2, _context3, _definition$type2, _context4;
|
|
6698
|
-
return _objectSpread$
|
|
6693
|
+
return _objectSpread$O(_objectSpread$O({}, definition), {}, {
|
|
6699
6694
|
required: definition.isRequired,
|
|
6700
6695
|
inputTip: l10n.transformLocalizedFieldToLocalizedString(definition.inputTipAllLocales),
|
|
6701
6696
|
label: l10n.transformLocalizedFieldToLocalizedString(definition.labelAllLocales),
|
|
6702
|
-
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$
|
|
6703
|
-
elementType: _objectSpread$
|
|
6697
|
+
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), {}, {
|
|
6698
|
+
elementType: _objectSpread$O(_objectSpread$O({}, definition.type.elementType), {}, {
|
|
6704
6699
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](definition.type.elementType).results).call(_context2, value => ({
|
|
6705
6700
|
key: value.key,
|
|
6706
6701
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
6707
6702
|
}))
|
|
6708
6703
|
})
|
|
6709
|
-
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, (_definition$type2 = definition.type) === null || _definition$type2 === void 0 ? void 0 : _definition$type2.name) ? _objectSpread$
|
|
6704
|
+
}) : _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), {}, {
|
|
6710
6705
|
values: _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](definition.type).results).call(_context4, value => ({
|
|
6711
6706
|
key: value.key,
|
|
6712
6707
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -6827,8 +6822,8 @@ var messages$x = reactIntl.defineMessages({
|
|
|
6827
6822
|
|
|
6828
6823
|
const NestingLevelContext = /*#__PURE__*/React.createContext(0);
|
|
6829
6824
|
|
|
6830
|
-
function ownKeys$
|
|
6831
|
-
function _objectSpread$
|
|
6825
|
+
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; }
|
|
6826
|
+
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; }
|
|
6832
6827
|
const EditButton = props => {
|
|
6833
6828
|
const _useIntl = reactIntl.useIntl(),
|
|
6834
6829
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -6975,13 +6970,13 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
6975
6970
|
const valuesAsMap = nameValuePairsToMap(value);
|
|
6976
6971
|
const initialValues = omitUnknownValues(valuesAsMap, attributeDefinitionsAsMap);
|
|
6977
6972
|
const openNestedAttributesForm = () => {
|
|
6978
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
6973
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$N(_objectSpread$N({}, parentFormik.status), {}, {
|
|
6979
6974
|
hideSaveToolbar: true
|
|
6980
6975
|
}));
|
|
6981
6976
|
attributesForm.openModal();
|
|
6982
6977
|
};
|
|
6983
6978
|
const closeNestedAttributesForm = () => {
|
|
6984
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
6979
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$N(_objectSpread$N({}, parentFormik.status), {}, {
|
|
6985
6980
|
hideSaveToolbar: false
|
|
6986
6981
|
}));
|
|
6987
6982
|
attributesForm.closeModal();
|
|
@@ -7085,8 +7080,8 @@ const SetButtons = props => {
|
|
|
7085
7080
|
};
|
|
7086
7081
|
SetButtons.displayName = 'SetButtons';
|
|
7087
7082
|
|
|
7088
|
-
function ownKeys$
|
|
7089
|
-
function _objectSpread$
|
|
7083
|
+
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; }
|
|
7084
|
+
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; }
|
|
7090
7085
|
const getDuplicateErrors = setValues => {
|
|
7091
7086
|
/* eslint-disable no-plusplus */
|
|
7092
7087
|
const result = [];
|
|
@@ -7143,7 +7138,7 @@ function CustomInputSet(props) {
|
|
|
7143
7138
|
touched = _useFormikContext.touched,
|
|
7144
7139
|
isSubmitting = _useFormikContext.isSubmitting,
|
|
7145
7140
|
dirty = _useFormikContext.dirty;
|
|
7146
|
-
const itemFieldDefinition = _objectSpread$
|
|
7141
|
+
const itemFieldDefinition = _objectSpread$M(_objectSpread$M({}, props.fieldDefinition), {}, {
|
|
7147
7142
|
type: props.fieldDefinition.type.elementType
|
|
7148
7143
|
});
|
|
7149
7144
|
const value = React.useMemo(() => props.value || [undefined], [props.value]);
|
|
@@ -7201,7 +7196,7 @@ function CustomInputSet(props) {
|
|
|
7201
7196
|
// TODO(pa3): I don't like this bool. Feels like decision should happen
|
|
7202
7197
|
// in <CustomFieldComponent /> where proper component for given field/attribute
|
|
7203
7198
|
// type is selected.
|
|
7204
|
-
const type = getType
|
|
7199
|
+
const type = getType(props.fieldDefinition);
|
|
7205
7200
|
const typeName = type === null || type === void 0 ? void 0 : type.name.toLowerCase();
|
|
7206
7201
|
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);
|
|
7207
7202
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -7281,7 +7276,7 @@ const CustomFieldInput = /*#__PURE__*/React.memo(props => {
|
|
|
7281
7276
|
// Boolean is the only set element with peculiarities (i.e. way more
|
|
7282
7277
|
// convenient for user to work with it as with select input with three values:
|
|
7283
7278
|
// [true], [false] and [true, false]).
|
|
7284
|
-
if (((_getSetElementType = getType
|
|
7279
|
+
if (((_getSetElementType = getType(props.fieldDefinition)) === null || _getSetElementType === void 0 ? void 0 : _getSetElementType.name.toLowerCase()) === CUSTOM_FIELD_TYPES.boolean) {
|
|
7285
7280
|
return CustomBooleanInputSet;
|
|
7286
7281
|
}
|
|
7287
7282
|
// All the rest sets are just a fancy wrapper around single-item components
|
|
@@ -7311,10 +7306,10 @@ var messages$w = reactIntl.defineMessages({
|
|
|
7311
7306
|
}
|
|
7312
7307
|
});
|
|
7313
7308
|
|
|
7314
|
-
function ownKeys$
|
|
7315
|
-
function _objectSpread$
|
|
7309
|
+
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; }
|
|
7310
|
+
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; }
|
|
7316
7311
|
function ProductTypeReference(props) {
|
|
7317
|
-
const productTypeMessage = _objectSpread$
|
|
7312
|
+
const productTypeMessage = _objectSpread$L(_objectSpread$L({}, messages$w.referencedProductType), {}, {
|
|
7318
7313
|
values: {
|
|
7319
7314
|
productTypeName: props.productType.name
|
|
7320
7315
|
}
|
|
@@ -7360,9 +7355,9 @@ function CustomNestedFieldInput(props) {
|
|
|
7360
7355
|
}
|
|
7361
7356
|
CustomNestedFieldInput.displayName = 'CustomNestedFieldInput';
|
|
7362
7357
|
|
|
7363
|
-
function ownKeys$
|
|
7364
|
-
function _objectSpread$
|
|
7365
|
-
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$
|
|
7358
|
+
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; }
|
|
7359
|
+
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; }
|
|
7360
|
+
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$K(_objectSpread$K({}, result), itemErrors), {});
|
|
7366
7361
|
|
|
7367
7362
|
// TODO(pa3): worth splitting in two components: one of set errors and one for
|
|
7368
7363
|
// all the other types of fields. So that there will be no isArray check.
|
|
@@ -7411,16 +7406,22 @@ var messages$v = reactIntl.defineMessages({
|
|
|
7411
7406
|
id: 'cartDiscountMoreThan500',
|
|
7412
7407
|
description: 'Cart discounts must be selected by exact match of name, ID or key.',
|
|
7413
7408
|
defaultMessage: 'Cart discounts must be selected by exact match of name, ID or key.'
|
|
7409
|
+
},
|
|
7410
|
+
attributeGroupCountTooltip: {
|
|
7411
|
+
id: 'CustomFieldsLabel.attributeGroupCountTooltip',
|
|
7412
|
+
description: 'Tooltip message to display when the same attribute is assigned to multiple attribute groups',
|
|
7413
|
+
defaultMessage: 'Synced with {count} Attribute groups: {attributeGroups}'
|
|
7414
7414
|
}
|
|
7415
7415
|
});
|
|
7416
7416
|
|
|
7417
|
-
function ownKeys$
|
|
7418
|
-
function _objectSpread$
|
|
7417
|
+
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; }
|
|
7418
|
+
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; }
|
|
7419
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
7419
7420
|
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 } } } };
|
|
7420
|
-
const CustomFieldsLabelHint =
|
|
7421
|
+
const CustomFieldsLabelHint = _ref2 => {
|
|
7421
7422
|
var _type$name;
|
|
7422
|
-
let fieldDefinition =
|
|
7423
|
-
const type = getType
|
|
7423
|
+
let fieldDefinition = _ref2.fieldDefinition;
|
|
7424
|
+
const type = getType(fieldDefinition);
|
|
7424
7425
|
const isReference = ((_type$name = type.name) === null || _type$name === void 0 ? void 0 : _type$name.toLowerCase()) === 'reference';
|
|
7425
7426
|
const referenceTypeId = type.referenceTypeId;
|
|
7426
7427
|
const isCartDiscountsReference = isReference && referenceTypeId === SEARCHABLE_REFERENCES.cartDiscount;
|
|
@@ -7445,7 +7446,7 @@ const CustomFieldsLabelHint = _ref => {
|
|
|
7445
7446
|
children: [jsxRuntime.jsx(uiKit.WarningIcon, {
|
|
7446
7447
|
size: "medium",
|
|
7447
7448
|
color: "warning"
|
|
7448
|
-
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
7449
|
+
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$J({}, messages$v.cartDiscountMoreThan500))]
|
|
7449
7450
|
});
|
|
7450
7451
|
}
|
|
7451
7452
|
return l10n.formatLocalizedString(fieldDefinition, {
|
|
@@ -7465,12 +7466,12 @@ function CustomFieldsProductTypeReferenceSubtitle() {
|
|
|
7465
7466
|
|
|
7466
7467
|
// TODO(pa3): this logic may be misplaced and probably
|
|
7467
7468
|
// should belong to <CustomReferenceInput /> component instead.
|
|
7468
|
-
function CustomFieldsLabelSubtitle(
|
|
7469
|
+
function CustomFieldsLabelSubtitle(_ref3) {
|
|
7469
7470
|
var _type$name2, _context;
|
|
7470
|
-
let fieldDefinition =
|
|
7471
|
+
let fieldDefinition = _ref3.fieldDefinition;
|
|
7471
7472
|
const _useIntl2 = reactIntl.useIntl(),
|
|
7472
7473
|
formatMessage = _useIntl2.formatMessage;
|
|
7473
|
-
const type = getType
|
|
7474
|
+
const type = getType(fieldDefinition);
|
|
7474
7475
|
const isReference = ((_type$name2 = type.name) === null || _type$name2 === void 0 ? void 0 : _type$name2.toLowerCase()) === 'reference';
|
|
7475
7476
|
if (!isReference) return null;
|
|
7476
7477
|
const referenceTypeId = type.referenceTypeId;
|
|
@@ -7478,9 +7479,42 @@ function CustomFieldsLabelSubtitle(_ref2) {
|
|
|
7478
7479
|
if (_includesInstanceProperty__default["default"](_context = [SEARCHABLE_REFERENCES.category, SEARCHABLE_REFERENCES.cartDiscount]).call(_context, referenceTypeId)) return referenceTypeName;
|
|
7479
7480
|
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");
|
|
7480
7481
|
}
|
|
7481
|
-
const
|
|
7482
|
-
|
|
7483
|
-
|
|
7482
|
+
const Portal = props => /*#__PURE__*/ReactDOM__default["default"].createPortal(props.children, document.body);
|
|
7483
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
7484
|
+
name: "ar8y70",
|
|
7485
|
+
styles: "cursor:pointer;line-height:normal"
|
|
7486
|
+
} : {
|
|
7487
|
+
name: "471ze2-CustomFieldsCountIndicator",
|
|
7488
|
+
styles: "cursor:pointer;line-height:normal;label:CustomFieldsCountIndicator;",
|
|
7489
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS1maWVsZHMtbGFiZWwuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9KZ0IiLCJmaWxlIjoiY3VzdG9tLWZpZWxkcy1sYWJlbC5qc3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBtZW1vIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IFJlYWN0RE9NIGZyb20gJ3JlYWN0LWRvbSc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQge1xuICBDb25zdHJhaW50cyxcbiAgRmllbGRMYWJlbCxcbiAgU3BhY2luZ3MsXG4gIFN3aXRjaGVySWNvbixcbiAgVG9vbHRpcCxcbiAgV2FybmluZ0ljb24sXG59IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL3VpLWtpdCc7XG5pbXBvcnQgeyBGb3JtYXR0ZWRNZXNzYWdlLCB1c2VJbnRsIH0gZnJvbSAncmVhY3QtaW50bCc7XG5pbXBvcnQgeyBmb3JtYXRMb2NhbGl6ZWRTdHJpbmcgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9sMTBuJztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyB1c2VBcHBsaWNhdGlvbkNvbnRleHQgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9hcHBsaWNhdGlvbi1zaGVsbC1jb25uZWN0b3JzJztcbmltcG9ydCB7IHVzZVF1ZXJ5IH0gZnJvbSAnQGFwb2xsby9jbGllbnQvcmVhY3QnO1xuaW1wb3J0IHsgR1JBUEhRTF9UQVJHRVRTIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvY29uc3RhbnRzJztcbmltcG9ydCB7IFFVRVJZX01BWF9MSU1JVCwgU0VBUkNIQUJMRV9SRUZFUkVOQ0VTIH0gZnJvbSAnLi4vLi4vLi4vY29uc3RhbnRzJztcbmltcG9ydCB7XG4gIHVzZVBpbVN0YXR1cyxcbiAgY2FwaXRhbGl6ZUZpcnN0LFxuICB1c2VGb3JtYXRMb2NhbGl6ZWRGaWVsZFRvU3RyaW5nLFxufSBmcm9tICcuLi8uLi8uLi9pbnRlcm5hbC1pbmRleCc7XG5cbmltcG9ydCB7IGdldFR5cGUgfSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgeyBDYXJ0RGlzY291bnRzQ291bnQgfSBmcm9tICcuL2NhcnQtZGlzY291bnRzLWNvdW50LmN0cC5ncmFwaHFsJztcblxuaW1wb3J0IG1lc3NhZ2VzIGZyb20gJy4vbWVzc2FnZXMnO1xuXG5jb25zdCBDdXN0b21GaWVsZHNMYWJlbEhpbnQgPSAoeyBmaWVsZERlZmluaXRpb24gfSkgPT4ge1xuICBjb25zdCB0eXBlID0gZ2V0VHlwZShmaWVsZERlZmluaXRpb24pO1xuICBjb25zdCBpc1JlZmVyZW5jZSA9IHR5cGUubmFtZT8udG9Mb3dlckNhc2UoKSA9PT0gJ3JlZmVyZW5jZSc7XG4gIGNvbnN0IHJlZmVyZW5jZVR5cGVJZCA9IHR5cGUucmVmZXJlbmNlVHlwZUlkO1xuICBjb25zdCBpc0NhcnREaXNjb3VudHNSZWZlcmVuY2UgPVxuICAgIGlzUmVmZXJlbmNlICYmIHJlZmVyZW5jZVR5cGVJZCA9PT0gU0VBUkNIQUJMRV9SRUZFUkVOQ0VTLmNhcnREaXNjb3VudDtcblxuICBjb25zdCB7IGxhbmd1YWdlcywgZGF0YUxvY2FsZSB9ID0gdXNlQXBwbGljYXRpb25Db250ZXh0KFxuICAgIChhcHBsaWNhdGlvbkNvbnRleHQpID0+ICh7XG4gICAgICBsYW5ndWFnZXM6IGFwcGxpY2F0aW9uQ29udGV4dC5wcm9qZWN0Lmxhbmd1YWdlcyxcbiAgICAgIGRhdGFMb2NhbGU6IGFwcGxpY2F0aW9uQ29udGV4dC5kYXRhTG9jYWxlLFxuICAgIH0pXG4gICk7XG5cbiAgY29uc3QgeyBkYXRhLCBsb2FkaW5nIH0gPSB1c2VRdWVyeShDYXJ0RGlzY291bnRzQ291bnQsIHtcbiAgICBza2lwOiAhaXNDYXJ0RGlzY291bnRzUmVmZXJlbmNlLFxuICAgIGNvbnRleHQ6IHtcbiAgICAgIHRhcmdldDogR1JBUEhRTF9UQVJHRVRTLkNPTU1FUkNFVE9PTFNfUExBVEZPUk0sXG4gICAgfSxcbiAgfSk7XG5cbiAgaWYgKGxvYWRpbmcpIHJldHVybiBudWxsO1xuXG4gIGlmIChkYXRhPy5jYXJ0RGlzY291bnRzLnRvdGFsID4gUVVFUllfTUFYX0xJTUlUKSB7XG4gICAgcmV0dXJuIChcbiAgICAgIDxTcGFjaW5ncy5JbmxpbmUgYWxpZ25JdGVtcz1cImNlbnRlclwiPlxuICAgICAgICA8V2FybmluZ0ljb24gc2l6ZT1cIm1lZGl1bVwiIGNvbG9yPVwid2FybmluZ1wiIC8+XG4gICAgICAgIDxGb3JtYXR0ZWRNZXNzYWdlIHsuLi5tZXNzYWdlcy5jYXJ0RGlzY291bnRNb3JlVGhhbjUwMH0gLz5cbiAgICAgIDwvU3BhY2luZ3MuSW5saW5lPlxuICAgICk7XG4gIH1cblxuICByZXR1cm4gZm9ybWF0TG9jYWxpemVkU3RyaW5nKGZpZWxkRGVmaW5pdGlvbiwge1xuICAgIGtleTogJ2lucHV0VGlwJyxcbiAgICBsb2NhbGU6IGRhdGFMb2NhbGUsXG4gICAgZmFsbGJhY2tPcmRlcjogbGFuZ3VhZ2VzLFxuICB9KTtcbn07XG5DdXN0b21GaWVsZHNMYWJlbEhpbnQucHJvcFR5cGVzID0ge1xuICBmaWVsZERlZmluaXRpb246IFByb3BUeXBlcy5zaGFwZSh7XG4gICAgbmFtZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICBpbnB1dFRpcDogUHJvcFR5cGVzLm9iamVjdCxcbiAgICByZXF1aXJlZDogUHJvcFR5cGVzLmJvb2wsXG4gIH0pLFxufTtcblxuZnVuY3Rpb24gQ3VzdG9tRmllbGRzUHJvZHVjdFR5cGVSZWZlcmVuY2VTdWJ0aXRsZSgpIHtcbiAgY29uc3QgeyBmb3JtYXRNZXNzYWdlIH0gPSB1c2VJbnRsKCk7XG4gIGNvbnN0IHsgaXNQcm9qZWN0SW5kZXhlZCB9ID0gdXNlUGltU3RhdHVzKCk7XG5cbiAgaWYgKGlzUHJvamVjdEluZGV4ZWQpXG4gICAgcmV0dXJuIGZvcm1hdE1lc3NhZ2UobWVzc2FnZXMucHJvZHVjdFR5cGVSZWZlcmVuY2VMYWJlbEkpO1xuICByZXR1cm4gZm9ybWF0TWVzc2FnZShtZXNzYWdlcy5wcm9kdWN0VHlwZVJlZmVyZW5jZUxhYmVsKTtcbn1cblxuLy8gVE9ETyhwYTMpOiB0aGlzIGxvZ2ljIG1heSBiZSBtaXNwbGFjZWQgYW5kIHByb2JhYmx5XG4vLyBzaG91bGQgYmVsb25nIHRvIDxDdXN0b21SZWZlcmVuY2VJbnB1dCAvPiBjb21wb25lbnQgaW5zdGVhZC5cbmZ1bmN0aW9uIEN1c3RvbUZpZWxkc0xhYmVsU3VidGl0bGUoeyBmaWVsZERlZmluaXRpb24gfSkge1xuICBjb25zdCB7IGZvcm1hdE1lc3NhZ2UgfSA9IHVzZUludGwoKTtcbiAgY29uc3QgdHlwZSA9IGdldFR5cGUoZmllbGREZWZpbml0aW9uKTtcbiAgY29uc3QgaXNSZWZlcmVuY2UgPSB0eXBlLm5hbWU/LnRvTG93ZXJDYXNlKCkgPT09ICdyZWZlcmVuY2UnO1xuXG4gIGlmICghaXNSZWZlcmVuY2UpIHJldHVybiBudWxsO1xuXG4gIGNvbnN0IHJlZmVyZW5jZVR5cGVJZCA9IHR5cGUucmVmZXJlbmNlVHlwZUlkO1xuICBjb25zdCByZWZlcmVuY2VUeXBlTmFtZSA9IGNhcGl0YWxpemVGaXJzdChyZWZlcmVuY2VUeXBlSWQpO1xuXG4gIGlmIChcbiAgICBbXG4gICAgICBTRUFSQ0hBQkxFX1JFRkVSRU5DRVMuY2F0ZWdvcnksXG4gICAgICBTRUFSQ0hBQkxFX1JFRkVSRU5DRVMuY2FydERpc2NvdW50LFxuICAgIF0uaW5jbHVkZXMocmVmZXJlbmNlVHlwZUlkKVxuICApXG4gICAgcmV0dXJuIHJlZmVyZW5jZVR5cGVOYW1lO1xuXG4gIHJldHVybiBkbyB7XG4gICAgaWYgKHJlZmVyZW5jZVR5cGVJZCA9PT0gU0VBUkNIQUJMRV9SRUZFUkVOQ0VTLnByb2R1Y3QpXG4gICAgICBmb3JtYXRNZXNzYWdlKG1lc3NhZ2VzLnByb2R1Y3RSZWZlcmVuY2VMYWJlbCk7XG4gICAgZWxzZSBpZiAocmVmZXJlbmNlVHlwZUlkID09PSBTRUFSQ0hBQkxFX1JFRkVSRU5DRVMucHJvZHVjdFR5cGUpXG4gICAgICA8Q3VzdG9tRmllbGRzUHJvZHVjdFR5cGVSZWZlcmVuY2VTdWJ0aXRsZSAvPjtcbiAgICBlbHNlIGlmIChyZWZlcmVuY2VUeXBlSWQgPT09IFNFQVJDSEFCTEVfUkVGRVJFTkNFUy5jaGFubmVsKVxuICAgICAgZm9ybWF0TWVzc2FnZShtZXNzYWdlcy5jaGFubmVsUmVmZXJlbmNlTGFiZWwpO1xuICAgIGVsc2UgaWYgKHJlZmVyZW5jZVR5cGVJZCA9PT0gU0VBUkNIQUJMRV9SRUZFUkVOQ0VTLnN0YXRlKVxuICAgICAgZm9ybWF0TWVzc2FnZShtZXNzYWdlcy5zdGF0ZVJlZmVyZW5jZUxhYmVsKTtcbiAgICBlbHNlIGAke3JlZmVyZW5jZVR5cGVOYW1lfSBJRGA7XG4gIH07XG59XG5DdXN0b21GaWVsZHNMYWJlbFN1YnRpdGxlLnByb3BUeXBlcyA9IHtcbiAgZmllbGREZWZpbml0aW9uOiBQcm9wVHlwZXMuc2hhcGUoe1xuICAgIHR5cGU6IFByb3BUeXBlcy5zaGFwZSh7XG4gICAgICBuYW1lOiBQcm9wVHlwZXMuc3RyaW5nLFxuICAgICAgZWxlbWVudFR5cGU6IFByb3BUeXBlcy5zaGFwZSh7XG4gICAgICAgIG5hbWU6IFByb3BUeXBlcy5zdHJpbmcsXG4gICAgICB9KSxcbiAgICB9KSxcbiAgICBuYW1lOiBQcm9wVHlwZXMuc3RyaW5nLFxuICB9KS5pc1JlcXVpcmVkLFxufTtcblxuY29uc3QgUG9ydGFsID0gKHByb3BzKSA9PiBSZWFjdERPTS5jcmVhdGVQb3J0YWwocHJvcHMuY2hpbGRyZW4sIGRvY3VtZW50LmJvZHkpO1xuXG5mdW5jdGlvbiBDdXN0b21GaWVsZHNDb3VudEluZGljYXRvcih7IGFzc2lnbmVkQXR0cmlidXRlR3JvdXBzIH0pIHtcbiAgY29uc3QgZm9ybWF0TG9jYWxpemVkRmllbGQgPSB1c2VGb3JtYXRMb2NhbGl6ZWRGaWVsZFRvU3RyaW5nKCk7XG4gIGNvbnN0IHsgZm9ybWF0TWVzc2FnZSB9ID0gdXNlSW50bCgpO1xuXG4gIHJldHVybiBhc3NpZ25lZEF0dHJpYnV0ZUdyb3Vwcz8ubGVuZ3RoID4gMSA/IChcbiAgICA8VG9vbHRpcFxuICAgICAgdGl0bGU9e2Zvcm1hdE1lc3NhZ2UobWVzc2FnZXMuYXR0cmlidXRlR3JvdXBDb3VudFRvb2x0aXAsIHtcbiAgICAgICAgYXR0cmlidXRlR3JvdXBzOiBhc3NpZ25lZEF0dHJpYnV0ZUdyb3Vwc1xuICAgICAgICAgIC5tYXAoKGFzc2lnbmVkQXR0cmlidXRlR3JvdXApID0+XG4gICAgICAgICAgICBmb3JtYXRMb2NhbGl6ZWRGaWVsZChhc3NpZ25lZEF0dHJpYnV0ZUdyb3VwLm5hbWVBbGxMb2NhbGVzKVxuICAgICAgICAgIClcbiAgICAgICAgICAuam9pbignLCAnKSxcbiAgICAgICAgY291bnQ6IGFzc2lnbmVkQXR0cmlidXRlR3JvdXBzLmxlbmd0aCxcbiAgICAgIH0pfVxuICAgICAgaG9yaXpvbnRhbENvbnN0cmFpbnQ9ezd9XG4gICAgICBjb21wb25lbnRzPXt7IFRvb2x0aXBXcmFwcGVyQ29tcG9uZW50OiBQb3J0YWwgfX1cbiAgICA+XG4gICAgICA8ZGl2XG4gICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICAgICAgICBsaW5lLWhlaWdodDogbm9ybWFsO1xuICAgICAgICBgfVxuICAgICAgPlxuICAgICAgICA8U3dpdGNoZXJJY29uIGNvbG9yPVwiaW5mb1wiIHNpemU9XCJtZWRpdW1cIiAvPlxuICAgICAgPC9kaXY+XG4gICAgPC9Ub29sdGlwPlxuICApIDogbnVsbDtcbn1cblxuQ3VzdG9tRmllbGRzQ291bnRJbmRpY2F0b3IucHJvcFR5cGVzID0ge1xuICBhc3NpZ25lZEF0dHJpYnV0ZUdyb3VwczogUHJvcFR5cGVzLmFycmF5LFxufTtcblxuY29uc3QgQ3VzdG9tRmllbGRzTGFiZWwgPSBtZW1vKCh7IG5hbWUsIGZpZWxkRGVmaW5pdGlvbiB9KSA9PiB7XG4gIGNvbnN0IHsgbGFuZ3VhZ2VzLCBsYW5ndWFnZSB9ID0gdXNlQXBwbGljYXRpb25Db250ZXh0KFxuICAgIChhcHBsaWNhdGlvbkNvbnRleHQpID0+ICh7XG4gICAgICBsYW5ndWFnZXM6IGFwcGxpY2F0aW9uQ29udGV4dC5wcm9qZWN0Lmxhbmd1YWdlcyxcbiAgICAgIGxhbmd1YWdlOiBhcHBsaWNhdGlvbkNvbnRleHQuZGF0YUxvY2FsZSxcbiAgICB9KVxuICApO1xuXG4gIHJldHVybiAoXG4gICAgPEZpZWxkTGFiZWxcbiAgICAgIGh0bWxGb3I9e25hbWV9XG4gICAgICB0aXRsZT17XG4gICAgICAgIDxDb25zdHJhaW50cy5Ib3Jpem9udGFsIG1heD1cInNjYWxlXCI+XG4gICAgICAgICAgPFNwYWNpbmdzLklubGluZSBzY2FsZT1cInNcIiBhbGlnbkl0ZW1zPVwiZmxleC1lbmRcIj5cbiAgICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICAgIHtmb3JtYXRMb2NhbGl6ZWRTdHJpbmcoZmllbGREZWZpbml0aW9uLCB7XG4gICAgICAgICAgICAgICAga2V5OiAnbGFiZWwnLFxuICAgICAgICAgICAgICAgIGxvY2FsZTogbGFuZ3VhZ2UsXG4gICAgICAgICAgICAgICAgZmFsbGJhY2tPcmRlcjogbGFuZ3VhZ2VzLFxuICAgICAgICAgICAgICAgIGZhbGxiYWNrOiBmaWVsZERlZmluaXRpb24ubmFtZSxcbiAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxDdXN0b21GaWVsZHNDb3VudEluZGljYXRvclxuICAgICAgICAgICAgICBhc3NpZ25lZEF0dHJpYnV0ZUdyb3Vwcz17ZmllbGREZWZpbml0aW9uLmFzc2lnbmVkQXR0cmlidXRlR3JvdXBzfVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICA8L1NwYWNpbmdzLklubGluZT5cbiAgICAgICAgPC9Db25zdHJhaW50cy5Ib3Jpem9udGFsPlxuICAgICAgfVxuICAgICAgZGVzY3JpcHRpb249e1xuICAgICAgICA8Q3VzdG9tRmllbGRzTGFiZWxTdWJ0aXRsZSBmaWVsZERlZmluaXRpb249e2ZpZWxkRGVmaW5pdGlvbn0gLz5cbiAgICAgIH1cbiAgICAgIGhpbnQ9ezxDdXN0b21GaWVsZHNMYWJlbEhpbnQgZmllbGREZWZpbml0aW9uPXtmaWVsZERlZmluaXRpb259IC8+fVxuICAgICAgaGFzUmVxdWlyZWRJbmRpY2F0b3I9e2ZpZWxkRGVmaW5pdGlvbi5yZXF1aXJlZH1cbiAgICAvPlxuICApO1xufSk7XG5DdXN0b21GaWVsZHNMYWJlbC5kaXNwbGF5TmFtZSA9ICdDdXN0b21GaWVsZHNUaXRsZSc7XG5DdXN0b21GaWVsZHNMYWJlbC5wcm9wVHlwZXMgPSB7XG4gIG5hbWU6IFByb3BUeXBlcy5zdHJpbmcuaXNSZXF1aXJlZCxcbiAgZmllbGREZWZpbml0aW9uOiBQcm9wVHlwZXMuc2hhcGUoe1xuICAgIGFzc2lnbmVkQXR0cmlidXRlR3JvdXBzOiBQcm9wVHlwZXMuYXJyYXksXG4gICAgbmFtZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICBpbnB1dFRpcDogUHJvcFR5cGVzLm9iamVjdCxcbiAgICByZXF1aXJlZDogUHJvcFR5cGVzLmJvb2wsXG4gIH0pLFxufTtcbmV4cG9ydCBkZWZhdWx0IEN1c3RvbUZpZWxkc0xhYmVsO1xuIl19 */",
|
|
7490
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
7491
|
+
};
|
|
7492
|
+
function CustomFieldsCountIndicator(_ref4) {
|
|
7493
|
+
let assignedAttributeGroups = _ref4.assignedAttributeGroups;
|
|
7494
|
+
const formatLocalizedField = useFormatLocalizedFieldToString();
|
|
7495
|
+
const _useIntl3 = reactIntl.useIntl(),
|
|
7496
|
+
formatMessage = _useIntl3.formatMessage;
|
|
7497
|
+
return (assignedAttributeGroups === null || assignedAttributeGroups === void 0 ? void 0 : assignedAttributeGroups.length) > 1 ? jsxRuntime.jsx(uiKit.Tooltip, {
|
|
7498
|
+
title: formatMessage(messages$v.attributeGroupCountTooltip, {
|
|
7499
|
+
attributeGroups: _mapInstanceProperty__default["default"](assignedAttributeGroups).call(assignedAttributeGroups, assignedAttributeGroup => formatLocalizedField(assignedAttributeGroup.nameAllLocales)).join(', '),
|
|
7500
|
+
count: assignedAttributeGroups.length
|
|
7501
|
+
}),
|
|
7502
|
+
horizontalConstraint: 7,
|
|
7503
|
+
components: {
|
|
7504
|
+
TooltipWrapperComponent: Portal
|
|
7505
|
+
},
|
|
7506
|
+
children: jsxRuntime.jsx("div", {
|
|
7507
|
+
css: _ref,
|
|
7508
|
+
children: jsxRuntime.jsx(uiKit.SwitcherIcon, {
|
|
7509
|
+
color: "info",
|
|
7510
|
+
size: "medium"
|
|
7511
|
+
})
|
|
7512
|
+
})
|
|
7513
|
+
}) : null;
|
|
7514
|
+
}
|
|
7515
|
+
const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref5 => {
|
|
7516
|
+
let name = _ref5.name,
|
|
7517
|
+
fieldDefinition = _ref5.fieldDefinition;
|
|
7484
7518
|
const _useApplicationContex2 = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
7485
7519
|
languages: applicationContext.project.languages,
|
|
7486
7520
|
language: applicationContext.dataLocale
|
|
@@ -7489,11 +7523,22 @@ const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref3 => {
|
|
|
7489
7523
|
language = _useApplicationContex2.language;
|
|
7490
7524
|
return jsxRuntime.jsx(uiKit.FieldLabel, {
|
|
7491
7525
|
htmlFor: name,
|
|
7492
|
-
title:
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7526
|
+
title: jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
7527
|
+
max: "scale",
|
|
7528
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
7529
|
+
scale: "s",
|
|
7530
|
+
alignItems: "flex-end",
|
|
7531
|
+
children: [jsxRuntime.jsx("div", {
|
|
7532
|
+
children: l10n.formatLocalizedString(fieldDefinition, {
|
|
7533
|
+
key: 'label',
|
|
7534
|
+
locale: language,
|
|
7535
|
+
fallbackOrder: languages,
|
|
7536
|
+
fallback: fieldDefinition.name
|
|
7537
|
+
})
|
|
7538
|
+
}), jsxRuntime.jsx(CustomFieldsCountIndicator, {
|
|
7539
|
+
assignedAttributeGroups: fieldDefinition.assignedAttributeGroups
|
|
7540
|
+
})]
|
|
7541
|
+
})
|
|
7497
7542
|
}),
|
|
7498
7543
|
description: jsxRuntime.jsx(CustomFieldsLabelSubtitle, {
|
|
7499
7544
|
fieldDefinition: fieldDefinition
|
|
@@ -7631,23 +7676,23 @@ var pickerMessages = reactIntl.defineMessages({
|
|
|
7631
7676
|
}
|
|
7632
7677
|
});
|
|
7633
7678
|
|
|
7634
|
-
function ownKeys$
|
|
7635
|
-
function _objectSpread$
|
|
7636
|
-
const
|
|
7637
|
-
INCLUSION: '
|
|
7638
|
-
EXCLUSION: '
|
|
7679
|
+
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; }
|
|
7680
|
+
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; }
|
|
7681
|
+
const PRODUCT_SELECTION_MODES = {
|
|
7682
|
+
INCLUSION: 'Individual',
|
|
7683
|
+
EXCLUSION: 'IndividualExclusion'
|
|
7639
7684
|
};
|
|
7640
|
-
const
|
|
7685
|
+
const PRODUCT_SELECTION_MODES_LABELS = {
|
|
7641
7686
|
INCLUSION: 'inclusion',
|
|
7642
7687
|
EXCLUSION: 'exclusion'
|
|
7643
7688
|
};
|
|
7644
|
-
const
|
|
7645
|
-
const
|
|
7689
|
+
const getMode = mode => mode === PRODUCT_SELECTION_MODES.INCLUSION || mode === PRODUCT_SELECTION_MODES_LABELS.INCLUSION ? 'inclusion' : 'exclusion';
|
|
7690
|
+
const addModeToLabel = function (ps) {
|
|
7646
7691
|
var _context;
|
|
7647
7692
|
let enableExcludingProducts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
7648
7693
|
if (!ps) return undefined;
|
|
7649
|
-
return _objectSpread$
|
|
7650
|
-
label: _concatInstanceProperty__default["default"](_context = "".concat(ps === null || ps === void 0 ? void 0 : ps.label)).call(_context, enableExcludingProducts ? " (type: ".concat(
|
|
7694
|
+
return _objectSpread$I(_objectSpread$I({}, ps), {}, {
|
|
7695
|
+
label: _concatInstanceProperty__default["default"](_context = "".concat(ps === null || ps === void 0 ? void 0 : ps.label)).call(_context, enableExcludingProducts ? " (type: ".concat(getMode(ps === null || ps === void 0 ? void 0 : ps.mode), ")") : '')
|
|
7651
7696
|
});
|
|
7652
7697
|
};
|
|
7653
7698
|
|
|
@@ -7668,9 +7713,9 @@ const mapProductSelectionsToOptions$1 = memoize__default["default"](function ()
|
|
|
7668
7713
|
return {
|
|
7669
7714
|
id: productSelection.id,
|
|
7670
7715
|
value: productSelection.id,
|
|
7671
|
-
label: _concatInstanceProperty__default["default"](_context = "".concat(label)).call(_context, _includesInstanceProperty__default["default"](selectedPSList).call(selectedPSList, productSelection.id) && enableExcludingProducts ? " (type: ".concat(
|
|
7716
|
+
label: _concatInstanceProperty__default["default"](_context = "".concat(label)).call(_context, _includesInstanceProperty__default["default"](selectedPSList).call(selectedPSList, productSelection.id) && enableExcludingProducts ? " (type: ".concat(getMode(productSelection.mode), ")") : ''),
|
|
7672
7717
|
key: productSelection.key,
|
|
7673
|
-
|
|
7718
|
+
mode: getMode(productSelection.mode)
|
|
7674
7719
|
};
|
|
7675
7720
|
});
|
|
7676
7721
|
});
|
|
@@ -7740,11 +7785,11 @@ const getValueFromOptions$3 = _ref => {
|
|
|
7740
7785
|
// handle async-select-field value transformation
|
|
7741
7786
|
if (isMulti) {
|
|
7742
7787
|
var _context;
|
|
7743
|
-
return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](allProductSelectionOptions).call(allProductSelectionOptions, ps => currentlySelectedProductSelections === null || currentlySelectedProductSelections === void 0 ? void 0 : _includesInstanceProperty__default["default"](currentlySelectedProductSelections).call(currentlySelectedProductSelections, ps.value))).call(_context, ps =>
|
|
7788
|
+
return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](allProductSelectionOptions).call(allProductSelectionOptions, ps => currentlySelectedProductSelections === null || currentlySelectedProductSelections === void 0 ? void 0 : _includesInstanceProperty__default["default"](currentlySelectedProductSelections).call(currentlySelectedProductSelections, ps.value))).call(_context, ps => addModeToLabel(ps, enableExcludingProducts));
|
|
7744
7789
|
}
|
|
7745
7790
|
|
|
7746
7791
|
// in case it is not multiselect, then a single valued async-select-input is being requested and the value should have proper format
|
|
7747
|
-
return
|
|
7792
|
+
return addModeToLabel(_findInstanceProperty__default["default"](allProductSelectionOptions).call(allProductSelectionOptions, ps => currentlySelectedProductSelections === ps.value), enableExcludingProducts);
|
|
7748
7793
|
};
|
|
7749
7794
|
const emptyStoreOption$1 = intl => [{
|
|
7750
7795
|
label: intl.formatMessage(pickerMessages.asyncSelectDropdownTypeAheadPrompt),
|
|
@@ -7791,7 +7836,7 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
7791
7836
|
value: productSelection.id,
|
|
7792
7837
|
name: localizedName,
|
|
7793
7838
|
key: productSelection.key,
|
|
7794
|
-
|
|
7839
|
+
mode: getMode(productSelection.mode)
|
|
7795
7840
|
};
|
|
7796
7841
|
});
|
|
7797
7842
|
}, [dataLocale, projectLanguages, filteredProductSelections]);
|
|
@@ -7846,7 +7891,7 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
7846
7891
|
});
|
|
7847
7892
|
}
|
|
7848
7893
|
|
|
7849
|
-
var ProductSelectionsPickerFetcher$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "ProductSelectionsPickerFetcher" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "
|
|
7894
|
+
var ProductSelectionsPickerFetcher$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "ProductSelectionsPickerFetcher" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 223, source: { body: "query ProductSelectionsPickerFetcher($where: String!) {\n productSelections(where: $where) {\n results {\n id\n key\n version\n nameAllLocales {\n locale\n value\n }\n mode\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
7850
7895
|
const createQueryVariables$4 = (productSelections, predicateField) => {
|
|
7851
7896
|
var _context;
|
|
7852
7897
|
return {
|
|
@@ -7870,7 +7915,7 @@ const useProductSelectionsByFieldFetcher = (productSelections, predicateField) =
|
|
|
7870
7915
|
};
|
|
7871
7916
|
};
|
|
7872
7917
|
|
|
7873
|
-
var ProductSelectionsPickerFetcher = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "ProductSelectionsPickerFetcher" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "
|
|
7918
|
+
var ProductSelectionsPickerFetcher = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "ProductSelectionsPickerFetcher" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 223, source: { body: "query ProductSelectionsPickerFetcher($where: String!) {\n productSelections(where: $where) {\n results {\n id\n key\n version\n nameAllLocales {\n locale\n value\n }\n mode\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
7874
7919
|
const mapProductSelectionsToOptions = memoize__default["default"](_ref => {
|
|
7875
7920
|
let _ref$productSelection = _ref.productSelections,
|
|
7876
7921
|
productSelections = _ref$productSelection === void 0 ? [] : _ref$productSelection,
|
|
@@ -7885,7 +7930,7 @@ const mapProductSelectionsToOptions = memoize__default["default"](_ref => {
|
|
|
7885
7930
|
fallbackOrder: projectLanguages
|
|
7886
7931
|
}),
|
|
7887
7932
|
key: productSelection.key,
|
|
7888
|
-
|
|
7933
|
+
mode: getMode(productSelection.mode)
|
|
7889
7934
|
}));
|
|
7890
7935
|
});
|
|
7891
7936
|
const getValueFromOptions$2 = _ref2 => {
|
|
@@ -7897,10 +7942,10 @@ const getValueFromOptions$2 = _ref2 => {
|
|
|
7897
7942
|
return undefined;
|
|
7898
7943
|
}
|
|
7899
7944
|
if (isMulti) {
|
|
7900
|
-
return _mapInstanceProperty__default["default"](productSelectionFieldOptions).call(productSelectionFieldOptions, ps =>
|
|
7945
|
+
return _mapInstanceProperty__default["default"](productSelectionFieldOptions).call(productSelectionFieldOptions, ps => addModeToLabel(ps, enableExcludingProducts));
|
|
7901
7946
|
}
|
|
7902
7947
|
// if the input is not multiselect, the AsyncSearchSelect is expecting an object rather than array
|
|
7903
|
-
return
|
|
7948
|
+
return addModeToLabel(productSelectionFieldOptions[0], enableExcludingProducts);
|
|
7904
7949
|
};
|
|
7905
7950
|
const createQueryVariables$3 = _ref3 => {
|
|
7906
7951
|
var _context;
|
|
@@ -7997,12 +8042,12 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
7997
8042
|
});
|
|
7998
8043
|
}
|
|
7999
8044
|
|
|
8000
|
-
function ownKeys$
|
|
8001
|
-
function _objectSpread$
|
|
8002
|
-
function
|
|
8045
|
+
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; }
|
|
8046
|
+
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; }
|
|
8047
|
+
function ModeSelectInputOption(props) {
|
|
8003
8048
|
const data = props.data;
|
|
8004
8049
|
const noValueFallback = props.noValueFallback || constants.NO_VALUE_FALLBACK;
|
|
8005
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8050
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$H(_objectSpread$H({}, props), {}, {
|
|
8006
8051
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
8007
8052
|
scale: "xs",
|
|
8008
8053
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -8011,24 +8056,24 @@ function TypeSelectInputOption(props) {
|
|
|
8011
8056
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
8012
8057
|
children: ["Key: ", (data === null || data === void 0 ? void 0 : data.key) || noValueFallback]
|
|
8013
8058
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
8014
|
-
children: ["Type: ", (data === null || data === void 0 ? void 0 : data.
|
|
8059
|
+
children: ["Type: ", (data === null || data === void 0 ? void 0 : data.mode) || noValueFallback]
|
|
8015
8060
|
})]
|
|
8016
8061
|
})
|
|
8017
8062
|
}));
|
|
8018
8063
|
}
|
|
8019
8064
|
|
|
8020
|
-
function ownKeys$
|
|
8021
|
-
function _objectSpread$
|
|
8065
|
+
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; }
|
|
8066
|
+
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; }
|
|
8022
8067
|
function ProductSelectionsPicker(props) {
|
|
8023
8068
|
const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher();
|
|
8024
8069
|
const components = React.useMemo(() => {
|
|
8025
8070
|
return {
|
|
8026
8071
|
Option: optionInnerProps => {
|
|
8027
8072
|
if (optionInnerProps.isDisabled) {
|
|
8028
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8073
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$G({}, optionInnerProps));
|
|
8029
8074
|
}
|
|
8030
8075
|
if (props.optionType === TYPE_PROPERTY) {
|
|
8031
|
-
return jsxRuntime.jsx(
|
|
8076
|
+
return jsxRuntime.jsx(ModeSelectInputOption, _objectSpread$G({}, optionInnerProps));
|
|
8032
8077
|
}
|
|
8033
8078
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8034
8079
|
optionType: props.optionType,
|
|
@@ -8040,7 +8085,7 @@ function ProductSelectionsPicker(props) {
|
|
|
8040
8085
|
if (productSelectionsTotalFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8041
8086
|
const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= props.lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= props.upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
|
|
8042
8087
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8043
|
-
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$
|
|
8088
|
+
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$G(_objectSpread$G({}, props), {}, {
|
|
8044
8089
|
components: components
|
|
8045
8090
|
}))
|
|
8046
8091
|
});
|
|
@@ -8101,8 +8146,8 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
8101
8146
|
});
|
|
8102
8147
|
}
|
|
8103
8148
|
|
|
8104
|
-
function ownKeys$
|
|
8105
|
-
function _objectSpread$
|
|
8149
|
+
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; }
|
|
8150
|
+
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; }
|
|
8106
8151
|
const emptyCountryOption = intl => [{
|
|
8107
8152
|
label: intl.formatMessage(messages$u.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
8108
8153
|
value: undefined,
|
|
@@ -8129,7 +8174,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8129
8174
|
const onOptionChange = event => {
|
|
8130
8175
|
const countries = event.target.value;
|
|
8131
8176
|
props.onChange({
|
|
8132
|
-
target: _objectSpread$
|
|
8177
|
+
target: _objectSpread$F(_objectSpread$F({}, event.target), {}, {
|
|
8133
8178
|
value: _mapInstanceProperty__default["default"](countries).call(countries, country => {
|
|
8134
8179
|
var _country$value;
|
|
8135
8180
|
return (_country$value = country === null || country === void 0 ? void 0 : country.value) !== null && _country$value !== void 0 ? _country$value : country;
|
|
@@ -8160,13 +8205,13 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8160
8205
|
});
|
|
8161
8206
|
}
|
|
8162
8207
|
|
|
8163
|
-
function ownKeys$
|
|
8164
|
-
function _objectSpread$
|
|
8208
|
+
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; }
|
|
8209
|
+
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; }
|
|
8165
8210
|
function CountriesPicker(props) {
|
|
8166
8211
|
var _props$options;
|
|
8167
8212
|
const CustomCountriesPicker = ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.length) <= props.countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
|
|
8168
8213
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8169
|
-
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$
|
|
8214
|
+
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$E({}, props))
|
|
8170
8215
|
});
|
|
8171
8216
|
}
|
|
8172
8217
|
CountriesPicker.defaultProps = {
|
|
@@ -8386,8 +8431,8 @@ var messages$s = reactIntl.defineMessages({
|
|
|
8386
8431
|
}
|
|
8387
8432
|
});
|
|
8388
8433
|
|
|
8389
|
-
function ownKeys$
|
|
8390
|
-
function _objectSpread$
|
|
8434
|
+
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; }
|
|
8435
|
+
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; }
|
|
8391
8436
|
const hasErrors$2 = errors => {
|
|
8392
8437
|
var _context;
|
|
8393
8438
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8459,7 +8504,7 @@ const StoresAsyncSelectInput = props => {
|
|
|
8459
8504
|
};
|
|
8460
8505
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8461
8506
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8462
|
-
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$
|
|
8507
|
+
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$D(_objectSpread$D({
|
|
8463
8508
|
id: props.id,
|
|
8464
8509
|
name: props.name,
|
|
8465
8510
|
placeholder: intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
@@ -8502,8 +8547,8 @@ StoresAsyncSelectInput.defaultProps = {
|
|
|
8502
8547
|
shouldFetchProductSelections: false
|
|
8503
8548
|
};
|
|
8504
8549
|
|
|
8505
|
-
function ownKeys$
|
|
8506
|
-
function _objectSpread$
|
|
8550
|
+
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; }
|
|
8551
|
+
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; }
|
|
8507
8552
|
const hasErrors$1 = errors => {
|
|
8508
8553
|
var _context;
|
|
8509
8554
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8551,7 +8596,7 @@ const StoresBasicSelectInput = props => {
|
|
|
8551
8596
|
};
|
|
8552
8597
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8553
8598
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8554
|
-
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$
|
|
8599
|
+
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$C(_objectSpread$C({
|
|
8555
8600
|
id: props.id,
|
|
8556
8601
|
name: props.name,
|
|
8557
8602
|
placeholder: intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
@@ -8647,8 +8692,8 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
8647
8692
|
};
|
|
8648
8693
|
};
|
|
8649
8694
|
|
|
8650
|
-
function ownKeys$
|
|
8651
|
-
function _objectSpread$
|
|
8695
|
+
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; }
|
|
8696
|
+
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; }
|
|
8652
8697
|
var FetchStoresByWherePredicate = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresByWherePredicate" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "storesByWherePredicate" }, name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelection" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 525, source: { body: "query FetchStoresByWherePredicate(\n $where: String!\n $skipFetchingStores: Boolean!\n $excludeProductSelections: Boolean!\n) {\n storesByWherePredicate: stores(where: $where) @skip(if: $skipFetchingStores) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n productSelections @skip(if: $excludeProductSelections) {\n active\n productSelection {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8653
8698
|
const hasErrors = errors => {
|
|
8654
8699
|
var _context;
|
|
@@ -8750,7 +8795,7 @@ const StoresSearchSelectInput = props => {
|
|
|
8750
8795
|
const loadOptionsDebounced = debounce__default["default"](handleLoadOptions, 500);
|
|
8751
8796
|
if (storesByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8752
8797
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8753
|
-
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$
|
|
8798
|
+
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$B(_objectSpread$B({
|
|
8754
8799
|
id: props.id,
|
|
8755
8800
|
name: props.name,
|
|
8756
8801
|
placeholder: intl.formatMessage(messages$s.searchSelectInputPlaceholder),
|
|
@@ -8799,8 +8844,8 @@ StoresSearchSelectInput.defaultProps = {
|
|
|
8799
8844
|
shouldFetchProductSelections: false
|
|
8800
8845
|
};
|
|
8801
8846
|
|
|
8802
|
-
function ownKeys$
|
|
8803
|
-
function _objectSpread$
|
|
8847
|
+
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; }
|
|
8848
|
+
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; }
|
|
8804
8849
|
const StoreSelectInput = props => {
|
|
8805
8850
|
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher(props.projectKey);
|
|
8806
8851
|
const components = React.useMemo(() => {
|
|
@@ -8808,7 +8853,7 @@ const StoreSelectInput = props => {
|
|
|
8808
8853
|
// eslint-disable-next-line react/display-name
|
|
8809
8854
|
Option: optionInnerProps => {
|
|
8810
8855
|
if (optionInnerProps.isDisabled) {
|
|
8811
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8856
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$A({}, optionInnerProps));
|
|
8812
8857
|
}
|
|
8813
8858
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8814
8859
|
optionType: props.optionType,
|
|
@@ -8819,7 +8864,7 @@ const StoreSelectInput = props => {
|
|
|
8819
8864
|
}, [props.optionType]);
|
|
8820
8865
|
if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8821
8866
|
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput : StoresSearchSelectInput;
|
|
8822
|
-
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$
|
|
8867
|
+
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$A(_objectSpread$A({
|
|
8823
8868
|
projectKey: props.projectKey,
|
|
8824
8869
|
id: props.id,
|
|
8825
8870
|
name: props.name,
|
|
@@ -9374,10 +9419,10 @@ const RESOURCES_WITH_PLATFORM_LIMITS = {
|
|
|
9374
9419
|
carts: 'carts'
|
|
9375
9420
|
};
|
|
9376
9421
|
|
|
9377
|
-
function ownKeys$
|
|
9378
|
-
function _objectSpread$
|
|
9422
|
+
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; }
|
|
9423
|
+
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; }
|
|
9379
9424
|
const resourcesWithPlatformLimits = _Object$keys__default["default"](RESOURCES_WITH_PLATFORM_LIMITS);
|
|
9380
|
-
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$
|
|
9425
|
+
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$z({
|
|
9381
9426
|
[camelCase__default["default"]("should include ".concat(nextNameOfLimit))]: platformLimit ? nextNameOfLimit === platformLimit : true
|
|
9382
9427
|
}, previousIncludedLimits), {});
|
|
9383
9428
|
|
|
@@ -9467,8 +9512,8 @@ var messages$n = reactIntl.defineMessages({
|
|
|
9467
9512
|
}
|
|
9468
9513
|
});
|
|
9469
9514
|
|
|
9470
|
-
function ownKeys$
|
|
9471
|
-
function _objectSpread$
|
|
9515
|
+
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; }
|
|
9516
|
+
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; }
|
|
9472
9517
|
const getCustomerSupportLink$1 = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
9473
9518
|
isExternal: true,
|
|
9474
9519
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -9479,7 +9524,7 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
9479
9524
|
limit = _ref.limit;
|
|
9480
9525
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9481
9526
|
type: "warning",
|
|
9482
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9527
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$y(_objectSpread$y({}, messages$n[resource]), {}, {
|
|
9483
9528
|
values: {
|
|
9484
9529
|
limit,
|
|
9485
9530
|
customersupport: getCustomerSupportLink$1
|
|
@@ -9520,8 +9565,8 @@ var messages$m = reactIntl.defineMessages({
|
|
|
9520
9565
|
}
|
|
9521
9566
|
});
|
|
9522
9567
|
|
|
9523
|
-
function ownKeys$
|
|
9524
|
-
function _objectSpread$
|
|
9568
|
+
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; }
|
|
9569
|
+
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; }
|
|
9525
9570
|
const getCustomerSupportLink = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
9526
9571
|
isExternal: true,
|
|
9527
9572
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -9532,7 +9577,7 @@ const PlatformLimitErrorNotification = _ref => {
|
|
|
9532
9577
|
limit = _ref.limit;
|
|
9533
9578
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9534
9579
|
type: "error",
|
|
9535
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9580
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$x(_objectSpread$x({}, messages$m[resource]), {}, {
|
|
9536
9581
|
values: {
|
|
9537
9582
|
limit,
|
|
9538
9583
|
customersupport: getCustomerSupportLink
|
|
@@ -9550,8 +9595,8 @@ const Notifications = {
|
|
|
9550
9595
|
Error: PlatformLimitErrorNotification
|
|
9551
9596
|
};
|
|
9552
9597
|
|
|
9553
|
-
function ownKeys$
|
|
9554
|
-
function _objectSpread$
|
|
9598
|
+
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; }
|
|
9599
|
+
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; }
|
|
9555
9600
|
const PlatformLimitsStatusText = _ref => {
|
|
9556
9601
|
let intlMessage = _ref.intlMessage,
|
|
9557
9602
|
children = _ref.children;
|
|
@@ -9560,7 +9605,7 @@ const PlatformLimitsStatusText = _ref => {
|
|
|
9560
9605
|
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
9561
9606
|
size: "xs",
|
|
9562
9607
|
children: [jsxRuntime.jsx("span", {
|
|
9563
|
-
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9608
|
+
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$w({}, intlMessage))
|
|
9564
9609
|
}), jsxRuntime.jsx("span", {
|
|
9565
9610
|
children: children
|
|
9566
9611
|
})]
|
|
@@ -9669,11 +9714,11 @@ var messages$l = reactIntl.defineMessages({
|
|
|
9669
9714
|
}
|
|
9670
9715
|
});
|
|
9671
9716
|
|
|
9672
|
-
function ownKeys$
|
|
9673
|
-
function _objectSpread$
|
|
9717
|
+
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; }
|
|
9718
|
+
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; }
|
|
9674
9719
|
const PlatformLimitsShippingMethodsTooltip = props => {
|
|
9675
9720
|
const intl = reactIntl.useIntl();
|
|
9676
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
9721
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$v(_objectSpread$v({}, props), {}, {
|
|
9677
9722
|
title: intl.formatMessage(messages$l.shippingMethodsPlatformLimitReached)
|
|
9678
9723
|
}));
|
|
9679
9724
|
};
|
|
@@ -9727,15 +9772,15 @@ const useShippingMethodsLimits = () => {
|
|
|
9727
9772
|
};
|
|
9728
9773
|
};
|
|
9729
9774
|
|
|
9730
|
-
function ownKeys$
|
|
9731
|
-
function _objectSpread$
|
|
9775
|
+
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; }
|
|
9776
|
+
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; }
|
|
9732
9777
|
const injectShippingMethodsPlatformLimits = () => WrappedComponent => {
|
|
9733
9778
|
const WithShippingMethodsPlatformLimits = props => {
|
|
9734
9779
|
const shippingMethodsPlatformLimits = useShippingMethodsLimits();
|
|
9735
9780
|
const shippingMethodsProps = {
|
|
9736
9781
|
platformLimits: shippingMethodsPlatformLimits
|
|
9737
9782
|
};
|
|
9738
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
9783
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$u(_objectSpread$u({}, props), shippingMethodsProps));
|
|
9739
9784
|
};
|
|
9740
9785
|
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
9741
9786
|
return WithShippingMethodsPlatformLimits;
|
|
@@ -9816,11 +9861,11 @@ var messages$j = reactIntl.defineMessages({
|
|
|
9816
9861
|
}
|
|
9817
9862
|
});
|
|
9818
9863
|
|
|
9819
|
-
function ownKeys$
|
|
9820
|
-
function _objectSpread$
|
|
9864
|
+
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; }
|
|
9865
|
+
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; }
|
|
9821
9866
|
const PlatformLimitsTaxCategoriesTooltip = props => {
|
|
9822
9867
|
const intl = reactIntl.useIntl();
|
|
9823
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
9868
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
9824
9869
|
title: intl.formatMessage(messages$j.taxCategoriesPlatformLimitReached)
|
|
9825
9870
|
}));
|
|
9826
9871
|
};
|
|
@@ -9874,15 +9919,15 @@ const useTaxCategoriesLimits = () => {
|
|
|
9874
9919
|
};
|
|
9875
9920
|
};
|
|
9876
9921
|
|
|
9877
|
-
function ownKeys$
|
|
9878
|
-
function _objectSpread$
|
|
9922
|
+
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; }
|
|
9923
|
+
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; }
|
|
9879
9924
|
const injectTaxCategoriesPlatformLimits = WrappedComponent => {
|
|
9880
9925
|
const WithTaxCategoriesPlatformLimits = props => {
|
|
9881
9926
|
const taxCategoriesPlatformLimits = useTaxCategoriesLimits();
|
|
9882
9927
|
const taxCategoriesProps = {
|
|
9883
9928
|
platformLimits: taxCategoriesPlatformLimits
|
|
9884
9929
|
};
|
|
9885
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
9930
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$s(_objectSpread$s({}, props), taxCategoriesProps));
|
|
9886
9931
|
};
|
|
9887
9932
|
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
9888
9933
|
return WithTaxCategoriesPlatformLimits;
|
|
@@ -9963,11 +10008,11 @@ var messages$h = reactIntl.defineMessages({
|
|
|
9963
10008
|
}
|
|
9964
10009
|
});
|
|
9965
10010
|
|
|
9966
|
-
function ownKeys$
|
|
9967
|
-
function _objectSpread$
|
|
10011
|
+
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; }
|
|
10012
|
+
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; }
|
|
9968
10013
|
const PlatformLimitsZonesTooltip = props => {
|
|
9969
10014
|
const intl = reactIntl.useIntl();
|
|
9970
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10015
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$r(_objectSpread$r({}, props), {}, {
|
|
9971
10016
|
title: intl.formatMessage(messages$h.zonesPlatformLimitReached)
|
|
9972
10017
|
}));
|
|
9973
10018
|
};
|
|
@@ -10021,15 +10066,15 @@ const useZonesLimits = () => {
|
|
|
10021
10066
|
};
|
|
10022
10067
|
};
|
|
10023
10068
|
|
|
10024
|
-
function ownKeys$
|
|
10025
|
-
function _objectSpread$
|
|
10069
|
+
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; }
|
|
10070
|
+
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; }
|
|
10026
10071
|
const injectZonesPlatformLimits = () => WrappedComponent => {
|
|
10027
10072
|
const WithZonesPlatformLimits = props => {
|
|
10028
10073
|
const zonesPlatformLimits = useZonesLimits();
|
|
10029
10074
|
const zonesProps = {
|
|
10030
10075
|
platformLimits: zonesPlatformLimits
|
|
10031
10076
|
};
|
|
10032
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10077
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$q(_objectSpread$q({}, props), zonesProps));
|
|
10033
10078
|
};
|
|
10034
10079
|
WithZonesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithZonesPlatformLimits');
|
|
10035
10080
|
return WithZonesPlatformLimits;
|
|
@@ -10123,11 +10168,11 @@ var messages$f = reactIntl.defineMessages({
|
|
|
10123
10168
|
}
|
|
10124
10169
|
});
|
|
10125
10170
|
|
|
10126
|
-
function ownKeys$
|
|
10127
|
-
function _objectSpread$
|
|
10171
|
+
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; }
|
|
10172
|
+
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; }
|
|
10128
10173
|
const PlatformLimitsCustomersTooltip = props => {
|
|
10129
10174
|
const intl = reactIntl.useIntl();
|
|
10130
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10175
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
10131
10176
|
title: intl.formatMessage(messages$f.customersPlatformLimitReached)
|
|
10132
10177
|
}));
|
|
10133
10178
|
};
|
|
@@ -10141,8 +10186,8 @@ var messages$e = reactIntl.defineMessages({
|
|
|
10141
10186
|
}
|
|
10142
10187
|
});
|
|
10143
10188
|
|
|
10144
|
-
function ownKeys$
|
|
10145
|
-
function _objectSpread$
|
|
10189
|
+
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; }
|
|
10190
|
+
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; }
|
|
10146
10191
|
var styles$b = {
|
|
10147
10192
|
"status": "platform-limits-customers-status-module__status___3rXYM"
|
|
10148
10193
|
};
|
|
@@ -10162,7 +10207,7 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
10162
10207
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
10163
10208
|
tone: "secondary",
|
|
10164
10209
|
isInline: true,
|
|
10165
|
-
intlMessage: _objectSpread$
|
|
10210
|
+
intlMessage: _objectSpread$o(_objectSpread$o({}, messages$e.customersStatus), {}, {
|
|
10166
10211
|
values: {
|
|
10167
10212
|
current: intl.formatNumber(current),
|
|
10168
10213
|
limit: intl.formatNumber(limit)
|
|
@@ -10186,10 +10231,10 @@ var messages$d = reactIntl.defineMessages({
|
|
|
10186
10231
|
}
|
|
10187
10232
|
});
|
|
10188
10233
|
|
|
10189
|
-
function ownKeys$
|
|
10190
|
-
function _objectSpread$
|
|
10234
|
+
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; }
|
|
10235
|
+
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; }
|
|
10191
10236
|
var LimitsReachedErrorGraphic$1 = function LimitsReachedErrorGraphic(props) {
|
|
10192
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
10237
|
+
return jsxRuntime.jsxs("svg", _objectSpread$n(_objectSpread$n({}, props), {}, {
|
|
10193
10238
|
children: [jsxRuntime.jsx("defs", {
|
|
10194
10239
|
children: jsxRuntime.jsx("path", {
|
|
10195
10240
|
id: "a",
|
|
@@ -10361,15 +10406,15 @@ const useCustomersPlatformLimits = () => {
|
|
|
10361
10406
|
};
|
|
10362
10407
|
};
|
|
10363
10408
|
|
|
10364
|
-
function ownKeys$
|
|
10365
|
-
function _objectSpread$
|
|
10409
|
+
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; }
|
|
10410
|
+
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; }
|
|
10366
10411
|
const injectCustomersPlatformLimits = () => WrappedComponent => {
|
|
10367
10412
|
const WithCustomersPlatformLimits = props => {
|
|
10368
10413
|
const CustomersPlatformLimits = useCustomersPlatformLimits();
|
|
10369
10414
|
const customersProps = {
|
|
10370
10415
|
platformLimits: CustomersPlatformLimits
|
|
10371
10416
|
};
|
|
10372
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10417
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$m(_objectSpread$m({}, props), customersProps));
|
|
10373
10418
|
};
|
|
10374
10419
|
WithCustomersPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
10375
10420
|
return WithCustomersPlatformLimits;
|
|
@@ -10463,11 +10508,11 @@ var messages$c = reactIntl.defineMessages({
|
|
|
10463
10508
|
}
|
|
10464
10509
|
});
|
|
10465
10510
|
|
|
10466
|
-
function ownKeys$
|
|
10467
|
-
function _objectSpread$
|
|
10511
|
+
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; }
|
|
10512
|
+
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; }
|
|
10468
10513
|
const PlatformLimitsCustomerGroupsTooltip = props => {
|
|
10469
10514
|
const intl = reactIntl.useIntl();
|
|
10470
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10515
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
10471
10516
|
title: intl.formatMessage(messages$c.customerGroupsPlatformLimitReached)
|
|
10472
10517
|
}));
|
|
10473
10518
|
};
|
|
@@ -10481,8 +10526,8 @@ var messages$b = reactIntl.defineMessages({
|
|
|
10481
10526
|
}
|
|
10482
10527
|
});
|
|
10483
10528
|
|
|
10484
|
-
function ownKeys$
|
|
10485
|
-
function _objectSpread$
|
|
10529
|
+
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; }
|
|
10530
|
+
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; }
|
|
10486
10531
|
var styles$9 = {
|
|
10487
10532
|
"status": "platform-limits-customer-groups-status-module__status___6099G"
|
|
10488
10533
|
};
|
|
@@ -10502,7 +10547,7 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
10502
10547
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
10503
10548
|
tone: "secondary",
|
|
10504
10549
|
isInline: true,
|
|
10505
|
-
intlMessage: _objectSpread$
|
|
10550
|
+
intlMessage: _objectSpread$k(_objectSpread$k({}, messages$b.customerGroupsStatus), {}, {
|
|
10506
10551
|
values: {
|
|
10507
10552
|
current: intl.formatNumber(current),
|
|
10508
10553
|
limit: intl.formatNumber(limit)
|
|
@@ -10526,10 +10571,10 @@ var messages$a = reactIntl.defineMessages({
|
|
|
10526
10571
|
}
|
|
10527
10572
|
});
|
|
10528
10573
|
|
|
10529
|
-
function ownKeys$
|
|
10530
|
-
function _objectSpread$
|
|
10574
|
+
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; }
|
|
10575
|
+
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; }
|
|
10531
10576
|
var LimitsReachedErrorGraphic = function LimitsReachedErrorGraphic(props) {
|
|
10532
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
10577
|
+
return jsxRuntime.jsxs("svg", _objectSpread$j(_objectSpread$j({}, props), {}, {
|
|
10533
10578
|
children: [jsxRuntime.jsx("defs", {
|
|
10534
10579
|
children: jsxRuntime.jsx("path", {
|
|
10535
10580
|
id: "a",
|
|
@@ -10701,15 +10746,15 @@ const useCustomerGroupsPlatformLimits = () => {
|
|
|
10701
10746
|
};
|
|
10702
10747
|
};
|
|
10703
10748
|
|
|
10704
|
-
function ownKeys$
|
|
10705
|
-
function _objectSpread$
|
|
10749
|
+
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; }
|
|
10750
|
+
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; }
|
|
10706
10751
|
const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
|
|
10707
10752
|
const WithCustomerGroupsPlatformLimits = props => {
|
|
10708
10753
|
const CustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits();
|
|
10709
10754
|
const customersProps = {
|
|
10710
10755
|
platformLimits: CustomerGroupsPlatformLimits
|
|
10711
10756
|
};
|
|
10712
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10757
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$i(_objectSpread$i({}, props), customersProps));
|
|
10713
10758
|
};
|
|
10714
10759
|
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
10715
10760
|
return WithCustomerGroupsPlatformLimits;
|
|
@@ -10802,8 +10847,8 @@ const defaultValue = {
|
|
|
10802
10847
|
*/
|
|
10803
10848
|
const PimIndexerContext = /*#__PURE__*/React.createContext(defaultValue);
|
|
10804
10849
|
|
|
10805
|
-
function ownKeys$
|
|
10806
|
-
function _objectSpread$
|
|
10850
|
+
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; }
|
|
10851
|
+
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; }
|
|
10807
10852
|
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10808
10853
|
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10809
10854
|
var RefreshProductIndices = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "RefreshProductIndices" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "ids" } }, type: { kind: "NonNullType", type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "refreshProducts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "ids" }, value: { kind: "Variable", name: { kind: "Name", value: "ids" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updatedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "deletedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "notFoundDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "unchangedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "failedRefreshedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "reason" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 1119, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -10979,7 +11024,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10979
11024
|
shouldIndexProductTypes: isIndexingProductTypes
|
|
10980
11025
|
}
|
|
10981
11026
|
});
|
|
10982
|
-
_this.setState(_objectSpread$
|
|
11027
|
+
_this.setState(_objectSpread$h(_objectSpread$h({
|
|
10983
11028
|
isLoading: false,
|
|
10984
11029
|
isProjectBeingIndexedByPim: true
|
|
10985
11030
|
}, getIndexingJobIds(indexMutationResult)), {}, {
|
|
@@ -11004,7 +11049,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11004
11049
|
key: "render",
|
|
11005
11050
|
value: function render() {
|
|
11006
11051
|
return jsxRuntime.jsx(PimIndexerContext.Provider, {
|
|
11007
|
-
value: _objectSpread$
|
|
11052
|
+
value: _objectSpread$h(_objectSpread$h({}, this.state), {}, {
|
|
11008
11053
|
attemptToRefreshProducts: this.attemptToRefreshProducts,
|
|
11009
11054
|
indexProject: this.indexProject
|
|
11010
11055
|
}),
|
|
@@ -11046,13 +11091,13 @@ let WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
|
11046
11091
|
}(React.PureComponent);
|
|
11047
11092
|
WithPimIndexer.displayName = 'WithPimIndexer';
|
|
11048
11093
|
|
|
11049
|
-
function ownKeys$
|
|
11050
|
-
function _objectSpread$
|
|
11094
|
+
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; }
|
|
11095
|
+
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; }
|
|
11051
11096
|
var injectPimIndexer = (function () {
|
|
11052
11097
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pimIndexer';
|
|
11053
11098
|
return Component => {
|
|
11054
11099
|
const WrappedComponent = props => jsxRuntime.jsx(WithPimIndexer, {
|
|
11055
|
-
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$
|
|
11100
|
+
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$g(_objectSpread$g({}, props), {}, {
|
|
11056
11101
|
[propName]: pimIndexerProps
|
|
11057
11102
|
}))
|
|
11058
11103
|
});
|
|
@@ -11134,20 +11179,20 @@ var messages$7 = reactIntl.defineMessages({
|
|
|
11134
11179
|
}
|
|
11135
11180
|
});
|
|
11136
11181
|
|
|
11137
|
-
function ownKeys$
|
|
11138
|
-
function _objectSpread$
|
|
11182
|
+
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; }
|
|
11183
|
+
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; }
|
|
11139
11184
|
const MissingValueField = props => jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
11140
11185
|
name: "missing-value",
|
|
11141
11186
|
isChecked: props.isChecked,
|
|
11142
11187
|
onChange: props.onChange,
|
|
11143
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11188
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$f({}, messages$7.label))
|
|
11144
11189
|
});
|
|
11145
11190
|
MissingValueField.defaultProps = {
|
|
11146
11191
|
isChecked: false
|
|
11147
11192
|
};
|
|
11148
11193
|
|
|
11149
|
-
function ownKeys$
|
|
11150
|
-
function _objectSpread$
|
|
11194
|
+
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; }
|
|
11195
|
+
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; }
|
|
11151
11196
|
var styles$7 = {
|
|
11152
11197
|
"button": "button-module__button___1OzVf",
|
|
11153
11198
|
"cancel": "button-module__cancel___1-jYL button-module__button___1OzVf",
|
|
@@ -11181,7 +11226,7 @@ const Button = props => {
|
|
|
11181
11226
|
|
|
11182
11227
|
// Pass only `data-*` props
|
|
11183
11228
|
const dataProps = filterDataAttributes(props);
|
|
11184
|
-
return jsxRuntime.jsx("button", _objectSpread$
|
|
11229
|
+
return jsxRuntime.jsx("button", _objectSpread$e(_objectSpread$e({
|
|
11185
11230
|
onClick: isDisabled ? null : onClick,
|
|
11186
11231
|
type: props.type,
|
|
11187
11232
|
className: classnames__default["default"](styles$7.button, isDisabled ? styles$7.disabled : null, className),
|
|
@@ -11204,8 +11249,8 @@ var messages$6 = reactIntl.defineMessages({
|
|
|
11204
11249
|
}
|
|
11205
11250
|
});
|
|
11206
11251
|
|
|
11207
|
-
function ownKeys$
|
|
11208
|
-
function _objectSpread$
|
|
11252
|
+
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; }
|
|
11253
|
+
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; }
|
|
11209
11254
|
var styles$6 = {
|
|
11210
11255
|
"button": "file-input-module__button___2KypN",
|
|
11211
11256
|
"input": "file-input-module__input___3MP4D"
|
|
@@ -11225,7 +11270,7 @@ const FileInput = props => jsxRuntime.jsx("label", {
|
|
|
11225
11270
|
});
|
|
11226
11271
|
FileInput.displayName = 'FileInput';
|
|
11227
11272
|
FileInput.defaultProps = {
|
|
11228
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11273
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$d({}, messages$6.chooseFile)),
|
|
11229
11274
|
allowMultiple: false,
|
|
11230
11275
|
acceptTypes: 'image/png,image/jpeg,image/gif'
|
|
11231
11276
|
};
|
|
@@ -11334,8 +11379,8 @@ const SelectableFieldSearchInput = props => {
|
|
|
11334
11379
|
};
|
|
11335
11380
|
SelectableFieldSearchInput.displayName = 'SelectableFieldSearchInput';
|
|
11336
11381
|
|
|
11337
|
-
function ownKeys$
|
|
11338
|
-
function _objectSpread$
|
|
11382
|
+
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; }
|
|
11383
|
+
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; }
|
|
11339
11384
|
const StoreSelectField = props => {
|
|
11340
11385
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
11341
11386
|
max: props.horizontalConstraint,
|
|
@@ -11349,7 +11394,7 @@ const StoreSelectField = props => {
|
|
|
11349
11394
|
htmlFor: props.id,
|
|
11350
11395
|
hasRequiredIndicator: props.isRequired,
|
|
11351
11396
|
isBold: true
|
|
11352
|
-
}), jsxRuntime.jsx(StoreSelectInput, _objectSpread$
|
|
11397
|
+
}), jsxRuntime.jsx(StoreSelectInput, _objectSpread$c(_objectSpread$c({
|
|
11353
11398
|
projectKey: props.projectKey,
|
|
11354
11399
|
id: props.id,
|
|
11355
11400
|
name: props.name,
|
|
@@ -11389,8 +11434,8 @@ StoreSelectField.defaultProps = {
|
|
|
11389
11434
|
};
|
|
11390
11435
|
|
|
11391
11436
|
var _templateObject;
|
|
11392
|
-
function ownKeys$
|
|
11393
|
-
function _objectSpread$
|
|
11437
|
+
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; }
|
|
11438
|
+
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; }
|
|
11394
11439
|
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11395
11440
|
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11396
11441
|
var styles$3 = {
|
|
@@ -11540,7 +11585,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11540
11585
|
* so it must be an invalid numeric value
|
|
11541
11586
|
*/
|
|
11542
11587
|
_this.handleInvalid = () => {
|
|
11543
|
-
const nextValidStatus = _objectSpread$
|
|
11588
|
+
const nextValidStatus = _objectSpread$b({}, _this.state.validStatus);
|
|
11544
11589
|
if (has__default["default"](nextValidStatus, 'numeric')) {
|
|
11545
11590
|
nextValidStatus.numeric = false;
|
|
11546
11591
|
_this.conditionalSetValidStatus(nextValidStatus);
|
|
@@ -11592,7 +11637,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11592
11637
|
if (prev) return this.state.validStatus[v.name];
|
|
11593
11638
|
return prev;
|
|
11594
11639
|
}, true);
|
|
11595
|
-
const componentProps = _objectSpread$
|
|
11640
|
+
const componentProps = _objectSpread$b(_objectSpread$b({}, this.props), {}, {
|
|
11596
11641
|
[blurHandler || 'onBlurValue']: this.handleBlur,
|
|
11597
11642
|
[changeHandler || 'onChange']: this.handleChange,
|
|
11598
11643
|
onInvalidValue: this.handleInvalid,
|
|
@@ -11609,7 +11654,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11609
11654
|
components: {
|
|
11610
11655
|
WrapperComponent: ToolTipWrapperComponent
|
|
11611
11656
|
},
|
|
11612
|
-
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$
|
|
11657
|
+
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$b({}, componentProps))
|
|
11613
11658
|
})
|
|
11614
11659
|
});
|
|
11615
11660
|
}
|
|
@@ -11672,14 +11717,14 @@ var messages$4 = reactIntl.defineMessages({
|
|
|
11672
11717
|
}
|
|
11673
11718
|
});
|
|
11674
11719
|
|
|
11675
|
-
function ownKeys$
|
|
11676
|
-
function _objectSpread$
|
|
11720
|
+
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; }
|
|
11721
|
+
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; }
|
|
11677
11722
|
const CustomFieldsErrorTextNotification = props => {
|
|
11678
11723
|
var _context;
|
|
11679
11724
|
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
11680
11725
|
scale: "s",
|
|
11681
11726
|
children: [jsxRuntime.jsx(uiKit.Text.Wrap, {
|
|
11682
|
-
intlMessage: _objectSpread$
|
|
11727
|
+
intlMessage: _objectSpread$a({}, messages$4.customFieldsError)
|
|
11683
11728
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
11684
11729
|
scale: "xs",
|
|
11685
11730
|
children: _mapInstanceProperty__default["default"](_context = props.formErrors).call(_context, formError => jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -11704,8 +11749,8 @@ const messages$3 = reactIntl.defineMessages({
|
|
|
11704
11749
|
}
|
|
11705
11750
|
});
|
|
11706
11751
|
|
|
11707
|
-
function ownKeys$
|
|
11708
|
-
function _objectSpread$
|
|
11752
|
+
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; }
|
|
11753
|
+
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; }
|
|
11709
11754
|
var styles$2 = {
|
|
11710
11755
|
"label": "label-range-module__label___3Tb0p"
|
|
11711
11756
|
};
|
|
@@ -11713,7 +11758,7 @@ const LabelRange = _ref => {
|
|
|
11713
11758
|
let type = _ref.type;
|
|
11714
11759
|
return jsxRuntime.jsx("label", {
|
|
11715
11760
|
className: styles$2.label,
|
|
11716
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11761
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$9({}, messages$3[type]))
|
|
11717
11762
|
});
|
|
11718
11763
|
};
|
|
11719
11764
|
LabelRange.displayName = 'LabelRange';
|
|
@@ -11731,8 +11776,8 @@ var messages$2 = reactIntl.defineMessages({
|
|
|
11731
11776
|
}
|
|
11732
11777
|
});
|
|
11733
11778
|
|
|
11734
|
-
function ownKeys$
|
|
11735
|
-
function _objectSpread$
|
|
11779
|
+
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; }
|
|
11780
|
+
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; }
|
|
11736
11781
|
var styles$1 = {
|
|
11737
11782
|
"container": "multi-value-search-input-module__container___2u64d",
|
|
11738
11783
|
"searchInput": "multi-value-search-input-module__searchInput___363nj",
|
|
@@ -11756,7 +11801,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11756
11801
|
}),
|
|
11757
11802
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11758
11803
|
truncate: true,
|
|
11759
|
-
intlMessage: _objectSpread$
|
|
11804
|
+
intlMessage: _objectSpread$8(_objectSpread$8({}, messages$2.filterWholeInput), {}, {
|
|
11760
11805
|
values: {
|
|
11761
11806
|
values: "\"".concat(props.value, "\"")
|
|
11762
11807
|
}
|
|
@@ -11769,7 +11814,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11769
11814
|
}),
|
|
11770
11815
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11771
11816
|
truncate: true,
|
|
11772
|
-
intlMessage: _objectSpread$
|
|
11817
|
+
intlMessage: _objectSpread$8(_objectSpread$8({}, messages$2.filterSeparateValues), {}, {
|
|
11773
11818
|
values: {
|
|
11774
11819
|
values: "\"".concat(props.multiValue.join('", "'), "\"") || props.value
|
|
11775
11820
|
}
|
|
@@ -11880,8 +11925,8 @@ const MultiValueSearchInput = props => {
|
|
|
11880
11925
|
};
|
|
11881
11926
|
MultiValueSearchInput.displayName = 'MultiValueSearchInput';
|
|
11882
11927
|
|
|
11883
|
-
function ownKeys$
|
|
11884
|
-
function _objectSpread$
|
|
11928
|
+
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; }
|
|
11929
|
+
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; }
|
|
11885
11930
|
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); }; }
|
|
11886
11931
|
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; } }
|
|
11887
11932
|
var styles = {
|
|
@@ -11903,7 +11948,9 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11903
11948
|
args[_key] = arguments[_key];
|
|
11904
11949
|
}
|
|
11905
11950
|
_this = _super.call(this, ...args);
|
|
11906
|
-
_this.
|
|
11951
|
+
_this.state = {
|
|
11952
|
+
parsedValue: _this.props.value
|
|
11953
|
+
};
|
|
11907
11954
|
_this.setValue = value => {
|
|
11908
11955
|
if (!isValidValue(value)) return;
|
|
11909
11956
|
const newValue = !isUndefined__default["default"](value) ? _this.props.formatNumber(value) : undefined;
|
|
@@ -11916,8 +11963,10 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11916
11963
|
_this.handleChange = event => {
|
|
11917
11964
|
const value = event.target.rawValue;
|
|
11918
11965
|
const parsedNumber = _this.props.parseNumber(value);
|
|
11919
|
-
if (_this.parsedValue === parsedNumber) return;
|
|
11920
|
-
_this.
|
|
11966
|
+
if (_this.state.parsedValue === parsedNumber) return;
|
|
11967
|
+
_this.setState({
|
|
11968
|
+
parsedValue: parsedNumber
|
|
11969
|
+
});
|
|
11921
11970
|
_this.props.onChangeValue(parsedNumber);
|
|
11922
11971
|
if (!isNumberish(value) && _this.props.onInvalidValue) _this.props.onInvalidValue(value);
|
|
11923
11972
|
};
|
|
@@ -11931,12 +11980,10 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11931
11980
|
return _this;
|
|
11932
11981
|
}
|
|
11933
11982
|
_createClass(NumericFormatInput, [{
|
|
11934
|
-
key: "
|
|
11935
|
-
value:
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
if (this.props.value !== nextProps.value && nextProps.value !== this.parsedValue) {
|
|
11939
|
-
this.setValue(nextProps.value);
|
|
11983
|
+
key: "componentDidUpdate",
|
|
11984
|
+
value: function componentDidUpdate(prevProps) {
|
|
11985
|
+
if (this.props.value !== prevProps.value && this.props.value !== this.state.parsedValue) {
|
|
11986
|
+
this.setValue(this.props.value);
|
|
11940
11987
|
}
|
|
11941
11988
|
}
|
|
11942
11989
|
}, {
|
|
@@ -11944,7 +11991,7 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11944
11991
|
value: function render() {
|
|
11945
11992
|
const separators = getSeparatorsForLocale(this.props.numberFormat);
|
|
11946
11993
|
const dataAttributes = filterDataAttributes(this.props);
|
|
11947
|
-
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$
|
|
11994
|
+
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$7({
|
|
11948
11995
|
placeholder: this.props.placeholder,
|
|
11949
11996
|
htmlRef: this.registerInputRef,
|
|
11950
11997
|
options: {
|
|
@@ -12240,8 +12287,8 @@ const createNextSortDefinition = _ref => {
|
|
|
12240
12287
|
}
|
|
12241
12288
|
};
|
|
12242
12289
|
|
|
12243
|
-
function ownKeys$
|
|
12244
|
-
function _objectSpread$
|
|
12290
|
+
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; }
|
|
12291
|
+
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; }
|
|
12245
12292
|
/**
|
|
12246
12293
|
* Creates reducer
|
|
12247
12294
|
* @param {Object} initialState
|
|
@@ -12257,13 +12304,13 @@ function createReducer(initialState, actionHandlers) {
|
|
|
12257
12304
|
|
|
12258
12305
|
// In case reducer ignored action, avoid creating new object
|
|
12259
12306
|
const newSubstate = reduce(newState, action);
|
|
12260
|
-
if (newSubstate) return _objectSpread$
|
|
12307
|
+
if (newSubstate) return _objectSpread$6(_objectSpread$6({}, newState), newSubstate);
|
|
12261
12308
|
return newState;
|
|
12262
12309
|
};
|
|
12263
12310
|
}
|
|
12264
12311
|
|
|
12265
|
-
function ownKeys$
|
|
12266
|
-
function _objectSpread$
|
|
12312
|
+
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; }
|
|
12313
|
+
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; }
|
|
12267
12314
|
function updateStatusInList(mergeData) {
|
|
12268
12315
|
return (state, _ref) => {
|
|
12269
12316
|
let payload = _ref.payload;
|
|
@@ -12272,15 +12319,15 @@ function updateStatusInList(mergeData) {
|
|
|
12272
12319
|
results[index] = mergeData(payload, results[index]);
|
|
12273
12320
|
results[index].checked = false;
|
|
12274
12321
|
return {
|
|
12275
|
-
currentQueryResult: _objectSpread$
|
|
12322
|
+
currentQueryResult: _objectSpread$5(_objectSpread$5({}, state.currentQueryResult), {}, {
|
|
12276
12323
|
results
|
|
12277
12324
|
})
|
|
12278
12325
|
};
|
|
12279
12326
|
};
|
|
12280
12327
|
}
|
|
12281
12328
|
|
|
12282
|
-
function ownKeys$
|
|
12283
|
-
function _objectSpread$
|
|
12329
|
+
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; }
|
|
12330
|
+
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; }
|
|
12284
12331
|
const identity = value => value;
|
|
12285
12332
|
function createResourceReducer(options) {
|
|
12286
12333
|
const _options$constantsPre = options.constantsPrefix,
|
|
@@ -12290,7 +12337,7 @@ function createResourceReducer(options) {
|
|
|
12290
12337
|
_options$initialState = options.initialState,
|
|
12291
12338
|
extendInitialState = _options$initialState === void 0 ? {} : _options$initialState;
|
|
12292
12339
|
const mergeData = options.mergeData || identity;
|
|
12293
|
-
const initialState = _objectSpread$
|
|
12340
|
+
const initialState = _objectSpread$4({
|
|
12294
12341
|
currentQueryResult: {
|
|
12295
12342
|
count: 0,
|
|
12296
12343
|
offset: 0,
|
|
@@ -12310,7 +12357,7 @@ function createResourceReducer(options) {
|
|
|
12310
12357
|
let payload = _ref.payload;
|
|
12311
12358
|
const results = state.currentQueryResult.results;
|
|
12312
12359
|
return {
|
|
12313
|
-
currentQueryResult: _objectSpread$
|
|
12360
|
+
currentQueryResult: _objectSpread$4(_objectSpread$4({}, state.currentQueryResult), {}, {
|
|
12314
12361
|
results: _filterInstanceProperty__default["default"](results).call(results, _ref2 => {
|
|
12315
12362
|
let id = _ref2.id;
|
|
12316
12363
|
return id !== payload.id;
|
|
@@ -12831,8 +12878,8 @@ const getTimeZoneLabel = memoize__default["default"]((selectedTimeZone, timeZone
|
|
|
12831
12878
|
return _concatInstanceProperty__default["default"](_context4 = "(GMT ".concat(timeZoneData.offset, ") ")).call(_context4, timeZoneData.name);
|
|
12832
12879
|
});
|
|
12833
12880
|
|
|
12834
|
-
function ownKeys$
|
|
12835
|
-
function _objectSpread$
|
|
12881
|
+
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; }
|
|
12882
|
+
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; }
|
|
12836
12883
|
function withPendingRequests() {
|
|
12837
12884
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pendingRequests';
|
|
12838
12885
|
return Component => {
|
|
@@ -12841,7 +12888,7 @@ function withPendingRequests() {
|
|
|
12841
12888
|
const pendingProp = {
|
|
12842
12889
|
[propName]: pendingRequests
|
|
12843
12890
|
};
|
|
12844
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
12891
|
+
return jsxRuntime.jsx(Component, _objectSpread$3(_objectSpread$3({}, props), pendingProp));
|
|
12845
12892
|
};
|
|
12846
12893
|
WrappedComponent.displayName = wrapDisplayName(Component, 'withPendingRequests');
|
|
12847
12894
|
return WrappedComponent;
|
|
@@ -12876,8 +12923,10 @@ var messages = reactIntl.defineMessages({
|
|
|
12876
12923
|
}
|
|
12877
12924
|
});
|
|
12878
12925
|
|
|
12879
|
-
|
|
12880
|
-
|
|
12926
|
+
const FIELD_NAME = 'custom';
|
|
12927
|
+
|
|
12928
|
+
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; }
|
|
12929
|
+
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; }
|
|
12881
12930
|
const typeDefinitionsExist = typeDefinitions => {
|
|
12882
12931
|
return typeDefinitions.length > 0;
|
|
12883
12932
|
};
|
|
@@ -12894,13 +12943,13 @@ const CustomFieldsInputWrapper = _ref => {
|
|
|
12894
12943
|
const _useFormikContext = formik.useFormikContext(),
|
|
12895
12944
|
formValues = _valuesInstanceProperty__default["default"](_useFormikContext);
|
|
12896
12945
|
if (!typeDefinitionsExist(typeDefinitions)) {
|
|
12897
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12946
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noTypes));
|
|
12898
12947
|
}
|
|
12899
12948
|
if (!typeDefinitionSelected(formValues)) {
|
|
12900
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12949
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noCustomType));
|
|
12901
12950
|
}
|
|
12902
12951
|
if (!typeDefinitionContainsFieldDefinitions(formValues)) {
|
|
12903
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12952
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noCustomFields));
|
|
12904
12953
|
}
|
|
12905
12954
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
12906
12955
|
max: "scale",
|
|
@@ -12913,11 +12962,8 @@ const CustomFieldsInputWrapper = _ref => {
|
|
|
12913
12962
|
};
|
|
12914
12963
|
CustomFieldsInputWrapper.displayName = 'CustomFieldsInputWrapper';
|
|
12915
12964
|
|
|
12916
|
-
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; }
|
|
12917
|
-
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; }
|
|
12918
|
-
const FIELD_NAME = 'custom';
|
|
12919
|
-
|
|
12920
|
-
// Creates dropdown options
|
|
12965
|
+
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; }
|
|
12966
|
+
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; }
|
|
12921
12967
|
const mapTypeDefinitionsToOptions = (typeDefinitions, language, languages, selectedTypeDefinitionId) => {
|
|
12922
12968
|
return _mapInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => ({
|
|
12923
12969
|
isDisabled: selectedTypeDefinitionId && selectedTypeDefinitionId === typeDefinition.type.id,
|
|
@@ -12946,10 +12992,12 @@ const createFormStateFromTypeDefinition = selectedTypeDefinition => {
|
|
|
12946
12992
|
const CustomTypeSubform = _ref => {
|
|
12947
12993
|
var _formValues$FIELD_NAM, _formValues$FIELD_NAM2;
|
|
12948
12994
|
let typeDefinitions = _ref.typeDefinitions,
|
|
12949
|
-
isReadOnly = _ref.isReadOnly
|
|
12995
|
+
isReadOnly = _ref.isReadOnly,
|
|
12996
|
+
isCondensed = _ref.isCondensed;
|
|
12950
12997
|
const _useFormikContext = formik.useFormikContext(),
|
|
12951
12998
|
formValues = _valuesInstanceProperty__default["default"](_useFormikContext),
|
|
12952
|
-
setFieldValue = _useFormikContext.setFieldValue
|
|
12999
|
+
setFieldValue = _useFormikContext.setFieldValue,
|
|
13000
|
+
validateForm = _useFormikContext.validateForm;
|
|
12953
13001
|
const _useIntl = reactIntl.useIntl(),
|
|
12954
13002
|
formatMessage = _useIntl.formatMessage;
|
|
12955
13003
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -12962,19 +13010,23 @@ const CustomTypeSubform = _ref => {
|
|
|
12962
13010
|
const selectedTypeDefinition = _findInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => typeDefinition.type.key === event.target.value);
|
|
12963
13011
|
if (selectedTypeDefinition) {
|
|
12964
13012
|
const nextCustom = createFormStateFromTypeDefinition(selectedTypeDefinition);
|
|
12965
|
-
setFieldValue(FIELD_NAME, nextCustom)
|
|
13013
|
+
setFieldValue(FIELD_NAME, nextCustom).then(() => {
|
|
13014
|
+
validateForm();
|
|
13015
|
+
});
|
|
12966
13016
|
} else {
|
|
12967
|
-
// if the dropdown selector is cleared
|
|
12968
|
-
|
|
12969
|
-
|
|
13017
|
+
// if the dropdown selector is cleared, remove the `custom` field from the form state entirely
|
|
13018
|
+
setFieldValue(FIELD_NAME, undefined).then(() => {
|
|
13019
|
+
validateForm();
|
|
13020
|
+
});
|
|
12970
13021
|
}
|
|
12971
|
-
}, [typeDefinitions, setFieldValue,
|
|
13022
|
+
}, [typeDefinitions, setFieldValue, validateForm]);
|
|
12972
13023
|
return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
12973
13024
|
header: jsxRuntime.jsx(uiKit.CollapsiblePanel.Header, {
|
|
12974
|
-
|
|
13025
|
+
isCondensed: isCondensed,
|
|
13026
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1({}, messages.title))
|
|
12975
13027
|
}),
|
|
12976
13028
|
headerControls: typeDefinitions.length > 0 && jsxRuntime.jsx("div", {
|
|
12977
|
-
css: /*#__PURE__*/react$1.css("min-width:", uiKit.designTokens.
|
|
13029
|
+
css: /*#__PURE__*/react$1.css("min-width:", uiKit.designTokens.constraint11, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:CustomTypeSubform;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS10eXBlLXN1YmZvcm0uanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWtHb0IiLCJmaWxlIjoiY3VzdG9tLXR5cGUtc3ViZm9ybS5qc3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyB1c2VDYWxsYmFjayB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyB1c2VGb3JtaWtDb250ZXh0IH0gZnJvbSAnZm9ybWlrJztcbmltcG9ydCB7IEZvcm1hdHRlZE1lc3NhZ2UsIHVzZUludGwgfSBmcm9tICdyZWFjdC1pbnRsJztcbmltcG9ydCB7IHVzZUFwcGxpY2F0aW9uQ29udGV4dCB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL2FwcGxpY2F0aW9uLXNoZWxsLWNvbm5lY3RvcnMnO1xuaW1wb3J0IHsgZm9ybWF0TG9jYWxpemVkU3RyaW5nIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvbDEwbic7XG5pbXBvcnQge1xuICBDb2xsYXBzaWJsZVBhbmVsLFxuICBTZWxlY3RJbnB1dCxcbiAgZGVzaWduVG9rZW5zLFxufSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC91aS1raXQnO1xuaW1wb3J0IG1lc3NhZ2VzIGZyb20gJy4vbWVzc2FnZXMnO1xuaW1wb3J0IEN1c3RvbUZpZWxkc0lucHV0V3JhcHBlciBmcm9tICcuL2N1c3RvbS1maWVsZHMtaW5wdXQtd3JhcHBlcic7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBGSUVMRF9OQU1FIH0gZnJvbSAnLi9jb25zdGFudHMnO1xuXG4vLyBDcmVhdGVzIGRyb3Bkb3duIG9wdGlvbnNcbmV4cG9ydCBjb25zdCBtYXBUeXBlRGVmaW5pdGlvbnNUb09wdGlvbnMgPSAoXG4gIHR5cGVEZWZpbml0aW9ucyxcbiAgbGFuZ3VhZ2UsXG4gIGxhbmd1YWdlcyxcbiAgc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbklkXG4pID0+IHtcbiAgcmV0dXJuIHR5cGVEZWZpbml0aW9ucy5tYXAoKHR5cGVEZWZpbml0aW9uKSA9PiAoe1xuICAgIGlzRGlzYWJsZWQ6XG4gICAgICBzZWxlY3RlZFR5cGVEZWZpbml0aW9uSWQgJiZcbiAgICAgIHNlbGVjdGVkVHlwZURlZmluaXRpb25JZCA9PT0gdHlwZURlZmluaXRpb24udHlwZS5pZCxcbiAgICB2YWx1ZTogdHlwZURlZmluaXRpb24udHlwZS5rZXksXG4gICAgbGFiZWw6IGZvcm1hdExvY2FsaXplZFN0cmluZyh0eXBlRGVmaW5pdGlvbi50eXBlLCB7XG4gICAgICBrZXk6ICduYW1lJyxcbiAgICAgIGxvY2FsZTogbGFuZ3VhZ2UsXG4gICAgICBmYWxsYmFja09yZGVyOiBsYW5ndWFnZXMsXG4gICAgfSksXG4gIH0pKTtcbn07XG5cbi8vIFVzZWQgdG8gZ2VuZXJhdGUgZm9ybSBzdGF0ZSB3aGVuIHRoZSB1c2VyIHNlbGVjdHMgYSB0eXBlIGRlZmluaXRpb24gZnJvbSB0aGUgZHJvcGRvd25cbmNvbnN0IGNyZWF0ZUZvcm1TdGF0ZUZyb21UeXBlRGVmaW5pdGlvbiA9IChzZWxlY3RlZFR5cGVEZWZpbml0aW9uKSA9PiB7XG4gIHJldHVybiB7XG4gICAgdHlwZToge1xuICAgICAgaWQ6IHNlbGVjdGVkVHlwZURlZmluaXRpb24udHlwZS5pZCxcbiAgICAgIG9iajoge1xuICAgICAgICBmaWVsZERlZmluaXRpb25zOiBzZWxlY3RlZFR5cGVEZWZpbml0aW9uLnR5cGUuZmllbGREZWZpbml0aW9ucyxcbiAgICAgICAga2V5OiBzZWxlY3RlZFR5cGVEZWZpbml0aW9uLnR5cGUua2V5LFxuICAgICAgfSxcbiAgICB9LFxuICAgIGZpZWxkczoge30sXG4gIH07XG59O1xuXG5jb25zdCBDdXN0b21UeXBlU3ViZm9ybSA9ICh7IHR5cGVEZWZpbml0aW9ucywgaXNSZWFkT25seSwgaXNDb25kZW5zZWQgfSkgPT4ge1xuICBjb25zdCB7XG4gICAgdmFsdWVzOiBmb3JtVmFsdWVzLFxuICAgIHNldEZpZWxkVmFsdWUsXG4gICAgdmFsaWRhdGVGb3JtLFxuICB9ID0gdXNlRm9ybWlrQ29udGV4dCgpO1xuICBjb25zdCB7IGZvcm1hdE1lc3NhZ2UgfSA9IHVzZUludGwoKTtcbiAgY29uc3QgeyBsYW5ndWFnZSwgbGFuZ3VhZ2VzIH0gPSB1c2VBcHBsaWNhdGlvbkNvbnRleHQoXG4gICAgKGFwcGxpY2F0aW9uQ29udGV4dCkgPT4gKHtcbiAgICAgIGxhbmd1YWdlOiBhcHBsaWNhdGlvbkNvbnRleHQuZGF0YUxvY2FsZSxcbiAgICAgIGxhbmd1YWdlczogYXBwbGljYXRpb25Db250ZXh0LnByb2plY3QubGFuZ3VhZ2VzLFxuICAgIH0pXG4gICk7XG5cbiAgY29uc3QgaGFuZGxlVHlwZURlZmluaXRpb25TZWxlY3QgPSB1c2VDYWxsYmFjayhcbiAgICAoZXZlbnQpID0+IHtcbiAgICAgIGNvbnN0IHNlbGVjdGVkVHlwZURlZmluaXRpb24gPSB0eXBlRGVmaW5pdGlvbnMuZmluZChcbiAgICAgICAgKHR5cGVEZWZpbml0aW9uKSA9PiB0eXBlRGVmaW5pdGlvbi50eXBlLmtleSA9PT0gZXZlbnQudGFyZ2V0LnZhbHVlXG4gICAgICApO1xuXG4gICAgICBpZiAoc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbikge1xuICAgICAgICBjb25zdCBuZXh0Q3VzdG9tID0gY3JlYXRlRm9ybVN0YXRlRnJvbVR5cGVEZWZpbml0aW9uKFxuICAgICAgICAgIHNlbGVjdGVkVHlwZURlZmluaXRpb25cbiAgICAgICAgKTtcblxuICAgICAgICBzZXRGaWVsZFZhbHVlKEZJRUxEX05BTUUsIG5leHRDdXN0b20pLnRoZW4oKCkgPT4ge1xuICAgICAgICAgIHZhbGlkYXRlRm9ybSgpO1xuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIGlmIHRoZSBkcm9wZG93biBzZWxlY3RvciBpcyBjbGVhcmVkLCByZW1vdmUgdGhlIGBjdXN0b21gIGZpZWxkIGZyb20gdGhlIGZvcm0gc3RhdGUgZW50aXJlbHlcbiAgICAgICAgc2V0RmllbGRWYWx1ZShGSUVMRF9OQU1FLCB1bmRlZmluZWQpLnRoZW4oKCkgPT4ge1xuICAgICAgICAgIHZhbGlkYXRlRm9ybSgpO1xuICAgICAgICB9KTtcbiAgICAgIH1cbiAgICB9LFxuICAgIFt0eXBlRGVmaW5pdGlvbnMsIHNldEZpZWxkVmFsdWUsIHZhbGlkYXRlRm9ybV1cbiAgKTtcblxuICByZXR1cm4gKFxuICAgIDxDb2xsYXBzaWJsZVBhbmVsXG4gICAgICBoZWFkZXI9e1xuICAgICAgICA8Q29sbGFwc2libGVQYW5lbC5IZWFkZXIgaXNDb25kZW5zZWQ9e2lzQ29uZGVuc2VkfT5cbiAgICAgICAgICA8Rm9ybWF0dGVkTWVzc2FnZSB7Li4ubWVzc2FnZXMudGl0bGV9IC8+XG4gICAgICAgIDwvQ29sbGFwc2libGVQYW5lbC5IZWFkZXI+XG4gICAgICB9XG4gICAgICBoZWFkZXJDb250cm9scz17XG4gICAgICAgIHR5cGVEZWZpbml0aW9ucy5sZW5ndGggPiAwICYmIChcbiAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICBjc3M9e2Nzc2BcbiAgICAgICAgICAgICAgbWluLXdpZHRoOiAke2Rlc2lnblRva2Vucy5jb25zdHJhaW50MTF9O1xuICAgICAgICAgICAgYH1cbiAgICAgICAgICA+XG4gICAgICAgICAgICA8U2VsZWN0SW5wdXRcbiAgICAgICAgICAgICAgaXNDbGVhcmFibGVcbiAgICAgICAgICAgICAgZGF0YS10ZXN0aWQ9XCJjdXN0b20tdHlwZS1zZWxlY3RcIlxuICAgICAgICAgICAgICBuYW1lPXtgJHtGSUVMRF9OQU1FfS50eXBlLm9iai5rZXlgfVxuICAgICAgICAgICAgICBvcHRpb25zPXttYXBUeXBlRGVmaW5pdGlvbnNUb09wdGlvbnMoXG4gICAgICAgICAgICAgICAgdHlwZURlZmluaXRpb25zLFxuICAgICAgICAgICAgICAgIGxhbmd1YWdlLFxuICAgICAgICAgICAgICAgIGxhbmd1YWdlcyxcbiAgICAgICAgICAgICAgICBmb3JtVmFsdWVzW0ZJRUxEX05BTUVdPy50eXBlPy5pZFxuICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICB2YWx1ZT17Zm9ybVZhbHVlc1tGSUVMRF9OQU1FXT8udHlwZT8ub2JqPy5rZXl9XG4gICAgICAgICAgICAgIG9uQ2hhbmdlPXtoYW5kbGVUeXBlRGVmaW5pdGlvblNlbGVjdH1cbiAgICAgICAgICAgICAgcGxhY2Vob2xkZXI9e2Zvcm1hdE1lc3NhZ2UobWVzc2FnZXMudHlwZXNQbGFjZWhvbGRlcil9XG4gICAgICAgICAgICAgIGlzUmVhZE9ubHk9e2lzUmVhZE9ubHl9XG4gICAgICAgICAgICAvPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICApXG4gICAgICB9XG4gICAgICBoZWFkZXJDb250cm9sc0FsaWdubWVudD1cInJpZ2h0XCJcbiAgICA+XG4gICAgICA8Q3VzdG9tRmllbGRzSW5wdXRXcmFwcGVyXG4gICAgICAgIHR5cGVEZWZpbml0aW9ucz17dHlwZURlZmluaXRpb25zfVxuICAgICAgICBpc1JlYWRPbmx5PXtpc1JlYWRPbmx5fVxuICAgICAgLz5cbiAgICA8L0NvbGxhcHNpYmxlUGFuZWw+XG4gICk7XG59O1xuXG5DdXN0b21UeXBlU3ViZm9ybS5kaXNwbGF5TmFtZSA9ICdDdXN0b21UeXBlU3ViZm9ybSc7XG5DdXN0b21UeXBlU3ViZm9ybS5wcm9wVHlwZXMgPSB7XG4gIHR5cGVEZWZpbml0aW9uczogUHJvcFR5cGVzLmFycmF5LmlzUmVxdWlyZWQsXG4gIGlzUmVhZE9ubHk6IFByb3BUeXBlcy5ib29sLFxuICBpc0NvbmRlbnNlZDogUHJvcFR5cGVzLmJvb2wsXG59O1xuXG5leHBvcnQgZGVmYXVsdCBDdXN0b21UeXBlU3ViZm9ybTtcbiJdfQ== */"),
|
|
12978
13030
|
children: jsxRuntime.jsx(uiKit.SelectInput, {
|
|
12979
13031
|
isClearable: true,
|
|
12980
13032
|
"data-testid": "custom-type-select",
|
|
@@ -12986,7 +13038,7 @@ const CustomTypeSubform = _ref => {
|
|
|
12986
13038
|
isReadOnly: isReadOnly
|
|
12987
13039
|
})
|
|
12988
13040
|
}),
|
|
12989
|
-
headerControlsAlignment: "
|
|
13041
|
+
headerControlsAlignment: "right",
|
|
12990
13042
|
children: jsxRuntime.jsx(CustomFieldsInputWrapper, {
|
|
12991
13043
|
typeDefinitions: typeDefinitions,
|
|
12992
13044
|
isReadOnly: isReadOnly
|
|
@@ -12995,9 +13047,97 @@ const CustomTypeSubform = _ref => {
|
|
|
12995
13047
|
};
|
|
12996
13048
|
CustomTypeSubform.displayName = 'CustomTypeSubform';
|
|
12997
13049
|
|
|
13050
|
+
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; }
|
|
13051
|
+
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; }
|
|
13052
|
+
const transformFieldType = fieldDefinition => {
|
|
13053
|
+
var _fieldDefinition$type, _fieldDefinition$type2;
|
|
13054
|
+
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') {
|
|
13055
|
+
var _context;
|
|
13056
|
+
return _objectSpread(_objectSpread({}, fieldDefinition.type), {}, {
|
|
13057
|
+
elementType: _objectSpread(_objectSpread({}, fieldDefinition.type.elementType), {}, {
|
|
13058
|
+
values: _mapInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context, value => ({
|
|
13059
|
+
key: value.key,
|
|
13060
|
+
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
13061
|
+
}))
|
|
13062
|
+
})
|
|
13063
|
+
});
|
|
13064
|
+
} else if (((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum') {
|
|
13065
|
+
var _context2;
|
|
13066
|
+
return _objectSpread(_objectSpread({}, fieldDefinition.type), {}, {
|
|
13067
|
+
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context2, value => ({
|
|
13068
|
+
key: value.key,
|
|
13069
|
+
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
13070
|
+
}))
|
|
13071
|
+
});
|
|
13072
|
+
} else {
|
|
13073
|
+
return fieldDefinition.type;
|
|
13074
|
+
}
|
|
13075
|
+
};
|
|
13076
|
+
const convertCustomField = resource => {
|
|
13077
|
+
var _context3, _context4;
|
|
13078
|
+
return {
|
|
13079
|
+
type: {
|
|
13080
|
+
typeId: 'type',
|
|
13081
|
+
id: resource.custom.type.id,
|
|
13082
|
+
obj: {
|
|
13083
|
+
key: resource.custom.type.key,
|
|
13084
|
+
name: l10n.transformLocalizedFieldToLocalizedString(resource.custom.type.nameAllLocales),
|
|
13085
|
+
fieldDefinitions: _mapInstanceProperty__default["default"](_context3 = resource.custom.type.fieldDefinitions).call(_context3, fieldDefinition => ({
|
|
13086
|
+
name: fieldDefinition.name,
|
|
13087
|
+
required: fieldDefinition.required,
|
|
13088
|
+
inputHint: fieldDefinition.inputHint,
|
|
13089
|
+
type: transformFieldType(fieldDefinition),
|
|
13090
|
+
label: l10n.transformLocalizedFieldToLocalizedString(fieldDefinition.labelAllLocales)
|
|
13091
|
+
}))
|
|
13092
|
+
}
|
|
13093
|
+
},
|
|
13094
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread(_objectSpread({}, fields), {}, {
|
|
13095
|
+
[customField.name]: customField.value
|
|
13096
|
+
}), {})
|
|
13097
|
+
};
|
|
13098
|
+
};
|
|
13099
|
+
const createFormStateFromResource = resource => {
|
|
13100
|
+
// If there are no custom fields on the resource, don't create a form state
|
|
13101
|
+
if (!resource[FIELD_NAME]) {
|
|
13102
|
+
return {
|
|
13103
|
+
[FIELD_NAME]: undefined
|
|
13104
|
+
};
|
|
13105
|
+
}
|
|
13106
|
+
return {
|
|
13107
|
+
[FIELD_NAME]: convertCustomField(resource)
|
|
13108
|
+
};
|
|
13109
|
+
};
|
|
13110
|
+
const createGraphQlDocFromFormState = formState => {
|
|
13111
|
+
var _context5;
|
|
13112
|
+
// Unset the custom type if it's not in the form state
|
|
13113
|
+
if (!formState[FIELD_NAME]) {
|
|
13114
|
+
return {
|
|
13115
|
+
[FIELD_NAME]: {}
|
|
13116
|
+
};
|
|
13117
|
+
}
|
|
13118
|
+
return {
|
|
13119
|
+
[FIELD_NAME]: {
|
|
13120
|
+
type: {
|
|
13121
|
+
id: formState[FIELD_NAME].type.id,
|
|
13122
|
+
typeId: 'type'
|
|
13123
|
+
},
|
|
13124
|
+
fields: _mapInstanceProperty__default["default"](_context5 = _Object$entries__default["default"](formState[FIELD_NAME].fields)).call(_context5, _ref => {
|
|
13125
|
+
let _ref2 = _slicedToArray(_ref, 2),
|
|
13126
|
+
name = _ref2[0],
|
|
13127
|
+
value = _ref2[1];
|
|
13128
|
+
return {
|
|
13129
|
+
name,
|
|
13130
|
+
value: _JSON$stringify__default["default"](value)
|
|
13131
|
+
};
|
|
13132
|
+
})
|
|
13133
|
+
}
|
|
13134
|
+
};
|
|
13135
|
+
};
|
|
13136
|
+
|
|
12998
13137
|
const CustomFieldsFormField = _ref => {
|
|
12999
13138
|
let resources = _ref.resources,
|
|
13000
|
-
isReadOnly = _ref.isReadOnly
|
|
13139
|
+
isReadOnly = _ref.isReadOnly,
|
|
13140
|
+
isCondensed = _ref.isCondensed;
|
|
13001
13141
|
const projectKey = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.project.key);
|
|
13002
13142
|
return jsxRuntime.jsx(CustomFieldTypeDefinitionsConnector$1, {
|
|
13003
13143
|
resources: resources,
|
|
@@ -13013,11 +13153,14 @@ const CustomFieldsFormField = _ref => {
|
|
|
13013
13153
|
const typeDefinitions = _mapInstanceProperty__default["default"](_context = customFieldTypeDefinitions.results).call(_context, CustomFieldTypeDefinitionsConnector$1.graphQlDocToForm);
|
|
13014
13154
|
return jsxRuntime.jsx(CustomTypeSubform, {
|
|
13015
13155
|
typeDefinitions: typeDefinitions,
|
|
13016
|
-
isReadOnly: isReadOnly
|
|
13156
|
+
isReadOnly: isReadOnly,
|
|
13157
|
+
isCondensed: isCondensed
|
|
13017
13158
|
});
|
|
13018
13159
|
}
|
|
13019
13160
|
});
|
|
13020
13161
|
};
|
|
13162
|
+
CustomFieldsFormField.createFormStateFromResource = createFormStateFromResource;
|
|
13163
|
+
CustomFieldsFormField.createGraphQlDocFromFormState = createGraphQlDocFromFormState;
|
|
13021
13164
|
|
|
13022
13165
|
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 } } } };
|
|
13023
13166
|
|