@commercetools-frontend/experimental-components 5.1.0 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commercetools-frontend-experimental-components.cjs.dev.js +583 -433
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +577 -433
- package/dist/commercetools-frontend-experimental-components.esm.js +583 -434
- package/dist/styles.css +284 -284
- package/package.json +18 -18
|
@@ -99,6 +99,7 @@ var merge = require('lodash/merge');
|
|
|
99
99
|
var set = require('lodash/set');
|
|
100
100
|
var uuid = require('uuid');
|
|
101
101
|
var _ = require('@commercetools-frontend/ui-kit/');
|
|
102
|
+
var ReactDOM = require('react-dom');
|
|
102
103
|
var selectUtils = require('@commercetools-uikit/select-utils');
|
|
103
104
|
var memoize = require('memoize-one');
|
|
104
105
|
var utils = require('@commercetools-uikit/utils');
|
|
@@ -182,6 +183,7 @@ var keyBy__default = /*#__PURE__*/_interopDefault(keyBy);
|
|
|
182
183
|
var times__default = /*#__PURE__*/_interopDefault(times);
|
|
183
184
|
var merge__default = /*#__PURE__*/_interopDefault(merge);
|
|
184
185
|
var set__default = /*#__PURE__*/_interopDefault(set);
|
|
186
|
+
var ReactDOM__default = /*#__PURE__*/_interopDefault(ReactDOM);
|
|
185
187
|
var memoize__default = /*#__PURE__*/_interopDefault(memoize);
|
|
186
188
|
var flatMap__default = /*#__PURE__*/_interopDefault(flatMap);
|
|
187
189
|
var 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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1677
|
+
function _objectSpread$1l(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1l(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1l(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1959
|
+
function _objectSpread$1k(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1986
|
+
function _objectSpread$1j(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1j(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1j(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2011
|
+
function _objectSpread$1i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2025
|
+
function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1h(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1h(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2059
|
+
function _objectSpread$1g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1g(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2077
|
+
function _objectSpread$1f(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1f(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2095
|
+
function _objectSpread$1e(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1e(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1e(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2162
|
+
function _objectSpread$1d(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1d(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1d(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2234
|
+
function _objectSpread$1c(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1c(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1c(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2409
|
+
function _objectSpread$1b(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1b(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1b(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2502
|
+
function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1a(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2689
|
+
function _objectSpread$19(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$19(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$19(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2817
|
+
function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$18(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$18(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3000
|
+
function _objectSpread$17(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$17(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$17(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3151
|
+
function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$16(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$16(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3193
|
+
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$15(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$15(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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);
|
|
@@ -3421,7 +3415,7 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
3421
3415
|
};
|
|
3422
3416
|
_this.handleClear = () => {
|
|
3423
3417
|
var _this$inputRef;
|
|
3424
|
-
(_this$inputRef = _this.inputRef) === null || _this$inputRef === void 0
|
|
3418
|
+
(_this$inputRef = _this.inputRef) === null || _this$inputRef === void 0 || _this$inputRef.focus();
|
|
3425
3419
|
_this.props.onChange(null);
|
|
3426
3420
|
_this.props.onReset();
|
|
3427
3421
|
_this.setState({
|
|
@@ -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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3682
|
+
function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$14(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$14(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3711
|
+
function _objectSpread$13(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$13(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$13(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3733
|
+
function _objectSpread$12(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$12(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$12(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4068
|
+
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$11(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$11(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4208
|
+
function _objectSpread$10(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$10(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$10(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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$$(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4744
|
+
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$$(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$$(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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$_(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4830
|
+
function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$_(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$_(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4899
|
+
function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$Z(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$Z(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4991
|
+
function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$Y(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$Y(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5080
|
+
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$X(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$X(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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
|
});
|
|
@@ -5153,7 +5147,7 @@ const createEmptyCustomFields = typeDefinition => ({
|
|
|
5153
5147
|
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5154
5148
|
function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5155
5149
|
var FetchTypeDefinitionsWithNamesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsWithNamesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "required" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 1445, source: { body: "query FetchTypeDefinitionsWithNamesQuery(\n $where: String\n $limit: Int\n $offset: Int\n) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n id\n key\n nameAllLocales {\n value\n locale\n }\n fieldDefinitions {\n required\n type {\n name\n ... on ReferenceType {\n referenceTypeId\n }\n ... on SetType {\n elementType {\n name\n ... on ReferenceType {\n referenceTypeId\n name\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n inputHint\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
5156
|
-
const customizableResources = ['asset', 'address', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection'];
|
|
5150
|
+
const customizableResources = ['asset', 'address', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item'];
|
|
5157
5151
|
const emptyTypeDefinitions = {
|
|
5158
5152
|
total: 0,
|
|
5159
5153
|
count: 0,
|
|
@@ -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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5266
|
+
function _objectSpread$W(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$W(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$W(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5362
|
+
function _objectSpread$V(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$V(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$V(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5454
|
+
function _objectSpread$U(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$U(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$U(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5824
|
+
function _objectSpread$T(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$T(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$T(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5866
|
+
function _objectSpread$S(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$S(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$S(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6015
|
+
function _objectSpread$R(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$R(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$R(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6044
|
+
function _objectSpread$Q(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$Q(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$Q(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6541
|
+
function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys$P(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys$P(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6689
|
+
function _objectSpread$O(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$O(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$O(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6826
|
+
function _objectSpread$N(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$N(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$N(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7084
|
+
function _objectSpread$M(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$M(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$M(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7310
|
+
function _objectSpread$L(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$L(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$L(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7359
|
+
function _objectSpread$K(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$K(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$K(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7418
|
+
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$J(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$J(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
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
|
|
@@ -7547,37 +7592,44 @@ const CustomFieldsInternal = props => {
|
|
|
7547
7592
|
return jsxRuntime.jsx(formik.FastField, {
|
|
7548
7593
|
name: fieldName,
|
|
7549
7594
|
validate: validate,
|
|
7550
|
-
children: () =>
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
name: fieldName,
|
|
7554
|
-
fieldDefinition: fieldDefinition
|
|
7555
|
-
}), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
7595
|
+
children: () => {
|
|
7596
|
+
var _context3;
|
|
7597
|
+
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
7556
7598
|
scale: "xs",
|
|
7557
|
-
|
|
7558
|
-
children: [isNested(fieldDefinition) ? jsxRuntime.jsx(CustomNestedFieldInput, {
|
|
7559
|
-
name: fieldName,
|
|
7560
|
-
value: value,
|
|
7561
|
-
fieldDefinition: fieldDefinition,
|
|
7562
|
-
isDisabled: props.isDisabled,
|
|
7563
|
-
isReadOnly: props.isReadOnly,
|
|
7564
|
-
onBlur: handleBlur,
|
|
7565
|
-
setFieldValue: props.setFieldValue
|
|
7566
|
-
}) : jsxRuntime.jsx(CustomFieldInput, {
|
|
7599
|
+
children: [jsxRuntime.jsx(CustomFieldsLabel, {
|
|
7567
7600
|
name: fieldName,
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7601
|
+
fieldDefinition: fieldDefinition
|
|
7602
|
+
}), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
7603
|
+
scale: "xs",
|
|
7604
|
+
alignItems: "stretch",
|
|
7605
|
+
children: [isNested(fieldDefinition) ? jsxRuntime.jsx(CustomNestedFieldInput, {
|
|
7606
|
+
name: fieldName,
|
|
7607
|
+
value: value,
|
|
7608
|
+
fieldDefinition: fieldDefinition,
|
|
7609
|
+
isDisabled: props.isDisabled,
|
|
7610
|
+
isReadOnly: props.isReadOnly,
|
|
7611
|
+
onBlur: handleBlur,
|
|
7612
|
+
setFieldValue: props.setFieldValue
|
|
7613
|
+
}) : jsxRuntime.jsx("div", {
|
|
7614
|
+
"aria-invalid": _Object$keys__default["default"](fieldErrors !== null && fieldErrors !== void 0 ? fieldErrors : {}).length > 0,
|
|
7615
|
+
"aria-errormessage": "".concat(fieldName, "-error"),
|
|
7616
|
+
children: jsxRuntime.jsx(CustomFieldInput, {
|
|
7617
|
+
name: fieldName,
|
|
7618
|
+
value: value,
|
|
7619
|
+
fieldDefinition: fieldDefinition,
|
|
7620
|
+
isDisabled: props.isDisabled,
|
|
7621
|
+
isReadOnly: props.isReadOnly,
|
|
7622
|
+
onBlur: handleBlur,
|
|
7623
|
+
setFieldValue: props.setFieldValue,
|
|
7624
|
+
hasError: hasError
|
|
7625
|
+
})
|
|
7626
|
+
}, _concatInstanceProperty__default["default"](_context3 = "".concat(fieldName, "-")).call(_context3, index)), jsxRuntime.jsx(CustomFieldErrors, {
|
|
7627
|
+
isTouched: isTouched,
|
|
7628
|
+
errors: fieldErrors
|
|
7629
|
+
})]
|
|
7578
7630
|
})]
|
|
7579
|
-
})
|
|
7580
|
-
}
|
|
7631
|
+
});
|
|
7632
|
+
}
|
|
7581
7633
|
}, _concatInstanceProperty__default["default"](_context2 = "".concat(fieldName, "-")).call(_context2, index));
|
|
7582
7634
|
})
|
|
7583
7635
|
});
|
|
@@ -7631,23 +7683,23 @@ var pickerMessages = reactIntl.defineMessages({
|
|
|
7631
7683
|
}
|
|
7632
7684
|
});
|
|
7633
7685
|
|
|
7634
|
-
function ownKeys$
|
|
7635
|
-
function _objectSpread$
|
|
7636
|
-
const
|
|
7637
|
-
INCLUSION: '
|
|
7638
|
-
EXCLUSION: '
|
|
7686
|
+
function ownKeys$I(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7687
|
+
function _objectSpread$I(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$I(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$I(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7688
|
+
const PRODUCT_SELECTION_MODES = {
|
|
7689
|
+
INCLUSION: 'Individual',
|
|
7690
|
+
EXCLUSION: 'IndividualExclusion'
|
|
7639
7691
|
};
|
|
7640
|
-
const
|
|
7692
|
+
const PRODUCT_SELECTION_MODES_LABELS = {
|
|
7641
7693
|
INCLUSION: 'inclusion',
|
|
7642
7694
|
EXCLUSION: 'exclusion'
|
|
7643
7695
|
};
|
|
7644
|
-
const
|
|
7645
|
-
const
|
|
7696
|
+
const getMode = mode => mode === PRODUCT_SELECTION_MODES.INCLUSION || mode === PRODUCT_SELECTION_MODES_LABELS.INCLUSION ? 'inclusion' : 'exclusion';
|
|
7697
|
+
const addModeToLabel = function (ps) {
|
|
7646
7698
|
var _context;
|
|
7647
7699
|
let enableExcludingProducts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
7648
7700
|
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(
|
|
7701
|
+
return _objectSpread$I(_objectSpread$I({}, ps), {}, {
|
|
7702
|
+
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
7703
|
});
|
|
7652
7704
|
};
|
|
7653
7705
|
|
|
@@ -7668,9 +7720,9 @@ const mapProductSelectionsToOptions$1 = memoize__default["default"](function ()
|
|
|
7668
7720
|
return {
|
|
7669
7721
|
id: productSelection.id,
|
|
7670
7722
|
value: productSelection.id,
|
|
7671
|
-
label: _concatInstanceProperty__default["default"](_context = "".concat(label)).call(_context, _includesInstanceProperty__default["default"](selectedPSList).call(selectedPSList, productSelection.id) && enableExcludingProducts ? " (type: ".concat(
|
|
7723
|
+
label: _concatInstanceProperty__default["default"](_context = "".concat(label)).call(_context, _includesInstanceProperty__default["default"](selectedPSList).call(selectedPSList, productSelection.id) && enableExcludingProducts ? " (type: ".concat(getMode(productSelection.mode), ")") : ''),
|
|
7672
7724
|
key: productSelection.key,
|
|
7673
|
-
|
|
7725
|
+
mode: getMode(productSelection.mode)
|
|
7674
7726
|
};
|
|
7675
7727
|
});
|
|
7676
7728
|
});
|
|
@@ -7740,11 +7792,11 @@ const getValueFromOptions$3 = _ref => {
|
|
|
7740
7792
|
// handle async-select-field value transformation
|
|
7741
7793
|
if (isMulti) {
|
|
7742
7794
|
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 =>
|
|
7795
|
+
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
7796
|
}
|
|
7745
7797
|
|
|
7746
7798
|
// 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
|
|
7799
|
+
return addModeToLabel(_findInstanceProperty__default["default"](allProductSelectionOptions).call(allProductSelectionOptions, ps => currentlySelectedProductSelections === ps.value), enableExcludingProducts);
|
|
7748
7800
|
};
|
|
7749
7801
|
const emptyStoreOption$1 = intl => [{
|
|
7750
7802
|
label: intl.formatMessage(pickerMessages.asyncSelectDropdownTypeAheadPrompt),
|
|
@@ -7791,7 +7843,7 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
7791
7843
|
value: productSelection.id,
|
|
7792
7844
|
name: localizedName,
|
|
7793
7845
|
key: productSelection.key,
|
|
7794
|
-
|
|
7846
|
+
mode: getMode(productSelection.mode)
|
|
7795
7847
|
};
|
|
7796
7848
|
});
|
|
7797
7849
|
}, [dataLocale, projectLanguages, filteredProductSelections]);
|
|
@@ -7846,7 +7898,7 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
7846
7898
|
});
|
|
7847
7899
|
}
|
|
7848
7900
|
|
|
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: "
|
|
7901
|
+
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
7902
|
const createQueryVariables$4 = (productSelections, predicateField) => {
|
|
7851
7903
|
var _context;
|
|
7852
7904
|
return {
|
|
@@ -7870,7 +7922,7 @@ const useProductSelectionsByFieldFetcher = (productSelections, predicateField) =
|
|
|
7870
7922
|
};
|
|
7871
7923
|
};
|
|
7872
7924
|
|
|
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: "
|
|
7925
|
+
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
7926
|
const mapProductSelectionsToOptions = memoize__default["default"](_ref => {
|
|
7875
7927
|
let _ref$productSelection = _ref.productSelections,
|
|
7876
7928
|
productSelections = _ref$productSelection === void 0 ? [] : _ref$productSelection,
|
|
@@ -7885,7 +7937,7 @@ const mapProductSelectionsToOptions = memoize__default["default"](_ref => {
|
|
|
7885
7937
|
fallbackOrder: projectLanguages
|
|
7886
7938
|
}),
|
|
7887
7939
|
key: productSelection.key,
|
|
7888
|
-
|
|
7940
|
+
mode: getMode(productSelection.mode)
|
|
7889
7941
|
}));
|
|
7890
7942
|
});
|
|
7891
7943
|
const getValueFromOptions$2 = _ref2 => {
|
|
@@ -7897,10 +7949,10 @@ const getValueFromOptions$2 = _ref2 => {
|
|
|
7897
7949
|
return undefined;
|
|
7898
7950
|
}
|
|
7899
7951
|
if (isMulti) {
|
|
7900
|
-
return _mapInstanceProperty__default["default"](productSelectionFieldOptions).call(productSelectionFieldOptions, ps =>
|
|
7952
|
+
return _mapInstanceProperty__default["default"](productSelectionFieldOptions).call(productSelectionFieldOptions, ps => addModeToLabel(ps, enableExcludingProducts));
|
|
7901
7953
|
}
|
|
7902
7954
|
// if the input is not multiselect, the AsyncSearchSelect is expecting an object rather than array
|
|
7903
|
-
return
|
|
7955
|
+
return addModeToLabel(productSelectionFieldOptions[0], enableExcludingProducts);
|
|
7904
7956
|
};
|
|
7905
7957
|
const createQueryVariables$3 = _ref3 => {
|
|
7906
7958
|
var _context;
|
|
@@ -7997,12 +8049,12 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
7997
8049
|
});
|
|
7998
8050
|
}
|
|
7999
8051
|
|
|
8000
|
-
function ownKeys$
|
|
8001
|
-
function _objectSpread$
|
|
8002
|
-
function
|
|
8052
|
+
function ownKeys$H(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8053
|
+
function _objectSpread$H(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$H(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$H(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8054
|
+
function ModeSelectInputOption(props) {
|
|
8003
8055
|
const data = props.data;
|
|
8004
8056
|
const noValueFallback = props.noValueFallback || constants.NO_VALUE_FALLBACK;
|
|
8005
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8057
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$H(_objectSpread$H({}, props), {}, {
|
|
8006
8058
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
8007
8059
|
scale: "xs",
|
|
8008
8060
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -8011,24 +8063,24 @@ function TypeSelectInputOption(props) {
|
|
|
8011
8063
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
8012
8064
|
children: ["Key: ", (data === null || data === void 0 ? void 0 : data.key) || noValueFallback]
|
|
8013
8065
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
8014
|
-
children: ["Type: ", (data === null || data === void 0 ? void 0 : data.
|
|
8066
|
+
children: ["Type: ", (data === null || data === void 0 ? void 0 : data.mode) || noValueFallback]
|
|
8015
8067
|
})]
|
|
8016
8068
|
})
|
|
8017
8069
|
}));
|
|
8018
8070
|
}
|
|
8019
8071
|
|
|
8020
|
-
function ownKeys$
|
|
8021
|
-
function _objectSpread$
|
|
8072
|
+
function ownKeys$G(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8073
|
+
function _objectSpread$G(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$G(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$G(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8022
8074
|
function ProductSelectionsPicker(props) {
|
|
8023
8075
|
const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher();
|
|
8024
8076
|
const components = React.useMemo(() => {
|
|
8025
8077
|
return {
|
|
8026
8078
|
Option: optionInnerProps => {
|
|
8027
8079
|
if (optionInnerProps.isDisabled) {
|
|
8028
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8080
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$G({}, optionInnerProps));
|
|
8029
8081
|
}
|
|
8030
8082
|
if (props.optionType === TYPE_PROPERTY) {
|
|
8031
|
-
return jsxRuntime.jsx(
|
|
8083
|
+
return jsxRuntime.jsx(ModeSelectInputOption, _objectSpread$G({}, optionInnerProps));
|
|
8032
8084
|
}
|
|
8033
8085
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8034
8086
|
optionType: props.optionType,
|
|
@@ -8040,7 +8092,7 @@ function ProductSelectionsPicker(props) {
|
|
|
8040
8092
|
if (productSelectionsTotalFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8041
8093
|
const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= props.lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= props.upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
|
|
8042
8094
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8043
|
-
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$
|
|
8095
|
+
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$G(_objectSpread$G({}, props), {}, {
|
|
8044
8096
|
components: components
|
|
8045
8097
|
}))
|
|
8046
8098
|
});
|
|
@@ -8101,8 +8153,8 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
8101
8153
|
});
|
|
8102
8154
|
}
|
|
8103
8155
|
|
|
8104
|
-
function ownKeys$
|
|
8105
|
-
function _objectSpread$
|
|
8156
|
+
function ownKeys$F(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8157
|
+
function _objectSpread$F(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$F(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$F(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8106
8158
|
const emptyCountryOption = intl => [{
|
|
8107
8159
|
label: intl.formatMessage(messages$u.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
8108
8160
|
value: undefined,
|
|
@@ -8129,7 +8181,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8129
8181
|
const onOptionChange = event => {
|
|
8130
8182
|
const countries = event.target.value;
|
|
8131
8183
|
props.onChange({
|
|
8132
|
-
target: _objectSpread$
|
|
8184
|
+
target: _objectSpread$F(_objectSpread$F({}, event.target), {}, {
|
|
8133
8185
|
value: _mapInstanceProperty__default["default"](countries).call(countries, country => {
|
|
8134
8186
|
var _country$value;
|
|
8135
8187
|
return (_country$value = country === null || country === void 0 ? void 0 : country.value) !== null && _country$value !== void 0 ? _country$value : country;
|
|
@@ -8160,13 +8212,13 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
8160
8212
|
});
|
|
8161
8213
|
}
|
|
8162
8214
|
|
|
8163
|
-
function ownKeys$
|
|
8164
|
-
function _objectSpread$
|
|
8215
|
+
function ownKeys$E(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8216
|
+
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$E(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$E(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8165
8217
|
function CountriesPicker(props) {
|
|
8166
8218
|
var _props$options;
|
|
8167
8219
|
const CustomCountriesPicker = ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.length) <= props.countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
|
|
8168
8220
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8169
|
-
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$
|
|
8221
|
+
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$E({}, props))
|
|
8170
8222
|
});
|
|
8171
8223
|
}
|
|
8172
8224
|
CountriesPicker.defaultProps = {
|
|
@@ -8386,8 +8438,8 @@ var messages$s = reactIntl.defineMessages({
|
|
|
8386
8438
|
}
|
|
8387
8439
|
});
|
|
8388
8440
|
|
|
8389
|
-
function ownKeys$
|
|
8390
|
-
function _objectSpread$
|
|
8441
|
+
function ownKeys$D(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8442
|
+
function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$D(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$D(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8391
8443
|
const hasErrors$2 = errors => {
|
|
8392
8444
|
var _context;
|
|
8393
8445
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8459,7 +8511,7 @@ const StoresAsyncSelectInput = props => {
|
|
|
8459
8511
|
};
|
|
8460
8512
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8461
8513
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8462
|
-
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$
|
|
8514
|
+
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$D(_objectSpread$D({
|
|
8463
8515
|
id: props.id,
|
|
8464
8516
|
name: props.name,
|
|
8465
8517
|
placeholder: intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
@@ -8502,8 +8554,8 @@ StoresAsyncSelectInput.defaultProps = {
|
|
|
8502
8554
|
shouldFetchProductSelections: false
|
|
8503
8555
|
};
|
|
8504
8556
|
|
|
8505
|
-
function ownKeys$
|
|
8506
|
-
function _objectSpread$
|
|
8557
|
+
function ownKeys$C(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8558
|
+
function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$C(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$C(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8507
8559
|
const hasErrors$1 = errors => {
|
|
8508
8560
|
var _context;
|
|
8509
8561
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8551,7 +8603,7 @@ const StoresBasicSelectInput = props => {
|
|
|
8551
8603
|
};
|
|
8552
8604
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8553
8605
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8554
|
-
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$
|
|
8606
|
+
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$C(_objectSpread$C({
|
|
8555
8607
|
id: props.id,
|
|
8556
8608
|
name: props.name,
|
|
8557
8609
|
placeholder: intl.formatMessage(messages$s.basicSelectInputPlaceholder),
|
|
@@ -8647,8 +8699,8 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
8647
8699
|
};
|
|
8648
8700
|
};
|
|
8649
8701
|
|
|
8650
|
-
function ownKeys$
|
|
8651
|
-
function _objectSpread$
|
|
8702
|
+
function ownKeys$B(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8703
|
+
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$B(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$B(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8652
8704
|
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
8705
|
const hasErrors = errors => {
|
|
8654
8706
|
var _context;
|
|
@@ -8750,7 +8802,7 @@ const StoresSearchSelectInput = props => {
|
|
|
8750
8802
|
const loadOptionsDebounced = debounce__default["default"](handleLoadOptions, 500);
|
|
8751
8803
|
if (storesByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8752
8804
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8753
|
-
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$
|
|
8805
|
+
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$B(_objectSpread$B({
|
|
8754
8806
|
id: props.id,
|
|
8755
8807
|
name: props.name,
|
|
8756
8808
|
placeholder: intl.formatMessage(messages$s.searchSelectInputPlaceholder),
|
|
@@ -8799,8 +8851,8 @@ StoresSearchSelectInput.defaultProps = {
|
|
|
8799
8851
|
shouldFetchProductSelections: false
|
|
8800
8852
|
};
|
|
8801
8853
|
|
|
8802
|
-
function ownKeys$
|
|
8803
|
-
function _objectSpread$
|
|
8854
|
+
function ownKeys$A(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8855
|
+
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$A(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$A(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8804
8856
|
const StoreSelectInput = props => {
|
|
8805
8857
|
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher(props.projectKey);
|
|
8806
8858
|
const components = React.useMemo(() => {
|
|
@@ -8808,7 +8860,7 @@ const StoreSelectInput = props => {
|
|
|
8808
8860
|
// eslint-disable-next-line react/display-name
|
|
8809
8861
|
Option: optionInnerProps => {
|
|
8810
8862
|
if (optionInnerProps.isDisabled) {
|
|
8811
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8863
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$A({}, optionInnerProps));
|
|
8812
8864
|
}
|
|
8813
8865
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8814
8866
|
optionType: props.optionType,
|
|
@@ -8819,7 +8871,7 @@ const StoreSelectInput = props => {
|
|
|
8819
8871
|
}, [props.optionType]);
|
|
8820
8872
|
if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8821
8873
|
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput : StoresSearchSelectInput;
|
|
8822
|
-
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$
|
|
8874
|
+
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$A(_objectSpread$A({
|
|
8823
8875
|
projectKey: props.projectKey,
|
|
8824
8876
|
id: props.id,
|
|
8825
8877
|
name: props.name,
|
|
@@ -9374,10 +9426,10 @@ const RESOURCES_WITH_PLATFORM_LIMITS = {
|
|
|
9374
9426
|
carts: 'carts'
|
|
9375
9427
|
};
|
|
9376
9428
|
|
|
9377
|
-
function ownKeys$
|
|
9378
|
-
function _objectSpread$
|
|
9429
|
+
function ownKeys$z(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9430
|
+
function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$z(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9379
9431
|
const resourcesWithPlatformLimits = _Object$keys__default["default"](RESOURCES_WITH_PLATFORM_LIMITS);
|
|
9380
|
-
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$
|
|
9432
|
+
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$z({
|
|
9381
9433
|
[camelCase__default["default"]("should include ".concat(nextNameOfLimit))]: platformLimit ? nextNameOfLimit === platformLimit : true
|
|
9382
9434
|
}, previousIncludedLimits), {});
|
|
9383
9435
|
|
|
@@ -9467,8 +9519,8 @@ var messages$n = reactIntl.defineMessages({
|
|
|
9467
9519
|
}
|
|
9468
9520
|
});
|
|
9469
9521
|
|
|
9470
|
-
function ownKeys$
|
|
9471
|
-
function _objectSpread$
|
|
9522
|
+
function ownKeys$y(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9523
|
+
function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$y(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$y(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9472
9524
|
const getCustomerSupportLink$1 = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
9473
9525
|
isExternal: true,
|
|
9474
9526
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -9479,7 +9531,7 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
9479
9531
|
limit = _ref.limit;
|
|
9480
9532
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9481
9533
|
type: "warning",
|
|
9482
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9534
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$y(_objectSpread$y({}, messages$n[resource]), {}, {
|
|
9483
9535
|
values: {
|
|
9484
9536
|
limit,
|
|
9485
9537
|
customersupport: getCustomerSupportLink$1
|
|
@@ -9520,8 +9572,8 @@ var messages$m = reactIntl.defineMessages({
|
|
|
9520
9572
|
}
|
|
9521
9573
|
});
|
|
9522
9574
|
|
|
9523
|
-
function ownKeys$
|
|
9524
|
-
function _objectSpread$
|
|
9575
|
+
function ownKeys$x(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9576
|
+
function _objectSpread$x(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$x(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$x(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9525
9577
|
const getCustomerSupportLink = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
9526
9578
|
isExternal: true,
|
|
9527
9579
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -9532,7 +9584,7 @@ const PlatformLimitErrorNotification = _ref => {
|
|
|
9532
9584
|
limit = _ref.limit;
|
|
9533
9585
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9534
9586
|
type: "error",
|
|
9535
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9587
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$x(_objectSpread$x({}, messages$m[resource]), {}, {
|
|
9536
9588
|
values: {
|
|
9537
9589
|
limit,
|
|
9538
9590
|
customersupport: getCustomerSupportLink
|
|
@@ -9550,8 +9602,8 @@ const Notifications = {
|
|
|
9550
9602
|
Error: PlatformLimitErrorNotification
|
|
9551
9603
|
};
|
|
9552
9604
|
|
|
9553
|
-
function ownKeys$
|
|
9554
|
-
function _objectSpread$
|
|
9605
|
+
function ownKeys$w(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9606
|
+
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$w(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$w(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9555
9607
|
const PlatformLimitsStatusText = _ref => {
|
|
9556
9608
|
let intlMessage = _ref.intlMessage,
|
|
9557
9609
|
children = _ref.children;
|
|
@@ -9560,7 +9612,7 @@ const PlatformLimitsStatusText = _ref => {
|
|
|
9560
9612
|
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
9561
9613
|
size: "xs",
|
|
9562
9614
|
children: [jsxRuntime.jsx("span", {
|
|
9563
|
-
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
9615
|
+
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$w({}, intlMessage))
|
|
9564
9616
|
}), jsxRuntime.jsx("span", {
|
|
9565
9617
|
children: children
|
|
9566
9618
|
})]
|
|
@@ -9669,11 +9721,11 @@ var messages$l = reactIntl.defineMessages({
|
|
|
9669
9721
|
}
|
|
9670
9722
|
});
|
|
9671
9723
|
|
|
9672
|
-
function ownKeys$
|
|
9673
|
-
function _objectSpread$
|
|
9724
|
+
function ownKeys$v(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9725
|
+
function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$v(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$v(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9674
9726
|
const PlatformLimitsShippingMethodsTooltip = props => {
|
|
9675
9727
|
const intl = reactIntl.useIntl();
|
|
9676
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
9728
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$v(_objectSpread$v({}, props), {}, {
|
|
9677
9729
|
title: intl.formatMessage(messages$l.shippingMethodsPlatformLimitReached)
|
|
9678
9730
|
}));
|
|
9679
9731
|
};
|
|
@@ -9727,15 +9779,15 @@ const useShippingMethodsLimits = () => {
|
|
|
9727
9779
|
};
|
|
9728
9780
|
};
|
|
9729
9781
|
|
|
9730
|
-
function ownKeys$
|
|
9731
|
-
function _objectSpread$
|
|
9782
|
+
function ownKeys$u(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9783
|
+
function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$u(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$u(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9732
9784
|
const injectShippingMethodsPlatformLimits = () => WrappedComponent => {
|
|
9733
9785
|
const WithShippingMethodsPlatformLimits = props => {
|
|
9734
9786
|
const shippingMethodsPlatformLimits = useShippingMethodsLimits();
|
|
9735
9787
|
const shippingMethodsProps = {
|
|
9736
9788
|
platformLimits: shippingMethodsPlatformLimits
|
|
9737
9789
|
};
|
|
9738
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
9790
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$u(_objectSpread$u({}, props), shippingMethodsProps));
|
|
9739
9791
|
};
|
|
9740
9792
|
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
9741
9793
|
return WithShippingMethodsPlatformLimits;
|
|
@@ -9816,11 +9868,11 @@ var messages$j = reactIntl.defineMessages({
|
|
|
9816
9868
|
}
|
|
9817
9869
|
});
|
|
9818
9870
|
|
|
9819
|
-
function ownKeys$
|
|
9820
|
-
function _objectSpread$
|
|
9871
|
+
function ownKeys$t(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9872
|
+
function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$t(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$t(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9821
9873
|
const PlatformLimitsTaxCategoriesTooltip = props => {
|
|
9822
9874
|
const intl = reactIntl.useIntl();
|
|
9823
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
9875
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
9824
9876
|
title: intl.formatMessage(messages$j.taxCategoriesPlatformLimitReached)
|
|
9825
9877
|
}));
|
|
9826
9878
|
};
|
|
@@ -9874,15 +9926,15 @@ const useTaxCategoriesLimits = () => {
|
|
|
9874
9926
|
};
|
|
9875
9927
|
};
|
|
9876
9928
|
|
|
9877
|
-
function ownKeys$
|
|
9878
|
-
function _objectSpread$
|
|
9929
|
+
function ownKeys$s(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9930
|
+
function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$s(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$s(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9879
9931
|
const injectTaxCategoriesPlatformLimits = WrappedComponent => {
|
|
9880
9932
|
const WithTaxCategoriesPlatformLimits = props => {
|
|
9881
9933
|
const taxCategoriesPlatformLimits = useTaxCategoriesLimits();
|
|
9882
9934
|
const taxCategoriesProps = {
|
|
9883
9935
|
platformLimits: taxCategoriesPlatformLimits
|
|
9884
9936
|
};
|
|
9885
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
9937
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$s(_objectSpread$s({}, props), taxCategoriesProps));
|
|
9886
9938
|
};
|
|
9887
9939
|
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
9888
9940
|
return WithTaxCategoriesPlatformLimits;
|
|
@@ -9963,11 +10015,11 @@ var messages$h = reactIntl.defineMessages({
|
|
|
9963
10015
|
}
|
|
9964
10016
|
});
|
|
9965
10017
|
|
|
9966
|
-
function ownKeys$
|
|
9967
|
-
function _objectSpread$
|
|
10018
|
+
function ownKeys$r(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10019
|
+
function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$r(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$r(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9968
10020
|
const PlatformLimitsZonesTooltip = props => {
|
|
9969
10021
|
const intl = reactIntl.useIntl();
|
|
9970
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10022
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$r(_objectSpread$r({}, props), {}, {
|
|
9971
10023
|
title: intl.formatMessage(messages$h.zonesPlatformLimitReached)
|
|
9972
10024
|
}));
|
|
9973
10025
|
};
|
|
@@ -10021,15 +10073,15 @@ const useZonesLimits = () => {
|
|
|
10021
10073
|
};
|
|
10022
10074
|
};
|
|
10023
10075
|
|
|
10024
|
-
function ownKeys$
|
|
10025
|
-
function _objectSpread$
|
|
10076
|
+
function ownKeys$q(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10077
|
+
function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$q(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$q(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10026
10078
|
const injectZonesPlatformLimits = () => WrappedComponent => {
|
|
10027
10079
|
const WithZonesPlatformLimits = props => {
|
|
10028
10080
|
const zonesPlatformLimits = useZonesLimits();
|
|
10029
10081
|
const zonesProps = {
|
|
10030
10082
|
platformLimits: zonesPlatformLimits
|
|
10031
10083
|
};
|
|
10032
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10084
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$q(_objectSpread$q({}, props), zonesProps));
|
|
10033
10085
|
};
|
|
10034
10086
|
WithZonesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithZonesPlatformLimits');
|
|
10035
10087
|
return WithZonesPlatformLimits;
|
|
@@ -10123,11 +10175,11 @@ var messages$f = reactIntl.defineMessages({
|
|
|
10123
10175
|
}
|
|
10124
10176
|
});
|
|
10125
10177
|
|
|
10126
|
-
function ownKeys$
|
|
10127
|
-
function _objectSpread$
|
|
10178
|
+
function ownKeys$p(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10179
|
+
function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$p(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$p(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10128
10180
|
const PlatformLimitsCustomersTooltip = props => {
|
|
10129
10181
|
const intl = reactIntl.useIntl();
|
|
10130
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10182
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
10131
10183
|
title: intl.formatMessage(messages$f.customersPlatformLimitReached)
|
|
10132
10184
|
}));
|
|
10133
10185
|
};
|
|
@@ -10141,8 +10193,8 @@ var messages$e = reactIntl.defineMessages({
|
|
|
10141
10193
|
}
|
|
10142
10194
|
});
|
|
10143
10195
|
|
|
10144
|
-
function ownKeys$
|
|
10145
|
-
function _objectSpread$
|
|
10196
|
+
function ownKeys$o(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10197
|
+
function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$o(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$o(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10146
10198
|
var styles$b = {
|
|
10147
10199
|
"status": "platform-limits-customers-status-module__status___3rXYM"
|
|
10148
10200
|
};
|
|
@@ -10162,7 +10214,7 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
10162
10214
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
10163
10215
|
tone: "secondary",
|
|
10164
10216
|
isInline: true,
|
|
10165
|
-
intlMessage: _objectSpread$
|
|
10217
|
+
intlMessage: _objectSpread$o(_objectSpread$o({}, messages$e.customersStatus), {}, {
|
|
10166
10218
|
values: {
|
|
10167
10219
|
current: intl.formatNumber(current),
|
|
10168
10220
|
limit: intl.formatNumber(limit)
|
|
@@ -10186,10 +10238,10 @@ var messages$d = reactIntl.defineMessages({
|
|
|
10186
10238
|
}
|
|
10187
10239
|
});
|
|
10188
10240
|
|
|
10189
|
-
function ownKeys$
|
|
10190
|
-
function _objectSpread$
|
|
10241
|
+
function ownKeys$n(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10242
|
+
function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$n(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$n(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10191
10243
|
var LimitsReachedErrorGraphic$1 = function LimitsReachedErrorGraphic(props) {
|
|
10192
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
10244
|
+
return jsxRuntime.jsxs("svg", _objectSpread$n(_objectSpread$n({}, props), {}, {
|
|
10193
10245
|
children: [jsxRuntime.jsx("defs", {
|
|
10194
10246
|
children: jsxRuntime.jsx("path", {
|
|
10195
10247
|
id: "a",
|
|
@@ -10361,15 +10413,15 @@ const useCustomersPlatformLimits = () => {
|
|
|
10361
10413
|
};
|
|
10362
10414
|
};
|
|
10363
10415
|
|
|
10364
|
-
function ownKeys$
|
|
10365
|
-
function _objectSpread$
|
|
10416
|
+
function ownKeys$m(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10417
|
+
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$m(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$m(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10366
10418
|
const injectCustomersPlatformLimits = () => WrappedComponent => {
|
|
10367
10419
|
const WithCustomersPlatformLimits = props => {
|
|
10368
10420
|
const CustomersPlatformLimits = useCustomersPlatformLimits();
|
|
10369
10421
|
const customersProps = {
|
|
10370
10422
|
platformLimits: CustomersPlatformLimits
|
|
10371
10423
|
};
|
|
10372
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10424
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$m(_objectSpread$m({}, props), customersProps));
|
|
10373
10425
|
};
|
|
10374
10426
|
WithCustomersPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
10375
10427
|
return WithCustomersPlatformLimits;
|
|
@@ -10463,11 +10515,11 @@ var messages$c = reactIntl.defineMessages({
|
|
|
10463
10515
|
}
|
|
10464
10516
|
});
|
|
10465
10517
|
|
|
10466
|
-
function ownKeys$
|
|
10467
|
-
function _objectSpread$
|
|
10518
|
+
function ownKeys$l(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10519
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$l(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$l(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10468
10520
|
const PlatformLimitsCustomerGroupsTooltip = props => {
|
|
10469
10521
|
const intl = reactIntl.useIntl();
|
|
10470
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
10522
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
10471
10523
|
title: intl.formatMessage(messages$c.customerGroupsPlatformLimitReached)
|
|
10472
10524
|
}));
|
|
10473
10525
|
};
|
|
@@ -10481,8 +10533,8 @@ var messages$b = reactIntl.defineMessages({
|
|
|
10481
10533
|
}
|
|
10482
10534
|
});
|
|
10483
10535
|
|
|
10484
|
-
function ownKeys$
|
|
10485
|
-
function _objectSpread$
|
|
10536
|
+
function ownKeys$k(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10537
|
+
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10486
10538
|
var styles$9 = {
|
|
10487
10539
|
"status": "platform-limits-customer-groups-status-module__status___6099G"
|
|
10488
10540
|
};
|
|
@@ -10502,7 +10554,7 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
10502
10554
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
10503
10555
|
tone: "secondary",
|
|
10504
10556
|
isInline: true,
|
|
10505
|
-
intlMessage: _objectSpread$
|
|
10557
|
+
intlMessage: _objectSpread$k(_objectSpread$k({}, messages$b.customerGroupsStatus), {}, {
|
|
10506
10558
|
values: {
|
|
10507
10559
|
current: intl.formatNumber(current),
|
|
10508
10560
|
limit: intl.formatNumber(limit)
|
|
@@ -10526,10 +10578,10 @@ var messages$a = reactIntl.defineMessages({
|
|
|
10526
10578
|
}
|
|
10527
10579
|
});
|
|
10528
10580
|
|
|
10529
|
-
function ownKeys$
|
|
10530
|
-
function _objectSpread$
|
|
10581
|
+
function ownKeys$j(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10582
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$j(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$j(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10531
10583
|
var LimitsReachedErrorGraphic = function LimitsReachedErrorGraphic(props) {
|
|
10532
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
10584
|
+
return jsxRuntime.jsxs("svg", _objectSpread$j(_objectSpread$j({}, props), {}, {
|
|
10533
10585
|
children: [jsxRuntime.jsx("defs", {
|
|
10534
10586
|
children: jsxRuntime.jsx("path", {
|
|
10535
10587
|
id: "a",
|
|
@@ -10701,15 +10753,15 @@ const useCustomerGroupsPlatformLimits = () => {
|
|
|
10701
10753
|
};
|
|
10702
10754
|
};
|
|
10703
10755
|
|
|
10704
|
-
function ownKeys$
|
|
10705
|
-
function _objectSpread$
|
|
10756
|
+
function ownKeys$i(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10757
|
+
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10706
10758
|
const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
|
|
10707
10759
|
const WithCustomerGroupsPlatformLimits = props => {
|
|
10708
10760
|
const CustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits();
|
|
10709
10761
|
const customersProps = {
|
|
10710
10762
|
platformLimits: CustomerGroupsPlatformLimits
|
|
10711
10763
|
};
|
|
10712
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
10764
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$i(_objectSpread$i({}, props), customersProps));
|
|
10713
10765
|
};
|
|
10714
10766
|
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
10715
10767
|
return WithCustomerGroupsPlatformLimits;
|
|
@@ -10802,8 +10854,8 @@ const defaultValue = {
|
|
|
10802
10854
|
*/
|
|
10803
10855
|
const PimIndexerContext = /*#__PURE__*/React.createContext(defaultValue);
|
|
10804
10856
|
|
|
10805
|
-
function ownKeys$
|
|
10806
|
-
function _objectSpread$
|
|
10857
|
+
function ownKeys$h(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10858
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$h(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$h(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10807
10859
|
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
10860
|
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
10861
|
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 +11031,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10979
11031
|
shouldIndexProductTypes: isIndexingProductTypes
|
|
10980
11032
|
}
|
|
10981
11033
|
});
|
|
10982
|
-
_this.setState(_objectSpread$
|
|
11034
|
+
_this.setState(_objectSpread$h(_objectSpread$h({
|
|
10983
11035
|
isLoading: false,
|
|
10984
11036
|
isProjectBeingIndexedByPim: true
|
|
10985
11037
|
}, getIndexingJobIds(indexMutationResult)), {}, {
|
|
@@ -11004,7 +11056,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11004
11056
|
key: "render",
|
|
11005
11057
|
value: function render() {
|
|
11006
11058
|
return jsxRuntime.jsx(PimIndexerContext.Provider, {
|
|
11007
|
-
value: _objectSpread$
|
|
11059
|
+
value: _objectSpread$h(_objectSpread$h({}, this.state), {}, {
|
|
11008
11060
|
attemptToRefreshProducts: this.attemptToRefreshProducts,
|
|
11009
11061
|
indexProject: this.indexProject
|
|
11010
11062
|
}),
|
|
@@ -11046,13 +11098,13 @@ let WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
|
11046
11098
|
}(React.PureComponent);
|
|
11047
11099
|
WithPimIndexer.displayName = 'WithPimIndexer';
|
|
11048
11100
|
|
|
11049
|
-
function ownKeys$
|
|
11050
|
-
function _objectSpread$
|
|
11101
|
+
function ownKeys$g(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11102
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$g(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11051
11103
|
var injectPimIndexer = (function () {
|
|
11052
11104
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pimIndexer';
|
|
11053
11105
|
return Component => {
|
|
11054
11106
|
const WrappedComponent = props => jsxRuntime.jsx(WithPimIndexer, {
|
|
11055
|
-
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$
|
|
11107
|
+
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$g(_objectSpread$g({}, props), {}, {
|
|
11056
11108
|
[propName]: pimIndexerProps
|
|
11057
11109
|
}))
|
|
11058
11110
|
});
|
|
@@ -11134,20 +11186,20 @@ var messages$7 = reactIntl.defineMessages({
|
|
|
11134
11186
|
}
|
|
11135
11187
|
});
|
|
11136
11188
|
|
|
11137
|
-
function ownKeys$e
|
|
11138
|
-
function _objectSpread$e
|
|
11189
|
+
function ownKeys$f(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11190
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$f(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11139
11191
|
const MissingValueField = props => jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
11140
11192
|
name: "missing-value",
|
|
11141
11193
|
isChecked: props.isChecked,
|
|
11142
11194
|
onChange: props.onChange,
|
|
11143
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11195
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$f({}, messages$7.label))
|
|
11144
11196
|
});
|
|
11145
11197
|
MissingValueField.defaultProps = {
|
|
11146
11198
|
isChecked: false
|
|
11147
11199
|
};
|
|
11148
11200
|
|
|
11149
|
-
function ownKeys$
|
|
11150
|
-
function _objectSpread$
|
|
11201
|
+
function ownKeys$e(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11202
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$e(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$e(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11151
11203
|
var styles$7 = {
|
|
11152
11204
|
"button": "button-module__button___1OzVf",
|
|
11153
11205
|
"cancel": "button-module__cancel___1-jYL button-module__button___1OzVf",
|
|
@@ -11181,7 +11233,7 @@ const Button = props => {
|
|
|
11181
11233
|
|
|
11182
11234
|
// Pass only `data-*` props
|
|
11183
11235
|
const dataProps = filterDataAttributes(props);
|
|
11184
|
-
return jsxRuntime.jsx("button", _objectSpread$
|
|
11236
|
+
return jsxRuntime.jsx("button", _objectSpread$e(_objectSpread$e({
|
|
11185
11237
|
onClick: isDisabled ? null : onClick,
|
|
11186
11238
|
type: props.type,
|
|
11187
11239
|
className: classnames__default["default"](styles$7.button, isDisabled ? styles$7.disabled : null, className),
|
|
@@ -11204,8 +11256,8 @@ var messages$6 = reactIntl.defineMessages({
|
|
|
11204
11256
|
}
|
|
11205
11257
|
});
|
|
11206
11258
|
|
|
11207
|
-
function ownKeys$
|
|
11208
|
-
function _objectSpread$
|
|
11259
|
+
function ownKeys$d(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11260
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$d(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$d(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11209
11261
|
var styles$6 = {
|
|
11210
11262
|
"button": "file-input-module__button___2KypN",
|
|
11211
11263
|
"input": "file-input-module__input___3MP4D"
|
|
@@ -11225,7 +11277,7 @@ const FileInput = props => jsxRuntime.jsx("label", {
|
|
|
11225
11277
|
});
|
|
11226
11278
|
FileInput.displayName = 'FileInput';
|
|
11227
11279
|
FileInput.defaultProps = {
|
|
11228
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11280
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$d({}, messages$6.chooseFile)),
|
|
11229
11281
|
allowMultiple: false,
|
|
11230
11282
|
acceptTypes: 'image/png,image/jpeg,image/gif'
|
|
11231
11283
|
};
|
|
@@ -11264,7 +11316,7 @@ const ScrollToFieldError = () => {
|
|
|
11264
11316
|
|
|
11265
11317
|
// Scroll to the label (if found), otherwise to the input element itself.
|
|
11266
11318
|
const elementToScrollTo = (_ref = (_document$querySelect = document.querySelector("label[for=\"".concat(id, "\"]"))) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector("label#".concat(id))) !== null && _ref !== void 0 ? _ref : firstErrorElement;
|
|
11267
|
-
(_elementToScrollTo$sc = elementToScrollTo.scrollIntoView) === null || _elementToScrollTo$sc === void 0
|
|
11319
|
+
(_elementToScrollTo$sc = elementToScrollTo.scrollIntoView) === null || _elementToScrollTo$sc === void 0 || _elementToScrollTo$sc.call(elementToScrollTo, {
|
|
11268
11320
|
behavior: 'smooth'
|
|
11269
11321
|
});
|
|
11270
11322
|
}
|
|
@@ -11334,8 +11386,8 @@ const SelectableFieldSearchInput = props => {
|
|
|
11334
11386
|
};
|
|
11335
11387
|
SelectableFieldSearchInput.displayName = 'SelectableFieldSearchInput';
|
|
11336
11388
|
|
|
11337
|
-
function ownKeys$
|
|
11338
|
-
function _objectSpread$
|
|
11389
|
+
function ownKeys$c(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11390
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$c(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$c(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11339
11391
|
const StoreSelectField = props => {
|
|
11340
11392
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
11341
11393
|
max: props.horizontalConstraint,
|
|
@@ -11349,7 +11401,7 @@ const StoreSelectField = props => {
|
|
|
11349
11401
|
htmlFor: props.id,
|
|
11350
11402
|
hasRequiredIndicator: props.isRequired,
|
|
11351
11403
|
isBold: true
|
|
11352
|
-
}), jsxRuntime.jsx(StoreSelectInput, _objectSpread$
|
|
11404
|
+
}), jsxRuntime.jsx(StoreSelectInput, _objectSpread$c(_objectSpread$c({
|
|
11353
11405
|
projectKey: props.projectKey,
|
|
11354
11406
|
id: props.id,
|
|
11355
11407
|
name: props.name,
|
|
@@ -11389,8 +11441,8 @@ StoreSelectField.defaultProps = {
|
|
|
11389
11441
|
};
|
|
11390
11442
|
|
|
11391
11443
|
var _templateObject;
|
|
11392
|
-
function ownKeys$
|
|
11393
|
-
function _objectSpread$
|
|
11444
|
+
function ownKeys$b(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11445
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$b(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$b(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11394
11446
|
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
11447
|
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
11448
|
var styles$3 = {
|
|
@@ -11540,7 +11592,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11540
11592
|
* so it must be an invalid numeric value
|
|
11541
11593
|
*/
|
|
11542
11594
|
_this.handleInvalid = () => {
|
|
11543
|
-
const nextValidStatus = _objectSpread$
|
|
11595
|
+
const nextValidStatus = _objectSpread$b({}, _this.state.validStatus);
|
|
11544
11596
|
if (has__default["default"](nextValidStatus, 'numeric')) {
|
|
11545
11597
|
nextValidStatus.numeric = false;
|
|
11546
11598
|
_this.conditionalSetValidStatus(nextValidStatus);
|
|
@@ -11592,7 +11644,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11592
11644
|
if (prev) return this.state.validStatus[v.name];
|
|
11593
11645
|
return prev;
|
|
11594
11646
|
}, true);
|
|
11595
|
-
const componentProps = _objectSpread$
|
|
11647
|
+
const componentProps = _objectSpread$b(_objectSpread$b({}, this.props), {}, {
|
|
11596
11648
|
[blurHandler || 'onBlurValue']: this.handleBlur,
|
|
11597
11649
|
[changeHandler || 'onChange']: this.handleChange,
|
|
11598
11650
|
onInvalidValue: this.handleInvalid,
|
|
@@ -11609,7 +11661,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11609
11661
|
components: {
|
|
11610
11662
|
WrapperComponent: ToolTipWrapperComponent
|
|
11611
11663
|
},
|
|
11612
|
-
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$
|
|
11664
|
+
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$b({}, componentProps))
|
|
11613
11665
|
})
|
|
11614
11666
|
});
|
|
11615
11667
|
}
|
|
@@ -11624,13 +11676,13 @@ function validatedInput(InnerComponent, validators) {
|
|
|
11624
11676
|
return reactIntl.injectIntl(ValidatedInput);
|
|
11625
11677
|
}
|
|
11626
11678
|
function simpleInput(type) {
|
|
11627
|
-
var
|
|
11628
|
-
return
|
|
11629
|
-
_inherits(
|
|
11630
|
-
var _super2 = _createSuper$1(
|
|
11631
|
-
function
|
|
11679
|
+
var _class2;
|
|
11680
|
+
return _class2 = /*#__PURE__*/function (_PureComponent2) {
|
|
11681
|
+
_inherits(_class2, _PureComponent2);
|
|
11682
|
+
var _super2 = _createSuper$1(_class2);
|
|
11683
|
+
function _class2() {
|
|
11632
11684
|
var _this2;
|
|
11633
|
-
_classCallCheck(this,
|
|
11685
|
+
_classCallCheck(this, _class2);
|
|
11634
11686
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
11635
11687
|
args[_key2] = arguments[_key2];
|
|
11636
11688
|
}
|
|
@@ -11640,7 +11692,7 @@ function simpleInput(type) {
|
|
|
11640
11692
|
};
|
|
11641
11693
|
return _this2;
|
|
11642
11694
|
}
|
|
11643
|
-
_createClass(
|
|
11695
|
+
_createClass(_class2, [{
|
|
11644
11696
|
key: "render",
|
|
11645
11697
|
value: function render() {
|
|
11646
11698
|
return jsxRuntime.jsx("input", {
|
|
@@ -11657,11 +11709,11 @@ function simpleInput(type) {
|
|
|
11657
11709
|
});
|
|
11658
11710
|
}
|
|
11659
11711
|
}]);
|
|
11660
|
-
return
|
|
11661
|
-
}(React.PureComponent),
|
|
11712
|
+
return _class2;
|
|
11713
|
+
}(React.PureComponent), _class2.displayName = 'SimpleInput', _class2.defaultProps = {
|
|
11662
11714
|
getInputRef: () => {},
|
|
11663
11715
|
name: 'simple-validated-input'
|
|
11664
|
-
},
|
|
11716
|
+
}, _class2;
|
|
11665
11717
|
}
|
|
11666
11718
|
|
|
11667
11719
|
var messages$4 = reactIntl.defineMessages({
|
|
@@ -11672,14 +11724,14 @@ var messages$4 = reactIntl.defineMessages({
|
|
|
11672
11724
|
}
|
|
11673
11725
|
});
|
|
11674
11726
|
|
|
11675
|
-
function ownKeys$
|
|
11676
|
-
function _objectSpread$
|
|
11727
|
+
function ownKeys$a(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11728
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$a(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$a(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11677
11729
|
const CustomFieldsErrorTextNotification = props => {
|
|
11678
11730
|
var _context;
|
|
11679
11731
|
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
11680
11732
|
scale: "s",
|
|
11681
11733
|
children: [jsxRuntime.jsx(uiKit.Text.Wrap, {
|
|
11682
|
-
intlMessage: _objectSpread$
|
|
11734
|
+
intlMessage: _objectSpread$a({}, messages$4.customFieldsError)
|
|
11683
11735
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
11684
11736
|
scale: "xs",
|
|
11685
11737
|
children: _mapInstanceProperty__default["default"](_context = props.formErrors).call(_context, formError => jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -11704,8 +11756,8 @@ const messages$3 = reactIntl.defineMessages({
|
|
|
11704
11756
|
}
|
|
11705
11757
|
});
|
|
11706
11758
|
|
|
11707
|
-
function ownKeys$
|
|
11708
|
-
function _objectSpread$
|
|
11759
|
+
function ownKeys$9(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11760
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$9(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$9(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11709
11761
|
var styles$2 = {
|
|
11710
11762
|
"label": "label-range-module__label___3Tb0p"
|
|
11711
11763
|
};
|
|
@@ -11713,7 +11765,7 @@ const LabelRange = _ref => {
|
|
|
11713
11765
|
let type = _ref.type;
|
|
11714
11766
|
return jsxRuntime.jsx("label", {
|
|
11715
11767
|
className: styles$2.label,
|
|
11716
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11768
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$9({}, messages$3[type]))
|
|
11717
11769
|
});
|
|
11718
11770
|
};
|
|
11719
11771
|
LabelRange.displayName = 'LabelRange';
|
|
@@ -11731,8 +11783,8 @@ var messages$2 = reactIntl.defineMessages({
|
|
|
11731
11783
|
}
|
|
11732
11784
|
});
|
|
11733
11785
|
|
|
11734
|
-
function ownKeys$
|
|
11735
|
-
function _objectSpread$
|
|
11786
|
+
function ownKeys$8(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11787
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$8(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$8(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11736
11788
|
var styles$1 = {
|
|
11737
11789
|
"container": "multi-value-search-input-module__container___2u64d",
|
|
11738
11790
|
"searchInput": "multi-value-search-input-module__searchInput___363nj",
|
|
@@ -11756,7 +11808,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11756
11808
|
}),
|
|
11757
11809
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11758
11810
|
truncate: true,
|
|
11759
|
-
intlMessage: _objectSpread$
|
|
11811
|
+
intlMessage: _objectSpread$8(_objectSpread$8({}, messages$2.filterWholeInput), {}, {
|
|
11760
11812
|
values: {
|
|
11761
11813
|
values: "\"".concat(props.value, "\"")
|
|
11762
11814
|
}
|
|
@@ -11769,7 +11821,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11769
11821
|
}),
|
|
11770
11822
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11771
11823
|
truncate: true,
|
|
11772
|
-
intlMessage: _objectSpread$
|
|
11824
|
+
intlMessage: _objectSpread$8(_objectSpread$8({}, messages$2.filterSeparateValues), {}, {
|
|
11773
11825
|
values: {
|
|
11774
11826
|
values: "\"".concat(props.multiValue.join('", "'), "\"") || props.value
|
|
11775
11827
|
}
|
|
@@ -11880,8 +11932,8 @@ const MultiValueSearchInput = props => {
|
|
|
11880
11932
|
};
|
|
11881
11933
|
MultiValueSearchInput.displayName = 'MultiValueSearchInput';
|
|
11882
11934
|
|
|
11883
|
-
function ownKeys$
|
|
11884
|
-
function _objectSpread$
|
|
11935
|
+
function ownKeys$7(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11936
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$7(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$7(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11885
11937
|
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
11938
|
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
11939
|
var styles = {
|
|
@@ -11903,7 +11955,9 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11903
11955
|
args[_key] = arguments[_key];
|
|
11904
11956
|
}
|
|
11905
11957
|
_this = _super.call(this, ...args);
|
|
11906
|
-
_this.
|
|
11958
|
+
_this.state = {
|
|
11959
|
+
parsedValue: _this.props.value
|
|
11960
|
+
};
|
|
11907
11961
|
_this.setValue = value => {
|
|
11908
11962
|
if (!isValidValue(value)) return;
|
|
11909
11963
|
const newValue = !isUndefined__default["default"](value) ? _this.props.formatNumber(value) : undefined;
|
|
@@ -11916,8 +11970,10 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11916
11970
|
_this.handleChange = event => {
|
|
11917
11971
|
const value = event.target.rawValue;
|
|
11918
11972
|
const parsedNumber = _this.props.parseNumber(value);
|
|
11919
|
-
if (_this.parsedValue === parsedNumber) return;
|
|
11920
|
-
_this.
|
|
11973
|
+
if (_this.state.parsedValue === parsedNumber) return;
|
|
11974
|
+
_this.setState({
|
|
11975
|
+
parsedValue: parsedNumber
|
|
11976
|
+
});
|
|
11921
11977
|
_this.props.onChangeValue(parsedNumber);
|
|
11922
11978
|
if (!isNumberish(value) && _this.props.onInvalidValue) _this.props.onInvalidValue(value);
|
|
11923
11979
|
};
|
|
@@ -11931,12 +11987,10 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11931
11987
|
return _this;
|
|
11932
11988
|
}
|
|
11933
11989
|
_createClass(NumericFormatInput, [{
|
|
11934
|
-
key: "
|
|
11935
|
-
value:
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
if (this.props.value !== nextProps.value && nextProps.value !== this.parsedValue) {
|
|
11939
|
-
this.setValue(nextProps.value);
|
|
11990
|
+
key: "componentDidUpdate",
|
|
11991
|
+
value: function componentDidUpdate(prevProps) {
|
|
11992
|
+
if (this.props.value !== prevProps.value && this.props.value !== this.state.parsedValue) {
|
|
11993
|
+
this.setValue(this.props.value);
|
|
11940
11994
|
}
|
|
11941
11995
|
}
|
|
11942
11996
|
}, {
|
|
@@ -11944,7 +11998,7 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
11944
11998
|
value: function render() {
|
|
11945
11999
|
const separators = getSeparatorsForLocale(this.props.numberFormat);
|
|
11946
12000
|
const dataAttributes = filterDataAttributes(this.props);
|
|
11947
|
-
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$
|
|
12001
|
+
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$7({
|
|
11948
12002
|
placeholder: this.props.placeholder,
|
|
11949
12003
|
htmlRef: this.registerInputRef,
|
|
11950
12004
|
options: {
|
|
@@ -12240,8 +12294,8 @@ const createNextSortDefinition = _ref => {
|
|
|
12240
12294
|
}
|
|
12241
12295
|
};
|
|
12242
12296
|
|
|
12243
|
-
function ownKeys$
|
|
12244
|
-
function _objectSpread$
|
|
12297
|
+
function ownKeys$6(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12298
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$6(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12245
12299
|
/**
|
|
12246
12300
|
* Creates reducer
|
|
12247
12301
|
* @param {Object} initialState
|
|
@@ -12257,13 +12311,13 @@ function createReducer(initialState, actionHandlers) {
|
|
|
12257
12311
|
|
|
12258
12312
|
// In case reducer ignored action, avoid creating new object
|
|
12259
12313
|
const newSubstate = reduce(newState, action);
|
|
12260
|
-
if (newSubstate) return _objectSpread$
|
|
12314
|
+
if (newSubstate) return _objectSpread$6(_objectSpread$6({}, newState), newSubstate);
|
|
12261
12315
|
return newState;
|
|
12262
12316
|
};
|
|
12263
12317
|
}
|
|
12264
12318
|
|
|
12265
|
-
function ownKeys$
|
|
12266
|
-
function _objectSpread$
|
|
12319
|
+
function ownKeys$5(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12320
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$5(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$5(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12267
12321
|
function updateStatusInList(mergeData) {
|
|
12268
12322
|
return (state, _ref) => {
|
|
12269
12323
|
let payload = _ref.payload;
|
|
@@ -12272,15 +12326,15 @@ function updateStatusInList(mergeData) {
|
|
|
12272
12326
|
results[index] = mergeData(payload, results[index]);
|
|
12273
12327
|
results[index].checked = false;
|
|
12274
12328
|
return {
|
|
12275
|
-
currentQueryResult: _objectSpread$
|
|
12329
|
+
currentQueryResult: _objectSpread$5(_objectSpread$5({}, state.currentQueryResult), {}, {
|
|
12276
12330
|
results
|
|
12277
12331
|
})
|
|
12278
12332
|
};
|
|
12279
12333
|
};
|
|
12280
12334
|
}
|
|
12281
12335
|
|
|
12282
|
-
function ownKeys$
|
|
12283
|
-
function _objectSpread$
|
|
12336
|
+
function ownKeys$4(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12337
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12284
12338
|
const identity = value => value;
|
|
12285
12339
|
function createResourceReducer(options) {
|
|
12286
12340
|
const _options$constantsPre = options.constantsPrefix,
|
|
@@ -12290,7 +12344,7 @@ function createResourceReducer(options) {
|
|
|
12290
12344
|
_options$initialState = options.initialState,
|
|
12291
12345
|
extendInitialState = _options$initialState === void 0 ? {} : _options$initialState;
|
|
12292
12346
|
const mergeData = options.mergeData || identity;
|
|
12293
|
-
const initialState = _objectSpread$
|
|
12347
|
+
const initialState = _objectSpread$4({
|
|
12294
12348
|
currentQueryResult: {
|
|
12295
12349
|
count: 0,
|
|
12296
12350
|
offset: 0,
|
|
@@ -12310,7 +12364,7 @@ function createResourceReducer(options) {
|
|
|
12310
12364
|
let payload = _ref.payload;
|
|
12311
12365
|
const results = state.currentQueryResult.results;
|
|
12312
12366
|
return {
|
|
12313
|
-
currentQueryResult: _objectSpread$
|
|
12367
|
+
currentQueryResult: _objectSpread$4(_objectSpread$4({}, state.currentQueryResult), {}, {
|
|
12314
12368
|
results: _filterInstanceProperty__default["default"](results).call(results, _ref2 => {
|
|
12315
12369
|
let id = _ref2.id;
|
|
12316
12370
|
return id !== payload.id;
|
|
@@ -12831,8 +12885,8 @@ const getTimeZoneLabel = memoize__default["default"]((selectedTimeZone, timeZone
|
|
|
12831
12885
|
return _concatInstanceProperty__default["default"](_context4 = "(GMT ".concat(timeZoneData.offset, ") ")).call(_context4, timeZoneData.name);
|
|
12832
12886
|
});
|
|
12833
12887
|
|
|
12834
|
-
function ownKeys$
|
|
12835
|
-
function _objectSpread$
|
|
12888
|
+
function ownKeys$3(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12889
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$3(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12836
12890
|
function withPendingRequests() {
|
|
12837
12891
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pendingRequests';
|
|
12838
12892
|
return Component => {
|
|
@@ -12841,7 +12895,7 @@ function withPendingRequests() {
|
|
|
12841
12895
|
const pendingProp = {
|
|
12842
12896
|
[propName]: pendingRequests
|
|
12843
12897
|
};
|
|
12844
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
12898
|
+
return jsxRuntime.jsx(Component, _objectSpread$3(_objectSpread$3({}, props), pendingProp));
|
|
12845
12899
|
};
|
|
12846
12900
|
WrappedComponent.displayName = wrapDisplayName(Component, 'withPendingRequests');
|
|
12847
12901
|
return WrappedComponent;
|
|
@@ -12876,8 +12930,10 @@ var messages = reactIntl.defineMessages({
|
|
|
12876
12930
|
}
|
|
12877
12931
|
});
|
|
12878
12932
|
|
|
12879
|
-
|
|
12880
|
-
|
|
12933
|
+
const FIELD_NAME = 'custom';
|
|
12934
|
+
|
|
12935
|
+
function ownKeys$2(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12936
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$2(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$2(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12881
12937
|
const typeDefinitionsExist = typeDefinitions => {
|
|
12882
12938
|
return typeDefinitions.length > 0;
|
|
12883
12939
|
};
|
|
@@ -12894,13 +12950,13 @@ const CustomFieldsInputWrapper = _ref => {
|
|
|
12894
12950
|
const _useFormikContext = formik.useFormikContext(),
|
|
12895
12951
|
formValues = _valuesInstanceProperty__default["default"](_useFormikContext);
|
|
12896
12952
|
if (!typeDefinitionsExist(typeDefinitions)) {
|
|
12897
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12953
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noTypes));
|
|
12898
12954
|
}
|
|
12899
12955
|
if (!typeDefinitionSelected(formValues)) {
|
|
12900
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12956
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noCustomType));
|
|
12901
12957
|
}
|
|
12902
12958
|
if (!typeDefinitionContainsFieldDefinitions(formValues)) {
|
|
12903
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12959
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noCustomFields));
|
|
12904
12960
|
}
|
|
12905
12961
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
12906
12962
|
max: "scale",
|
|
@@ -12913,11 +12969,8 @@ const CustomFieldsInputWrapper = _ref => {
|
|
|
12913
12969
|
};
|
|
12914
12970
|
CustomFieldsInputWrapper.displayName = 'CustomFieldsInputWrapper';
|
|
12915
12971
|
|
|
12916
|
-
function ownKeys(
|
|
12917
|
-
function _objectSpread(
|
|
12918
|
-
const FIELD_NAME = 'custom';
|
|
12919
|
-
|
|
12920
|
-
// Creates dropdown options
|
|
12972
|
+
function ownKeys$1(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12973
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12921
12974
|
const mapTypeDefinitionsToOptions = (typeDefinitions, language, languages, selectedTypeDefinitionId) => {
|
|
12922
12975
|
return _mapInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => ({
|
|
12923
12976
|
isDisabled: selectedTypeDefinitionId && selectedTypeDefinitionId === typeDefinition.type.id,
|
|
@@ -12946,10 +12999,12 @@ const createFormStateFromTypeDefinition = selectedTypeDefinition => {
|
|
|
12946
12999
|
const CustomTypeSubform = _ref => {
|
|
12947
13000
|
var _formValues$FIELD_NAM, _formValues$FIELD_NAM2;
|
|
12948
13001
|
let typeDefinitions = _ref.typeDefinitions,
|
|
12949
|
-
isReadOnly = _ref.isReadOnly
|
|
13002
|
+
isReadOnly = _ref.isReadOnly,
|
|
13003
|
+
isCondensed = _ref.isCondensed;
|
|
12950
13004
|
const _useFormikContext = formik.useFormikContext(),
|
|
12951
13005
|
formValues = _valuesInstanceProperty__default["default"](_useFormikContext),
|
|
12952
|
-
setFieldValue = _useFormikContext.setFieldValue
|
|
13006
|
+
setFieldValue = _useFormikContext.setFieldValue,
|
|
13007
|
+
validateForm = _useFormikContext.validateForm;
|
|
12953
13008
|
const _useIntl = reactIntl.useIntl(),
|
|
12954
13009
|
formatMessage = _useIntl.formatMessage;
|
|
12955
13010
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -12962,19 +13017,23 @@ const CustomTypeSubform = _ref => {
|
|
|
12962
13017
|
const selectedTypeDefinition = _findInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => typeDefinition.type.key === event.target.value);
|
|
12963
13018
|
if (selectedTypeDefinition) {
|
|
12964
13019
|
const nextCustom = createFormStateFromTypeDefinition(selectedTypeDefinition);
|
|
12965
|
-
setFieldValue(FIELD_NAME, nextCustom)
|
|
13020
|
+
setFieldValue(FIELD_NAME, nextCustom).then(() => {
|
|
13021
|
+
validateForm();
|
|
13022
|
+
});
|
|
12966
13023
|
} else {
|
|
12967
|
-
// if the dropdown selector is cleared
|
|
12968
|
-
|
|
12969
|
-
|
|
13024
|
+
// if the dropdown selector is cleared, remove the `custom` field from the form state entirely
|
|
13025
|
+
setFieldValue(FIELD_NAME, undefined).then(() => {
|
|
13026
|
+
validateForm();
|
|
13027
|
+
});
|
|
12970
13028
|
}
|
|
12971
|
-
}, [typeDefinitions, setFieldValue,
|
|
13029
|
+
}, [typeDefinitions, setFieldValue, validateForm]);
|
|
12972
13030
|
return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
12973
13031
|
header: jsxRuntime.jsx(uiKit.CollapsiblePanel.Header, {
|
|
12974
|
-
|
|
13032
|
+
isCondensed: isCondensed,
|
|
13033
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$1({}, messages.title))
|
|
12975
13034
|
}),
|
|
12976
13035
|
headerControls: typeDefinitions.length > 0 && jsxRuntime.jsx("div", {
|
|
12977
|
-
css: /*#__PURE__*/react$1.css("min-width:", uiKit.designTokens.
|
|
13036
|
+
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
13037
|
children: jsxRuntime.jsx(uiKit.SelectInput, {
|
|
12979
13038
|
isClearable: true,
|
|
12980
13039
|
"data-testid": "custom-type-select",
|
|
@@ -12986,7 +13045,7 @@ const CustomTypeSubform = _ref => {
|
|
|
12986
13045
|
isReadOnly: isReadOnly
|
|
12987
13046
|
})
|
|
12988
13047
|
}),
|
|
12989
|
-
headerControlsAlignment: "
|
|
13048
|
+
headerControlsAlignment: "right",
|
|
12990
13049
|
children: jsxRuntime.jsx(CustomFieldsInputWrapper, {
|
|
12991
13050
|
typeDefinitions: typeDefinitions,
|
|
12992
13051
|
isReadOnly: isReadOnly
|
|
@@ -12995,9 +13054,97 @@ const CustomTypeSubform = _ref => {
|
|
|
12995
13054
|
};
|
|
12996
13055
|
CustomTypeSubform.displayName = 'CustomTypeSubform';
|
|
12997
13056
|
|
|
13057
|
+
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13058
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
13059
|
+
const transformFieldType = fieldDefinition => {
|
|
13060
|
+
var _fieldDefinition$type, _fieldDefinition$type2;
|
|
13061
|
+
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') {
|
|
13062
|
+
var _context;
|
|
13063
|
+
return _objectSpread(_objectSpread({}, fieldDefinition.type), {}, {
|
|
13064
|
+
elementType: _objectSpread(_objectSpread({}, fieldDefinition.type.elementType), {}, {
|
|
13065
|
+
values: _mapInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context, value => ({
|
|
13066
|
+
key: value.key,
|
|
13067
|
+
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
13068
|
+
}))
|
|
13069
|
+
})
|
|
13070
|
+
});
|
|
13071
|
+
} else if (((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum') {
|
|
13072
|
+
var _context2;
|
|
13073
|
+
return _objectSpread(_objectSpread({}, fieldDefinition.type), {}, {
|
|
13074
|
+
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context2, value => ({
|
|
13075
|
+
key: value.key,
|
|
13076
|
+
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
13077
|
+
}))
|
|
13078
|
+
});
|
|
13079
|
+
} else {
|
|
13080
|
+
return fieldDefinition.type;
|
|
13081
|
+
}
|
|
13082
|
+
};
|
|
13083
|
+
const convertCustomField = resource => {
|
|
13084
|
+
var _context3, _context4;
|
|
13085
|
+
return {
|
|
13086
|
+
type: {
|
|
13087
|
+
typeId: 'type',
|
|
13088
|
+
id: resource.custom.type.id,
|
|
13089
|
+
obj: {
|
|
13090
|
+
key: resource.custom.type.key,
|
|
13091
|
+
name: l10n.transformLocalizedFieldToLocalizedString(resource.custom.type.nameAllLocales),
|
|
13092
|
+
fieldDefinitions: _mapInstanceProperty__default["default"](_context3 = resource.custom.type.fieldDefinitions).call(_context3, fieldDefinition => ({
|
|
13093
|
+
name: fieldDefinition.name,
|
|
13094
|
+
required: fieldDefinition.required,
|
|
13095
|
+
inputHint: fieldDefinition.inputHint,
|
|
13096
|
+
type: transformFieldType(fieldDefinition),
|
|
13097
|
+
label: l10n.transformLocalizedFieldToLocalizedString(fieldDefinition.labelAllLocales)
|
|
13098
|
+
}))
|
|
13099
|
+
}
|
|
13100
|
+
},
|
|
13101
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread(_objectSpread({}, fields), {}, {
|
|
13102
|
+
[customField.name]: customField.value
|
|
13103
|
+
}), {})
|
|
13104
|
+
};
|
|
13105
|
+
};
|
|
13106
|
+
const createFormStateFromResource = resource => {
|
|
13107
|
+
// If there are no custom fields on the resource, don't create a form state
|
|
13108
|
+
if (!resource[FIELD_NAME]) {
|
|
13109
|
+
return {
|
|
13110
|
+
[FIELD_NAME]: undefined
|
|
13111
|
+
};
|
|
13112
|
+
}
|
|
13113
|
+
return {
|
|
13114
|
+
[FIELD_NAME]: convertCustomField(resource)
|
|
13115
|
+
};
|
|
13116
|
+
};
|
|
13117
|
+
const createGraphQlDocFromFormState = formState => {
|
|
13118
|
+
var _context5;
|
|
13119
|
+
// Unset the custom type if it's not in the form state
|
|
13120
|
+
if (!formState[FIELD_NAME]) {
|
|
13121
|
+
return {
|
|
13122
|
+
[FIELD_NAME]: {}
|
|
13123
|
+
};
|
|
13124
|
+
}
|
|
13125
|
+
return {
|
|
13126
|
+
[FIELD_NAME]: {
|
|
13127
|
+
type: {
|
|
13128
|
+
id: formState[FIELD_NAME].type.id,
|
|
13129
|
+
typeId: 'type'
|
|
13130
|
+
},
|
|
13131
|
+
fields: _mapInstanceProperty__default["default"](_context5 = _Object$entries__default["default"](formState[FIELD_NAME].fields)).call(_context5, _ref => {
|
|
13132
|
+
let _ref2 = _slicedToArray(_ref, 2),
|
|
13133
|
+
name = _ref2[0],
|
|
13134
|
+
value = _ref2[1];
|
|
13135
|
+
return {
|
|
13136
|
+
name,
|
|
13137
|
+
value: _JSON$stringify__default["default"](value)
|
|
13138
|
+
};
|
|
13139
|
+
})
|
|
13140
|
+
}
|
|
13141
|
+
};
|
|
13142
|
+
};
|
|
13143
|
+
|
|
12998
13144
|
const CustomFieldsFormField = _ref => {
|
|
12999
13145
|
let resources = _ref.resources,
|
|
13000
|
-
isReadOnly = _ref.isReadOnly
|
|
13146
|
+
isReadOnly = _ref.isReadOnly,
|
|
13147
|
+
isCondensed = _ref.isCondensed;
|
|
13001
13148
|
const projectKey = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.project.key);
|
|
13002
13149
|
return jsxRuntime.jsx(CustomFieldTypeDefinitionsConnector$1, {
|
|
13003
13150
|
resources: resources,
|
|
@@ -13013,11 +13160,14 @@ const CustomFieldsFormField = _ref => {
|
|
|
13013
13160
|
const typeDefinitions = _mapInstanceProperty__default["default"](_context = customFieldTypeDefinitions.results).call(_context, CustomFieldTypeDefinitionsConnector$1.graphQlDocToForm);
|
|
13014
13161
|
return jsxRuntime.jsx(CustomTypeSubform, {
|
|
13015
13162
|
typeDefinitions: typeDefinitions,
|
|
13016
|
-
isReadOnly: isReadOnly
|
|
13163
|
+
isReadOnly: isReadOnly,
|
|
13164
|
+
isCondensed: isCondensed
|
|
13017
13165
|
});
|
|
13018
13166
|
}
|
|
13019
13167
|
});
|
|
13020
13168
|
};
|
|
13169
|
+
CustomFieldsFormField.createFormStateFromResource = createFormStateFromResource;
|
|
13170
|
+
CustomFieldsFormField.createGraphQlDocFromFormState = createGraphQlDocFromFormState;
|
|
13021
13171
|
|
|
13022
13172
|
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
13173
|
|