@commercetools-frontend/experimental-components 6.2.2 → 6.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commercetools-frontend-experimental-components.cjs.dev.js +671 -533
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +671 -533
- package/dist/commercetools-frontend-experimental-components.esm.js +565 -427
- package/dist/styles.css +51 -51
- package/package.json +2 -1
- package/test-utils/dist/commercetools-frontend-experimental-components-test-utils.cjs.dev.js +33 -24
- package/test-utils/dist/commercetools-frontend-experimental-components-test-utils.cjs.prod.js +33 -24
- package/test-utils/dist/commercetools-frontend-experimental-components-test-utils.esm.js +22 -13
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
2
2
|
import { NO_VALUE_FALLBACK, MC_API_PROXY_TARGETS, GRAPHQL_TARGETS, DOMAINS, SUPPORT_PORTAL_URL } from '@commercetools-frontend/constants';
|
|
3
|
-
import { LoadingSpinner, Constraints, Spacings, AsyncSelectInput, Text, SearchIcon, Tooltip, AccessibleHidden, SecondaryIconButton, CloseIcon, usePaginationState, useDataTableSortingState, useToggleState, Link, MoneyInput, SearchSelectInput, AsyncSelectField, SelectField, SelectInput, FlatButton, AngleUpIcon, AngleDownIcon, IconButton, BinLinearIcon, PlusBoldIcon, DateInput, DateTimeInput, LocalizedTextInput, LocalizedMultilineTextInput, SecondaryButton, RevertIcon, Grid, customProperties, SubdirectoryArrowIcon, Tag, EditIcon, FieldLabel, WarningIcon, NumberInput, TextInput, MultilineTextInput, TimeInput, SwitcherIcon, ErrorIcon, DragIcon, Card, SearchSelectField, SelectableSearchInput, FieldErrors, CollapsiblePanel, designTokens, ContentNotification, ListIcon, CheckboxInput, SearchTextInput } from '@commercetools-frontend/ui-kit';
|
|
4
|
-
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
5
|
-
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
6
3
|
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
7
4
|
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
8
5
|
import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
@@ -10,107 +7,110 @@ import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/inst
|
|
|
10
7
|
import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
|
|
11
8
|
import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
12
9
|
import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
10
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
13
11
|
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
14
12
|
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
13
|
+
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
14
|
+
import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
15
|
+
import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
16
|
+
import _Object$entries from '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
17
|
+
import _parseFloat from '@babel/runtime-corejs3/core-js-stable/parse-float';
|
|
18
|
+
import _valuesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/values';
|
|
19
|
+
import isEmpty$3 from 'lodash/isEmpty';
|
|
20
|
+
import omit from 'lodash/omit';
|
|
21
|
+
import pick from 'lodash/pick';
|
|
22
|
+
import { transformLocalizedFieldToLocalizedString, formatLocalizedString, applyTransformedLocalizedFields, transformLocalizedStringToLocalizedField } from '@commercetools-frontend/l10n';
|
|
23
|
+
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
15
24
|
import React, { useMemo, useState, useCallback, useEffect, PureComponent, Component, useRef, createContext, memo, useContext, forwardRef } from 'react';
|
|
25
|
+
import { useApolloClient, useQuery as useQuery$1 } from '@apollo/client';
|
|
26
|
+
import { useQuery, useApolloClient as useApolloClient$1 } from '@apollo/client/react';
|
|
16
27
|
import { defineMessages, useIntl, injectIntl, FormattedMessage } from 'react-intl';
|
|
17
28
|
import { useApplicationContext, ApplicationContext, withApplicationContext } from '@commercetools-frontend/application-shell-connectors';
|
|
29
|
+
import { LoadingSpinner, Constraints, Spacings, AsyncSelectInput, Text, SearchIcon, Tooltip, AccessibleHidden, SecondaryIconButton, CloseIcon, usePaginationState, useDataTableSortingState, useToggleState, Link, MoneyInput, SearchSelectInput, AsyncSelectField, SelectField, SelectInput, FlatButton, AngleUpIcon, AngleDownIcon, IconButton, BinLinearIcon, PlusBoldIcon, DateInput, DateTimeInput, LocalizedTextInput, LocalizedMultilineTextInput, SecondaryButton, RevertIcon, Grid, customProperties, SubdirectoryArrowIcon, Tag, EditIcon, FieldLabel, WarningIcon, NumberInput, TextInput, MultilineTextInput, TimeInput, SwitcherIcon, ErrorIcon, DragIcon, Card, SearchSelectField, SelectableSearchInput, FieldErrors, CollapsiblePanel, designTokens, ContentNotification, ListIcon, CheckboxInput, SearchTextInput } from '@commercetools-frontend/ui-kit';
|
|
30
|
+
import _Map from '@babel/runtime-corejs3/core-js-stable/map';
|
|
31
|
+
import _everyInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/every';
|
|
32
|
+
import _Promise from '@babel/runtime-corejs3/core-js-stable/promise';
|
|
33
|
+
import _setTimeout from '@babel/runtime-corejs3/core-js-stable/set-timeout';
|
|
34
|
+
import { deepEqual } from 'fast-equals';
|
|
35
|
+
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
36
|
+
import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim';
|
|
37
|
+
import classnames from 'classnames';
|
|
38
|
+
import camelCase from 'lodash/camelCase';
|
|
18
39
|
import _Reflect$construct from '@babel/runtime-corejs3/core-js-stable/reflect/construct';
|
|
19
40
|
import _classCallCheck from '@babel/runtime-corejs3/helpers/esm/classCallCheck';
|
|
20
41
|
import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
|
|
21
42
|
import _possibleConstructorReturn from '@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn';
|
|
22
43
|
import _getPrototypeOf from '@babel/runtime-corejs3/helpers/esm/getPrototypeOf';
|
|
23
44
|
import _inherits from '@babel/runtime-corejs3/helpers/esm/inherits';
|
|
24
|
-
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
25
|
-
import _toArray from '@babel/runtime-corejs3/helpers/esm/toArray';
|
|
26
|
-
import _reverseInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reverse';
|
|
27
|
-
import _sliceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/slice';
|
|
28
|
-
import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
29
|
-
import { useApolloClient, useQuery as useQuery$1 } from '@apollo/client';
|
|
30
|
-
import { useQuery, useApolloClient as useApolloClient$1 } from '@apollo/client/react';
|
|
31
|
-
import { useAsyncDispatch, actions } from '@commercetools-frontend/sdk';
|
|
32
|
-
import classnames from 'classnames';
|
|
33
|
-
import { deepEqual } from 'fast-equals';
|
|
34
|
-
import flowRight from 'lodash/flowRight';
|
|
35
|
-
import 'react-required-if';
|
|
36
|
-
import _setTimeout from '@babel/runtime-corejs3/core-js-stable/set-timeout';
|
|
37
|
-
import Textarea from 'react-textarea-autosize';
|
|
38
|
-
import { useShowNotification, useShowApiErrorNotification, useOnActionError, useHideAllPageNotifications } from '@commercetools-frontend/actions-global';
|
|
39
|
-
import PropTypes from 'prop-types';
|
|
40
|
-
import { useModalState, CustomFormModalPage, PageContentNarrow, ConfirmationDialog, InfoDialog } from '@commercetools-frontend/application-components';
|
|
41
|
-
import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
42
|
-
import { transformLocalizedFieldToLocalizedString, formatLocalizedString, applyTransformedLocalizedFields, transformLocalizedStringToLocalizedField } from '@commercetools-frontend/l10n';
|
|
43
|
-
import _Object$values from '@babel/runtime-corejs3/core-js-stable/object/values';
|
|
44
|
-
import { useLazyQuery, useQuery as useQuery$2 } from '@apollo/client/react/hooks';
|
|
45
|
-
import _sortInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/sort';
|
|
46
|
-
import camelCase from 'lodash/camelCase';
|
|
47
|
-
import get from 'lodash/get';
|
|
48
|
-
import { useFormikContext, Field, Formik, getIn, FastField } from 'formik';
|
|
49
|
-
import _Date$now from '@babel/runtime-corejs3/core-js-stable/date/now';
|
|
50
|
-
import { useFeatureToggle, useAdapterStatus } from '@commercetools-frontend/application-shell';
|
|
51
|
-
import debounce from 'debounce-promise';
|
|
52
|
-
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
53
|
-
import pick from 'lodash/pick';
|
|
54
|
-
import oneLine from 'common-tags/lib/oneLine';
|
|
55
|
-
import moment from 'moment';
|
|
56
|
-
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
57
45
|
import _someInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/some';
|
|
46
|
+
import oneLine from 'common-tags/lib/oneLine';
|
|
58
47
|
import moment$1 from 'moment-timezone';
|
|
48
|
+
import { useFormikContext, Field, Formik, getIn, FastField } from 'formik';
|
|
59
49
|
import isNil$1 from 'lodash/isNil';
|
|
60
|
-
import { reportErrorToSentry } from '@commercetools-frontend/sentry';
|
|
61
|
-
import _valuesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/values';
|
|
62
|
-
import _Object$entries from '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
63
|
-
import _parseFloat from '@babel/runtime-corejs3/core-js-stable/parse-float';
|
|
64
|
-
import isEmpty$3 from 'lodash/isEmpty';
|
|
65
|
-
import omit from 'lodash/omit';
|
|
66
|
-
import _Object$freeze from '@babel/runtime-corejs3/core-js-stable/object/freeze';
|
|
67
|
-
import originalOmitDeep from 'omit-deep';
|
|
68
|
-
import _parseInt from '@babel/runtime-corejs3/core-js-stable/parse-int';
|
|
69
|
-
import _Array$isArray from '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
70
|
-
import _indexOfInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/index-of';
|
|
71
|
-
import omitEmpty from 'omit-empty-es';
|
|
72
|
-
import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim';
|
|
73
|
-
import _Map from '@babel/runtime-corejs3/core-js-stable/map';
|
|
74
|
-
import _everyInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/every';
|
|
75
|
-
import _Promise from '@babel/runtime-corejs3/core-js-stable/promise';
|
|
76
|
-
import keyBy from 'lodash/keyBy';
|
|
77
|
-
import { ErrorMessage } from '@commercetools-frontend/ui-kit/';
|
|
78
50
|
import omitBy from 'lodash/omitBy';
|
|
51
|
+
import _Array$isArray from '@babel/runtime-corejs3/core-js-stable/array/is-array';
|
|
52
|
+
import _sliceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/slice';
|
|
79
53
|
import _lastIndexOfInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/last-index-of';
|
|
54
|
+
import _parseInt from '@babel/runtime-corejs3/core-js-stable/parse-int';
|
|
80
55
|
import merge from 'lodash/merge';
|
|
81
56
|
import set from 'lodash/set';
|
|
82
57
|
import times from 'lodash/times';
|
|
83
58
|
import { v4 } from 'uuid';
|
|
59
|
+
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
84
60
|
import { defaultMemoize } from 'reselect';
|
|
85
61
|
import _endsWithInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/ends-with';
|
|
62
|
+
import _toArray from '@babel/runtime-corejs3/helpers/esm/toArray';
|
|
63
|
+
import _reverseInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reverse';
|
|
64
|
+
import debounce from 'debounce-promise';
|
|
65
|
+
import { useAsyncDispatch, actions } from '@commercetools-frontend/sdk';
|
|
66
|
+
import keyBy from 'lodash/keyBy';
|
|
67
|
+
import { useShowNotification, useShowApiErrorNotification, useOnActionError, useHideAllPageNotifications } from '@commercetools-frontend/actions-global';
|
|
68
|
+
import { useModalState, CustomFormModalPage, PageContentNarrow, ConfirmationDialog, InfoDialog } from '@commercetools-frontend/application-components';
|
|
69
|
+
import { useFeatureToggle, useAdapterStatus } from '@commercetools-frontend/application-shell';
|
|
70
|
+
import { ErrorMessage } from '@commercetools-frontend/ui-kit/';
|
|
71
|
+
import PropTypes from 'prop-types';
|
|
86
72
|
import { css } from '@emotion/react';
|
|
87
|
-
import ReactDOM from 'react-dom';
|
|
88
73
|
import { Draggable, DragDropContext, Droppable } from 'react-beautiful-dnd';
|
|
74
|
+
import ReactDOM from 'react-dom';
|
|
75
|
+
import _indexOfInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/index-of';
|
|
89
76
|
import { CustomSelectInputOption } from '@commercetools-uikit/select-utils';
|
|
90
|
-
import memoize from 'memoize-one';
|
|
91
77
|
import { filterDataAttributes as filterDataAttributes$1, filterAriaAttributes } from '@commercetools-uikit/utils';
|
|
78
|
+
import 'react-required-if';
|
|
79
|
+
import _Object$values from '@babel/runtime-corejs3/core-js-stable/object/values';
|
|
80
|
+
import _sortInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/sort';
|
|
92
81
|
import { oneLineTrim } from 'common-tags';
|
|
93
82
|
import has from 'lodash/has';
|
|
94
83
|
import warning from 'tiny-warning';
|
|
95
|
-
import { graphql, withApollo } from '@apollo/client/react/hoc';
|
|
96
|
-
import flatten from 'lodash/flatten';
|
|
97
|
-
import uniqBy from 'lodash/uniqBy';
|
|
98
|
-
import invariant from 'tiny-invariant';
|
|
99
|
-
import hoistNonReactStatics from 'hoist-non-react-statics';
|
|
100
|
-
import { connect } from 'react-redux';
|
|
101
84
|
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
102
85
|
import _Math$trunc from '@babel/runtime-corejs3/core-js-stable/math/trunc';
|
|
103
86
|
import _Number$isNaN from '@babel/runtime-corejs3/core-js-stable/number/is-nan';
|
|
104
87
|
import Cleave from 'cleave.js/react';
|
|
105
88
|
import isFinite from 'lodash/isFinite';
|
|
106
89
|
import isUndefined from 'lodash/isUndefined';
|
|
90
|
+
import flowRight from 'lodash/flowRight';
|
|
91
|
+
import Textarea from 'react-textarea-autosize';
|
|
107
92
|
import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
108
93
|
import _findIndexInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find-index';
|
|
109
|
-
import
|
|
94
|
+
import moment from 'moment';
|
|
95
|
+
import _Object$freeze from '@babel/runtime-corejs3/core-js-stable/object/freeze';
|
|
96
|
+
import originalOmitDeep from 'omit-deep';
|
|
110
97
|
import compact from 'lodash/compact';
|
|
111
98
|
import _Set from '@babel/runtime-corejs3/core-js-stable/set';
|
|
99
|
+
import flatMap from 'lodash/flatMap';
|
|
112
100
|
import '@babel/runtime-corejs3/helpers/get';
|
|
101
|
+
import _Date$now from '@babel/runtime-corejs3/core-js-stable/date/now';
|
|
113
102
|
import _spliceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/splice';
|
|
103
|
+
import memoize from 'memoize-one';
|
|
104
|
+
import omitEmpty from 'omit-empty-es';
|
|
105
|
+
import { graphql, withApollo } from '@apollo/client/react/hoc';
|
|
106
|
+
import flatten from 'lodash/flatten';
|
|
107
|
+
import uniqBy from 'lodash/uniqBy';
|
|
108
|
+
import invariant from 'tiny-invariant';
|
|
109
|
+
import hoistNonReactStatics from 'hoist-non-react-statics';
|
|
110
|
+
import { reportErrorToSentry } from '@commercetools-frontend/sentry';
|
|
111
|
+
import { useLazyQuery, useQuery as useQuery$2 } from '@apollo/client/react/hooks';
|
|
112
|
+
import { connect } from 'react-redux';
|
|
113
|
+
import get from 'lodash/get';
|
|
114
114
|
|
|
115
115
|
var styles$k = {
|
|
116
116
|
"loading-container": "centered-loading-spinner-module__loading-container___3_9-h"
|
|
@@ -125,6 +125,7 @@ const CenteredLoadingSpinner = () => jsx("div", {
|
|
|
125
125
|
children: jsx(LoadingSpinner, {})
|
|
126
126
|
});
|
|
127
127
|
CenteredLoadingSpinner.displayName = 'CenteredLoadingSpinner';
|
|
128
|
+
var CenteredLoadingSpinner$1 = CenteredLoadingSpinner;
|
|
128
129
|
|
|
129
130
|
const QUERY_MAX_LIMIT = 500;
|
|
130
131
|
const SHOW_TOOLTIP_CHARS_COUNT = 40;
|
|
@@ -180,7 +181,7 @@ var pickerMessages$1 = defineMessages({
|
|
|
180
181
|
}
|
|
181
182
|
});
|
|
182
183
|
|
|
183
|
-
var messages$
|
|
184
|
+
var messages$Q = defineMessages({
|
|
184
185
|
noChannelsFound: {
|
|
185
186
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
186
187
|
description: 'The message to display when no channels were found',
|
|
@@ -241,7 +242,7 @@ const ChannelPickerInput = _ref => {
|
|
|
241
242
|
return channel;
|
|
242
243
|
}, [formatLocalizedFieldToString]);
|
|
243
244
|
const prefixSearchFields = useMemo(() => [`name.${dataLocale}`, 'key'], [dataLocale]);
|
|
244
|
-
const loadOptions = useLoadOptions({
|
|
245
|
+
const loadOptions = useLoadOptions$1({
|
|
245
246
|
query: GetChannelsQuery,
|
|
246
247
|
variables,
|
|
247
248
|
prefixSearchFields
|
|
@@ -266,8 +267,8 @@ const ChannelPickerInput = _ref => {
|
|
|
266
267
|
setLoadingError(error);
|
|
267
268
|
onError(error);
|
|
268
269
|
}), [loadOptions, convertChannelToOption, onError]);
|
|
269
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
270
|
-
const _useHandlers = useHandlers(onChange),
|
|
270
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
271
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
271
272
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
272
273
|
handleInternalInputChange = _useHandlers2[0],
|
|
273
274
|
handleChange = _useHandlers2[1];
|
|
@@ -280,18 +281,18 @@ const ChannelPickerInput = _ref => {
|
|
|
280
281
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
281
282
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
282
283
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
283
|
-
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$
|
|
284
|
+
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$Q.noChannelsFound), [loadingError, formatMessage]);
|
|
284
285
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
285
286
|
return jsx(Constraints.Horizontal, {
|
|
286
287
|
max: "scale",
|
|
287
288
|
children: jsxs(Spacings.Stack, {
|
|
288
289
|
scale: "xs",
|
|
289
|
-
children: [jsx(CustomFieldTooltip, {
|
|
290
|
+
children: [jsx(CustomFieldTooltip$1, {
|
|
290
291
|
title: tooltipTitle,
|
|
291
292
|
children: jsx(AsyncSelectInput, {
|
|
292
293
|
id: name,
|
|
293
294
|
name: name,
|
|
294
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
295
|
+
placeholder: placeholder ?? formatMessage(messages$Q.placeholder),
|
|
295
296
|
loadOptions: loadOptionsDebounced,
|
|
296
297
|
defaultOptions: true,
|
|
297
298
|
showOptionGroupDivider: true,
|
|
@@ -319,6 +320,7 @@ const ChannelPickerInput = _ref => {
|
|
|
319
320
|
});
|
|
320
321
|
};
|
|
321
322
|
ChannelPickerInput.displayName = 'ChannelPickerInput';
|
|
323
|
+
var ChannelPickerInput$1 = ChannelPickerInput;
|
|
322
324
|
|
|
323
325
|
function _callSuper$9(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$9() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
324
326
|
function _isNativeReflectConstruct$9() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$9 = function () { return !!t; })(); }
|
|
@@ -346,7 +348,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
346
348
|
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
347
349
|
var FormattedDateTime$1 = injectIntl(FormattedDateTime);
|
|
348
350
|
|
|
349
|
-
var messages$
|
|
351
|
+
var messages$P = defineMessages({
|
|
350
352
|
noProductTypesFound: {
|
|
351
353
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
352
354
|
description: 'The message to display when no product types were found',
|
|
@@ -391,7 +393,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
391
393
|
_useState2 = _slicedToArray(_useState, 2),
|
|
392
394
|
loadingError = _useState2[0],
|
|
393
395
|
setLoadingError = _useState2[1];
|
|
394
|
-
const _useProductTypeOption = useProductTypeOptions({
|
|
396
|
+
const _useProductTypeOption = useProductTypeOptions$1({
|
|
395
397
|
prefixSearchFields
|
|
396
398
|
}),
|
|
397
399
|
loadProductTypes = _useProductTypeOption.loadProductTypes;
|
|
@@ -411,8 +413,8 @@ const ProductTypePickerInput = _ref => {
|
|
|
411
413
|
setLoadingError(error);
|
|
412
414
|
onError(error);
|
|
413
415
|
}), [loadProductTypes, onError]);
|
|
414
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
415
|
-
const _useHandlers = useHandlers(onChange),
|
|
416
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
417
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
416
418
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
417
419
|
handleInternalInputChange = _useHandlers2[0],
|
|
418
420
|
handleChange = _useHandlers2[1];
|
|
@@ -428,14 +430,14 @@ const ProductTypePickerInput = _ref => {
|
|
|
428
430
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
429
431
|
return jsx(Constraints.Horizontal, {
|
|
430
432
|
max: "scale",
|
|
431
|
-
children: currentOption.loading ? jsx(CenteredLoadingSpinner, {}) : jsxs(Spacings.Stack, {
|
|
433
|
+
children: currentOption.loading ? jsx(CenteredLoadingSpinner$1, {}) : jsxs(Spacings.Stack, {
|
|
432
434
|
scale: "xs",
|
|
433
|
-
children: [jsx(CustomFieldTooltip, {
|
|
435
|
+
children: [jsx(CustomFieldTooltip$1, {
|
|
434
436
|
title: tooltipTitle,
|
|
435
437
|
children: jsx(AsyncSelectInput, {
|
|
436
438
|
id: name,
|
|
437
439
|
name: name,
|
|
438
|
-
placeholder: formatMessage(messages$
|
|
440
|
+
placeholder: formatMessage(messages$P.placeholder),
|
|
439
441
|
loadOptions: loadOptionsDebounced,
|
|
440
442
|
defaultOptions: [],
|
|
441
443
|
isClearable: isClearable,
|
|
@@ -448,7 +450,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
448
450
|
onInputChange: handleInputChange,
|
|
449
451
|
onBlur: onBlur,
|
|
450
452
|
value: currentOption.data,
|
|
451
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
453
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$P.noProductTypesFound),
|
|
452
454
|
hasError: hasError || isLoadingFailed,
|
|
453
455
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
454
456
|
menuPortalTarget: document.body,
|
|
@@ -462,8 +464,9 @@ const ProductTypePickerInput = _ref => {
|
|
|
462
464
|
});
|
|
463
465
|
};
|
|
464
466
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
467
|
+
var ProductTypePickerInput$1 = ProductTypePickerInput;
|
|
465
468
|
|
|
466
|
-
var messages$
|
|
469
|
+
var messages$O = defineMessages({
|
|
467
470
|
noStatesFound: {
|
|
468
471
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
469
472
|
description: 'The message to display when no states were found',
|
|
@@ -510,7 +513,7 @@ const StatePickerInput = _ref => {
|
|
|
510
513
|
loadingError = _useState2[0],
|
|
511
514
|
setLoadingError = _useState2[1];
|
|
512
515
|
const prefixSearchFields = useMemo(() => [`name.${dataLocale}`, 'key'], [dataLocale]);
|
|
513
|
-
const loadOptions = useLoadOptions({
|
|
516
|
+
const loadOptions = useLoadOptions$1({
|
|
514
517
|
query: GetStatesQuery,
|
|
515
518
|
variables,
|
|
516
519
|
prefixSearchFields
|
|
@@ -533,8 +536,8 @@ const StatePickerInput = _ref => {
|
|
|
533
536
|
setLoadingError(error);
|
|
534
537
|
onError(error);
|
|
535
538
|
}), [loadOptions, convertStateToOption, onError]);
|
|
536
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
537
|
-
const _useHandlers = useHandlers(onChange),
|
|
539
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
540
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
538
541
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
539
542
|
handleInternalInputChange = _useHandlers2[0],
|
|
540
543
|
handleChange = _useHandlers2[1];
|
|
@@ -547,19 +550,19 @@ const StatePickerInput = _ref => {
|
|
|
547
550
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
548
551
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
549
552
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
550
|
-
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$
|
|
553
|
+
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$O.noStatesFound), [loadingError, formatMessage]);
|
|
551
554
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
552
555
|
return jsx(Constraints.Horizontal, {
|
|
553
556
|
max: "scale",
|
|
554
|
-
children: currentOption.loading ? jsx(CenteredLoadingSpinner, {}) : jsxs(Spacings.Stack, {
|
|
557
|
+
children: currentOption.loading ? jsx(CenteredLoadingSpinner$1, {}) : jsxs(Spacings.Stack, {
|
|
555
558
|
scale: "xs",
|
|
556
|
-
children: [jsx(CustomFieldTooltip, {
|
|
559
|
+
children: [jsx(CustomFieldTooltip$1, {
|
|
557
560
|
title: tooltipTitle,
|
|
558
561
|
children: jsx(AsyncSelectInput, {
|
|
559
562
|
id: name,
|
|
560
563
|
name: name,
|
|
561
564
|
horizontalConstraint: "scale",
|
|
562
|
-
placeholder: formatMessage(messages$
|
|
565
|
+
placeholder: formatMessage(messages$O.placeholder),
|
|
563
566
|
loadOptions: loadOptionsDebounced,
|
|
564
567
|
defaultOptions: true,
|
|
565
568
|
showOptionGroupDivider: true,
|
|
@@ -587,6 +590,7 @@ const StatePickerInput = _ref => {
|
|
|
587
590
|
});
|
|
588
591
|
};
|
|
589
592
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
593
|
+
var StatePickerInput$1 = StatePickerInput;
|
|
590
594
|
|
|
591
595
|
function ownKeys$1q(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
592
596
|
function _objectSpread$1q(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1q(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1q(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -613,8 +617,9 @@ const CustomFieldTooltip = _ref => {
|
|
|
613
617
|
children: children
|
|
614
618
|
});
|
|
615
619
|
};
|
|
620
|
+
var CustomFieldTooltip$1 = CustomFieldTooltip;
|
|
616
621
|
|
|
617
|
-
var messages$
|
|
622
|
+
var messages$N = defineMessages({
|
|
618
623
|
bottomOption: {
|
|
619
624
|
id: 'Products.Pickers.bottomOption',
|
|
620
625
|
description: 'The message to display at the end of the options menu',
|
|
@@ -626,7 +631,7 @@ function ownKeys$1p(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertyS
|
|
|
626
631
|
function _objectSpread$1p(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1p(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1p(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
627
632
|
const getBottomOption = formatMessage => ({
|
|
628
633
|
options: [{
|
|
629
|
-
label: formatMessage ? formatMessage(messages$
|
|
634
|
+
label: formatMessage ? formatMessage(messages$N.bottomOption) : messages$N.bottomOption,
|
|
630
635
|
isBottomOption: true,
|
|
631
636
|
isDisabled: true
|
|
632
637
|
}]
|
|
@@ -661,7 +666,7 @@ const useHandlers = onChange => {
|
|
|
661
666
|
const handleInputChange = useCallback(changedValue => {
|
|
662
667
|
setInputValue(changedValue);
|
|
663
668
|
}, []);
|
|
664
|
-
const handleChange = useEventCallback(event => {
|
|
669
|
+
const handleChange = useEventCallback$1(event => {
|
|
665
670
|
const eventWithExtractedValue = _objectSpread$1o(_objectSpread$1o({}, event), {}, {
|
|
666
671
|
target: _objectSpread$1o(_objectSpread$1o({}, event.target), {}, {
|
|
667
672
|
value: event.target.value?.value
|
|
@@ -671,6 +676,7 @@ const useHandlers = onChange => {
|
|
|
671
676
|
}, [onChange, inputValue]);
|
|
672
677
|
return [handleInputChange, handleChange];
|
|
673
678
|
};
|
|
679
|
+
var useHandlers$1 = useHandlers;
|
|
674
680
|
|
|
675
681
|
const _excluded$3 = ["extraWhere"];
|
|
676
682
|
function ownKeys$1n(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -703,10 +709,10 @@ const useLoadOptions = _ref => {
|
|
|
703
709
|
let inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
704
710
|
let where;
|
|
705
711
|
if (inputValue.length) {
|
|
706
|
-
if (isUUID(inputValue)) {
|
|
712
|
+
if (isUUID$1(inputValue)) {
|
|
707
713
|
where = `id = "${inputValue}"`;
|
|
708
714
|
} else {
|
|
709
|
-
const _getPrefixSearchBound = getPrefixSearchBounds(inputValue),
|
|
715
|
+
const _getPrefixSearchBound = getPrefixSearchBounds$1(inputValue),
|
|
710
716
|
_getPrefixSearchBound2 = _slicedToArray(_getPrefixSearchBound, 2),
|
|
711
717
|
lowerBound = _getPrefixSearchBound2[0],
|
|
712
718
|
upperBound = _getPrefixSearchBound2[1];
|
|
@@ -732,6 +738,7 @@ const useLoadOptions = _ref => {
|
|
|
732
738
|
}, [client, query, variables, prefixSearchFields]);
|
|
733
739
|
return loadOptions;
|
|
734
740
|
};
|
|
741
|
+
var useLoadOptions$1 = useLoadOptions;
|
|
735
742
|
|
|
736
743
|
var FetchIndicesExist$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchIndicesExist" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indicesExist" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "products" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 191, source: { body: "query FetchIndicesExist {\n indicesExist {\n products {\n searchableIndexExists\n newInProgress\n }\n productTypes {\n searchableIndexExists\n newInProgress\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
737
744
|
const useExecuteGraphQLRequest = () => {
|
|
@@ -822,8 +829,8 @@ const constructPrefixSearchPredicate = (prefixSearchFields, lowerBound, upperBou
|
|
|
822
829
|
const constructWherePredicate = (inputValue, prefixSearchFields) => {
|
|
823
830
|
const wherePredicate = function () {
|
|
824
831
|
if (inputValue.length) {
|
|
825
|
-
if (isUUID(inputValue)) return `id = "${inputValue}"`;else {
|
|
826
|
-
const _getPrefixSearchBound = getPrefixSearchBounds(inputValue),
|
|
832
|
+
if (isUUID$1(inputValue)) return `id = "${inputValue}"`;else {
|
|
833
|
+
const _getPrefixSearchBound = getPrefixSearchBounds$1(inputValue),
|
|
827
834
|
_getPrefixSearchBound2 = _slicedToArray(_getPrefixSearchBound, 2),
|
|
828
835
|
lowerBound = _getPrefixSearchBound2[0],
|
|
829
836
|
upperBound = _getPrefixSearchBound2[1];
|
|
@@ -881,6 +888,7 @@ const useProductTypeOptions = _ref3 => {
|
|
|
881
888
|
loadProductTypes: isProjectIndexed ? fetchProductTypesFromPim : fetchProductTypessFromCTP
|
|
882
889
|
};
|
|
883
890
|
};
|
|
891
|
+
var useProductTypeOptions$1 = useProductTypeOptions;
|
|
884
892
|
|
|
885
893
|
function useCurrentOption(_ref) {
|
|
886
894
|
let id = _ref.id,
|
|
@@ -932,16 +940,20 @@ const getDisplayName = Component => {
|
|
|
932
940
|
}
|
|
933
941
|
return Component.displayName || Component.name || 'Component';
|
|
934
942
|
};
|
|
943
|
+
var getDisplayName$1 = getDisplayName;
|
|
935
944
|
|
|
936
945
|
const setDisplayName = nextDisplayName => Component => {
|
|
937
946
|
// eslint-disable-next-line no-param-reassign
|
|
938
947
|
Component.displayName = nextDisplayName;
|
|
939
948
|
return Component;
|
|
940
949
|
};
|
|
950
|
+
var setDisplayName$1 = setDisplayName;
|
|
941
951
|
|
|
942
|
-
const keepDisplayName = component => setDisplayName(getDisplayName(component));
|
|
952
|
+
const keepDisplayName = component => setDisplayName$1(getDisplayName$1(component));
|
|
953
|
+
var keepDisplayName$1 = keepDisplayName;
|
|
943
954
|
|
|
944
|
-
const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName(BaseComponent)})`;
|
|
955
|
+
const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName$1(BaseComponent)})`;
|
|
956
|
+
var wrapDisplayName$1 = wrapDisplayName;
|
|
945
957
|
|
|
946
958
|
function ownKeys$1m(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
947
959
|
function _objectSpread$1m(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1m(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1m(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -979,9 +991,10 @@ const withMouseOverState = BaseComponent => {
|
|
|
979
991
|
}
|
|
980
992
|
}]);
|
|
981
993
|
}(Component);
|
|
982
|
-
WithMouseOverState.displayName = wrapDisplayName(BaseComponent, 'withMouseOverState');
|
|
994
|
+
WithMouseOverState.displayName = wrapDisplayName$1(BaseComponent, 'withMouseOverState');
|
|
983
995
|
return WithMouseOverState;
|
|
984
996
|
};
|
|
997
|
+
var withMouseOverState$1 = withMouseOverState;
|
|
985
998
|
|
|
986
999
|
function ownKeys$1l(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
987
1000
|
function _objectSpread$1l(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1l(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1l(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1139,8 +1152,9 @@ ThrottledField.defaultProps = {
|
|
|
1139
1152
|
autoFocus: false,
|
|
1140
1153
|
label: 'Throttled field'
|
|
1141
1154
|
};
|
|
1155
|
+
var ThrottledField$1 = ThrottledField;
|
|
1142
1156
|
|
|
1143
|
-
var messages$
|
|
1157
|
+
var messages$M = defineMessages({
|
|
1144
1158
|
buttonLabel: {
|
|
1145
1159
|
id: 'SearchInput.buttonLabel',
|
|
1146
1160
|
description: 'Label for "Search" button.',
|
|
@@ -1239,13 +1253,13 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
1239
1253
|
[styles$i['input-container-disabled']]: this.props.disabled && this.props.enableDisabledStyle,
|
|
1240
1254
|
[styles$i['input-container-granular']]: this.props.isGranular
|
|
1241
1255
|
}),
|
|
1242
|
-
children: jsx(ThrottledField, {
|
|
1256
|
+
children: jsx(ThrottledField$1, {
|
|
1243
1257
|
style: "primary",
|
|
1244
1258
|
name: "search-text",
|
|
1245
1259
|
"data-testid": this.props.testId || 'search-input',
|
|
1246
1260
|
value: this.state.text,
|
|
1247
1261
|
label: this.props.label,
|
|
1248
|
-
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$
|
|
1262
|
+
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$M.placeholder),
|
|
1249
1263
|
inputRef: this.props.inputRef || this.setInputRef,
|
|
1250
1264
|
onChange: this.handleInputChange,
|
|
1251
1265
|
onEnter: this.handleEnter,
|
|
@@ -1300,7 +1314,7 @@ SearchInput.defaultProps = {
|
|
|
1300
1314
|
label: 'Search input',
|
|
1301
1315
|
onChange: () => null
|
|
1302
1316
|
};
|
|
1303
|
-
var searchInput = flowRight(keepDisplayName(SearchInput), withMouseOverState, injectIntl)(SearchInput);
|
|
1317
|
+
var searchInput = flowRight(keepDisplayName$1(SearchInput), withMouseOverState$1, injectIntl)(SearchInput);
|
|
1304
1318
|
|
|
1305
1319
|
function ownKeys$1k(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1306
1320
|
function _objectSpread$1k(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1k(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1324,9 +1338,10 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1324
1338
|
}
|
|
1325
1339
|
}));
|
|
1326
1340
|
};
|
|
1327
|
-
WithDataTablePaginationState.displayName = wrapDisplayName(WithDataTablePaginationState, 'WithDataTablePaginationState');
|
|
1341
|
+
WithDataTablePaginationState.displayName = wrapDisplayName$1(WithDataTablePaginationState, 'WithDataTablePaginationState');
|
|
1328
1342
|
return WithDataTablePaginationState;
|
|
1329
1343
|
};
|
|
1344
|
+
var injectDataTablePaginationState$1 = injectDataTablePaginationState;
|
|
1330
1345
|
|
|
1331
1346
|
function ownKeys$1j(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1332
1347
|
function _objectSpread$1j(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1j(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1j(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1348,10 +1363,11 @@ const injectNotifications = function () {
|
|
|
1348
1363
|
[propName]: notifications
|
|
1349
1364
|
}));
|
|
1350
1365
|
};
|
|
1351
|
-
WrappedComponent.displayName = `withNotifications(${getDisplayName(Component)}`;
|
|
1366
|
+
WrappedComponent.displayName = `withNotifications(${getDisplayName$1(Component)}`;
|
|
1352
1367
|
return WrappedComponent;
|
|
1353
1368
|
};
|
|
1354
1369
|
};
|
|
1370
|
+
var injectNotifications$1 = injectNotifications;
|
|
1355
1371
|
|
|
1356
1372
|
function ownKeys$1i(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1357
1373
|
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(_context = ownKeys$1i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1i(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1363,9 +1379,10 @@ const withProps = mapProps => Component => {
|
|
|
1363
1379
|
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1i(_objectSpread$1i({}, ownProps), mapProps(ownProps)) : _objectSpread$1i(_objectSpread$1i({}, ownProps), mapProps);
|
|
1364
1380
|
return jsx(Component, _objectSpread$1i({}, enhancedProps));
|
|
1365
1381
|
};
|
|
1366
|
-
EnhancedWithProps.displayName = wrapDisplayName(Component, 'withProps');
|
|
1382
|
+
EnhancedWithProps.displayName = wrapDisplayName$1(Component, 'withProps');
|
|
1367
1383
|
return EnhancedWithProps;
|
|
1368
1384
|
};
|
|
1385
|
+
var withProps$1 = withProps;
|
|
1369
1386
|
|
|
1370
1387
|
function ownKeys$1h(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1371
1388
|
function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1h(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1h(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1400,6 +1417,7 @@ const withRedirectTo = options => Component => {
|
|
|
1400
1417
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
1401
1418
|
return WithRedirectTo;
|
|
1402
1419
|
};
|
|
1420
|
+
var withRedirectTo$1 = withRedirectTo;
|
|
1403
1421
|
|
|
1404
1422
|
function ownKeys$1g(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1405
1423
|
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(_context = ownKeys$1g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1g(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1407,7 +1425,7 @@ const defaultOptions$4 = {
|
|
|
1407
1425
|
propName: 'modalState',
|
|
1408
1426
|
isInitiallyOpen: false
|
|
1409
1427
|
};
|
|
1410
|
-
const injectModalState$
|
|
1428
|
+
const injectModalState$2 = options => Component => {
|
|
1411
1429
|
const mergedOptions = _objectSpread$1g(_objectSpread$1g({}, defaultOptions$4), options);
|
|
1412
1430
|
const WithModalState = props => {
|
|
1413
1431
|
const modalState = useModalState(mergedOptions.isInitiallyOpen);
|
|
@@ -1415,9 +1433,10 @@ const injectModalState$1 = options => Component => {
|
|
|
1415
1433
|
[mergedOptions.propName]: modalState
|
|
1416
1434
|
}));
|
|
1417
1435
|
};
|
|
1418
|
-
WithModalState.displayName = wrapDisplayName(WithModalState, 'WithModalState');
|
|
1436
|
+
WithModalState.displayName = wrapDisplayName$1(WithModalState, 'WithModalState');
|
|
1419
1437
|
return WithModalState;
|
|
1420
1438
|
};
|
|
1439
|
+
var injectModalState$3 = injectModalState$2;
|
|
1421
1440
|
|
|
1422
1441
|
function ownKeys$1f(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1423
1442
|
function _objectSpread$1f(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1f(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1433,9 +1452,10 @@ const injectModalState = options => Component => {
|
|
|
1433
1452
|
[mergedOptions.propName]: toggleState
|
|
1434
1453
|
}));
|
|
1435
1454
|
};
|
|
1436
|
-
WithToggleState.displayName = wrapDisplayName(WithToggleState, 'WithToggleState');
|
|
1455
|
+
WithToggleState.displayName = wrapDisplayName$1(WithToggleState, 'WithToggleState');
|
|
1437
1456
|
return WithToggleState;
|
|
1438
1457
|
};
|
|
1458
|
+
var injectModalState$1 = injectModalState;
|
|
1439
1459
|
|
|
1440
1460
|
function ownKeys$1e(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1441
1461
|
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(_context2 = ownKeys$1e(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1e(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1499,6 +1519,7 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
1499
1519
|
}, [actualStorageValue, initialStorageValue, readFromStorage, writeToStorage]);
|
|
1500
1520
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
1501
1521
|
};
|
|
1522
|
+
var useStorage$1 = useStorage;
|
|
1502
1523
|
|
|
1503
1524
|
function ownKeys$1d(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1504
1525
|
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(_context = ownKeys$1d(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1d(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1516,7 +1537,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1516
1537
|
*/
|
|
1517
1538
|
const mergedOptions = _objectSpread$1d(_objectSpread$1d({}, defaultOptions$1), options);
|
|
1518
1539
|
const WithStorage = props => {
|
|
1519
|
-
const _useStorage = useStorage(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
1540
|
+
const _useStorage = useStorage$1(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
1520
1541
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
1521
1542
|
actualStorageValue = _useStorage2[0],
|
|
1522
1543
|
writeToStorage = _useStorage2[1],
|
|
@@ -1530,9 +1551,10 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1530
1551
|
};
|
|
1531
1552
|
return jsx(WrappedComponent, _objectSpread$1d(_objectSpread$1d({}, props), storageProp));
|
|
1532
1553
|
};
|
|
1533
|
-
WithStorage.displayName = wrapDisplayName(WrappedComponent, 'WithStorage');
|
|
1554
|
+
WithStorage.displayName = wrapDisplayName$1(WrappedComponent, 'WithStorage');
|
|
1534
1555
|
return WithStorage;
|
|
1535
1556
|
};
|
|
1557
|
+
var injectStorage$1 = injectStorage;
|
|
1536
1558
|
|
|
1537
1559
|
/**
|
|
1538
1560
|
* @returns function with the following parameters
|
|
@@ -1685,6 +1707,7 @@ const useIsFieldDuplicated = () => {
|
|
|
1685
1707
|
queryIsFieldDuplicated: execute
|
|
1686
1708
|
};
|
|
1687
1709
|
};
|
|
1710
|
+
var useIsFieldDuplicated$1 = useIsFieldDuplicated;
|
|
1688
1711
|
|
|
1689
1712
|
const usePrevious = value => {
|
|
1690
1713
|
const ref = useRef();
|
|
@@ -1693,6 +1716,7 @@ const usePrevious = value => {
|
|
|
1693
1716
|
}, [value]);
|
|
1694
1717
|
return ref.current;
|
|
1695
1718
|
};
|
|
1719
|
+
var usePrevious$1 = usePrevious;
|
|
1696
1720
|
|
|
1697
1721
|
function ownKeys$1b(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1698
1722
|
function _objectSpread$1b(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1b(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1b(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1760,6 +1784,7 @@ const useStoresListFetcher = props => {
|
|
|
1760
1784
|
}
|
|
1761
1785
|
};
|
|
1762
1786
|
};
|
|
1787
|
+
var useStoresListFetcher$1 = useStoresListFetcher;
|
|
1763
1788
|
|
|
1764
1789
|
const toPermission = (permission, resourceName) => camelCase(`can ${permission} ${resourceName}`);
|
|
1765
1790
|
const createPermissionsComposePath = permission =>
|
|
@@ -1789,6 +1814,7 @@ const useStoreKeysInDataFences = _ref => {
|
|
|
1789
1814
|
});
|
|
1790
1815
|
return storeKeysInDataFences;
|
|
1791
1816
|
};
|
|
1817
|
+
var useStoreKeysInDataFences$1 = useStoreKeysInDataFences;
|
|
1792
1818
|
|
|
1793
1819
|
function useDidFormValidationFail() {
|
|
1794
1820
|
const _useState = useState(false),
|
|
@@ -1848,7 +1874,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
1848
1874
|
const usePersistedReminder = function () {
|
|
1849
1875
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1850
1876
|
const mergedOptions = _objectSpread$1a(_objectSpread$1a({}, defaultOptions), options);
|
|
1851
|
-
const _useStorage = useStorage(mergedOptions.storageKey, null),
|
|
1877
|
+
const _useStorage = useStorage$1(mergedOptions.storageKey, null),
|
|
1852
1878
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
1853
1879
|
initialChosenReminderInterval = _useStorage2[0],
|
|
1854
1880
|
choseReminderInterval = _useStorage2[1],
|
|
@@ -1892,8 +1918,9 @@ const usePersistedReminder = function () {
|
|
|
1892
1918
|
}, []);
|
|
1893
1919
|
return [hasReminderExpired, hasChosenReminderRef, scheduleReminder];
|
|
1894
1920
|
};
|
|
1921
|
+
var usePersistedReminder$1 = usePersistedReminder;
|
|
1895
1922
|
|
|
1896
|
-
var messages$
|
|
1923
|
+
var messages$L = defineMessages({
|
|
1897
1924
|
profileUpdated: {
|
|
1898
1925
|
id: 'NotificationText.profileUpdated',
|
|
1899
1926
|
description: 'Label for the notification header',
|
|
@@ -1930,9 +1957,9 @@ const NotificationText = () => jsxs(Spacings.Stack, {
|
|
|
1930
1957
|
children: [jsx(Text.Body, {
|
|
1931
1958
|
as: "p",
|
|
1932
1959
|
isBold: true,
|
|
1933
|
-
intlMessage: messages$
|
|
1960
|
+
intlMessage: messages$L.profileUpdated
|
|
1934
1961
|
}), jsx(Text.Body, {
|
|
1935
|
-
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$
|
|
1962
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$L.addMoreInformation), {}, {
|
|
1936
1963
|
values: {
|
|
1937
1964
|
newline: getNewLine
|
|
1938
1965
|
}
|
|
@@ -1941,7 +1968,7 @@ const NotificationText = () => jsxs(Spacings.Stack, {
|
|
|
1941
1968
|
}), jsx(Spacings.Stack, {
|
|
1942
1969
|
scale: "xs",
|
|
1943
1970
|
children: jsx(Text.Body, {
|
|
1944
|
-
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$
|
|
1971
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$L.informationAndProfileLink), {}, {
|
|
1945
1972
|
values: {
|
|
1946
1973
|
newline: getNewLine,
|
|
1947
1974
|
link: getLinkToProfile
|
|
@@ -1951,6 +1978,7 @@ const NotificationText = () => jsxs(Spacings.Stack, {
|
|
|
1951
1978
|
})]
|
|
1952
1979
|
});
|
|
1953
1980
|
NotificationText.displayName = 'NotificationText';
|
|
1981
|
+
var NotificationText$1 = NotificationText;
|
|
1954
1982
|
|
|
1955
1983
|
const useRoleNotification = _ref => {
|
|
1956
1984
|
let dismissNotification = _ref.onDismiss;
|
|
@@ -1962,13 +1990,14 @@ const useRoleNotification = _ref => {
|
|
|
1962
1990
|
return () => {
|
|
1963
1991
|
if (isBusinessRoleNotificationEnabled) {
|
|
1964
1992
|
notification({
|
|
1965
|
-
text: jsx(NotificationText, {})
|
|
1993
|
+
text: jsx(NotificationText$1, {})
|
|
1966
1994
|
}, {
|
|
1967
1995
|
onDismiss: () => dismissNotification()
|
|
1968
1996
|
});
|
|
1969
1997
|
}
|
|
1970
1998
|
};
|
|
1971
1999
|
};
|
|
2000
|
+
var useRoleNotification$1 = useRoleNotification;
|
|
1972
2001
|
|
|
1973
2002
|
const useRoleNotificationEffect = () => {
|
|
1974
2003
|
const _useAdapterStatus = useAdapterStatus(),
|
|
@@ -1977,7 +2006,7 @@ const useRoleNotificationEffect = () => {
|
|
|
1977
2006
|
const storageKey = 'roleExpiry';
|
|
1978
2007
|
const userBusinessRole = user.businessRole;
|
|
1979
2008
|
const scopedStorageKey = [user.id, storageKey].join('/');
|
|
1980
|
-
const _usePersistedReminder = usePersistedReminder({
|
|
2009
|
+
const _usePersistedReminder = usePersistedReminder$1({
|
|
1981
2010
|
storageKey,
|
|
1982
2011
|
reminderInterval: REMINDER_OPTION_3_DAY
|
|
1983
2012
|
}),
|
|
@@ -1985,7 +2014,7 @@ const useRoleNotificationEffect = () => {
|
|
|
1985
2014
|
hasReminderExpired = _usePersistedReminder2[0],
|
|
1986
2015
|
hasChosenReminderRef = _usePersistedReminder2[1],
|
|
1987
2016
|
scheduleReminder = _usePersistedReminder2[2];
|
|
1988
|
-
const roleNotification = useRoleNotification({
|
|
2017
|
+
const roleNotification = useRoleNotification$1({
|
|
1989
2018
|
onDismiss: scheduleReminder
|
|
1990
2019
|
});
|
|
1991
2020
|
const isFirstTimeUser = !hasChosenReminderRef.current;
|
|
@@ -2014,6 +2043,7 @@ const useRoleNotificationEffect = () => {
|
|
|
2014
2043
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2015
2044
|
[userBusinessRole, hasReminderExpired, isFlopFlipReady]);
|
|
2016
2045
|
};
|
|
2046
|
+
var useRoleNotificationEffect$1 = useRoleNotificationEffect;
|
|
2017
2047
|
|
|
2018
2048
|
function usePendingRequests() {
|
|
2019
2049
|
const _useState = useState(0),
|
|
@@ -2061,8 +2091,9 @@ const useEventCallback = (fn, dependencies) => {
|
|
|
2061
2091
|
return ref.current(...arguments);
|
|
2062
2092
|
}, [ref]);
|
|
2063
2093
|
};
|
|
2094
|
+
var useEventCallback$1 = useEventCallback;
|
|
2064
2095
|
|
|
2065
|
-
var messages$
|
|
2096
|
+
var messages$K = defineMessages({
|
|
2066
2097
|
fallbackHint: {
|
|
2067
2098
|
id: 'KeyFallback.fallbackHint',
|
|
2068
2099
|
description: 'key fallback for a specified resource key (e.g name)',
|
|
@@ -2086,17 +2117,19 @@ const useLocalizedKeyFallback = () => {
|
|
|
2086
2117
|
return values => {
|
|
2087
2118
|
if (!values.resource) return null;
|
|
2088
2119
|
const localizedString = values.resource[values.localizedStringFieldName];
|
|
2089
|
-
const fallbackHintWithKey = intl.formatMessage(messages$
|
|
2120
|
+
const fallbackHintWithKey = intl.formatMessage(messages$K.fallbackHint, {
|
|
2090
2121
|
key: values.resource.key
|
|
2091
2122
|
});
|
|
2092
2123
|
if (!localizedString) return fallbackHintWithKey;
|
|
2093
2124
|
return localizedString[language] || fallbackHintWithKey;
|
|
2094
2125
|
};
|
|
2095
2126
|
};
|
|
2127
|
+
var useLocalizedKeyFallback$1 = useLocalizedKeyFallback;
|
|
2096
2128
|
|
|
2097
2129
|
const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
2098
2130
|
// eslint-disable-next-line testing-library/await-async-utils
|
|
2099
2131
|
useCallback(debounce(promiseCallback, wait), [promiseCallback]);
|
|
2132
|
+
var useDebouncedPromiseCallback$1 = useDebouncedPromiseCallback;
|
|
2100
2133
|
|
|
2101
2134
|
function ownKeys$18(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2102
2135
|
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(_context2 = ownKeys$18(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$18(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -2162,7 +2195,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2162
2195
|
displaySettings
|
|
2163
2196
|
};
|
|
2164
2197
|
}, [allAvailableColumnsConfiguration, initialVisibleColumnKeys, mutableColumnProps, displaySettings]);
|
|
2165
|
-
const _useStorage = useStorage(tableConfigurationStorageKey,
|
|
2198
|
+
const _useStorage = useStorage$1(tableConfigurationStorageKey,
|
|
2166
2199
|
// initialize with all the available columns
|
|
2167
2200
|
mappedInitialTableConfiguration, {
|
|
2168
2201
|
storageType
|
|
@@ -2198,6 +2231,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2198
2231
|
})
|
|
2199
2232
|
};
|
|
2200
2233
|
};
|
|
2234
|
+
var usePersistedTableConfiguration$1 = usePersistedTableConfiguration;
|
|
2201
2235
|
|
|
2202
2236
|
var FetchProductSelectionsTotal = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductSelectionsTotal" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 74, source: { body: "query FetchProductSelectionsTotal {\n productSelections {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
2203
2237
|
const useProductSelectionsTotalFetcher = props => {
|
|
@@ -2213,6 +2247,7 @@ const useProductSelectionsTotalFetcher = props => {
|
|
|
2213
2247
|
total: data?.productSelections?.total
|
|
2214
2248
|
};
|
|
2215
2249
|
};
|
|
2250
|
+
var useProductSelectionsTotalFetcher$1 = useProductSelectionsTotalFetcher;
|
|
2216
2251
|
|
|
2217
2252
|
function ownKeys$17(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2218
2253
|
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(_context2 = ownKeys$17(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$17(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -2261,6 +2296,7 @@ const useProductSelectionsFetcher = props => {
|
|
|
2261
2296
|
refetch
|
|
2262
2297
|
};
|
|
2263
2298
|
};
|
|
2299
|
+
var useProductSelectionsFetcher$1 = useProductSelectionsFetcher;
|
|
2264
2300
|
|
|
2265
2301
|
const setToArray = function () {
|
|
2266
2302
|
let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -3671,6 +3707,7 @@ const currencyData = {
|
|
|
3671
3707
|
countries: ['Zimbabwe']
|
|
3672
3708
|
}
|
|
3673
3709
|
};
|
|
3710
|
+
var currencyData$1 = currencyData;
|
|
3674
3711
|
|
|
3675
3712
|
/* This is is short-term solution that patches fraction digits not being available from the Dashboard backend.
|
|
3676
3713
|
|
|
@@ -3697,8 +3734,8 @@ SOFTWARE.
|
|
|
3697
3734
|
|
|
3698
3735
|
const getData = (code, field) => {
|
|
3699
3736
|
code = code !== undefined && code !== '' ? code.toUpperCase() : code;
|
|
3700
|
-
if (currencyData[code] !== undefined) {
|
|
3701
|
-
if (field === 'all') return currencyData[code];else return currencyData[code][field];
|
|
3737
|
+
if (currencyData$1[code] !== undefined) {
|
|
3738
|
+
if (field === 'all') return currencyData$1[code];else return currencyData$1[code][field];
|
|
3702
3739
|
} else return undefined;
|
|
3703
3740
|
};
|
|
3704
3741
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
@@ -3737,7 +3774,7 @@ function formatMoney$2(moneyValue, intl, options) {
|
|
|
3737
3774
|
}, options));
|
|
3738
3775
|
}
|
|
3739
3776
|
|
|
3740
|
-
var messages$
|
|
3777
|
+
var messages$J = defineMessages({
|
|
3741
3778
|
booleanYes: {
|
|
3742
3779
|
id: 'AttributeTypeFormats.boolean.yes',
|
|
3743
3780
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -3819,7 +3856,7 @@ const formatDateTime = _ref7 => {
|
|
|
3819
3856
|
const formatBoolean = _ref8 => {
|
|
3820
3857
|
let value = _ref8.value,
|
|
3821
3858
|
intl = _ref8.intl;
|
|
3822
|
-
return value ? intl.formatMessage(messages$
|
|
3859
|
+
return value ? intl.formatMessage(messages$J.booleanYes) : intl.formatMessage(messages$J.booleanNo);
|
|
3823
3860
|
};
|
|
3824
3861
|
const formatNilType = _ref9 => {
|
|
3825
3862
|
let value = _ref9.value,
|
|
@@ -3976,6 +4013,7 @@ const getPrefixSearchBounds = input => {
|
|
|
3976
4013
|
const getNextCharacter = character => String.fromCharCode(character.charCodeAt() + 1);
|
|
3977
4014
|
return [input, `${_sliceInstanceProperty(input).call(input, 0, input.length - 1)}${getNextCharacter(_sliceInstanceProperty(input).call(input, input.length - 1))}`];
|
|
3978
4015
|
};
|
|
4016
|
+
var getPrefixSearchBounds$1 = getPrefixSearchBounds;
|
|
3979
4017
|
|
|
3980
4018
|
const _excluded$2 = ["action"];
|
|
3981
4019
|
function ownKeys$15(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -4535,6 +4573,7 @@ const extractErrorFromGraphQlResponse = graphQlResponse => {
|
|
|
4535
4573
|
};
|
|
4536
4574
|
|
|
4537
4575
|
const isUUID = string => /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(string);
|
|
4576
|
+
var isUUID$1 = isUUID;
|
|
4538
4577
|
|
|
4539
4578
|
const formats = {
|
|
4540
4579
|
en: [',', '.'],
|
|
@@ -4924,7 +4963,7 @@ function uniqueObjects(items) {
|
|
|
4924
4963
|
|
|
4925
4964
|
*/
|
|
4926
4965
|
|
|
4927
|
-
const messages$
|
|
4966
|
+
const messages$I = defineMessages({
|
|
4928
4967
|
unique: {
|
|
4929
4968
|
id: 'Validation.unique',
|
|
4930
4969
|
description: 'An error message to show if the field must be unique',
|
|
@@ -4966,6 +5005,7 @@ const messages$C = defineMessages({
|
|
|
4966
5005
|
defaultMessage: 'Invalid ID format. Please enter a valid ID.'
|
|
4967
5006
|
}
|
|
4968
5007
|
});
|
|
5008
|
+
var validationMessages = messages$I;
|
|
4969
5009
|
|
|
4970
5010
|
function getIndexesOfInvalidValues(values) {
|
|
4971
5011
|
let invalidValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
@@ -4979,6 +5019,7 @@ function getIndexesOfInvalidValues(values) {
|
|
|
4979
5019
|
}
|
|
4980
5020
|
|
|
4981
5021
|
const withoutEmptyErrorsByField = errorsByField => omitEmpty(errorsByField);
|
|
5022
|
+
var withoutEmptyErrorsByField$1 = withoutEmptyErrorsByField;
|
|
4982
5023
|
|
|
4983
5024
|
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 } } } };
|
|
4984
5025
|
|
|
@@ -5048,7 +5089,7 @@ const getWhereClause = function () {
|
|
|
5048
5089
|
let searchText = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
5049
5090
|
let language = arguments.length > 1 ? arguments[1] : undefined;
|
|
5050
5091
|
const query = _trimInstanceProperty(_context2 = _JSON$stringify(searchText)).call(_context2);
|
|
5051
|
-
const idQuery = isUUID(searchText) && `id = ${query}`;
|
|
5092
|
+
const idQuery = isUUID$1(searchText) && `id = ${query}`;
|
|
5052
5093
|
const nameQuery = `name(${language} = ${query})`;
|
|
5053
5094
|
const keyQuery = `key = ${query}`;
|
|
5054
5095
|
return _filterInstanceProperty(_context3 = [idQuery, nameQuery, keyQuery]).call(_context3, Boolean).join(' or ');
|
|
@@ -5115,7 +5156,7 @@ const useReferenceSearchItems = _ref => {
|
|
|
5115
5156
|
const putToCache = useCallback(items => {
|
|
5116
5157
|
_forEachInstanceProperty(items).call(items, item => itemCache.set(item.id, item));
|
|
5117
5158
|
}, []);
|
|
5118
|
-
const prevIds = usePrevious(ids);
|
|
5159
|
+
const prevIds = usePrevious$1(ids);
|
|
5119
5160
|
useEffect(() => {
|
|
5120
5161
|
async function loadItems() {
|
|
5121
5162
|
const loadedItems = ids.length > 0 ? await loadItemsByIds(ids) : [];
|
|
@@ -5188,7 +5229,7 @@ function ReferenceSearch(props) {
|
|
|
5188
5229
|
children: [areSomeItemsMissing && jsx("div", {
|
|
5189
5230
|
className: styles$h['missing-label'],
|
|
5190
5231
|
children: props.referenceIsMissingLabel
|
|
5191
|
-
}), jsx(CustomFieldTooltip, {
|
|
5232
|
+
}), jsx(CustomFieldTooltip$1, {
|
|
5192
5233
|
title: tooltipTitle,
|
|
5193
5234
|
children: jsxs("div", {
|
|
5194
5235
|
children: [jsx(AccessibleHidden, {
|
|
@@ -5220,7 +5261,7 @@ function ReferenceSearch(props) {
|
|
|
5220
5261
|
});
|
|
5221
5262
|
}
|
|
5222
5263
|
|
|
5223
|
-
const messages$
|
|
5264
|
+
const messages$G = defineMessages({
|
|
5224
5265
|
placeholder: {
|
|
5225
5266
|
id: 'CartDiscountReferenceSearch.placeholder',
|
|
5226
5267
|
description: 'Placeholder for search for a cart discount',
|
|
@@ -5247,6 +5288,7 @@ const messages$B = defineMessages({
|
|
|
5247
5288
|
defaultMessage: 'Enter search term'
|
|
5248
5289
|
}
|
|
5249
5290
|
});
|
|
5291
|
+
var messages$H = messages$G;
|
|
5250
5292
|
|
|
5251
5293
|
function ownKeys$11(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5252
5294
|
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(_context = ownKeys$11(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$11(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -5271,7 +5313,7 @@ function Option$1(props) {
|
|
|
5271
5313
|
fallbackOrder: languages
|
|
5272
5314
|
})
|
|
5273
5315
|
}), jsxs(Text.Detail, {
|
|
5274
|
-
children: [formatMessage(messages$
|
|
5316
|
+
children: [formatMessage(messages$H.key), ": ", cartDiscount.key || NO_VALUE_FALLBACK]
|
|
5275
5317
|
})]
|
|
5276
5318
|
})
|
|
5277
5319
|
}));
|
|
@@ -5347,10 +5389,10 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5347
5389
|
onBlur: props.onBlur,
|
|
5348
5390
|
onChange: props.onChange,
|
|
5349
5391
|
value: returnNullIfEmpty(props.value),
|
|
5350
|
-
placeholderLabel: formatMessage(messages$
|
|
5351
|
-
searchPromptLabel: formatMessage(messages$
|
|
5352
|
-
noResultsLabel: formatMessage(messages$
|
|
5353
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5392
|
+
placeholderLabel: formatMessage(messages$H.placeholder),
|
|
5393
|
+
searchPromptLabel: formatMessage(messages$H.searchPrompt),
|
|
5394
|
+
noResultsLabel: formatMessage(messages$H.noResults),
|
|
5395
|
+
referenceIsMissingLabel: formatMessage(messages$H.isMissing),
|
|
5354
5396
|
mapItemToOption: mapItemToOption,
|
|
5355
5397
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5356
5398
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5360,7 +5402,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5360
5402
|
});
|
|
5361
5403
|
}
|
|
5362
5404
|
|
|
5363
|
-
const messages$
|
|
5405
|
+
const messages$E = defineMessages({
|
|
5364
5406
|
placeholder: {
|
|
5365
5407
|
id: 'CategoryReferenceSearch.placeholder',
|
|
5366
5408
|
description: 'Placeholder for search for a category',
|
|
@@ -5392,6 +5434,7 @@ const messages$A = defineMessages({
|
|
|
5392
5434
|
defaultMessage: 'Parent Category'
|
|
5393
5435
|
}
|
|
5394
5436
|
});
|
|
5437
|
+
var messages$F = messages$E;
|
|
5395
5438
|
|
|
5396
5439
|
function ownKeys$$(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5397
5440
|
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$$(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$$(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -5416,7 +5459,7 @@ function Option(props) {
|
|
|
5416
5459
|
fallbackOrder: languages
|
|
5417
5460
|
})
|
|
5418
5461
|
}), category.parent && jsx(Text.Detail, {
|
|
5419
|
-
children: `${formatMessage(messages$
|
|
5462
|
+
children: `${formatMessage(messages$F.parentCategory)}: ${formatLocalizedString(category.parent, {
|
|
5420
5463
|
key: 'name',
|
|
5421
5464
|
locale: language,
|
|
5422
5465
|
fallbackOrder: languages
|
|
@@ -5428,7 +5471,7 @@ function Option(props) {
|
|
|
5428
5471
|
fallbackOrder: languages
|
|
5429
5472
|
})}`
|
|
5430
5473
|
}), category.externalId && jsx(Text.Detail, {
|
|
5431
|
-
children: `${formatMessage(messages$
|
|
5474
|
+
children: `${formatMessage(messages$F.externalId)}: ${category.externalId || NO_VALUE_FALLBACK}`
|
|
5432
5475
|
})]
|
|
5433
5476
|
})
|
|
5434
5477
|
}));
|
|
@@ -5476,10 +5519,10 @@ function CategoryReferenceSearch(props) {
|
|
|
5476
5519
|
onBlur: props.onBlur,
|
|
5477
5520
|
onChange: props.onChange,
|
|
5478
5521
|
value: props.value,
|
|
5479
|
-
placeholderLabel: formatMessage(messages$
|
|
5480
|
-
searchPromptLabel: formatMessage(messages$
|
|
5481
|
-
noResultsLabel: formatMessage(messages$
|
|
5482
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5522
|
+
placeholderLabel: formatMessage(messages$F.placeholder),
|
|
5523
|
+
searchPromptLabel: formatMessage(messages$F.searchPrompt),
|
|
5524
|
+
noResultsLabel: formatMessage(messages$F.noResults),
|
|
5525
|
+
referenceIsMissingLabel: formatMessage(messages$F.isMissing),
|
|
5483
5526
|
mapItemToOption: mapItemToOption,
|
|
5484
5527
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5485
5528
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5553,8 +5596,9 @@ Button.displayName = 'Button';
|
|
|
5553
5596
|
Button.defaultProps = {
|
|
5554
5597
|
type: 'button'
|
|
5555
5598
|
};
|
|
5599
|
+
var Button$1 = Button;
|
|
5556
5600
|
|
|
5557
|
-
var messages$
|
|
5601
|
+
var messages$D = defineMessages({
|
|
5558
5602
|
chooseFile: {
|
|
5559
5603
|
id: 'ButtonFileInput.chooseFile',
|
|
5560
5604
|
description: 'The label text of the field for upload local file',
|
|
@@ -5583,12 +5627,13 @@ const FileInput = props => jsx("label", {
|
|
|
5583
5627
|
});
|
|
5584
5628
|
FileInput.displayName = 'FileInput';
|
|
5585
5629
|
FileInput.defaultProps = {
|
|
5586
|
-
children: jsx(FormattedMessage, _objectSpread$Y({}, messages$
|
|
5630
|
+
children: jsx(FormattedMessage, _objectSpread$Y({}, messages$D.chooseFile)),
|
|
5587
5631
|
allowMultiple: false,
|
|
5588
5632
|
acceptTypes: 'image/png,image/jpeg,image/gif'
|
|
5589
5633
|
};
|
|
5634
|
+
var FileInput$1 = FileInput;
|
|
5590
5635
|
|
|
5591
|
-
var messages$
|
|
5636
|
+
var messages$C = defineMessages({
|
|
5592
5637
|
countriesBasicSelectPlaceholder: {
|
|
5593
5638
|
id: 'CountriesPicker.countriesBasicSelectPlaceholder',
|
|
5594
5639
|
description: 'Placeholder of the basic field for countries',
|
|
@@ -5609,7 +5654,7 @@ var messages$y = defineMessages({
|
|
|
5609
5654
|
function ownKeys$X(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5610
5655
|
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(_context4 = ownKeys$X(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context5 = ownKeys$X(Object(t))).call(_context5, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5611
5656
|
const emptyCountryOption = intl => [{
|
|
5612
|
-
label: intl.formatMessage(messages$
|
|
5657
|
+
label: intl.formatMessage(messages$C.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
5613
5658
|
value: undefined,
|
|
5614
5659
|
isDisabled: true
|
|
5615
5660
|
}];
|
|
@@ -5651,7 +5696,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
5651
5696
|
var _context3;
|
|
5652
5697
|
return _findInstanceProperty(_context3 = props.options).call(_context3, country => country.value === countryCode);
|
|
5653
5698
|
}),
|
|
5654
|
-
placeholder: intl.formatMessage(messages$
|
|
5699
|
+
placeholder: intl.formatMessage(messages$C.countriesAsyncSelectPlaceholder),
|
|
5655
5700
|
loadOptions: handleLoadOptions,
|
|
5656
5701
|
onChange: onOptionChange,
|
|
5657
5702
|
isDisabled: props.isDisabled,
|
|
@@ -5671,7 +5716,7 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
5671
5716
|
value: props.value,
|
|
5672
5717
|
isRequired: props.isRequired,
|
|
5673
5718
|
description: props.description,
|
|
5674
|
-
placeholder: intl.formatMessage(messages$
|
|
5719
|
+
placeholder: intl.formatMessage(messages$C.countriesBasicSelectPlaceholder),
|
|
5675
5720
|
options: props.options,
|
|
5676
5721
|
onChange: props.onChange,
|
|
5677
5722
|
isDisabled: props.isDisabled,
|
|
@@ -5698,7 +5743,7 @@ CountriesPicker.defaultProps = {
|
|
|
5698
5743
|
hasWarning: false
|
|
5699
5744
|
};
|
|
5700
5745
|
|
|
5701
|
-
var messages$
|
|
5746
|
+
var messages$B = defineMessages({
|
|
5702
5747
|
noCustomerGroupsFound: {
|
|
5703
5748
|
id: 'Prices.CustomerGroupPickerInput.noCustomerGroupsFound',
|
|
5704
5749
|
description: 'The message to display when no customer groups were found',
|
|
@@ -5749,7 +5794,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5749
5794
|
return customerGroup;
|
|
5750
5795
|
}, []);
|
|
5751
5796
|
const prefixSearchFields = useMemo(() => ['name', 'key'], []);
|
|
5752
|
-
const loadOptions = useLoadOptions({
|
|
5797
|
+
const loadOptions = useLoadOptions$1({
|
|
5753
5798
|
query: GetCustomerGroupsQuery,
|
|
5754
5799
|
variables,
|
|
5755
5800
|
prefixSearchFields
|
|
@@ -5774,8 +5819,8 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5774
5819
|
setLoadingError(error);
|
|
5775
5820
|
onError(error);
|
|
5776
5821
|
}), [loadOptions, convertCustomerGroupToOption, onError]);
|
|
5777
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
5778
|
-
const _useHandlers = useHandlers(onChange),
|
|
5822
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
5823
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
5779
5824
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
5780
5825
|
handleInternalInputChange = _useHandlers2[0],
|
|
5781
5826
|
handleChange = _useHandlers2[1];
|
|
@@ -5788,18 +5833,18 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5788
5833
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
5789
5834
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
5790
5835
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
5791
|
-
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$
|
|
5836
|
+
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$B.noCustomerGroupsFound), [loadingError, formatMessage]);
|
|
5792
5837
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
5793
5838
|
return jsx(Constraints.Horizontal, {
|
|
5794
5839
|
max: "scale",
|
|
5795
5840
|
children: jsxs(Spacings.Stack, {
|
|
5796
5841
|
scale: "xs",
|
|
5797
|
-
children: [jsx(CustomFieldTooltip, {
|
|
5842
|
+
children: [jsx(CustomFieldTooltip$1, {
|
|
5798
5843
|
title: tooltipTitle,
|
|
5799
5844
|
children: jsx(AsyncSelectInput, {
|
|
5800
5845
|
id: name,
|
|
5801
5846
|
name: name,
|
|
5802
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
5847
|
+
placeholder: placeholder ?? formatMessage(messages$B.placeholder),
|
|
5803
5848
|
loadOptions: loadOptionsDebounced,
|
|
5804
5849
|
defaultOptions: true,
|
|
5805
5850
|
showOptionGroupDivider: true,
|
|
@@ -5824,6 +5869,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5824
5869
|
});
|
|
5825
5870
|
};
|
|
5826
5871
|
CustomerGroupPickerInput.displayName = 'CustomerGroupPickerInput';
|
|
5872
|
+
var CustomerGroupPickerInput$1 = CustomerGroupPickerInput;
|
|
5827
5873
|
|
|
5828
5874
|
var styles$e = {
|
|
5829
5875
|
"divider": "divider-module__divider___4-vdy",
|
|
@@ -5894,13 +5940,14 @@ const CustomFieldErrors = props => {
|
|
|
5894
5940
|
const errors = _Array$isArray(props.errors) ? mergeSetItemsErrors(props.errors) : props.errors;
|
|
5895
5941
|
return jsxs(Fragment, {
|
|
5896
5942
|
children: [props.isTouched || didFormValidationFail && errors?.missing && jsx(ErrorMessage, {
|
|
5897
|
-
intlMessage:
|
|
5943
|
+
intlMessage: validationMessages.required
|
|
5898
5944
|
}), props.isTouched || didFormValidationFail && errors?.duplicated && jsx(ErrorMessage, {
|
|
5899
|
-
intlMessage:
|
|
5945
|
+
intlMessage: validationMessages.unique
|
|
5900
5946
|
})]
|
|
5901
5947
|
});
|
|
5902
5948
|
};
|
|
5903
5949
|
CustomFieldErrors.displayName = 'CustomFieldErrors';
|
|
5950
|
+
var CustomFieldErrors$1 = CustomFieldErrors;
|
|
5904
5951
|
|
|
5905
5952
|
const getType = fieldDefinition => {
|
|
5906
5953
|
const fieldDefinitionType = fieldDefinition.type.name.toLowerCase() === 'set' ? fieldDefinition.type.elementType : fieldDefinition.type;
|
|
@@ -5984,6 +6031,7 @@ const ExpandButton = props => props.totalValues > 1 ? jsxs(Spacings.Stack, {
|
|
|
5984
6031
|
})]
|
|
5985
6032
|
}) : null;
|
|
5986
6033
|
ExpandButton.displayName = 'ExpandButton';
|
|
6034
|
+
var ExpandButton$1 = ExpandButton;
|
|
5987
6035
|
|
|
5988
6036
|
var styles$d = {
|
|
5989
6037
|
"topAlign": "set-buttons-module__topAlign___3AZwc",
|
|
@@ -6012,6 +6060,7 @@ const SetButtons = props => {
|
|
|
6012
6060
|
});
|
|
6013
6061
|
};
|
|
6014
6062
|
SetButtons.displayName = 'SetButtons';
|
|
6063
|
+
var SetButtons$1 = SetButtons;
|
|
6015
6064
|
|
|
6016
6065
|
function ownKeys$U(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6017
6066
|
function _objectSpread$U(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$U(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$U(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -6156,7 +6205,7 @@ function CustomInputSet(props) {
|
|
|
6156
6205
|
const fieldValue = internalValue[index];
|
|
6157
6206
|
return jsxs(Spacings.Inline, {
|
|
6158
6207
|
alignItems: areButtonsTopAligned ? 'flex-start' : 'center',
|
|
6159
|
-
children: [jsx(CustomFieldInput, {
|
|
6208
|
+
children: [jsx(CustomFieldInput$1, {
|
|
6160
6209
|
name: fieldName,
|
|
6161
6210
|
fieldDefinition: itemFieldDefinition,
|
|
6162
6211
|
isDisabled: props.isDisabled,
|
|
@@ -6169,7 +6218,7 @@ function CustomInputSet(props) {
|
|
|
6169
6218
|
WrapperComponent: props.WrapperComponent,
|
|
6170
6219
|
renderWarnings: props.renderWarnings,
|
|
6171
6220
|
handleWarningChange: props.handleWarningChange
|
|
6172
|
-
}), jsx(SetButtons, {
|
|
6221
|
+
}), jsx(SetButtons$1, {
|
|
6173
6222
|
index: index,
|
|
6174
6223
|
isFirstItem: !isExpanded || index === 0,
|
|
6175
6224
|
onAddItem: addNewItem,
|
|
@@ -6179,7 +6228,7 @@ function CustomInputSet(props) {
|
|
|
6179
6228
|
isTopAligned: areButtonsTopAligned
|
|
6180
6229
|
})]
|
|
6181
6230
|
}, keys[index]);
|
|
6182
|
-
}), jsx(ExpandButton, {
|
|
6231
|
+
}), jsx(ExpandButton$1, {
|
|
6183
6232
|
totalValues: totalAmount,
|
|
6184
6233
|
isExpanded: isExpanded,
|
|
6185
6234
|
onExpand: toggleExpansion
|
|
@@ -6256,7 +6305,7 @@ function CustomEnumInput(props) {
|
|
|
6256
6305
|
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
6257
6306
|
});
|
|
6258
6307
|
const tooltipTitle = props.value ? _findInstanceProperty(options).call(options, option => option.value === props.value)?.label ?? '' : '';
|
|
6259
|
-
return jsx(CustomFieldTooltip, {
|
|
6308
|
+
return jsx(CustomFieldTooltip$1, {
|
|
6260
6309
|
title: tooltipTitle,
|
|
6261
6310
|
children: jsx(SelectInput, {
|
|
6262
6311
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -6302,7 +6351,7 @@ function CustomLocalizedEnumInput(props) {
|
|
|
6302
6351
|
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
6303
6352
|
});
|
|
6304
6353
|
const tooltipTitle = props.value ? _findInstanceProperty(options).call(options, option => option.value === props.value)?.label ?? '' : '';
|
|
6305
|
-
return jsx(CustomFieldTooltip, {
|
|
6354
|
+
return jsx(CustomFieldTooltip$1, {
|
|
6306
6355
|
title: tooltipTitle,
|
|
6307
6356
|
children: jsx(SelectInput, {
|
|
6308
6357
|
id: props.name,
|
|
@@ -6356,7 +6405,7 @@ function CustomLocalizedTextInput(props) {
|
|
|
6356
6405
|
});
|
|
6357
6406
|
const InputComponent = isMultiLine ? LocalizedMultilineTextInput : LocalizedTextInput;
|
|
6358
6407
|
const tooltipTitle = isMultiLine ? '' : value ? value[language] ?? '' : '';
|
|
6359
|
-
return jsx(CustomFieldTooltip, {
|
|
6408
|
+
return jsx(CustomFieldTooltip$1, {
|
|
6360
6409
|
title: tooltipTitle,
|
|
6361
6410
|
children: jsx(InputComponent, {
|
|
6362
6411
|
id: props.name,
|
|
@@ -6524,9 +6573,10 @@ function useNestedProductType(fieldDefinition) {
|
|
|
6524
6573
|
}
|
|
6525
6574
|
|
|
6526
6575
|
const NestingLevelContext = /*#__PURE__*/createContext(0);
|
|
6576
|
+
var NestingLevelContext$1 = NestingLevelContext;
|
|
6527
6577
|
|
|
6528
6578
|
// eslint-disable-next-line import/prefer-default-export
|
|
6529
|
-
const messages$
|
|
6579
|
+
const messages$A = defineMessages({
|
|
6530
6580
|
aboveFifthLevelWarning: {
|
|
6531
6581
|
id: 'attributeInputByType.nestedAttributes.aboveFifthLevelWarning',
|
|
6532
6582
|
description: 'Warning message shown when nested attribute are above the fifth level',
|
|
@@ -6538,8 +6588,9 @@ const messages$w = defineMessages({
|
|
|
6538
6588
|
defaultMessage: 'Empty'
|
|
6539
6589
|
}
|
|
6540
6590
|
});
|
|
6591
|
+
var customFieldsMessages = messages$A;
|
|
6541
6592
|
|
|
6542
|
-
var messages$
|
|
6593
|
+
var messages$z = defineMessages({
|
|
6543
6594
|
updateButton: {
|
|
6544
6595
|
id: 'NestedAttributes.Details.updateButton',
|
|
6545
6596
|
description: 'Update button label',
|
|
@@ -6624,7 +6675,7 @@ const EditButton = props => {
|
|
|
6624
6675
|
formatMessage = _useIntl.formatMessage;
|
|
6625
6676
|
return jsx(Tooltip, {
|
|
6626
6677
|
placement: "top",
|
|
6627
|
-
title: formatMessage(messages$
|
|
6678
|
+
title: formatMessage(messages$z.editTooltip),
|
|
6628
6679
|
children: jsx(IconButton, {
|
|
6629
6680
|
label: "Edit",
|
|
6630
6681
|
isDisabled: props.isDisabled,
|
|
@@ -6640,12 +6691,12 @@ const DropChangesConfirmation = props => {
|
|
|
6640
6691
|
formatMessage = _useIntl2.formatMessage;
|
|
6641
6692
|
return jsx(ConfirmationDialog, {
|
|
6642
6693
|
isOpen: props.isOpen || false,
|
|
6643
|
-
title: formatMessage(messages$
|
|
6644
|
-
labelPrimary: formatMessage(messages$
|
|
6694
|
+
title: formatMessage(messages$z.confirmationDialogTitle),
|
|
6695
|
+
labelPrimary: formatMessage(messages$z.nestedAttributesConfirmLabel),
|
|
6645
6696
|
onConfirm: props.onConfirm,
|
|
6646
6697
|
onCancel: props.onCancel,
|
|
6647
6698
|
children: jsx(Text.Body, {
|
|
6648
|
-
intlMessage: messages$
|
|
6699
|
+
intlMessage: messages$z.confirmationDialogBody
|
|
6649
6700
|
})
|
|
6650
6701
|
});
|
|
6651
6702
|
};
|
|
@@ -6670,11 +6721,11 @@ const NestedAttributeModalPage = props => {
|
|
|
6670
6721
|
children: [jsx(SecondaryButton, {
|
|
6671
6722
|
isDisabled: !formik.dirty,
|
|
6672
6723
|
iconLeft: jsx(RevertIcon, {}),
|
|
6673
|
-
label: formatMessage(messages$
|
|
6724
|
+
label: formatMessage(messages$z.cancelButton),
|
|
6674
6725
|
onClick: formik.resetForm
|
|
6675
6726
|
}), jsx(CustomFormModalPage.FormPrimaryButton, {
|
|
6676
6727
|
isDisabled: !formik.dirty,
|
|
6677
|
-
label: formatMessage(messages$
|
|
6728
|
+
label: formatMessage(messages$z.updateButton),
|
|
6678
6729
|
onClick: formik.handleSubmit
|
|
6679
6730
|
})]
|
|
6680
6731
|
}),
|
|
@@ -6704,19 +6755,19 @@ NestedAttributeModalPage.displayName = 'NestedAttributeModalPage';
|
|
|
6704
6755
|
const MaxNestingLevelReached = () => jsx(FieldLabel, {
|
|
6705
6756
|
title: "",
|
|
6706
6757
|
hint: jsx(Text.Body, {
|
|
6707
|
-
intlMessage:
|
|
6758
|
+
intlMessage: customFieldsMessages.aboveFifthLevelWarning
|
|
6708
6759
|
}),
|
|
6709
6760
|
hintIcon: jsx(WarningIcon, {})
|
|
6710
6761
|
});
|
|
6711
6762
|
MaxNestingLevelReached.displayName = 'MaxNestingLevelReached';
|
|
6712
6763
|
const NestedInputControls = props => {
|
|
6713
|
-
const nextNestingLevel = useContext(NestingLevelContext);
|
|
6764
|
+
const nextNestingLevel = useContext(NestingLevelContext$1);
|
|
6714
6765
|
const _useIntl4 = useIntl(),
|
|
6715
6766
|
formatMessage = _useIntl4.formatMessage;
|
|
6716
6767
|
if (nextNestingLevel >= 6) return jsx(MaxNestingLevelReached, {});
|
|
6717
6768
|
const hasAttributes = props.productType.attributeDefinitions.length > 0;
|
|
6718
6769
|
if (!hasAttributes) return jsx(Text.Body, {
|
|
6719
|
-
intlMessage: messages$
|
|
6770
|
+
intlMessage: messages$z.emptyProductType,
|
|
6720
6771
|
tone: "secondary"
|
|
6721
6772
|
});
|
|
6722
6773
|
return jsxs(Spacings.Inline, {
|
|
@@ -6730,7 +6781,7 @@ const NestedInputControls = props => {
|
|
|
6730
6781
|
children: props.productType.name
|
|
6731
6782
|
}), props.isEmpty && jsx("span", {
|
|
6732
6783
|
children: jsx(Tag, {
|
|
6733
|
-
children: formatMessage(
|
|
6784
|
+
children: formatMessage(customFieldsMessages.emptySetItem)
|
|
6734
6785
|
})
|
|
6735
6786
|
})]
|
|
6736
6787
|
}), jsx(EditButton, {
|
|
@@ -6752,7 +6803,7 @@ const CustomNestedInput = /*#__PURE__*/memo(props => {
|
|
|
6752
6803
|
const parentFormik = useFormikContext();
|
|
6753
6804
|
const showNotification = useShowNotification();
|
|
6754
6805
|
const attributesForm = useModalState();
|
|
6755
|
-
const nestingLevel = useContext(NestingLevelContext);
|
|
6806
|
+
const nestingLevel = useContext(NestingLevelContext$1);
|
|
6756
6807
|
const _useNestedProductType = useNestedProductType(props.fieldDefinition),
|
|
6757
6808
|
productType = _useNestedProductType.productType;
|
|
6758
6809
|
if (!productType) return null;
|
|
@@ -6781,7 +6832,7 @@ const CustomNestedInput = /*#__PURE__*/memo(props => {
|
|
|
6781
6832
|
max: "scale",
|
|
6782
6833
|
children: jsx("div", {
|
|
6783
6834
|
"data-testid": props.name,
|
|
6784
|
-
children: jsx(NestingLevelContext.Provider, {
|
|
6835
|
+
children: jsx(NestingLevelContext$1.Provider, {
|
|
6785
6836
|
value: nestingLevel + 1,
|
|
6786
6837
|
children: jsx(Formik, {
|
|
6787
6838
|
enableReinitialize: true,
|
|
@@ -6792,7 +6843,7 @@ const CustomNestedInput = /*#__PURE__*/memo(props => {
|
|
|
6792
6843
|
if (nestingLevel !== 0) parentFormik.submitForm();else showNotification({
|
|
6793
6844
|
kind: 'success',
|
|
6794
6845
|
domain: DOMAINS.SIDE,
|
|
6795
|
-
text: formatMessage(messages$
|
|
6846
|
+
text: formatMessage(messages$z.attributeUpdateSucceeded)
|
|
6796
6847
|
});
|
|
6797
6848
|
setSubmitting(false);
|
|
6798
6849
|
},
|
|
@@ -6818,6 +6869,7 @@ const CustomNestedInput = /*#__PURE__*/memo(props => {
|
|
|
6818
6869
|
});
|
|
6819
6870
|
});
|
|
6820
6871
|
CustomNestedInput.displayName = 'CustomNestedInput';
|
|
6872
|
+
var CustomNestedInput$1 = CustomNestedInput;
|
|
6821
6873
|
|
|
6822
6874
|
function CustomNumberInput(props) {
|
|
6823
6875
|
const value = props.value ?? '';
|
|
@@ -6895,7 +6947,7 @@ CustomCategoryReferenceInput.displayName = 'CustomCategoryReferenceInput';
|
|
|
6895
6947
|
|
|
6896
6948
|
function CustomChannelReferenceInput(props) {
|
|
6897
6949
|
const value = props.value?.id || '';
|
|
6898
|
-
return jsx(ChannelPickerInput, {
|
|
6950
|
+
return jsx(ChannelPickerInput$1, {
|
|
6899
6951
|
value: value,
|
|
6900
6952
|
name: props.name,
|
|
6901
6953
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -6910,7 +6962,7 @@ function CustomChannelReferenceInput(props) {
|
|
|
6910
6962
|
}
|
|
6911
6963
|
CustomChannelReferenceInput.displayName = 'CustomChannelReferenceInput';
|
|
6912
6964
|
|
|
6913
|
-
var messages$
|
|
6965
|
+
var messages$y = defineMessages({
|
|
6914
6966
|
noProductsFound: {
|
|
6915
6967
|
id: 'Shared.ProductPickerInput.noProductsFound',
|
|
6916
6968
|
description: 'The message to display when no products were found',
|
|
@@ -6963,7 +7015,7 @@ const ProductPickerInput = _ref => {
|
|
|
6963
7015
|
};
|
|
6964
7016
|
}, [formatLocalizedFieldToString]);
|
|
6965
7017
|
const prefixSearchFields = useMemo(() => [`masterData.current.name.${dataLocale}`, 'key'], [dataLocale]);
|
|
6966
|
-
const loadOptions = useLoadOptions({
|
|
7018
|
+
const loadOptions = useLoadOptions$1({
|
|
6967
7019
|
query: GetProductsQuery,
|
|
6968
7020
|
prefixSearchFields
|
|
6969
7021
|
});
|
|
@@ -6984,8 +7036,8 @@ const ProductPickerInput = _ref => {
|
|
|
6984
7036
|
setLoadingError(error);
|
|
6985
7037
|
onError(error);
|
|
6986
7038
|
}), [loadOptions, onError, convertProductToOption]);
|
|
6987
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
6988
|
-
const _useHandlers = useHandlers(onChange),
|
|
7039
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
7040
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
6989
7041
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
6990
7042
|
handleInternalInputChange = _useHandlers2[0],
|
|
6991
7043
|
handleChange = _useHandlers2[1];
|
|
@@ -7001,14 +7053,14 @@ const ProductPickerInput = _ref => {
|
|
|
7001
7053
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
7002
7054
|
return jsx(Constraints.Horizontal, {
|
|
7003
7055
|
max: "scale",
|
|
7004
|
-
children: currentOption.loading ? jsx(CenteredLoadingSpinner, {}) : jsxs(Spacings.Stack, {
|
|
7056
|
+
children: currentOption.loading ? jsx(CenteredLoadingSpinner$1, {}) : jsxs(Spacings.Stack, {
|
|
7005
7057
|
scale: "xs",
|
|
7006
|
-
children: [jsx(CustomFieldTooltip, {
|
|
7058
|
+
children: [jsx(CustomFieldTooltip$1, {
|
|
7007
7059
|
title: tooltipTitle,
|
|
7008
7060
|
children: jsx(AsyncSelectInput, {
|
|
7009
7061
|
id: name,
|
|
7010
7062
|
name: name,
|
|
7011
|
-
placeholder: formatMessage(messages$
|
|
7063
|
+
placeholder: formatMessage(messages$y.placeholder),
|
|
7012
7064
|
loadOptions: loadOptionsDebounced,
|
|
7013
7065
|
defaultOptions: [],
|
|
7014
7066
|
isClearable: isClearable,
|
|
@@ -7022,7 +7074,7 @@ const ProductPickerInput = _ref => {
|
|
|
7022
7074
|
onInputChange: handleInputChange,
|
|
7023
7075
|
onBlur: onBlur,
|
|
7024
7076
|
value: currentOption.data,
|
|
7025
|
-
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$
|
|
7077
|
+
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$y.noProductsFound),
|
|
7026
7078
|
hasError: hasError || isLoadingFailed,
|
|
7027
7079
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
7028
7080
|
menuPortalTarget: document.body,
|
|
@@ -7036,10 +7088,11 @@ const ProductPickerInput = _ref => {
|
|
|
7036
7088
|
});
|
|
7037
7089
|
};
|
|
7038
7090
|
ProductPickerInput.displayName = 'ProductPickerInput';
|
|
7091
|
+
var ProductPickerInput$1 = ProductPickerInput;
|
|
7039
7092
|
|
|
7040
7093
|
function CustomProductReferenceInput(props) {
|
|
7041
7094
|
const value = props.value?.id || '';
|
|
7042
|
-
return jsx(ProductPickerInput, {
|
|
7095
|
+
return jsx(ProductPickerInput$1, {
|
|
7043
7096
|
value: value,
|
|
7044
7097
|
name: props.name,
|
|
7045
7098
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -7057,7 +7110,7 @@ CustomProductReferenceInput.displayName = 'CustomProductReferenceInput';
|
|
|
7057
7110
|
|
|
7058
7111
|
function CustomProductTypeReferenceInput(props) {
|
|
7059
7112
|
const value = props.value?.id || '';
|
|
7060
|
-
return jsx(ProductTypePickerInput, {
|
|
7113
|
+
return jsx(ProductTypePickerInput$1, {
|
|
7061
7114
|
value: value,
|
|
7062
7115
|
name: props.name,
|
|
7063
7116
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -7074,7 +7127,7 @@ CustomProductTypeReferenceInput.displayName = 'CustomProductTypeReferenceInput';
|
|
|
7074
7127
|
|
|
7075
7128
|
function CustomRawIdReferenceInput(props) {
|
|
7076
7129
|
const value = props.value?.id || '';
|
|
7077
|
-
return jsx(CustomFieldTooltip, {
|
|
7130
|
+
return jsx(CustomFieldTooltip$1, {
|
|
7078
7131
|
title: value,
|
|
7079
7132
|
children: jsx(TextInput, {
|
|
7080
7133
|
id: props.name,
|
|
@@ -7092,7 +7145,7 @@ CustomRawIdReferenceInput.displayName = 'CustomRawIdReferenceInput';
|
|
|
7092
7145
|
|
|
7093
7146
|
function CustomStateReferenceInput(props) {
|
|
7094
7147
|
const value = props.value?.id || '';
|
|
7095
|
-
return jsx(StatePickerInput, {
|
|
7148
|
+
return jsx(StatePickerInput$1, {
|
|
7096
7149
|
value: value,
|
|
7097
7150
|
name: props.name,
|
|
7098
7151
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -7144,7 +7197,7 @@ function CustomTextInput(props) {
|
|
|
7144
7197
|
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
7145
7198
|
});
|
|
7146
7199
|
const tooltipValue = isMultiLine ? '' : value;
|
|
7147
|
-
return jsx(CustomFieldTooltip, {
|
|
7200
|
+
return jsx(CustomFieldTooltip$1, {
|
|
7148
7201
|
title: tooltipValue,
|
|
7149
7202
|
children: jsx(InputComponent, {
|
|
7150
7203
|
id: props.name,
|
|
@@ -7223,7 +7276,7 @@ const nonSetComponents = {
|
|
|
7223
7276
|
[CUSTOM_FIELD_TYPES.time]: CustomTimeInput,
|
|
7224
7277
|
[CUSTOM_FIELD_TYPES.datetime]: CustomDateTimeInput,
|
|
7225
7278
|
[CUSTOM_FIELD_TYPES.date]: CustomDateTimeInput,
|
|
7226
|
-
[CUSTOM_FIELD_TYPES.nested]: CustomNestedInput
|
|
7279
|
+
[CUSTOM_FIELD_TYPES.nested]: CustomNestedInput$1
|
|
7227
7280
|
};
|
|
7228
7281
|
const CustomFieldInput = /*#__PURE__*/memo(props => {
|
|
7229
7282
|
const InputComponent = useMemo(() => {
|
|
@@ -7256,8 +7309,9 @@ const CustomFieldInput = /*#__PURE__*/memo(props => {
|
|
|
7256
7309
|
});
|
|
7257
7310
|
});
|
|
7258
7311
|
CustomFieldInput.displayName = 'CustomFieldInput';
|
|
7312
|
+
var CustomFieldInput$1 = CustomFieldInput;
|
|
7259
7313
|
|
|
7260
|
-
var messages$
|
|
7314
|
+
var messages$x = defineMessages({
|
|
7261
7315
|
productReferenceLabel: {
|
|
7262
7316
|
id: 'CustomFieldsLabel.productReferenceLabel',
|
|
7263
7317
|
description: 'Label shown above the product picker input.',
|
|
@@ -7326,7 +7380,7 @@ const CustomFieldsLabelHint = _ref2 => {
|
|
|
7326
7380
|
children: [jsx(WarningIcon, {
|
|
7327
7381
|
size: "medium",
|
|
7328
7382
|
color: "warning"
|
|
7329
|
-
}), jsx(FormattedMessage, _objectSpread$P({}, messages$
|
|
7383
|
+
}), jsx(FormattedMessage, _objectSpread$P({}, messages$x.cartDiscountMoreThan500))]
|
|
7330
7384
|
});
|
|
7331
7385
|
}
|
|
7332
7386
|
return formatLocalizedString(fieldDefinition, {
|
|
@@ -7340,8 +7394,8 @@ function CustomFieldsProductTypeReferenceSubtitle() {
|
|
|
7340
7394
|
formatMessage = _useIntl.formatMessage;
|
|
7341
7395
|
const _usePimStatus = usePimStatus(),
|
|
7342
7396
|
isProjectIndexed = _usePimStatus.isProjectIndexed;
|
|
7343
|
-
if (isProjectIndexed) return formatMessage(messages$
|
|
7344
|
-
return formatMessage(messages$
|
|
7397
|
+
if (isProjectIndexed) return formatMessage(messages$x.productTypeReferenceLabelI);
|
|
7398
|
+
return formatMessage(messages$x.productTypeReferenceLabel);
|
|
7345
7399
|
}
|
|
7346
7400
|
|
|
7347
7401
|
// TODO(pa3): this logic may be misplaced and probably
|
|
@@ -7357,7 +7411,7 @@ function CustomFieldsLabelSubtitle(_ref3) {
|
|
|
7357
7411
|
const referenceTypeId = type.referenceTypeId;
|
|
7358
7412
|
const referenceTypeName = capitalizeFirst(referenceTypeId);
|
|
7359
7413
|
if (_includesInstanceProperty(_context = [SEARCHABLE_REFERENCES.category, SEARCHABLE_REFERENCES.cartDiscount]).call(_context, referenceTypeId)) return referenceTypeName;
|
|
7360
|
-
return referenceTypeId === SEARCHABLE_REFERENCES.product ? formatMessage(messages$
|
|
7414
|
+
return referenceTypeId === SEARCHABLE_REFERENCES.product ? formatMessage(messages$x.productReferenceLabel) : referenceTypeId === SEARCHABLE_REFERENCES.productType ? jsx(CustomFieldsProductTypeReferenceSubtitle, {}) : referenceTypeId === SEARCHABLE_REFERENCES.channel ? formatMessage(messages$x.channelReferenceLabel) : referenceTypeId === SEARCHABLE_REFERENCES.state ? formatMessage(messages$x.stateReferenceLabel) : `${referenceTypeName} ID`;
|
|
7361
7415
|
}
|
|
7362
7416
|
const Portal = props => /*#__PURE__*/ReactDOM.createPortal(props.children, document.body);
|
|
7363
7417
|
var _ref$1 = process.env.NODE_ENV === "production" ? {
|
|
@@ -7375,7 +7429,7 @@ function CustomFieldsCountIndicator(_ref4) {
|
|
|
7375
7429
|
const _useIntl3 = useIntl(),
|
|
7376
7430
|
formatMessage = _useIntl3.formatMessage;
|
|
7377
7431
|
return assignedAttributeGroups?.length > 1 ? jsx(Tooltip, {
|
|
7378
|
-
title: formatMessage(messages$
|
|
7432
|
+
title: formatMessage(messages$x.attributeGroupCountTooltip, {
|
|
7379
7433
|
attributeGroups: _mapInstanceProperty(assignedAttributeGroups).call(assignedAttributeGroups, assignedAttributeGroup => formatLocalizedField(assignedAttributeGroup.nameAllLocales)).join(', '),
|
|
7380
7434
|
count: assignedAttributeGroups.length
|
|
7381
7435
|
}),
|
|
@@ -7430,8 +7484,9 @@ const CustomFieldsLabel = /*#__PURE__*/memo(_ref5 => {
|
|
|
7430
7484
|
});
|
|
7431
7485
|
});
|
|
7432
7486
|
CustomFieldsLabel.displayName = 'CustomFieldsTitle';
|
|
7487
|
+
var CustomFieldsLabel$1 = CustomFieldsLabel;
|
|
7433
7488
|
|
|
7434
|
-
var messages$
|
|
7489
|
+
var messages$w = defineMessages({
|
|
7435
7490
|
referencedProductType: {
|
|
7436
7491
|
id: 'NestedAttributes.referencedProductType',
|
|
7437
7492
|
description: 'Product type referenced hint',
|
|
@@ -7442,7 +7497,7 @@ var messages$s = defineMessages({
|
|
|
7442
7497
|
function ownKeys$O(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7443
7498
|
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(_context = ownKeys$O(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$O(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7444
7499
|
function ProductTypeReference(props) {
|
|
7445
|
-
const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$
|
|
7500
|
+
const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$w.referencedProductType), {}, {
|
|
7446
7501
|
values: {
|
|
7447
7502
|
productTypeName: props.productType.name
|
|
7448
7503
|
}
|
|
@@ -7470,7 +7525,7 @@ function CustomNestedFieldInput(props) {
|
|
|
7470
7525
|
})]
|
|
7471
7526
|
});
|
|
7472
7527
|
if (!productType) return null;
|
|
7473
|
-
const InputComponent = isSet ? CustomInputSet : CustomNestedInput;
|
|
7528
|
+
const InputComponent = isSet ? CustomInputSet : CustomNestedInput$1;
|
|
7474
7529
|
return jsxs(Fragment, {
|
|
7475
7530
|
children: [jsx(ProductTypeReference, {
|
|
7476
7531
|
productType: productType
|
|
@@ -7694,7 +7749,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7694
7749
|
};
|
|
7695
7750
|
return undefined;
|
|
7696
7751
|
};
|
|
7697
|
-
const FieldComponent = isNested(fieldDefinition) ? CustomNestedFieldInput : CustomFieldInput;
|
|
7752
|
+
const FieldComponent = isNested(fieldDefinition) ? CustomNestedFieldInput : CustomFieldInput$1;
|
|
7698
7753
|
const fieldProps = {
|
|
7699
7754
|
name: fieldName,
|
|
7700
7755
|
value: value,
|
|
@@ -7722,7 +7777,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7722
7777
|
"aria-invalid": _Object$keys(fieldErrors ?? {}).length > 0,
|
|
7723
7778
|
"aria-errormessage": `${fieldName}-error`,
|
|
7724
7779
|
id: `${fieldName}-error`,
|
|
7725
|
-
children: [jsx(CustomFieldsLabel, {
|
|
7780
|
+
children: [jsx(CustomFieldsLabel$1, {
|
|
7726
7781
|
name: fieldName,
|
|
7727
7782
|
fieldDefinition: fieldDefinition
|
|
7728
7783
|
}), jsxs(Spacings.Stack, {
|
|
@@ -7730,7 +7785,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7730
7785
|
alignItems: "stretch",
|
|
7731
7786
|
children: [WrapperComponent ? jsx(WrapperComponent, {
|
|
7732
7787
|
children: Field
|
|
7733
|
-
}) : Field, props.renderWarnings && status?.warnings[fieldName] && props.renderCustomWarnings(fieldDefinition), jsx(CustomFieldErrors, {
|
|
7788
|
+
}) : Field, props.renderWarnings && status?.warnings[fieldName] && props.renderCustomWarnings(fieldDefinition), jsx(CustomFieldErrors$1, {
|
|
7734
7789
|
isTouched: isTouched,
|
|
7735
7790
|
errors: fieldErrors
|
|
7736
7791
|
})]
|
|
@@ -7746,6 +7801,7 @@ CustomFieldsInternal.displayName = 'CustomFieldsInternal';
|
|
|
7746
7801
|
CustomFieldsInternal.defaultProps = {
|
|
7747
7802
|
renderCustomWarnings: () => null
|
|
7748
7803
|
};
|
|
7804
|
+
var CustomFieldsInternal$1 = CustomFieldsInternal;
|
|
7749
7805
|
|
|
7750
7806
|
function ownKeys$I(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7751
7807
|
function _objectSpread$I(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context7 = ownKeys$I(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context8 = ownKeys$I(Object(t))).call(_context8, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -7841,7 +7897,7 @@ function ProductAttributes(_ref) {
|
|
|
7841
7897
|
max: "scale",
|
|
7842
7898
|
children: jsx(Spacings.Stack, {
|
|
7843
7899
|
scale: "xl",
|
|
7844
|
-
children: jsx(CustomFieldsInternal, {
|
|
7900
|
+
children: jsx(CustomFieldsInternal$1, {
|
|
7845
7901
|
name: props.name,
|
|
7846
7902
|
isReadOnly: props.isReadOnly,
|
|
7847
7903
|
isDisabled: props.isDisabled,
|
|
@@ -7876,7 +7932,7 @@ function ProductAttributeInput(props) {
|
|
|
7876
7932
|
// Just don't want to go with another several-weeks long refactoring and
|
|
7877
7933
|
// will address this step by step.
|
|
7878
7934
|
return jsx(Formik, {
|
|
7879
|
-
children: jsx(CustomFieldInput, {
|
|
7935
|
+
children: jsx(CustomFieldInput$1, {
|
|
7880
7936
|
value: value,
|
|
7881
7937
|
name: props.name,
|
|
7882
7938
|
isDisabled: props.isDisabled,
|
|
@@ -7962,7 +8018,7 @@ const emptyStoreOption$1 = intl => [{
|
|
|
7962
8018
|
function ProductSelectionsAsyncSelectDropdown(props) {
|
|
7963
8019
|
const intl = useIntl();
|
|
7964
8020
|
const enableExcludingProducts = useFeatureToggle(EXCLUDING_PRODUCTS);
|
|
7965
|
-
const productSelectionsFetcher = useProductSelectionsFetcher({
|
|
8021
|
+
const productSelectionsFetcher = useProductSelectionsFetcher$1({
|
|
7966
8022
|
limit: props.upperProductSelectionsLimit
|
|
7967
8023
|
});
|
|
7968
8024
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
@@ -8018,7 +8074,7 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
8018
8074
|
options: emptyStoreOption$1(intl)
|
|
8019
8075
|
}];
|
|
8020
8076
|
};
|
|
8021
|
-
if (productSelectionsFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
8077
|
+
if (productSelectionsFetcher.isLoading) return jsx(CenteredLoadingSpinner$1, {});
|
|
8022
8078
|
return jsx(AsyncSelectField, {
|
|
8023
8079
|
id: props.id,
|
|
8024
8080
|
name: props.name,
|
|
@@ -8078,7 +8134,7 @@ const mapProductSelectionsToOptions$1 = memoize(function () {
|
|
|
8078
8134
|
function ProductSelectionBasicSelectDropdown(props) {
|
|
8079
8135
|
const intl = useIntl();
|
|
8080
8136
|
const enableExcludingProducts = useFeatureToggle(EXCLUDING_PRODUCTS);
|
|
8081
|
-
const productSelectionsFetcher = useProductSelectionsFetcher({
|
|
8137
|
+
const productSelectionsFetcher = useProductSelectionsFetcher$1({
|
|
8082
8138
|
limit: props.lowerProductSelectionsLimit
|
|
8083
8139
|
});
|
|
8084
8140
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
@@ -8087,7 +8143,7 @@ function ProductSelectionBasicSelectDropdown(props) {
|
|
|
8087
8143
|
})),
|
|
8088
8144
|
projectLanguages = _useApplicationContex.projectLanguages,
|
|
8089
8145
|
dataLocale = _useApplicationContex.dataLocale;
|
|
8090
|
-
if (productSelectionsFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
8146
|
+
if (productSelectionsFetcher.isLoading) return jsx(CenteredLoadingSpinner$1, {});
|
|
8091
8147
|
const productSelections = productSelectionsFetcher.productSelections?.results ?? [];
|
|
8092
8148
|
const filteredProductSelections = _filterInstanceProperty(productSelections).call(productSelections, ps => {
|
|
8093
8149
|
var _context;
|
|
@@ -8146,6 +8202,7 @@ const useProductSelectionsByFieldFetcher = (productSelections, predicateField) =
|
|
|
8146
8202
|
isLoading: productSelectionsQuery.loading
|
|
8147
8203
|
};
|
|
8148
8204
|
};
|
|
8205
|
+
var useProductSelectionsByFieldFetcher$1 = useProductSelectionsByFieldFetcher;
|
|
8149
8206
|
|
|
8150
8207
|
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 } } } };
|
|
8151
8208
|
const mapProductSelectionsToOptions = memoize(_ref => {
|
|
@@ -8183,7 +8240,7 @@ const createQueryVariables$3 = _ref3 => {
|
|
|
8183
8240
|
var _context;
|
|
8184
8241
|
let searchText = _ref3.searchText;
|
|
8185
8242
|
const sanitizedSearchText = sanitize(_trimInstanceProperty(searchText).call(searchText, searchText));
|
|
8186
|
-
const idQuery = isUUID(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
|
|
8243
|
+
const idQuery = isUUID$1(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
|
|
8187
8244
|
const keyQuery = `key = "${sanitizedSearchText}"`;
|
|
8188
8245
|
const searchTextQuery = _filterInstanceProperty(_context = [idQuery, keyQuery]).call(_context, Boolean).join(' or ');
|
|
8189
8246
|
return {
|
|
@@ -8205,7 +8262,7 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
8205
8262
|
})),
|
|
8206
8263
|
projectLanguages = _useApplicationContex.projectLanguages,
|
|
8207
8264
|
dataLocale = _useApplicationContex.dataLocale;
|
|
8208
|
-
const productSelectionsByFieldFetcher = useProductSelectionsByFieldFetcher(props.value, props.renderSelectInputOptionValuesByField);
|
|
8265
|
+
const productSelectionsByFieldFetcher = useProductSelectionsByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField);
|
|
8209
8266
|
const handleLoadOptions = async searchText => {
|
|
8210
8267
|
const _await$client$query = await client.query({
|
|
8211
8268
|
query: ProductSelectionsPickerFetcher,
|
|
@@ -8238,7 +8295,7 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
8238
8295
|
const currentProductSelection = _findInstanceProperty(productionSelectionResults).call(productionSelectionResults, productSelection => productSelection.id === productSelectionId);
|
|
8239
8296
|
props.onChange(currentProductSelection);
|
|
8240
8297
|
};
|
|
8241
|
-
if (productSelectionsByFieldFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
8298
|
+
if (productSelectionsByFieldFetcher.isLoading) return jsx(CenteredLoadingSpinner$1, {});
|
|
8242
8299
|
return jsx(SearchSelectField, {
|
|
8243
8300
|
id: props.id,
|
|
8244
8301
|
name: props.name,
|
|
@@ -8299,7 +8356,7 @@ function ModeSelectInputOption(props) {
|
|
|
8299
8356
|
function ownKeys$F(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8300
8357
|
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(_context = ownKeys$F(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$F(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8301
8358
|
function ProductSelectionsPicker(props) {
|
|
8302
|
-
const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher();
|
|
8359
|
+
const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1();
|
|
8303
8360
|
const components = useMemo(() => {
|
|
8304
8361
|
return {
|
|
8305
8362
|
Option: optionInnerProps => {
|
|
@@ -8316,7 +8373,7 @@ function ProductSelectionsPicker(props) {
|
|
|
8316
8373
|
}
|
|
8317
8374
|
};
|
|
8318
8375
|
}, [props.optionType]);
|
|
8319
|
-
if (productSelectionsTotalFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
8376
|
+
if (productSelectionsTotalFetcher.isLoading) return jsx(CenteredLoadingSpinner$1, {});
|
|
8320
8377
|
const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= props.lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= props.upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
|
|
8321
8378
|
return jsx(Spacings.Stack, {
|
|
8322
8379
|
children: jsx(CustomProductSelectionsPicker, _objectSpread$F(_objectSpread$F({}, props), {}, {
|
|
@@ -8356,6 +8413,7 @@ const RequiredIndicator = _ref => {
|
|
|
8356
8413
|
});
|
|
8357
8414
|
};
|
|
8358
8415
|
RequiredIndicator.displayName = 'RequiredIndicator';
|
|
8416
|
+
var RequiredIndicator$1 = RequiredIndicator;
|
|
8359
8417
|
|
|
8360
8418
|
const ScrollToFieldError = () => {
|
|
8361
8419
|
const formik = useFormikContext();
|
|
@@ -8391,8 +8449,9 @@ const ScrollToFieldError = () => {
|
|
|
8391
8449
|
}, [dataLocale, isValid, submitCount]);
|
|
8392
8450
|
return null;
|
|
8393
8451
|
};
|
|
8452
|
+
var ScrollToFieldError$1 = ScrollToFieldError;
|
|
8394
8453
|
|
|
8395
|
-
var messages$
|
|
8454
|
+
var messages$v = defineMessages({
|
|
8396
8455
|
buttonLabel: {
|
|
8397
8456
|
id: 'SearchInput.buttonLabel',
|
|
8398
8457
|
description: 'Label for "Search" button.',
|
|
@@ -8446,14 +8505,15 @@ const SelectableFieldSearchInput = props => {
|
|
|
8446
8505
|
});
|
|
8447
8506
|
},
|
|
8448
8507
|
onReset: props.onReset,
|
|
8449
|
-
placeholder: props.placeholder ?? intl.formatMessage(messages$
|
|
8508
|
+
placeholder: props.placeholder ?? intl.formatMessage(messages$v.placeholder),
|
|
8450
8509
|
isDisabled: props.disabled
|
|
8451
8510
|
})
|
|
8452
8511
|
});
|
|
8453
8512
|
};
|
|
8454
8513
|
SelectableFieldSearchInput.displayName = 'SelectableFieldSearchInput';
|
|
8514
|
+
var SelectableFieldSearchInput$1 = SelectableFieldSearchInput;
|
|
8455
8515
|
|
|
8456
|
-
var messages$
|
|
8516
|
+
var messages$u = defineMessages({
|
|
8457
8517
|
basicSelectInputPlaceholder: {
|
|
8458
8518
|
id: 'Shared.StoreSelectInput.basicSelectInputPlaceholder',
|
|
8459
8519
|
description: 'The placeholder shown for basic select input',
|
|
@@ -8556,7 +8616,7 @@ const getValueFromOptions$1 = _ref => {
|
|
|
8556
8616
|
return _findInstanceProperty(mappedStoresListOptions).call(mappedStoresListOptions, store => currentlySelectedStores === store.value);
|
|
8557
8617
|
};
|
|
8558
8618
|
const emptyStoreOption = intl => [{
|
|
8559
|
-
label: intl.formatMessage(messages$
|
|
8619
|
+
label: intl.formatMessage(messages$u.asyncSelectDropdownTypeAheadPrompt),
|
|
8560
8620
|
value: undefined,
|
|
8561
8621
|
isDisabled: true
|
|
8562
8622
|
}];
|
|
@@ -8569,7 +8629,7 @@ const StoresAsyncSelectInput = props => {
|
|
|
8569
8629
|
dataLocale = _useApplicationContex.dataLocale,
|
|
8570
8630
|
projectLanguages = _useApplicationContex.projectLanguages;
|
|
8571
8631
|
const keysOfStores = props.allAccessibleStoreKeysThroughDataFencePermissions;
|
|
8572
|
-
const storesListFetcher = useStoresListFetcher({
|
|
8632
|
+
const storesListFetcher = useStoresListFetcher$1({
|
|
8573
8633
|
limit: 500,
|
|
8574
8634
|
offset: 0,
|
|
8575
8635
|
sort: 'createdAt asc',
|
|
@@ -8611,12 +8671,12 @@ const StoresAsyncSelectInput = props => {
|
|
|
8611
8671
|
options: emptyStoreOption(intl)
|
|
8612
8672
|
}];
|
|
8613
8673
|
};
|
|
8614
|
-
if (storesListFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
8674
|
+
if (storesListFetcher.isLoading) return jsx(CenteredLoadingSpinner$1, {});
|
|
8615
8675
|
return jsxs(Fragment, {
|
|
8616
8676
|
children: [jsx(AsyncSelectInput, _objectSpread$E(_objectSpread$E(_objectSpread$E({
|
|
8617
8677
|
id: props.id,
|
|
8618
8678
|
name: props.name,
|
|
8619
|
-
placeholder: intl.formatMessage(messages$
|
|
8679
|
+
placeholder: intl.formatMessage(messages$u.basicSelectInputPlaceholder),
|
|
8620
8680
|
horizontalConstraint: props.horizontalConstraint,
|
|
8621
8681
|
loadOptions: handleLoadOptions,
|
|
8622
8682
|
defaultOptions: true,
|
|
@@ -8658,6 +8718,7 @@ StoresAsyncSelectInput.displayName = 'StoresAsyncSelectInput';
|
|
|
8658
8718
|
StoresAsyncSelectInput.defaultProps = {
|
|
8659
8719
|
shouldFetchProductSelections: false
|
|
8660
8720
|
};
|
|
8721
|
+
var StoresAsyncSelectInput$1 = StoresAsyncSelectInput;
|
|
8661
8722
|
|
|
8662
8723
|
function ownKeys$D(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8663
8724
|
function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$D(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$D(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -8674,7 +8735,7 @@ const StoresBasicSelectInput = props => {
|
|
|
8674
8735
|
dataLocale = _useApplicationContex.dataLocale,
|
|
8675
8736
|
projectLanguages = _useApplicationContex.projectLanguages;
|
|
8676
8737
|
const keysOfStores = props.allAccessibleStoreKeysThroughDataFencePermissions;
|
|
8677
|
-
const storesListFetcher = useStoresListFetcher({
|
|
8738
|
+
const storesListFetcher = useStoresListFetcher$1({
|
|
8678
8739
|
limit: 60,
|
|
8679
8740
|
offset: 0,
|
|
8680
8741
|
sort: 'createdAt asc',
|
|
@@ -8714,12 +8775,12 @@ const StoresBasicSelectInput = props => {
|
|
|
8714
8775
|
});
|
|
8715
8776
|
}
|
|
8716
8777
|
};
|
|
8717
|
-
if (storesListFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
8778
|
+
if (storesListFetcher.isLoading) return jsx(CenteredLoadingSpinner$1, {});
|
|
8718
8779
|
return jsxs(Fragment, {
|
|
8719
8780
|
children: [jsx(SelectInput, _objectSpread$D(_objectSpread$D(_objectSpread$D({
|
|
8720
8781
|
id: props.id,
|
|
8721
8782
|
name: props.name,
|
|
8722
|
-
placeholder: props.placeholder || intl.formatMessage(messages$
|
|
8783
|
+
placeholder: props.placeholder || intl.formatMessage(messages$u.basicSelectInputPlaceholder),
|
|
8723
8784
|
horizontalConstraint: props.horizontalConstraint,
|
|
8724
8785
|
options: mappedStoresListOptions,
|
|
8725
8786
|
isMulti: props.isMulti,
|
|
@@ -8755,6 +8816,7 @@ StoresBasicSelectInput.displayName = 'StoresBasicSelectInput';
|
|
|
8755
8816
|
StoresBasicSelectInput.defaultProps = {
|
|
8756
8817
|
shouldFetchProductSelections: false
|
|
8757
8818
|
};
|
|
8819
|
+
var StoresBasicSelectInput$1 = StoresBasicSelectInput;
|
|
8758
8820
|
|
|
8759
8821
|
var TotalNumberOfStores = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "TotalNumberOfStores" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "totalNumberOfStores" }, name: { kind: "Name", value: "stores" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 76, source: { body: "query TotalNumberOfStores {\n totalNumberOfStores: stores {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8760
8822
|
const useTotalNumberOfStoresFetcher = projectKey => {
|
|
@@ -8770,6 +8832,7 @@ const useTotalNumberOfStoresFetcher = projectKey => {
|
|
|
8770
8832
|
isLoading: totalNumberOfStoresQuery.loading
|
|
8771
8833
|
};
|
|
8772
8834
|
};
|
|
8835
|
+
var useTotalNumberOfStoresFetcher$1 = useTotalNumberOfStoresFetcher;
|
|
8773
8836
|
|
|
8774
8837
|
var FetchStoresByField = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresByField" }, 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: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "storesByField" }, name: { kind: "Name", value: "stores" }, 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" } } }], 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: "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: 473, source: { body: "query FetchStoresByField(\n $where: String!\n $excludeProductSelections: Boolean!\n $limit: Int\n) {\n storesByField: stores(where: $where, limit: $limit) {\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 } } } };
|
|
8775
8838
|
const createQueryVariables$2 = (stores, predicateField, shouldFetchProductSelections) => ({
|
|
@@ -8797,6 +8860,7 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
8797
8860
|
isLoading: storesQuery.loading
|
|
8798
8861
|
};
|
|
8799
8862
|
};
|
|
8863
|
+
var useStoresByFieldFetcher$1 = useStoresByFieldFetcher;
|
|
8800
8864
|
|
|
8801
8865
|
function ownKeys$C(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8802
8866
|
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(_context3 = ownKeys$C(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$C(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -8835,7 +8899,7 @@ const createQueryVariables$1 = _ref => {
|
|
|
8835
8899
|
excludeProductSelections: !shouldFetchProductSelections
|
|
8836
8900
|
};
|
|
8837
8901
|
}
|
|
8838
|
-
const idQuery = isUUID(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
|
|
8902
|
+
const idQuery = isUUID$1(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
|
|
8839
8903
|
const nameQuery = `name(${dataLocale} = "${sanitizedSearchText}")`;
|
|
8840
8904
|
const searchTextQuery = _filterInstanceProperty(_context2 = [idQuery, nameQuery, keyQuery]).call(_context2, Boolean).join(' or ');
|
|
8841
8905
|
return {
|
|
@@ -8878,7 +8942,7 @@ const StoresSearchSelectInput = props => {
|
|
|
8878
8942
|
projectLanguages = _useApplicationContex.projectLanguages;
|
|
8879
8943
|
const intl = useIntl();
|
|
8880
8944
|
const client = useApolloClient();
|
|
8881
|
-
const storesByFieldFetcher = useStoresByFieldFetcher(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, props.shouldFetchProductSelections);
|
|
8945
|
+
const storesByFieldFetcher = useStoresByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, props.shouldFetchProductSelections);
|
|
8882
8946
|
const hasError = AsyncSelectInput.isTouched(props.touched) && hasErrors(props.errors) || props.hasError;
|
|
8883
8947
|
const handleLoadOptions = searchText => {
|
|
8884
8948
|
const extractMatchedStores = client.query({
|
|
@@ -8920,16 +8984,16 @@ const StoresSearchSelectInput = props => {
|
|
|
8920
8984
|
className: styles$9.customLabel,
|
|
8921
8985
|
children: props?.renderLabel && props?.renderLabel
|
|
8922
8986
|
}), jsx("div", {
|
|
8923
|
-
children: intl.formatMessage(inputValue ? messages$
|
|
8987
|
+
children: intl.formatMessage(inputValue ? messages$u.searchSelectInputNoOptionsFoundMessage : messages$u.searchSelectInputNoValueMessage)
|
|
8924
8988
|
})]
|
|
8925
8989
|
});
|
|
8926
8990
|
};
|
|
8927
|
-
if (storesByFieldFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
8991
|
+
if (storesByFieldFetcher.isLoading) return jsx(CenteredLoadingSpinner$1, {});
|
|
8928
8992
|
return jsxs(Fragment, {
|
|
8929
8993
|
children: [jsx(SearchSelectInput, _objectSpread$C(_objectSpread$C({
|
|
8930
8994
|
id: props.id,
|
|
8931
8995
|
name: props.name,
|
|
8932
|
-
placeholder: intl.formatMessage(messages$
|
|
8996
|
+
placeholder: intl.formatMessage(messages$u.searchSelectInputPlaceholder),
|
|
8933
8997
|
horizontalConstraint: props.horizontalConstraint,
|
|
8934
8998
|
loadOptions: loadOptionsDebounced,
|
|
8935
8999
|
defaultOptions: false,
|
|
@@ -8944,7 +9008,7 @@ const StoresSearchSelectInput = props => {
|
|
|
8944
9008
|
}),
|
|
8945
9009
|
onChange: props.onChange,
|
|
8946
9010
|
onBlur: props.onBlur,
|
|
8947
|
-
loadingMessage: intl.formatMessage(messages$
|
|
9011
|
+
loadingMessage: intl.formatMessage(messages$u.searchSelectInputLoadingMessage),
|
|
8948
9012
|
noOptionsMessage: renderNoOptions,
|
|
8949
9013
|
isDisabled: props.isDisabled || storesByFieldFetcher.isLoading,
|
|
8950
9014
|
isReadOnly: props.isReadOnly,
|
|
@@ -8973,6 +9037,7 @@ StoresSearchSelectInput.displayName = 'StoresSearchSelectInput';
|
|
|
8973
9037
|
StoresSearchSelectInput.defaultProps = {
|
|
8974
9038
|
shouldFetchProductSelections: false
|
|
8975
9039
|
};
|
|
9040
|
+
var StoresSearchSelectInput$1 = StoresSearchSelectInput;
|
|
8976
9041
|
|
|
8977
9042
|
function ownKeys$B(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8978
9043
|
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$B(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$B(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -8980,7 +9045,7 @@ var styles$8 = {
|
|
|
8980
9045
|
"customOption": "store-select-input-module__customOption___2SC00"
|
|
8981
9046
|
};
|
|
8982
9047
|
const StoreSelectInput = props => {
|
|
8983
|
-
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher(props.projectKey);
|
|
9048
|
+
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1(props.projectKey);
|
|
8984
9049
|
const components = useMemo(() => {
|
|
8985
9050
|
return {
|
|
8986
9051
|
// eslint-disable-next-line react/display-name
|
|
@@ -8999,8 +9064,8 @@ const StoreSelectInput = props => {
|
|
|
8999
9064
|
}
|
|
9000
9065
|
};
|
|
9001
9066
|
}, [props.optionType, totalNumberOfStoresFetcher.total, props.upperStoresLimit]);
|
|
9002
|
-
if (totalNumberOfStoresFetcher.isLoading) return jsx(CenteredLoadingSpinner, {});
|
|
9003
|
-
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput : StoresSearchSelectInput;
|
|
9067
|
+
if (totalNumberOfStoresFetcher.isLoading) return jsx(CenteredLoadingSpinner$1, {});
|
|
9068
|
+
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput$1 : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput$1 : StoresSearchSelectInput$1;
|
|
9004
9069
|
return jsx(CustomStoreSelectInput, _objectSpread$B(_objectSpread$B({
|
|
9005
9070
|
menuIsOpen: props.menuIsOpen,
|
|
9006
9071
|
placeholder: props.placeholder,
|
|
@@ -9045,6 +9110,7 @@ StoreSelectInput.defaultProps = {
|
|
|
9045
9110
|
optionType: 'double-property',
|
|
9046
9111
|
shouldFetchProductSelections: false
|
|
9047
9112
|
};
|
|
9113
|
+
var StoreSelectInput$1 = StoreSelectInput;
|
|
9048
9114
|
|
|
9049
9115
|
function ownKeys$A(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9050
9116
|
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(_context = ownKeys$A(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$A(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -9061,7 +9127,7 @@ const StoreSelectField = props => {
|
|
|
9061
9127
|
htmlFor: props.id,
|
|
9062
9128
|
hasRequiredIndicator: props.isRequired,
|
|
9063
9129
|
isBold: true
|
|
9064
|
-
}), jsx(StoreSelectInput, _objectSpread$A(_objectSpread$A({
|
|
9130
|
+
}), jsx(StoreSelectInput$1, _objectSpread$A(_objectSpread$A({
|
|
9065
9131
|
projectKey: props.projectKey,
|
|
9066
9132
|
id: props.id,
|
|
9067
9133
|
name: props.name,
|
|
@@ -9099,6 +9165,7 @@ StoreSelectField.defaultProps = {
|
|
|
9099
9165
|
upperStoresLimit: UPPER_STORES_LIMIT,
|
|
9100
9166
|
mappedValueField: 'id'
|
|
9101
9167
|
};
|
|
9168
|
+
var StoreSelectField$1 = StoreSelectField;
|
|
9102
9169
|
|
|
9103
9170
|
function ownKeys$z(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9104
9171
|
function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context5 = ownKeys$z(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context6 = ownKeys$z(Object(t))).call(_context6, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -9118,7 +9185,7 @@ const validateRequired = value => {
|
|
|
9118
9185
|
};
|
|
9119
9186
|
const VALIDATOR_REQUIRED = {
|
|
9120
9187
|
name: 'required',
|
|
9121
|
-
message:
|
|
9188
|
+
message: validationMessages.required,
|
|
9122
9189
|
permanent: true,
|
|
9123
9190
|
validators: {
|
|
9124
9191
|
change(value) {
|
|
@@ -9132,7 +9199,7 @@ const VALIDATOR_REQUIRED = {
|
|
|
9132
9199
|
};
|
|
9133
9200
|
const VALIDATOR_NUMERIC = {
|
|
9134
9201
|
name: 'numeric',
|
|
9135
|
-
message:
|
|
9202
|
+
message: validationMessages.numeric,
|
|
9136
9203
|
permanent: false,
|
|
9137
9204
|
validators: {
|
|
9138
9205
|
change: v => {
|
|
@@ -9147,7 +9214,7 @@ const VALIDATOR_NUMERIC = {
|
|
|
9147
9214
|
};
|
|
9148
9215
|
const VALIDATOR_INTEGER = {
|
|
9149
9216
|
name: 'integer',
|
|
9150
|
-
message:
|
|
9217
|
+
message: validationMessages.integer,
|
|
9151
9218
|
permanent: false,
|
|
9152
9219
|
validators: {
|
|
9153
9220
|
change: v => {
|
|
@@ -9162,7 +9229,7 @@ const VALIDATOR_INTEGER = {
|
|
|
9162
9229
|
};
|
|
9163
9230
|
({
|
|
9164
9231
|
name: 'email',
|
|
9165
|
-
message:
|
|
9232
|
+
message: validationMessages.email,
|
|
9166
9233
|
permanent: false,
|
|
9167
9234
|
validators: {
|
|
9168
9235
|
// Note: it's a bit weird to validate it on every change,
|
|
@@ -9599,7 +9666,7 @@ const CustomFields = props => {
|
|
|
9599
9666
|
css: /*#__PURE__*/css("min-width:", props.isWidthExpanded ? '100%' : customProperties.constraint11, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:CustomFields;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS1maWVsZHMuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWVjIiwiZmlsZSI6ImN1c3RvbS1maWVsZHMuanN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFByb3BUeXBlcyBmcm9tICdwcm9wLXR5cGVzJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IHVzZUZvcm1pa0NvbnRleHQgfSBmcm9tICdmb3JtaWsnO1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcywgU3BhY2luZ3MgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC91aS1raXQnO1xuaW1wb3J0IEN1c3RvbUZpZWxkc0ludGVybmFsIGZyb20gJy4vY3VzdG9tLWZpZWxkcy1pbnRlcm5hbCc7XG5cbmNvbnN0IG5vcENvbnZlcnRlciA9IChmaWVsZE5hbWUsIGZpZWxkVmFsdWUpID0+IGZpZWxkVmFsdWU7XG5cbmNvbnN0IEN1c3RvbUZpZWxkcyA9IChwcm9wcykgPT4ge1xuICBjb25zdCB7IHNldEZpZWxkVmFsdWUgfSA9IHVzZUZvcm1pa0NvbnRleHQoKTtcblxuICAvLyBFbnN1cmUgeW91IHBhc3MgaXNXaWR0aEV4cGFuZGVkPXRydWUgd2hlbiBhZGRpbmcgdGhlIG5ldyBsYXlvdXQgY29tcG9uZW50IHNvIHRoZSBjdXN0b20gZmllbGRzXG4gIC8vIGNhbiBleHBhbmQgdG8gZmlsbCB0aGUgd2lkdGggb2YgdGhlIGxheW91dC5cbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICBjc3M9e2Nzc2BcbiAgICAgICAgbWluLXdpZHRoOiAke3Byb3BzLmlzV2lkdGhFeHBhbmRlZFxuICAgICAgICAgID8gJzEwMCUnXG4gICAgICAgICAgOiBjdXN0b21Qcm9wZXJ0aWVzLmNvbnN0cmFpbnQxMX07XG4gICAgICBgfVxuICAgID5cbiAgICAgIDxTcGFjaW5ncy5TdGFjayBzY2FsZT1cInhsXCI+XG4gICAgICAgIDxDdXN0b21GaWVsZHNJbnRlcm5hbFxuICAgICAgICAgIG5hbWU9e3Byb3BzLm5hbWV9XG4gICAgICAgICAgaXNSZWFkT25seT17cHJvcHMuaXNSZWFkT25seX1cbiAgICAgICAgICBpc0Rpc2FibGVkPXtwcm9wcy5pc0Rpc2FibGVkfVxuICAgICAgICAgIGZpZWxkRGVmaW5pdGlvbnM9e3Byb3BzLmZpZWxkRGVmaW5pdGlvbnN9XG4gICAgICAgICAgc2V0RmllbGRWYWx1ZT17c2V0RmllbGRWYWx1ZX1cbiAgICAgICAgICBpbnB1dFZhbHVlc0NvbnZlcnRlcj17bm9wQ29udmVydGVyfVxuICAgICAgICAgIFdyYXBwZXJDb21wb25lbnQ9e3Byb3BzLldyYXBwZXJDb21wb25lbnR9XG4gICAgICAgIC8+XG4gICAgICA8L1NwYWNpbmdzLlN0YWNrPlxuICAgIDwvZGl2PlxuICApO1xufTtcbkN1c3RvbUZpZWxkcy5kaXNwbGF5TmFtZSA9ICdDdXN0b21GaWVsZHMnO1xuQ3VzdG9tRmllbGRzLnByb3BUeXBlcyA9IHtcbiAgaXNXaWR0aEV4cGFuZGVkOiBQcm9wVHlwZXMuYm9vbCxcbiAgaXNSZWFkT25seTogUHJvcFR5cGVzLmJvb2wsXG4gIGlzRGlzYWJsZWQ6IFByb3BUeXBlcy5ib29sLFxuICBuYW1lOiBQcm9wVHlwZXMuc3RyaW5nLFxuICBmaWVsZERlZmluaXRpb25zOiBQcm9wVHlwZXMuYXJyYXlPZihcbiAgICBQcm9wVHlwZXMuc2hhcGUoe1xuICAgICAgbmFtZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICAgIHJlcXVpcmVkOiBQcm9wVHlwZXMuYm9vbCxcblxuICAgICAgaW5wdXRIaW50OiBQcm9wVHlwZXMuc3RyaW5nLFxuICAgICAgaW5wdXRUaXA6IFByb3BUeXBlcy5vYmplY3QsXG4gICAgICBsYWJlbDogUHJvcFR5cGVzLm9iamVjdE9mKFByb3BUeXBlcy5zdHJpbmcpLFxuXG4gICAgICB0eXBlOiBQcm9wVHlwZXMub25lT2ZUeXBlKFtcbiAgICAgICAgUHJvcFR5cGVzLnNoYXBlKHtcbiAgICAgICAgICB0eXBlOiBQcm9wVHlwZXMuc2hhcGUoe1xuICAgICAgICAgICAgbmFtZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICAgICAgICB9KSxcbiAgICAgICAgfSksXG4gICAgICAgIC8vIFNldFxuICAgICAgICBQcm9wVHlwZXMuc2hhcGUoe1xuICAgICAgICAgIGVsZW1lbnRUeXBlOiBQcm9wVHlwZXMuc2hhcGUoe1xuICAgICAgICAgICAgdHlwZTogUHJvcFR5cGVzLnNoYXBlKHtcbiAgICAgICAgICAgICAgbmFtZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgIH0pLFxuICAgICAgICB9KSxcbiAgICAgIF0pLFxuICAgIH0pXG4gICksXG4gIFdyYXBwZXJDb21wb25lbnQ6IFByb3BUeXBlcy5lbGVtZW50VHlwZSxcbn07XG5cbmV4cG9ydCBkZWZhdWx0IEN1c3RvbUZpZWxkcztcbiJdfQ== */"),
|
|
9600
9667
|
children: jsx(Spacings.Stack, {
|
|
9601
9668
|
scale: "xl",
|
|
9602
|
-
children: jsx(CustomFieldsInternal, {
|
|
9669
|
+
children: jsx(CustomFieldsInternal$1, {
|
|
9603
9670
|
name: props.name,
|
|
9604
9671
|
isReadOnly: props.isReadOnly,
|
|
9605
9672
|
isDisabled: props.isDisabled,
|
|
@@ -9612,6 +9679,7 @@ const CustomFields = props => {
|
|
|
9612
9679
|
});
|
|
9613
9680
|
};
|
|
9614
9681
|
CustomFields.displayName = 'CustomFields';
|
|
9682
|
+
var CustomFields$1 = CustomFields;
|
|
9615
9683
|
|
|
9616
9684
|
function ownKeys$w(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9617
9685
|
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(_context3 = ownKeys$w(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$w(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -9684,12 +9752,12 @@ function validations (formValues, language, languages) {
|
|
|
9684
9752
|
const errors = _reduceInstanceProperty(fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$w(_objectSpread$w({}, acc), {}, {
|
|
9685
9753
|
[fieldDefinition.name]: _objectSpread$w(_objectSpread$w({}, setMissingIfRequired(formValues, fieldDefinition)), setDuplicatedIfSet(formValues, fieldDefinition, language, languages))
|
|
9686
9754
|
}), {});
|
|
9687
|
-
return withoutEmptyErrorsByField(errors);
|
|
9755
|
+
return withoutEmptyErrorsByField$1(errors);
|
|
9688
9756
|
}
|
|
9689
9757
|
|
|
9690
|
-
CustomFields.DndProvider = DndProvider;
|
|
9758
|
+
CustomFields$1.DndProvider = DndProvider;
|
|
9691
9759
|
|
|
9692
|
-
var messages$
|
|
9760
|
+
var messages$t = defineMessages({
|
|
9693
9761
|
customFieldsError: {
|
|
9694
9762
|
id: 'CustomFieldsError.Error',
|
|
9695
9763
|
description: 'The message when there are errors adding custom fields',
|
|
@@ -9704,7 +9772,7 @@ const CustomFieldsErrorTextNotification = props => {
|
|
|
9704
9772
|
return jsxs(Spacings.Stack, {
|
|
9705
9773
|
scale: "s",
|
|
9706
9774
|
children: [jsx(Text.Wrap, {
|
|
9707
|
-
intlMessage: _objectSpread$v({}, messages$
|
|
9775
|
+
intlMessage: _objectSpread$v({}, messages$t.customFieldsError)
|
|
9708
9776
|
}), jsx(Spacings.Stack, {
|
|
9709
9777
|
scale: "xs",
|
|
9710
9778
|
children: _mapInstanceProperty(_context = props.formErrors).call(_context, formError => jsx(Text.Detail, {
|
|
@@ -9715,8 +9783,9 @@ const CustomFieldsErrorTextNotification = props => {
|
|
|
9715
9783
|
});
|
|
9716
9784
|
};
|
|
9717
9785
|
CustomFieldsErrorTextNotification.displayName = 'CustomFieldsErrorTextNotification';
|
|
9786
|
+
var CustomFieldsErrorTextNotification$1 = CustomFieldsErrorTextNotification;
|
|
9718
9787
|
|
|
9719
|
-
var messages$
|
|
9788
|
+
var messages$s = defineMessages({
|
|
9720
9789
|
noCustomFields: {
|
|
9721
9790
|
id: 'CustomTypesSubform.noCustomFields',
|
|
9722
9791
|
description: 'The label when there are no custom fields defined',
|
|
@@ -9870,20 +9939,20 @@ const CustomFieldsInputWrapper = _ref2 => {
|
|
|
9870
9939
|
formValues = _valuesInstanceProperty(_useFormikContext);
|
|
9871
9940
|
const rootFieldName = createRootFieldName(rootFormStateFieldName);
|
|
9872
9941
|
if (!typeDefinitionsExist(typeDefinitions)) {
|
|
9873
|
-
return jsx(FormattedMessage, _objectSpread$t({}, messages$
|
|
9942
|
+
return jsx(FormattedMessage, _objectSpread$t({}, messages$s.noTypes));
|
|
9874
9943
|
}
|
|
9875
9944
|
if (!typeDefinitionSelected(formValues, rootFieldName)) {
|
|
9876
|
-
return jsx(FormattedMessage, _objectSpread$t({}, messages$
|
|
9945
|
+
return jsx(FormattedMessage, _objectSpread$t({}, messages$s.noCustomType));
|
|
9877
9946
|
}
|
|
9878
9947
|
if (!typeDefinitionContainsFieldDefinitions(formValues, rootFieldName)) {
|
|
9879
|
-
return jsx(FormattedMessage, _objectSpread$t({}, messages$
|
|
9948
|
+
return jsx(FormattedMessage, _objectSpread$t({}, messages$s.noCustomFields));
|
|
9880
9949
|
}
|
|
9881
9950
|
if (fieldDefinitionsWithValues(formValues, rootFieldName).length === 0 && isReadOnly && hideEmptyFields) {
|
|
9882
|
-
return jsx(FormattedMessage, _objectSpread$t({}, messages$
|
|
9951
|
+
return jsx(FormattedMessage, _objectSpread$t({}, messages$s.noInputValues));
|
|
9883
9952
|
}
|
|
9884
9953
|
return jsx(Constraints.Horizontal, {
|
|
9885
9954
|
max: "scale",
|
|
9886
|
-
children: jsx(CustomFields, {
|
|
9955
|
+
children: jsx(CustomFields$1, {
|
|
9887
9956
|
isReadOnly: isReadOnly,
|
|
9888
9957
|
name: `${rootFieldName}.fields`,
|
|
9889
9958
|
fieldDefinitions: isReadOnly && hideEmptyFields ? fieldDefinitionsWithValues(formValues, rootFieldName) : getIn(formValues, rootFieldName).type.obj.fieldDefinitions
|
|
@@ -9891,6 +9960,7 @@ const CustomFieldsInputWrapper = _ref2 => {
|
|
|
9891
9960
|
});
|
|
9892
9961
|
};
|
|
9893
9962
|
CustomFieldsInputWrapper.displayName = 'CustomFieldsInputWrapper';
|
|
9963
|
+
var CustomFieldsInputWrapper$1 = CustomFieldsInputWrapper;
|
|
9894
9964
|
|
|
9895
9965
|
function ownKeys$s(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9896
9966
|
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(_context = ownKeys$s(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$s(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -9980,7 +10050,7 @@ const CustomTypeSubform = _ref => {
|
|
|
9980
10050
|
return jsx(CollapsiblePanel, {
|
|
9981
10051
|
header: jsx(CollapsiblePanel.Header, {
|
|
9982
10052
|
isCondensed: isCondensed,
|
|
9983
|
-
children: panelTitle || jsx(FormattedMessage, _objectSpread$s({}, messages$
|
|
10053
|
+
children: panelTitle || jsx(FormattedMessage, _objectSpread$s({}, messages$s.title))
|
|
9984
10054
|
}),
|
|
9985
10055
|
headerControls: typeDefinitions.length > 0 && jsx("div", {
|
|
9986
10056
|
css: /*#__PURE__*/css("min-width:", designTokens.constraint11, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:CustomTypeSubform;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS10eXBlLXN1YmZvcm0uanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBJb0IiLCJmaWxlIjoiY3VzdG9tLXR5cGUtc3ViZm9ybS5qc3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyB1c2VDYWxsYmFjayB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyB1c2VGb3JtaWtDb250ZXh0LCBnZXRJbiB9IGZyb20gJ2Zvcm1payc7XG5pbXBvcnQgeyBGb3JtYXR0ZWRNZXNzYWdlLCB1c2VJbnRsIH0gZnJvbSAncmVhY3QtaW50bCc7XG5pbXBvcnQgeyB1c2VBcHBsaWNhdGlvbkNvbnRleHQgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9hcHBsaWNhdGlvbi1zaGVsbC1jb25uZWN0b3JzJztcbmltcG9ydCB7IGZvcm1hdExvY2FsaXplZFN0cmluZyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL2wxMG4nO1xuaW1wb3J0IHtcbiAgQ29sbGFwc2libGVQYW5lbCxcbiAgU2VsZWN0SW5wdXQsXG4gIGRlc2lnblRva2Vucyxcbn0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvdWkta2l0JztcbmltcG9ydCBDdXN0b21GaWVsZHNJbnB1dFdyYXBwZXIgZnJvbSAnLi9jdXN0b20tZmllbGRzLWlucHV0LXdyYXBwZXInO1xuaW1wb3J0IG1lc3NhZ2VzIGZyb20gJy4vbWVzc2FnZXMnO1xuaW1wb3J0IHsgY3JlYXRlUm9vdEZpZWxkTmFtZSB9IGZyb20gJy4vdXRpbHMnO1xuXG4vKipcbiAqIE1hcHMgdGhlIHR5cGUgZGVmaW5pdGlvbnMgdG8gb3B0aW9ucyBmb3IgdGhlIGRyb3Bkb3duIHNlbGVjdG9yLlxuICovXG5leHBvcnQgY29uc3QgbWFwVHlwZURlZmluaXRpb25zVG9PcHRpb25zID0gKFxuICB0eXBlRGVmaW5pdGlvbnMsXG4gIGxhbmd1YWdlLFxuICBsYW5ndWFnZXMsXG4gIHNlbGVjdGVkVHlwZURlZmluaXRpb25JZFxuKSA9PiB7XG4gIHJldHVybiB0eXBlRGVmaW5pdGlvbnMubWFwKCh0eXBlRGVmaW5pdGlvbikgPT4gKHtcbiAgICBpc0Rpc2FibGVkOlxuICAgICAgc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbklkICYmXG4gICAgICBzZWxlY3RlZFR5cGVEZWZpbml0aW9uSWQgPT09IHR5cGVEZWZpbml0aW9uLnR5cGUuaWQsXG4gICAgdmFsdWU6IHR5cGVEZWZpbml0aW9uLnR5cGUua2V5LFxuICAgIGxhYmVsOiBmb3JtYXRMb2NhbGl6ZWRTdHJpbmcodHlwZURlZmluaXRpb24udHlwZSwge1xuICAgICAga2V5OiAnbmFtZScsXG4gICAgICBsb2NhbGU6IGxhbmd1YWdlLFxuICAgICAgZmFsbGJhY2tPcmRlcjogbGFuZ3VhZ2VzLFxuICAgIH0pLFxuICB9KSk7XG59O1xuXG4vKipcbiAqIENyZWF0ZXMgYSBuZXcgZm9ybSBzdGF0ZSBiYXNlZCBvbiB0aGUgc2VsZWN0ZWQgdHlwZSBkZWZpbml0aW9uIGZyb20gdGhlIGRyb3Bkb3duLlxuICovXG5jb25zdCBjcmVhdGVGb3JtU3RhdGVGcm9tVHlwZURlZmluaXRpb24gPSAoc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbikgPT4ge1xuICByZXR1cm4ge1xuICAgIHR5cGU6IHtcbiAgICAgIGlkOiBzZWxlY3RlZFR5cGVEZWZpbml0aW9uLnR5cGUuaWQsXG4gICAgICBvYmo6IHtcbiAgICAgICAgZmllbGREZWZpbml0aW9uczogc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbi50eXBlLmZpZWxkRGVmaW5pdGlvbnMsXG4gICAgICAgIGtleTogc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbi50eXBlLmtleSxcbiAgICAgIH0sXG4gICAgfSxcbiAgICBmaWVsZHM6IHt9LFxuICB9O1xufTtcblxuY29uc3QgQ3VzdG9tVHlwZVN1YmZvcm0gPSAoe1xuICB0eXBlRGVmaW5pdGlvbnMsXG4gIGlzUmVhZE9ubHksXG4gIGlzQ29uZGVuc2VkLFxuICBoaWRlRW1wdHlGaWVsZHMsXG4gIHJvb3RGb3JtU3RhdGVGaWVsZE5hbWUsXG4gIHBhbmVsVGl0bGUsXG59KSA9PiB7XG4gIGNvbnN0IHtcbiAgICB2YWx1ZXM6IGZvcm1WYWx1ZXMsXG4gICAgc2V0RmllbGRWYWx1ZSxcbiAgICB2YWxpZGF0ZUZvcm0sXG4gICAgaW5pdGlhbFZhbHVlcyxcbiAgfSA9IHVzZUZvcm1pa0NvbnRleHQoKTtcbiAgY29uc3QgeyBmb3JtYXRNZXNzYWdlIH0gPSB1c2VJbnRsKCk7XG4gIGNvbnN0IHsgbGFuZ3VhZ2UsIGxhbmd1YWdlcyB9ID0gdXNlQXBwbGljYXRpb25Db250ZXh0KFxuICAgIChhcHBsaWNhdGlvbkNvbnRleHQpID0+ICh7XG4gICAgICBsYW5ndWFnZTogYXBwbGljYXRpb25Db250ZXh0LmRhdGFMb2NhbGUsXG4gICAgICBsYW5ndWFnZXM6IGFwcGxpY2F0aW9uQ29udGV4dC5wcm9qZWN0Lmxhbmd1YWdlcyxcbiAgICB9KVxuICApO1xuICBjb25zdCByb290RmllbGROYW1lID0gY3JlYXRlUm9vdEZpZWxkTmFtZShyb290Rm9ybVN0YXRlRmllbGROYW1lKTtcblxuICBjb25zdCBoYW5kbGVUeXBlRGVmaW5pdGlvblNlbGVjdCA9IHVzZUNhbGxiYWNrKFxuICAgIChldmVudCkgPT4ge1xuICAgICAgY29uc3Qgc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbiA9IHR5cGVEZWZpbml0aW9ucy5maW5kKFxuICAgICAgICAodHlwZURlZmluaXRpb24pID0+IHR5cGVEZWZpbml0aW9uLnR5cGUua2V5ID09PSBldmVudC50YXJnZXQudmFsdWVcbiAgICAgICk7XG5cbiAgICAgIGlmIChzZWxlY3RlZFR5cGVEZWZpbml0aW9uKSB7XG4gICAgICAgIGNvbnN0IGluaXRpYWxWYWx1ZUN1c3RvbVR5cGUgPSBpbml0aWFsVmFsdWVzW3Jvb3RGaWVsZE5hbWVdO1xuICAgICAgICBjb25zdCBzZWxlY3RlZEN1c3RvbVR5cGVLZXkgPSBzZWxlY3RlZFR5cGVEZWZpbml0aW9uPy50eXBlLmtleTtcblxuICAgICAgICBsZXQgbmV3RmllbGRWYWx1ZTtcblxuICAgICAgICAvKipcbiAgICAgICAgICogSWYgdGhlIHVzZXIgc2VsZWN0cyB0aGUgc2FtZSBjdXN0b20gdHlwZSB0aGF0IHdhcyBhbHJlYWR5IHNlbGVjdGVkLCB3ZSBuZWVkIHRvIHJlc2V0IHRoZSBgY3VzdG9tYCBmaWVsZFxuICAgICAgICAgKiBiYWNrIHRvIGl0cyBpbml0aWFsIHZhbHVlIHRvIGVuc3VyZSB0aGF0IHRoZSBmb3JtIHN0YXRlIGlzIGNvbnNpc3RlbnQgd2l0aCB0aGUgaW5pdGlhbCB2YWx1ZXMuXG4gICAgICAgICAqL1xuICAgICAgICBpZiAoaW5pdGlhbFZhbHVlQ3VzdG9tVHlwZT8udHlwZT8ub2JqPy5rZXkgPT09IHNlbGVjdGVkQ3VzdG9tVHlwZUtleSkge1xuICAgICAgICAgIG5ld0ZpZWxkVmFsdWUgPSBpbml0aWFsVmFsdWVDdXN0b21UeXBlO1xuICAgICAgICAgIC8qKlxuICAgICAgICAgICAqIE90aGVyd2lzZSwgc2V0IHRoZSBgY3VzdG9tYCBmaWVsZCB0byB0aGUgbmV3IGN1c3RvbSB0eXBlIGRlZmluaXRpb24uXG4gICAgICAgICAgICovXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgbmV3RmllbGRWYWx1ZSA9IGNyZWF0ZUZvcm1TdGF0ZUZyb21UeXBlRGVmaW5pdGlvbihcbiAgICAgICAgICAgIHNlbGVjdGVkVHlwZURlZmluaXRpb25cbiAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgc2V0RmllbGRWYWx1ZShyb290RmllbGROYW1lLCBuZXdGaWVsZFZhbHVlKS50aGVuKCgpID0+IHtcbiAgICAgICAgICB2YWxpZGF0ZUZvcm0oKTtcbiAgICAgICAgfSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyBpZiB0aGUgZHJvcGRvd24gc2VsZWN0b3IgaXMgY2xlYXJlZCwgcmVtb3ZlIHRoZSBgY3VzdG9tYCBmaWVsZCBmcm9tIHRoZSBmb3JtIHN0YXRlIGVudGlyZWx5XG4gICAgICAgIHNldEZpZWxkVmFsdWUocm9vdEZpZWxkTmFtZSwgdW5kZWZpbmVkKS50aGVuKCgpID0+IHtcbiAgICAgICAgICB2YWxpZGF0ZUZvcm0oKTtcbiAgICAgICAgfSk7XG4gICAgICB9XG4gICAgfSxcbiAgICBbdHlwZURlZmluaXRpb25zLCBzZXRGaWVsZFZhbHVlLCB2YWxpZGF0ZUZvcm0sIHJvb3RGaWVsZE5hbWVdXG4gICk7XG5cbiAgY29uc3QgdHlwZURlZmluaXRpb25TZWxlY3RlZCA9IChmb3JtVmFsdWVzKSA9PiB7XG4gICAgcmV0dXJuIChcbiAgICAgIGdldEluKGZvcm1WYWx1ZXMsIHJvb3RGaWVsZE5hbWUpPy50eXBlICYmXG4gICAgICBnZXRJbihmb3JtVmFsdWVzLCByb290RmllbGROYW1lKT8udHlwZT8ub2JqXG4gICAgKTtcbiAgfTtcblxuICAvLyBpZiB0aGUgdXNlciBoYXMgcmVhZC1vbmx5IHBlcm1pc3Npb25zLCBlbXB0eSBmaWVsZHMgYXJlIGhpZGRlbiwgYW5kIG5vIHR5cGUgZGVmaW5pdGlvbiBpcyBzZWxlY3RlZCwgaGlkZSB0aGUgY29tcG9uZW50XG4gIGlmIChpc1JlYWRPbmx5ICYmIGhpZGVFbXB0eUZpZWxkcyAmJiAhdHlwZURlZmluaXRpb25TZWxlY3RlZChmb3JtVmFsdWVzKSlcbiAgICByZXR1cm4gbnVsbDtcblxuICByZXR1cm4gKFxuICAgIDxDb2xsYXBzaWJsZVBhbmVsXG4gICAgICBoZWFkZXI9e1xuICAgICAgICA8Q29sbGFwc2libGVQYW5lbC5IZWFkZXIgaXNDb25kZW5zZWQ9e2lzQ29uZGVuc2VkfT5cbiAgICAgICAgICB7cGFuZWxUaXRsZSB8fCA8Rm9ybWF0dGVkTWVzc2FnZSB7Li4ubWVzc2FnZXMudGl0bGV9IC8+fVxuICAgICAgICA8L0NvbGxhcHNpYmxlUGFuZWwuSGVhZGVyPlxuICAgICAgfVxuICAgICAgaGVhZGVyQ29udHJvbHM9e1xuICAgICAgICB0eXBlRGVmaW5pdGlvbnMubGVuZ3RoID4gMCAmJiAoXG4gICAgICAgICAgPGRpdlxuICAgICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICAgIG1pbi13aWR0aDogJHtkZXNpZ25Ub2tlbnMuY29uc3RyYWludDExfTtcbiAgICAgICAgICAgIGB9XG4gICAgICAgICAgPlxuICAgICAgICAgICAgPFNlbGVjdElucHV0XG4gICAgICAgICAgICAgIGlzQ2xlYXJhYmxlXG4gICAgICAgICAgICAgIGRhdGEtdGVzdGlkPVwiY3VzdG9tLXR5cGUtc2VsZWN0XCJcbiAgICAgICAgICAgICAgbmFtZT17YCR7cm9vdEZpZWxkTmFtZX0udHlwZS5vYmoua2V5YH1cbiAgICAgICAgICAgICAgb3B0aW9ucz17bWFwVHlwZURlZmluaXRpb25zVG9PcHRpb25zKFxuICAgICAgICAgICAgICAgIHR5cGVEZWZpbml0aW9ucyxcbiAgICAgICAgICAgICAgICBsYW5ndWFnZSxcbiAgICAgICAgICAgICAgICBsYW5ndWFnZXMsXG5cbiAgICAgICAgICAgICAgICBnZXRJbihmb3JtVmFsdWVzLCByb290RmllbGROYW1lKT8udHlwZT8uaWRcbiAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgdmFsdWU9e2dldEluKGZvcm1WYWx1ZXMsIHJvb3RGaWVsZE5hbWUpPy50eXBlPy5vYmo/LmtleX1cbiAgICAgICAgICAgICAgb25DaGFuZ2U9e2hhbmRsZVR5cGVEZWZpbml0aW9uU2VsZWN0fVxuICAgICAgICAgICAgICBwbGFjZWhvbGRlcj17Zm9ybWF0TWVzc2FnZShtZXNzYWdlcy50eXBlc1BsYWNlaG9sZGVyKX1cbiAgICAgICAgICAgICAgaXNSZWFkT25seT17aXNSZWFkT25seX1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIClcbiAgICAgIH1cbiAgICAgIGhlYWRlckNvbnRyb2xzQWxpZ25tZW50PVwicmlnaHRcIlxuICAgID5cbiAgICAgIDxDdXN0b21GaWVsZHNJbnB1dFdyYXBwZXJcbiAgICAgICAgdHlwZURlZmluaXRpb25zPXt0eXBlRGVmaW5pdGlvbnN9XG4gICAgICAgIGlzUmVhZE9ubHk9e2lzUmVhZE9ubHl9XG4gICAgICAgIGhpZGVFbXB0eUZpZWxkcz17aGlkZUVtcHR5RmllbGRzfVxuICAgICAgICByb290Rm9ybVN0YXRlRmllbGROYW1lPXtyb290Rm9ybVN0YXRlRmllbGROYW1lfVxuICAgICAgLz5cbiAgICA8L0NvbGxhcHNpYmxlUGFuZWw+XG4gICk7XG59O1xuXG5DdXN0b21UeXBlU3ViZm9ybS5kaXNwbGF5TmFtZSA9ICdDdXN0b21UeXBlU3ViZm9ybSc7XG5DdXN0b21UeXBlU3ViZm9ybS5wcm9wVHlwZXMgPSB7XG4gIHR5cGVEZWZpbml0aW9uczogUHJvcFR5cGVzLmFycmF5LmlzUmVxdWlyZWQsXG4gIGlzUmVhZE9ubHk6IFByb3BUeXBlcy5ib29sLFxuICBpc0NvbmRlbnNlZDogUHJvcFR5cGVzLmJvb2wsXG4gIGhpZGVFbXB0eUZpZWxkczogUHJvcFR5cGVzLmJvb2wsXG4gIHJvb3RGb3JtU3RhdGVGaWVsZE5hbWU6IFByb3BUeXBlcy5zdHJpbmcsXG4gIHBhbmVsVGl0bGU6IFByb3BUeXBlcy5ub2RlLFxufTtcblxuZXhwb3J0IGRlZmF1bHQgQ3VzdG9tVHlwZVN1YmZvcm07XG4iXX0= */"),
|
|
@@ -9991,12 +10061,12 @@ const CustomTypeSubform = _ref => {
|
|
|
9991
10061
|
options: mapTypeDefinitionsToOptions(typeDefinitions, language, languages, getIn(formValues, rootFieldName)?.type?.id),
|
|
9992
10062
|
value: getIn(formValues, rootFieldName)?.type?.obj?.key,
|
|
9993
10063
|
onChange: handleTypeDefinitionSelect,
|
|
9994
|
-
placeholder: formatMessage(messages$
|
|
10064
|
+
placeholder: formatMessage(messages$s.typesPlaceholder),
|
|
9995
10065
|
isReadOnly: isReadOnly
|
|
9996
10066
|
})
|
|
9997
10067
|
}),
|
|
9998
10068
|
headerControlsAlignment: "right",
|
|
9999
|
-
children: jsx(CustomFieldsInputWrapper, {
|
|
10069
|
+
children: jsx(CustomFieldsInputWrapper$1, {
|
|
10000
10070
|
typeDefinitions: typeDefinitions,
|
|
10001
10071
|
isReadOnly: isReadOnly,
|
|
10002
10072
|
hideEmptyFields: hideEmptyFields,
|
|
@@ -10005,6 +10075,7 @@ const CustomTypeSubform = _ref => {
|
|
|
10005
10075
|
});
|
|
10006
10076
|
};
|
|
10007
10077
|
CustomTypeSubform.displayName = 'CustomTypeSubform';
|
|
10078
|
+
var CustomTypeSubform$1 = CustomTypeSubform;
|
|
10008
10079
|
|
|
10009
10080
|
const CustomFieldsFormField = _ref => {
|
|
10010
10081
|
let resources = _ref.resources,
|
|
@@ -10026,7 +10097,7 @@ const CustomFieldsFormField = _ref => {
|
|
|
10026
10097
|
return jsx(LoadingSpinner, {});
|
|
10027
10098
|
}
|
|
10028
10099
|
const typeDefinitions = _mapInstanceProperty(_context = customFieldTypeDefinitions.results).call(_context, CustomFieldTypeDefinitionsConnector$1.graphQlDocToForm);
|
|
10029
|
-
return jsx(CustomTypeSubform, {
|
|
10100
|
+
return jsx(CustomTypeSubform$1, {
|
|
10030
10101
|
typeDefinitions: typeDefinitions,
|
|
10031
10102
|
isReadOnly: isReadOnly,
|
|
10032
10103
|
isCondensed: isCondensed,
|
|
@@ -10039,6 +10110,7 @@ const CustomFieldsFormField = _ref => {
|
|
|
10039
10110
|
};
|
|
10040
10111
|
CustomFieldsFormField.createFormStateFromResource = createFormStateFromResource;
|
|
10041
10112
|
CustomFieldsFormField.createGraphQlDocFromFormState = createGraphQlDocFromFormState;
|
|
10113
|
+
var CustomFieldsFormField$1 = CustomFieldsFormField;
|
|
10042
10114
|
|
|
10043
10115
|
/**
|
|
10044
10116
|
* @typedef {object} TPimIndexer
|
|
@@ -10064,6 +10136,7 @@ const defaultValue = {
|
|
|
10064
10136
|
* @type {import('react').Context<TPimIndexer>}
|
|
10065
10137
|
*/
|
|
10066
10138
|
const PimIndexerContext = /*#__PURE__*/createContext(defaultValue);
|
|
10139
|
+
var PimIndexerContext$1 = PimIndexerContext;
|
|
10067
10140
|
|
|
10068
10141
|
var FetchIndicesExist = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchIndicesExist" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indicesExist" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "products" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 191, source: { body: "query FetchIndicesExist {\n indicesExist {\n products {\n searchableIndexExists\n newInProgress\n }\n productTypes {\n searchableIndexExists\n newInProgress\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10069
10142
|
var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
|
|
@@ -10106,7 +10179,7 @@ var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
|
|
|
10106
10179
|
}
|
|
10107
10180
|
};
|
|
10108
10181
|
|
|
10109
|
-
var messages$
|
|
10182
|
+
var messages$r = defineMessages({
|
|
10110
10183
|
indexingSucceed: {
|
|
10111
10184
|
id: 'Products.PimIndexer.Notifications.indexingSucceed',
|
|
10112
10185
|
description: 'Message to be shown to user when PIM successfully finishes initial project indexing.',
|
|
@@ -10212,7 +10285,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10212
10285
|
_this.props.notifications.showNotification({
|
|
10213
10286
|
kind: 'error',
|
|
10214
10287
|
domain: DOMAINS.SIDE,
|
|
10215
|
-
text: _this.props.intl.formatMessage(messages$
|
|
10288
|
+
text: _this.props.intl.formatMessage(messages$r.indexingFailed)
|
|
10216
10289
|
});
|
|
10217
10290
|
};
|
|
10218
10291
|
_this.getIndexingProgress = async () => {
|
|
@@ -10253,7 +10326,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10253
10326
|
_this.props.notifications.showNotification({
|
|
10254
10327
|
kind: 'success',
|
|
10255
10328
|
domain: DOMAINS.SIDE,
|
|
10256
|
-
text: _this.props.intl.formatMessage(messages$
|
|
10329
|
+
text: _this.props.intl.formatMessage(messages$r.indexingSucceed)
|
|
10257
10330
|
},
|
|
10258
10331
|
// because the indexing may take so long, the success notification
|
|
10259
10332
|
// may be dismissed without being seen by the user. Set `dismissAfter`
|
|
@@ -10327,7 +10400,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10327
10400
|
}, {
|
|
10328
10401
|
key: "render",
|
|
10329
10402
|
value: function render() {
|
|
10330
|
-
return jsx(PimIndexerContext.Provider, {
|
|
10403
|
+
return jsx(PimIndexerContext$1.Provider, {
|
|
10331
10404
|
value: _objectSpread$r(_objectSpread$r({}, this.state), {}, {
|
|
10332
10405
|
attemptToRefreshProducts: this.attemptToRefreshProducts,
|
|
10333
10406
|
indexProject: this.indexProject
|
|
@@ -10346,7 +10419,7 @@ var pimIndexerProvider = flowRight(withApplicationContext(applicationContext =>
|
|
|
10346
10419
|
name: 'refreshProductIndicesByIds'
|
|
10347
10420
|
}), graphql(IndexProject, {
|
|
10348
10421
|
name: 'indexProject'
|
|
10349
|
-
}), withApollo, injectIntl, injectNotifications())(PimIndexerProvider);
|
|
10422
|
+
}), withApollo, injectIntl, injectNotifications$1())(PimIndexerProvider);
|
|
10350
10423
|
|
|
10351
10424
|
function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10352
10425
|
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function () { return !!t; })(); }
|
|
@@ -10359,31 +10432,32 @@ let WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
|
10359
10432
|
return _createClass(WithPimIndexer, [{
|
|
10360
10433
|
key: "render",
|
|
10361
10434
|
value: function render() {
|
|
10362
|
-
return jsx(PimIndexerContext.Consumer, {
|
|
10435
|
+
return jsx(PimIndexerContext$1.Consumer, {
|
|
10363
10436
|
children: pimIndexerProps => this.props.children(pimIndexerProps)
|
|
10364
10437
|
});
|
|
10365
10438
|
}
|
|
10366
10439
|
}]);
|
|
10367
10440
|
}(PureComponent);
|
|
10368
10441
|
WithPimIndexer.displayName = 'WithPimIndexer';
|
|
10442
|
+
var WithPimIndexer$1 = WithPimIndexer;
|
|
10369
10443
|
|
|
10370
10444
|
function ownKeys$q(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10371
10445
|
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(_context = ownKeys$q(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$q(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10372
10446
|
var injectPimIndexer = (function () {
|
|
10373
10447
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pimIndexer';
|
|
10374
10448
|
return Component => {
|
|
10375
|
-
const WrappedComponent = props => jsx(WithPimIndexer, {
|
|
10449
|
+
const WrappedComponent = props => jsx(WithPimIndexer$1, {
|
|
10376
10450
|
children: pimIndexerProps => jsx(Component, _objectSpread$q(_objectSpread$q({}, props), {}, {
|
|
10377
10451
|
[propName]: pimIndexerProps
|
|
10378
10452
|
}))
|
|
10379
10453
|
});
|
|
10380
|
-
WrappedComponent.displayName = wrapDisplayName(Component, 'InjectPimIndexer');
|
|
10454
|
+
WrappedComponent.displayName = wrapDisplayName$1(Component, 'InjectPimIndexer');
|
|
10381
10455
|
return WrappedComponent;
|
|
10382
10456
|
};
|
|
10383
10457
|
});
|
|
10384
10458
|
|
|
10385
10459
|
function usePimIndexer() {
|
|
10386
|
-
return useContext(PimIndexerContext);
|
|
10460
|
+
return useContext(PimIndexerContext$1);
|
|
10387
10461
|
}
|
|
10388
10462
|
|
|
10389
10463
|
// eslint-disable-next-line import/prefer-default-export
|
|
@@ -10407,11 +10481,12 @@ const resourcesWithPlatformLimits = _Object$keys(RESOURCES_WITH_PLATFORM_LIMITS)
|
|
|
10407
10481
|
const createQueryVariables = platformLimit => _reduceInstanceProperty(resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$p({
|
|
10408
10482
|
[camelCase(`should include ${nextNameOfLimit}`)]: platformLimit ? nextNameOfLimit === platformLimit : true
|
|
10409
10483
|
}, previousIncludedLimits), {});
|
|
10484
|
+
var createPlatformLimitsQueryVariables = createQueryVariables;
|
|
10410
10485
|
|
|
10411
10486
|
var PlatformLimitsFetcherQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "PlatformLimitsFetcherQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limits" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "lineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "textLineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActive" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActiveWithoutDiscountCodes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventorySupplyChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDistributionChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "maxDivisions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxDepthLimit" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociateRoles" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 2107, source: { body: "query PlatformLimitsFetcherQuery(\n $shouldIncludeShoppingLists: Boolean!\n $shouldIncludeProductDiscounts: Boolean!\n $shouldIncludeCartDiscounts: Boolean!\n $shouldIncludeStores: Boolean!\n $shouldIncludeCustomers: Boolean!\n $shouldIncludeCustomerGroups: Boolean!\n $shouldIncludeZones: Boolean!\n $shouldIncludeTaxCategories: Boolean!\n $shouldIncludeShippingMethods: Boolean!\n $shouldIncludeCarts: Boolean!\n $shouldIncludeBusinessUnits: Boolean!\n) {\n limits {\n shoppingLists @include(if: $shouldIncludeShoppingLists) {\n total {\n limit\n current\n }\n lineItems {\n limit\n }\n textLineItems {\n limit\n }\n }\n productDiscounts @include(if: $shouldIncludeProductDiscounts) {\n totalActive {\n limit\n current\n }\n }\n cartDiscounts @include(if: $shouldIncludeCartDiscounts) {\n totalActiveWithoutDiscountCodes {\n limit\n current\n }\n }\n stores @include(if: $shouldIncludeStores) {\n total {\n limit\n current\n }\n inventorySupplyChannels {\n limit\n }\n productDistributionChannels {\n limit\n }\n }\n customers @include(if: $shouldIncludeCustomers) {\n total {\n limit\n current\n }\n }\n customerGroups @include(if: $shouldIncludeCustomerGroups) {\n total {\n limit\n current\n }\n }\n zones @include(if: $shouldIncludeZones) {\n total {\n limit\n current\n }\n }\n taxCategories @include(if: $shouldIncludeTaxCategories) {\n total {\n limit\n current\n }\n }\n shippingMethods @include(if: $shouldIncludeShippingMethods) {\n total {\n limit\n current\n }\n }\n carts @include(if: $shouldIncludeCarts) {\n total {\n limit\n current\n }\n }\n businessUnits @include(if: $shouldIncludeBusinessUnits) {\n maxDivisions {\n limit\n }\n maxDepthLimit {\n limit\n }\n maxAssociates {\n limit\n }\n maxAssociateRoles {\n limit\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10412
10487
|
const usePlatformLimitsFetcher = platformLimit => {
|
|
10413
10488
|
const _useQuery = useQuery(PlatformLimitsFetcherQuery, {
|
|
10414
|
-
variables:
|
|
10489
|
+
variables: createPlatformLimitsQueryVariables(platformLimit),
|
|
10415
10490
|
context: {
|
|
10416
10491
|
target: GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
10417
10492
|
},
|
|
@@ -10429,6 +10504,7 @@ const usePlatformLimitsFetcher = platformLimit => {
|
|
|
10429
10504
|
refetch
|
|
10430
10505
|
};
|
|
10431
10506
|
};
|
|
10507
|
+
var usePlatformLimitsFetcher$1 = usePlatformLimitsFetcher;
|
|
10432
10508
|
|
|
10433
10509
|
const useLimitsModalState = function () {
|
|
10434
10510
|
let isInitiallyOpen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
@@ -10444,6 +10520,7 @@ const useLimitsModalState = function () {
|
|
|
10444
10520
|
openModal
|
|
10445
10521
|
};
|
|
10446
10522
|
};
|
|
10523
|
+
var useLimitsModalState$1 = useLimitsModalState;
|
|
10447
10524
|
|
|
10448
10525
|
const useInterceptNavigation = hasReachedErrorLimit => {
|
|
10449
10526
|
const _useState = useState(false),
|
|
@@ -10465,8 +10542,9 @@ const useInterceptNavigation = hasReachedErrorLimit => {
|
|
|
10465
10542
|
setPlatformLimitToBeNotExceeded
|
|
10466
10543
|
};
|
|
10467
10544
|
};
|
|
10545
|
+
var useInterceptNavigation$1 = useInterceptNavigation;
|
|
10468
10546
|
|
|
10469
|
-
var messages$
|
|
10547
|
+
var messages$q = defineMessages({
|
|
10470
10548
|
shippingMethods: {
|
|
10471
10549
|
id: 'PlatformLimits.Notifications.shippingMethodsError',
|
|
10472
10550
|
description: 'error message about platform limit exceeded',
|
|
@@ -10506,7 +10584,7 @@ const PlatformLimitErrorNotification = _ref => {
|
|
|
10506
10584
|
limit = _ref.limit;
|
|
10507
10585
|
return jsx(ContentNotification, {
|
|
10508
10586
|
type: "error",
|
|
10509
|
-
children: jsx(FormattedMessage, _objectSpread$o(_objectSpread$o({}, messages$
|
|
10587
|
+
children: jsx(FormattedMessage, _objectSpread$o(_objectSpread$o({}, messages$q[resource]), {}, {
|
|
10510
10588
|
values: {
|
|
10511
10589
|
limit,
|
|
10512
10590
|
customersupport: getCustomerSupportLink$1
|
|
@@ -10518,8 +10596,9 @@ const PlatformLimitErrorNotification = _ref => {
|
|
|
10518
10596
|
});
|
|
10519
10597
|
};
|
|
10520
10598
|
PlatformLimitErrorNotification.displayName = 'PlatformLimitErrorNotification';
|
|
10599
|
+
var Error$1 = PlatformLimitErrorNotification;
|
|
10521
10600
|
|
|
10522
|
-
var messages$
|
|
10601
|
+
var messages$p = defineMessages({
|
|
10523
10602
|
shippingMethods: {
|
|
10524
10603
|
id: 'PlatformLimits.Notifications.shippingMethodsWarning',
|
|
10525
10604
|
description: 'warning message about platform limit exceeded',
|
|
@@ -10559,7 +10638,7 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
10559
10638
|
limit = _ref.limit;
|
|
10560
10639
|
return jsx(ContentNotification, {
|
|
10561
10640
|
type: "warning",
|
|
10562
|
-
children: jsx(FormattedMessage, _objectSpread$n(_objectSpread$n({}, messages$
|
|
10641
|
+
children: jsx(FormattedMessage, _objectSpread$n(_objectSpread$n({}, messages$p[resource]), {}, {
|
|
10563
10642
|
values: {
|
|
10564
10643
|
limit,
|
|
10565
10644
|
customersupport: getCustomerSupportLink
|
|
@@ -10571,11 +10650,13 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
10571
10650
|
});
|
|
10572
10651
|
};
|
|
10573
10652
|
PlatformLimitWarningNotification.displayName = 'PlatformLimitWarningNotification';
|
|
10653
|
+
var Warning = PlatformLimitWarningNotification;
|
|
10574
10654
|
|
|
10575
10655
|
const Notifications = {
|
|
10576
|
-
Warning
|
|
10577
|
-
Error:
|
|
10656
|
+
Warning,
|
|
10657
|
+
Error: Error$1
|
|
10578
10658
|
};
|
|
10659
|
+
var Notifications$1 = Notifications;
|
|
10579
10660
|
|
|
10580
10661
|
function ownKeys$m(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10581
10662
|
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(_context = ownKeys$m(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$m(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -10595,6 +10676,7 @@ const PlatformLimitsStatusText = _ref => {
|
|
|
10595
10676
|
});
|
|
10596
10677
|
};
|
|
10597
10678
|
PlatformLimitsStatusText.displayName = 'PlatformLimitsStatusText';
|
|
10679
|
+
var StatusText = PlatformLimitsStatusText;
|
|
10598
10680
|
|
|
10599
10681
|
const getHasExceededWarningThreshold = _ref => {
|
|
10600
10682
|
let limit = _ref.limit,
|
|
@@ -10621,7 +10703,7 @@ const getPlatformLimitsStatus = _ref3 => {
|
|
|
10621
10703
|
};
|
|
10622
10704
|
|
|
10623
10705
|
const useShippingMethodsPlatformLimitsFetcher = () => {
|
|
10624
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.shippingMethods),
|
|
10706
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.shippingMethods),
|
|
10625
10707
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
10626
10708
|
error = _usePlatformLimitsFet.error,
|
|
10627
10709
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -10633,9 +10715,10 @@ const useShippingMethodsPlatformLimitsFetcher = () => {
|
|
|
10633
10715
|
refetch
|
|
10634
10716
|
};
|
|
10635
10717
|
};
|
|
10718
|
+
var useShippingMethodsPlatformLimitsFetcher$1 = useShippingMethodsPlatformLimitsFetcher;
|
|
10636
10719
|
|
|
10637
|
-
const useShippingMethodsPlatformLimits = () => {
|
|
10638
|
-
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
10720
|
+
const useShippingMethodsPlatformLimits$1 = () => {
|
|
10721
|
+
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
|
|
10639
10722
|
platformLimits = _useShippingMethodsPl.platformLimits;
|
|
10640
10723
|
if (!platformLimits?.shippingMethods?.total) {
|
|
10641
10724
|
return {
|
|
@@ -10659,24 +10742,25 @@ const useShippingMethodsPlatformLimits = () => {
|
|
|
10659
10742
|
hasReachedShippingMethodsErrorLimit
|
|
10660
10743
|
};
|
|
10661
10744
|
};
|
|
10745
|
+
var useShippingMethodsPlatformLimitsStatus = useShippingMethodsPlatformLimits$1;
|
|
10662
10746
|
|
|
10663
10747
|
const PlatformLimitsShippingMethodsNotifications = () => {
|
|
10664
|
-
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
10748
|
+
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
|
|
10665
10749
|
platformLimits = _useShippingMethodsPl.platformLimits;
|
|
10666
|
-
const _useShippingMethodsPl2 =
|
|
10750
|
+
const _useShippingMethodsPl2 = useShippingMethodsPlatformLimitsStatus(),
|
|
10667
10751
|
hasReachedShippingMethodsWarningLimit = _useShippingMethodsPl2.hasReachedShippingMethodsWarningLimit,
|
|
10668
10752
|
hasReachedShippingMethodsErrorLimit = _useShippingMethodsPl2.hasReachedShippingMethodsErrorLimit;
|
|
10669
10753
|
if (!platformLimits?.shippingMethods?.total) {
|
|
10670
10754
|
return null;
|
|
10671
10755
|
}
|
|
10672
10756
|
if (hasReachedShippingMethodsErrorLimit) {
|
|
10673
|
-
return jsx(Notifications.Error, {
|
|
10757
|
+
return jsx(Notifications$1.Error, {
|
|
10674
10758
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.shippingMethods,
|
|
10675
10759
|
limit: platformLimits.shippingMethods.total.limit
|
|
10676
10760
|
});
|
|
10677
10761
|
}
|
|
10678
10762
|
if (hasReachedShippingMethodsWarningLimit) {
|
|
10679
|
-
return jsx(Notifications.Warning, {
|
|
10763
|
+
return jsx(Notifications$1.Warning, {
|
|
10680
10764
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.shippingMethods,
|
|
10681
10765
|
limit: platformLimits.shippingMethods.total.limit
|
|
10682
10766
|
});
|
|
@@ -10684,8 +10768,9 @@ const PlatformLimitsShippingMethodsNotifications = () => {
|
|
|
10684
10768
|
return null;
|
|
10685
10769
|
};
|
|
10686
10770
|
PlatformLimitsShippingMethodsNotifications.displayName = 'PlatformLimitsShippingMethodsNotifications';
|
|
10771
|
+
var ShippingMethodsNotification = PlatformLimitsShippingMethodsNotifications;
|
|
10687
10772
|
|
|
10688
|
-
var messages$
|
|
10773
|
+
var messages$o = defineMessages({
|
|
10689
10774
|
shippingMethodsPlatformLimitReached: {
|
|
10690
10775
|
id: 'PlatformLimits.Tooltip.shippingMethodsLimitReached',
|
|
10691
10776
|
description: 'The message for shipping methods platform limit being reached',
|
|
@@ -10698,12 +10783,13 @@ function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
10698
10783
|
const PlatformLimitsShippingMethodsTooltip = props => {
|
|
10699
10784
|
const intl = useIntl();
|
|
10700
10785
|
return jsx(Tooltip, _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
10701
|
-
title: intl.formatMessage(messages$
|
|
10786
|
+
title: intl.formatMessage(messages$o.shippingMethodsPlatformLimitReached)
|
|
10702
10787
|
}));
|
|
10703
10788
|
};
|
|
10704
10789
|
PlatformLimitsShippingMethodsTooltip.displayName = 'PlatformLimitsShippingMethodsTooltip';
|
|
10790
|
+
var ShippingMethodsTooltip = PlatformLimitsShippingMethodsTooltip;
|
|
10705
10791
|
|
|
10706
|
-
var messages$
|
|
10792
|
+
var messages$n = defineMessages({
|
|
10707
10793
|
shippingMethodsStatus: {
|
|
10708
10794
|
id: 'PlatformLimits.Status.shippingMethods',
|
|
10709
10795
|
description: 'The message for shipping methods platform limit values',
|
|
@@ -10714,12 +10800,12 @@ var messages$j = defineMessages({
|
|
|
10714
10800
|
const PlatformLimitsShippingMethodsStatus = _ref => {
|
|
10715
10801
|
let total = _ref.total;
|
|
10716
10802
|
const intl = useIntl();
|
|
10717
|
-
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
10803
|
+
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
|
|
10718
10804
|
platformLimits = _useShippingMethodsPl.platformLimits;
|
|
10719
10805
|
const current = platformLimits?.shippingMethods?.total?.current;
|
|
10720
10806
|
const limit = platformLimits?.shippingMethods?.total?.limit;
|
|
10721
|
-
return jsx(
|
|
10722
|
-
intlMessage: messages$
|
|
10807
|
+
return jsx(StatusText, {
|
|
10808
|
+
intlMessage: messages$n.shippingMethodsStatus,
|
|
10723
10809
|
children: getPlatformLimitsStatus({
|
|
10724
10810
|
limit,
|
|
10725
10811
|
current,
|
|
@@ -10729,18 +10815,19 @@ const PlatformLimitsShippingMethodsStatus = _ref => {
|
|
|
10729
10815
|
});
|
|
10730
10816
|
};
|
|
10731
10817
|
PlatformLimitsShippingMethodsStatus.displayName = 'PlatformLimitsShippingMethodsStatus';
|
|
10818
|
+
var ShippingMethodsStatus = PlatformLimitsShippingMethodsStatus;
|
|
10732
10819
|
|
|
10733
10820
|
const useShippingMethodsLimits = () => {
|
|
10734
|
-
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
10821
|
+
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
|
|
10735
10822
|
refetch = _useShippingMethodsPl.refetch;
|
|
10736
|
-
const _useShippingMethodsPl2 =
|
|
10823
|
+
const _useShippingMethodsPl2 = useShippingMethodsPlatformLimitsStatus(),
|
|
10737
10824
|
hasReachedShippingMethodsWarningLimit = _useShippingMethodsPl2.hasReachedShippingMethodsWarningLimit,
|
|
10738
10825
|
hasReachedShippingMethodsErrorLimit = _useShippingMethodsPl2.hasReachedShippingMethodsErrorLimit;
|
|
10739
10826
|
return {
|
|
10740
10827
|
ShippingMethodsLimits: {
|
|
10741
|
-
Notifications:
|
|
10742
|
-
Status:
|
|
10743
|
-
Tooltip:
|
|
10828
|
+
Notifications: ShippingMethodsNotification,
|
|
10829
|
+
Status: ShippingMethodsStatus,
|
|
10830
|
+
Tooltip: ShippingMethodsTooltip
|
|
10744
10831
|
},
|
|
10745
10832
|
refetchShippingMethodsPlatformLimits: refetch,
|
|
10746
10833
|
status: {
|
|
@@ -10749,23 +10836,25 @@ const useShippingMethodsLimits = () => {
|
|
|
10749
10836
|
}
|
|
10750
10837
|
};
|
|
10751
10838
|
};
|
|
10839
|
+
var useShippingMethodsPlatformLimits = useShippingMethodsLimits;
|
|
10752
10840
|
|
|
10753
10841
|
function ownKeys$k(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10754
10842
|
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(_context = ownKeys$k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$k(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10755
10843
|
const injectShippingMethodsPlatformLimits = () => WrappedComponent => {
|
|
10756
10844
|
const WithShippingMethodsPlatformLimits = props => {
|
|
10757
|
-
const shippingMethodsPlatformLimits =
|
|
10845
|
+
const shippingMethodsPlatformLimits = useShippingMethodsPlatformLimits();
|
|
10758
10846
|
const shippingMethodsProps = {
|
|
10759
10847
|
platformLimits: shippingMethodsPlatformLimits
|
|
10760
10848
|
};
|
|
10761
10849
|
return jsx(WrappedComponent, _objectSpread$k(_objectSpread$k({}, props), shippingMethodsProps));
|
|
10762
10850
|
};
|
|
10763
|
-
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
10851
|
+
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
10764
10852
|
return WithShippingMethodsPlatformLimits;
|
|
10765
10853
|
};
|
|
10854
|
+
var injectShippingMethodsPlatformLimits$1 = injectShippingMethodsPlatformLimits;
|
|
10766
10855
|
|
|
10767
10856
|
const useTaxCategoriesPlatformLimitsFetcher = () => {
|
|
10768
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.taxCategories),
|
|
10857
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.taxCategories),
|
|
10769
10858
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
10770
10859
|
error = _usePlatformLimitsFet.error,
|
|
10771
10860
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -10777,9 +10866,10 @@ const useTaxCategoriesPlatformLimitsFetcher = () => {
|
|
|
10777
10866
|
refetch
|
|
10778
10867
|
};
|
|
10779
10868
|
};
|
|
10869
|
+
var useTaxCategoriesPlatformLimitsFetcher$1 = useTaxCategoriesPlatformLimitsFetcher;
|
|
10780
10870
|
|
|
10781
|
-
const useTaxCategoriesPlatformLimits = () => {
|
|
10782
|
-
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
10871
|
+
const useTaxCategoriesPlatformLimits$1 = () => {
|
|
10872
|
+
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
|
|
10783
10873
|
platformLimits = _useTaxCategoriesPlat.platformLimits;
|
|
10784
10874
|
if (!platformLimits?.taxCategories?.total) {
|
|
10785
10875
|
return {
|
|
@@ -10803,24 +10893,25 @@ const useTaxCategoriesPlatformLimits = () => {
|
|
|
10803
10893
|
hasReachedTaxCategoriesErrorLimit
|
|
10804
10894
|
};
|
|
10805
10895
|
};
|
|
10896
|
+
var useTaxCategoriesPlatformLimitsStatus = useTaxCategoriesPlatformLimits$1;
|
|
10806
10897
|
|
|
10807
10898
|
const PlatformLimitsTaxCategoriesNotifications = () => {
|
|
10808
|
-
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
10899
|
+
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
|
|
10809
10900
|
platformLimits = _useTaxCategoriesPlat.platformLimits;
|
|
10810
|
-
const _useTaxCategoriesPlat2 =
|
|
10901
|
+
const _useTaxCategoriesPlat2 = useTaxCategoriesPlatformLimitsStatus(),
|
|
10811
10902
|
hasReachedTaxCategoriesWarningLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesWarningLimit,
|
|
10812
10903
|
hasReachedTaxCategoriesErrorLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesErrorLimit;
|
|
10813
10904
|
if (!platformLimits?.taxCategories?.total) {
|
|
10814
10905
|
return null;
|
|
10815
10906
|
}
|
|
10816
10907
|
if (hasReachedTaxCategoriesErrorLimit) {
|
|
10817
|
-
return jsx(Notifications.Error, {
|
|
10908
|
+
return jsx(Notifications$1.Error, {
|
|
10818
10909
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.taxCategories,
|
|
10819
10910
|
limit: platformLimits.taxCategories.total.limit
|
|
10820
10911
|
});
|
|
10821
10912
|
}
|
|
10822
10913
|
if (hasReachedTaxCategoriesWarningLimit) {
|
|
10823
|
-
return jsx(Notifications.Warning, {
|
|
10914
|
+
return jsx(Notifications$1.Warning, {
|
|
10824
10915
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.taxCategories,
|
|
10825
10916
|
limit: platformLimits.taxCategories.total.limit
|
|
10826
10917
|
});
|
|
@@ -10828,8 +10919,9 @@ const PlatformLimitsTaxCategoriesNotifications = () => {
|
|
|
10828
10919
|
return null;
|
|
10829
10920
|
};
|
|
10830
10921
|
PlatformLimitsTaxCategoriesNotifications.displayName = 'PlatformLimitsTaxCategoriesNotifications';
|
|
10922
|
+
var TaxCategoriesNotification = PlatformLimitsTaxCategoriesNotifications;
|
|
10831
10923
|
|
|
10832
|
-
var messages$
|
|
10924
|
+
var messages$m = defineMessages({
|
|
10833
10925
|
taxCategoriesPlatformLimitReached: {
|
|
10834
10926
|
id: 'PlatformLimits.Tooltip.taxCategoriesLimitReached',
|
|
10835
10927
|
description: 'The message for tax categories platform limit being reached',
|
|
@@ -10842,12 +10934,13 @@ function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
10842
10934
|
const PlatformLimitsTaxCategoriesTooltip = props => {
|
|
10843
10935
|
const intl = useIntl();
|
|
10844
10936
|
return jsx(Tooltip, _objectSpread$j(_objectSpread$j({}, props), {}, {
|
|
10845
|
-
title: intl.formatMessage(messages$
|
|
10937
|
+
title: intl.formatMessage(messages$m.taxCategoriesPlatformLimitReached)
|
|
10846
10938
|
}));
|
|
10847
10939
|
};
|
|
10848
10940
|
PlatformLimitsTaxCategoriesTooltip.displayName = 'PlatformLimitsTaxCategoriesTooltip';
|
|
10941
|
+
var TaxCategoriesTooltip = PlatformLimitsTaxCategoriesTooltip;
|
|
10849
10942
|
|
|
10850
|
-
var messages$
|
|
10943
|
+
var messages$l = defineMessages({
|
|
10851
10944
|
taxCategoriesStatus: {
|
|
10852
10945
|
id: 'PlatformLimits.Status.taxCategories',
|
|
10853
10946
|
description: 'The message for tax categories platform limit values',
|
|
@@ -10858,12 +10951,12 @@ var messages$h = defineMessages({
|
|
|
10858
10951
|
const PlatformLimitsTaxCategoriesStatus = _ref => {
|
|
10859
10952
|
let total = _ref.total;
|
|
10860
10953
|
const intl = useIntl();
|
|
10861
|
-
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
10954
|
+
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
|
|
10862
10955
|
platformLimits = _useTaxCategoriesPlat.platformLimits;
|
|
10863
10956
|
const current = platformLimits?.taxCategories?.total?.current;
|
|
10864
10957
|
const limit = platformLimits?.taxCategories?.total?.limit;
|
|
10865
|
-
return jsx(
|
|
10866
|
-
intlMessage: messages$
|
|
10958
|
+
return jsx(StatusText, {
|
|
10959
|
+
intlMessage: messages$l.taxCategoriesStatus,
|
|
10867
10960
|
children: getPlatformLimitsStatus({
|
|
10868
10961
|
limit,
|
|
10869
10962
|
current,
|
|
@@ -10873,18 +10966,19 @@ const PlatformLimitsTaxCategoriesStatus = _ref => {
|
|
|
10873
10966
|
});
|
|
10874
10967
|
};
|
|
10875
10968
|
PlatformLimitsTaxCategoriesStatus.displayName = 'PlatformLimitsTaxCategoriesStatus';
|
|
10969
|
+
var TaxCategoriesStatus = PlatformLimitsTaxCategoriesStatus;
|
|
10876
10970
|
|
|
10877
10971
|
const useTaxCategoriesLimits = () => {
|
|
10878
|
-
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
10972
|
+
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
|
|
10879
10973
|
refetch = _useTaxCategoriesPlat.refetch;
|
|
10880
|
-
const _useTaxCategoriesPlat2 =
|
|
10974
|
+
const _useTaxCategoriesPlat2 = useTaxCategoriesPlatformLimitsStatus(),
|
|
10881
10975
|
hasReachedTaxCategoriesWarningLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesWarningLimit,
|
|
10882
10976
|
hasReachedTaxCategoriesErrorLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesErrorLimit;
|
|
10883
10977
|
return {
|
|
10884
10978
|
TaxCategoriesLimits: {
|
|
10885
|
-
Notifications:
|
|
10886
|
-
Status:
|
|
10887
|
-
Tooltip:
|
|
10979
|
+
Notifications: TaxCategoriesNotification,
|
|
10980
|
+
Status: TaxCategoriesStatus,
|
|
10981
|
+
Tooltip: TaxCategoriesTooltip
|
|
10888
10982
|
},
|
|
10889
10983
|
refetchTaxCategoriesPlatformLimits: refetch,
|
|
10890
10984
|
status: {
|
|
@@ -10893,23 +10987,25 @@ const useTaxCategoriesLimits = () => {
|
|
|
10893
10987
|
}
|
|
10894
10988
|
};
|
|
10895
10989
|
};
|
|
10990
|
+
var useTaxCategoriesPlatformLimits = useTaxCategoriesLimits;
|
|
10896
10991
|
|
|
10897
10992
|
function ownKeys$i(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10898
10993
|
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(_context = ownKeys$i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$i(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10899
10994
|
const injectTaxCategoriesPlatformLimits = WrappedComponent => {
|
|
10900
10995
|
const WithTaxCategoriesPlatformLimits = props => {
|
|
10901
|
-
const taxCategoriesPlatformLimits =
|
|
10996
|
+
const taxCategoriesPlatformLimits = useTaxCategoriesPlatformLimits();
|
|
10902
10997
|
const taxCategoriesProps = {
|
|
10903
10998
|
platformLimits: taxCategoriesPlatformLimits
|
|
10904
10999
|
};
|
|
10905
11000
|
return jsx(WrappedComponent, _objectSpread$i(_objectSpread$i({}, props), taxCategoriesProps));
|
|
10906
11001
|
};
|
|
10907
|
-
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
11002
|
+
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
10908
11003
|
return WithTaxCategoriesPlatformLimits;
|
|
10909
11004
|
};
|
|
11005
|
+
var injectTaxCategoriesPlatformLimits$1 = injectTaxCategoriesPlatformLimits;
|
|
10910
11006
|
|
|
10911
11007
|
const useZonesPlatformLimitsFetcher = () => {
|
|
10912
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.zones),
|
|
11008
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.zones),
|
|
10913
11009
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
10914
11010
|
error = _usePlatformLimitsFet.error,
|
|
10915
11011
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -10921,9 +11017,10 @@ const useZonesPlatformLimitsFetcher = () => {
|
|
|
10921
11017
|
refetch
|
|
10922
11018
|
};
|
|
10923
11019
|
};
|
|
11020
|
+
var useZonesPlatformLimitsFetcher$1 = useZonesPlatformLimitsFetcher;
|
|
10924
11021
|
|
|
10925
|
-
const useZonesPlatformLimits = () => {
|
|
10926
|
-
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
11022
|
+
const useZonesPlatformLimits$1 = () => {
|
|
11023
|
+
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
|
|
10927
11024
|
platformLimits = _useZonesPlatformLimi.platformLimits;
|
|
10928
11025
|
if (!platformLimits?.zones?.total) {
|
|
10929
11026
|
return {
|
|
@@ -10947,24 +11044,25 @@ const useZonesPlatformLimits = () => {
|
|
|
10947
11044
|
hasReachedZonesErrorLimit
|
|
10948
11045
|
};
|
|
10949
11046
|
};
|
|
11047
|
+
var useZonesPlatformLimitsStatus = useZonesPlatformLimits$1;
|
|
10950
11048
|
|
|
10951
11049
|
const PlatformLimitsZonesNotifications = () => {
|
|
10952
|
-
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
11050
|
+
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
|
|
10953
11051
|
platformLimits = _useZonesPlatformLimi.platformLimits;
|
|
10954
|
-
const _useZonesPlatformLimi2 =
|
|
11052
|
+
const _useZonesPlatformLimi2 = useZonesPlatformLimitsStatus(),
|
|
10955
11053
|
hasReachedZonesWarningLimit = _useZonesPlatformLimi2.hasReachedZonesWarningLimit,
|
|
10956
11054
|
hasReachedZonesErrorLimit = _useZonesPlatformLimi2.hasReachedZonesErrorLimit;
|
|
10957
11055
|
if (!platformLimits?.zones?.total) {
|
|
10958
11056
|
return null;
|
|
10959
11057
|
}
|
|
10960
11058
|
if (hasReachedZonesErrorLimit) {
|
|
10961
|
-
return jsx(Notifications.Error, {
|
|
11059
|
+
return jsx(Notifications$1.Error, {
|
|
10962
11060
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.zones,
|
|
10963
11061
|
limit: platformLimits.zones.total.limit
|
|
10964
11062
|
});
|
|
10965
11063
|
}
|
|
10966
11064
|
if (hasReachedZonesWarningLimit) {
|
|
10967
|
-
return jsx(Notifications.Warning, {
|
|
11065
|
+
return jsx(Notifications$1.Warning, {
|
|
10968
11066
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.zones,
|
|
10969
11067
|
limit: platformLimits.zones.total.limit
|
|
10970
11068
|
});
|
|
@@ -10972,8 +11070,9 @@ const PlatformLimitsZonesNotifications = () => {
|
|
|
10972
11070
|
return null;
|
|
10973
11071
|
};
|
|
10974
11072
|
PlatformLimitsZonesNotifications.displayName = 'PlatformLimitsZonesNotifications';
|
|
11073
|
+
var ZonesNotification = PlatformLimitsZonesNotifications;
|
|
10975
11074
|
|
|
10976
|
-
var messages$
|
|
11075
|
+
var messages$k = defineMessages({
|
|
10977
11076
|
zonesPlatformLimitReached: {
|
|
10978
11077
|
id: 'PlatformLimits.Tooltip.zonesLimitReached',
|
|
10979
11078
|
description: 'The message for zones platform limit being reached',
|
|
@@ -10986,12 +11085,13 @@ function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
10986
11085
|
const PlatformLimitsZonesTooltip = props => {
|
|
10987
11086
|
const intl = useIntl();
|
|
10988
11087
|
return jsx(Tooltip, _objectSpread$h(_objectSpread$h({}, props), {}, {
|
|
10989
|
-
title: intl.formatMessage(messages$
|
|
11088
|
+
title: intl.formatMessage(messages$k.zonesPlatformLimitReached)
|
|
10990
11089
|
}));
|
|
10991
11090
|
};
|
|
10992
11091
|
PlatformLimitsZonesTooltip.displayName = 'PlatformLimitsZonesTooltip';
|
|
11092
|
+
var ZonesTooltip = PlatformLimitsZonesTooltip;
|
|
10993
11093
|
|
|
10994
|
-
var messages$
|
|
11094
|
+
var messages$j = defineMessages({
|
|
10995
11095
|
zonesStatus: {
|
|
10996
11096
|
id: 'PlatformLimits.Status.zones',
|
|
10997
11097
|
description: 'The message for zones platform limit values',
|
|
@@ -11002,12 +11102,12 @@ var messages$f = defineMessages({
|
|
|
11002
11102
|
const PlatformLimitsZonesStatus = _ref => {
|
|
11003
11103
|
let total = _ref.total;
|
|
11004
11104
|
const intl = useIntl();
|
|
11005
|
-
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
11105
|
+
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
|
|
11006
11106
|
platformLimits = _useZonesPlatformLimi.platformLimits;
|
|
11007
11107
|
const current = platformLimits?.zones?.total?.current;
|
|
11008
11108
|
const limit = platformLimits?.zones?.total?.limit;
|
|
11009
|
-
return jsx(
|
|
11010
|
-
intlMessage: messages$
|
|
11109
|
+
return jsx(StatusText, {
|
|
11110
|
+
intlMessage: messages$j.zonesStatus,
|
|
11011
11111
|
children: getPlatformLimitsStatus({
|
|
11012
11112
|
limit,
|
|
11013
11113
|
current,
|
|
@@ -11017,18 +11117,19 @@ const PlatformLimitsZonesStatus = _ref => {
|
|
|
11017
11117
|
});
|
|
11018
11118
|
};
|
|
11019
11119
|
PlatformLimitsZonesStatus.displayName = 'PlatformLimitsZonesStatus';
|
|
11120
|
+
var ZonesStatus = PlatformLimitsZonesStatus;
|
|
11020
11121
|
|
|
11021
11122
|
const useZonesLimits = () => {
|
|
11022
|
-
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
11123
|
+
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
|
|
11023
11124
|
refetch = _useZonesPlatformLimi.refetch;
|
|
11024
|
-
const _useZonesPlatformLimi2 =
|
|
11125
|
+
const _useZonesPlatformLimi2 = useZonesPlatformLimitsStatus(),
|
|
11025
11126
|
hasReachedZonesWarningLimit = _useZonesPlatformLimi2.hasReachedZonesWarningLimit,
|
|
11026
11127
|
hasReachedZonesErrorLimit = _useZonesPlatformLimi2.hasReachedZonesErrorLimit;
|
|
11027
11128
|
return {
|
|
11028
11129
|
ZonesLimits: {
|
|
11029
|
-
Notifications:
|
|
11030
|
-
Status:
|
|
11031
|
-
Tooltip:
|
|
11130
|
+
Notifications: ZonesNotification,
|
|
11131
|
+
Status: ZonesStatus,
|
|
11132
|
+
Tooltip: ZonesTooltip
|
|
11032
11133
|
},
|
|
11033
11134
|
refetchZonesPlatformLimits: refetch,
|
|
11034
11135
|
status: {
|
|
@@ -11037,23 +11138,25 @@ const useZonesLimits = () => {
|
|
|
11037
11138
|
}
|
|
11038
11139
|
};
|
|
11039
11140
|
};
|
|
11141
|
+
var useZonesPlatformLimits = useZonesLimits;
|
|
11040
11142
|
|
|
11041
11143
|
function ownKeys$g(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11042
11144
|
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(_context = ownKeys$g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$g(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11043
11145
|
const injectZonesPlatformLimits = () => WrappedComponent => {
|
|
11044
11146
|
const WithZonesPlatformLimits = props => {
|
|
11045
|
-
const zonesPlatformLimits =
|
|
11147
|
+
const zonesPlatformLimits = useZonesPlatformLimits();
|
|
11046
11148
|
const zonesProps = {
|
|
11047
11149
|
platformLimits: zonesPlatformLimits
|
|
11048
11150
|
};
|
|
11049
11151
|
return jsx(WrappedComponent, _objectSpread$g(_objectSpread$g({}, props), zonesProps));
|
|
11050
11152
|
};
|
|
11051
|
-
WithZonesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithZonesPlatformLimits');
|
|
11153
|
+
WithZonesPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithZonesPlatformLimits');
|
|
11052
11154
|
return WithZonesPlatformLimits;
|
|
11053
11155
|
};
|
|
11156
|
+
var injectZonesPlatformLimits$1 = injectZonesPlatformLimits;
|
|
11054
11157
|
|
|
11055
11158
|
const useCustomersPlatformLimitsFetcher = () => {
|
|
11056
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.customers),
|
|
11159
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.customers),
|
|
11057
11160
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
11058
11161
|
error = _usePlatformLimitsFet.error,
|
|
11059
11162
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -11065,9 +11168,10 @@ const useCustomersPlatformLimitsFetcher = () => {
|
|
|
11065
11168
|
refetch
|
|
11066
11169
|
};
|
|
11067
11170
|
};
|
|
11171
|
+
var useCustomersPlatformLimitsFetcher$1 = useCustomersPlatformLimitsFetcher;
|
|
11068
11172
|
|
|
11069
|
-
const useCustomersPlatformLimits$
|
|
11070
|
-
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher(),
|
|
11173
|
+
const useCustomersPlatformLimits$2 = () => {
|
|
11174
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
11071
11175
|
platformLimits = _useCustomersPlatform.platformLimits;
|
|
11072
11176
|
if (!platformLimits?.customers?.total) {
|
|
11073
11177
|
return {
|
|
@@ -11091,10 +11195,11 @@ const useCustomersPlatformLimits$1 = () => {
|
|
|
11091
11195
|
hasReachedCustomersErrorLimit
|
|
11092
11196
|
};
|
|
11093
11197
|
};
|
|
11198
|
+
var useCustomersPlatformLimitsStatus = useCustomersPlatformLimits$2;
|
|
11094
11199
|
|
|
11095
11200
|
const useCustomersPlatormLimitsModalState = () => {
|
|
11096
|
-
const customersPlatformLimitsStatus =
|
|
11097
|
-
const limitsModalState = useLimitsModalState(false);
|
|
11201
|
+
const customersPlatformLimitsStatus = useCustomersPlatformLimitsStatus();
|
|
11202
|
+
const limitsModalState = useLimitsModalState$1(false);
|
|
11098
11203
|
useEffect(() => {
|
|
11099
11204
|
if (customersPlatformLimitsStatus.hasReachedCustomersErrorLimit) {
|
|
11100
11205
|
limitsModalState.openModal();
|
|
@@ -11104,24 +11209,25 @@ const useCustomersPlatormLimitsModalState = () => {
|
|
|
11104
11209
|
isModalOpen: limitsModalState.isModalOpen
|
|
11105
11210
|
};
|
|
11106
11211
|
};
|
|
11212
|
+
var useCustomersPlatormLimitsModalState$1 = useCustomersPlatormLimitsModalState;
|
|
11107
11213
|
|
|
11108
11214
|
const PlatformLimitsCustomersNotifications = () => {
|
|
11109
|
-
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher(),
|
|
11215
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
11110
11216
|
platformLimits = _useCustomersPlatform.platformLimits;
|
|
11111
|
-
const _useCustomersPlatform2 =
|
|
11217
|
+
const _useCustomersPlatform2 = useCustomersPlatformLimitsStatus(),
|
|
11112
11218
|
hasReachedCustomersWarningLimit = _useCustomersPlatform2.hasReachedCustomersWarningLimit,
|
|
11113
11219
|
hasReachedCustomersErrorLimit = _useCustomersPlatform2.hasReachedCustomersErrorLimit;
|
|
11114
11220
|
if (!platformLimits?.customers?.total) {
|
|
11115
11221
|
return jsx("div", {});
|
|
11116
11222
|
}
|
|
11117
11223
|
if (hasReachedCustomersErrorLimit) {
|
|
11118
|
-
return jsx(Notifications.Error, {
|
|
11224
|
+
return jsx(Notifications$1.Error, {
|
|
11119
11225
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.customers,
|
|
11120
11226
|
limit: platformLimits.customers.total.limit
|
|
11121
11227
|
});
|
|
11122
11228
|
}
|
|
11123
11229
|
if (hasReachedCustomersWarningLimit) {
|
|
11124
|
-
return jsx(Notifications.Warning, {
|
|
11230
|
+
return jsx(Notifications$1.Warning, {
|
|
11125
11231
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.customers,
|
|
11126
11232
|
limit: platformLimits.customers.total.limit
|
|
11127
11233
|
});
|
|
@@ -11129,8 +11235,9 @@ const PlatformLimitsCustomersNotifications = () => {
|
|
|
11129
11235
|
return jsx("div", {});
|
|
11130
11236
|
};
|
|
11131
11237
|
PlatformLimitsCustomersNotifications.displayName = 'PlatformLimitsCustomersNotifications';
|
|
11238
|
+
var CustomersNotification = PlatformLimitsCustomersNotifications;
|
|
11132
11239
|
|
|
11133
|
-
var messages$
|
|
11240
|
+
var messages$i = defineMessages({
|
|
11134
11241
|
customersPlatformLimitReached: {
|
|
11135
11242
|
id: 'PlatformLimits.Tooltip.customersLimitReached',
|
|
11136
11243
|
description: 'The message for customers platform limit being reached',
|
|
@@ -11143,12 +11250,13 @@ function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
11143
11250
|
const PlatformLimitsCustomersTooltip = props => {
|
|
11144
11251
|
const intl = useIntl();
|
|
11145
11252
|
return jsx(Tooltip, _objectSpread$f(_objectSpread$f({}, props), {}, {
|
|
11146
|
-
title: intl.formatMessage(messages$
|
|
11253
|
+
title: intl.formatMessage(messages$i.customersPlatformLimitReached)
|
|
11147
11254
|
}));
|
|
11148
11255
|
};
|
|
11149
11256
|
PlatformLimitsCustomersTooltip.displayName = 'PlatformLimitsCustomersTooltip';
|
|
11257
|
+
var CustomersTooltip = PlatformLimitsCustomersTooltip;
|
|
11150
11258
|
|
|
11151
|
-
var messages$
|
|
11259
|
+
var messages$h = defineMessages({
|
|
11152
11260
|
customersStatus: {
|
|
11153
11261
|
id: 'PlatformLimits.Status.customers',
|
|
11154
11262
|
description: 'The message for customers platform limit values',
|
|
@@ -11163,7 +11271,7 @@ var styles$6 = {
|
|
|
11163
11271
|
};
|
|
11164
11272
|
const PlatformLimitsCustomersStatus = () => {
|
|
11165
11273
|
const intl = useIntl();
|
|
11166
|
-
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher(),
|
|
11274
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
11167
11275
|
platformLimits = _useCustomersPlatform.platformLimits;
|
|
11168
11276
|
if (!platformLimits?.customers?.total) {
|
|
11169
11277
|
return null;
|
|
@@ -11176,7 +11284,7 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
11176
11284
|
children: jsx(Text.Detail, {
|
|
11177
11285
|
tone: "secondary",
|
|
11178
11286
|
isInline: true,
|
|
11179
|
-
intlMessage: _objectSpread$e(_objectSpread$e({}, messages$
|
|
11287
|
+
intlMessage: _objectSpread$e(_objectSpread$e({}, messages$h.customersStatus), {}, {
|
|
11180
11288
|
values: {
|
|
11181
11289
|
current: intl.formatNumber(current),
|
|
11182
11290
|
limit: intl.formatNumber(limit)
|
|
@@ -11186,8 +11294,9 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
11186
11294
|
});
|
|
11187
11295
|
};
|
|
11188
11296
|
PlatformLimitsCustomersStatus.displayName = 'PlatformLimitsCustomersStatus';
|
|
11297
|
+
var CustomersStatus = PlatformLimitsCustomersStatus;
|
|
11189
11298
|
|
|
11190
|
-
var messages$
|
|
11299
|
+
var messages$g = defineMessages({
|
|
11191
11300
|
title: {
|
|
11192
11301
|
id: 'PlatformLimits.Customers.modalTitle',
|
|
11193
11302
|
description: 'The modal title for the customer platform limits error',
|
|
@@ -11307,20 +11416,20 @@ LimitsReachedErrorGraphic$1.defaultProps = {
|
|
|
11307
11416
|
const PlatformLimitsCustomersErrorModal = _ref => {
|
|
11308
11417
|
let onClose = _ref.onClose;
|
|
11309
11418
|
const intl = useIntl();
|
|
11310
|
-
const customersPlatformLimitsModalState = useCustomersPlatormLimitsModalState();
|
|
11419
|
+
const customersPlatformLimitsModalState = useCustomersPlatormLimitsModalState$1();
|
|
11311
11420
|
return jsx(InfoDialog, {
|
|
11312
11421
|
isOpen: customersPlatformLimitsModalState.isModalOpen,
|
|
11313
11422
|
onClose: onClose,
|
|
11314
|
-
title: intl.formatMessage(messages$
|
|
11423
|
+
title: intl.formatMessage(messages$g.title),
|
|
11315
11424
|
children: jsxs(Spacings.Stack, {
|
|
11316
11425
|
scale: "m",
|
|
11317
11426
|
alignItems: "center",
|
|
11318
11427
|
children: [jsx(LimitsReachedErrorGraphic$1, {}), jsxs(Spacings.Stack, {
|
|
11319
11428
|
scale: "l",
|
|
11320
11429
|
alignItems: "center",
|
|
11321
|
-
children: [jsx(
|
|
11430
|
+
children: [jsx(CustomersNotification, {}), jsx(FlatButton, {
|
|
11322
11431
|
onClick: onClose,
|
|
11323
|
-
label: intl.formatMessage(messages$
|
|
11432
|
+
label: intl.formatMessage(messages$g.backToList),
|
|
11324
11433
|
icon: jsx(ListIcon, {
|
|
11325
11434
|
size: "medium",
|
|
11326
11435
|
color: "primary"
|
|
@@ -11331,13 +11440,14 @@ const PlatformLimitsCustomersErrorModal = _ref => {
|
|
|
11331
11440
|
});
|
|
11332
11441
|
};
|
|
11333
11442
|
PlatformLimitsCustomersErrorModal.displayName = 'PlatformLimitsCustomersErrorModal';
|
|
11443
|
+
var CustomersErrorModal = PlatformLimitsCustomersErrorModal;
|
|
11334
11444
|
|
|
11335
11445
|
var styles$5 = {
|
|
11336
11446
|
"combined": "platform-limits-customers-combined-module__combined___OszDd"
|
|
11337
11447
|
};
|
|
11338
11448
|
const PlatformLimitsCustomersCombined = () => {
|
|
11339
11449
|
// on the customer create only show the warning message
|
|
11340
|
-
const _useCustomersPlatform =
|
|
11450
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsStatus(),
|
|
11341
11451
|
hasReachedCustomersErrorLimit = _useCustomersPlatform.hasReachedCustomersErrorLimit,
|
|
11342
11452
|
hasReachedCustomersWarningLimit = _useCustomersPlatform.hasReachedCustomersWarningLimit;
|
|
11343
11453
|
return jsx("div", {
|
|
@@ -11345,26 +11455,27 @@ const PlatformLimitsCustomersCombined = () => {
|
|
|
11345
11455
|
children: jsxs(Spacings.Inline, {
|
|
11346
11456
|
scale: "xl",
|
|
11347
11457
|
justifyContent: "space-between",
|
|
11348
|
-
children: [hasReachedCustomersWarningLimit && !hasReachedCustomersErrorLimit ? jsx(
|
|
11458
|
+
children: [hasReachedCustomersWarningLimit && !hasReachedCustomersErrorLimit ? jsx(CustomersNotification, {}) : null, jsx(CustomersStatus, {})]
|
|
11349
11459
|
})
|
|
11350
11460
|
});
|
|
11351
11461
|
};
|
|
11352
11462
|
PlatformLimitsCustomersCombined.displayName = 'PlatformLimitsCustomersCombined';
|
|
11463
|
+
var CustomersCombined = PlatformLimitsCustomersCombined;
|
|
11353
11464
|
|
|
11354
11465
|
const useCustomersPlatformLimits = () => {
|
|
11355
|
-
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher(),
|
|
11466
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
11356
11467
|
refetch = _useCustomersPlatform.refetch;
|
|
11357
|
-
const _useCustomersPlatform2 =
|
|
11468
|
+
const _useCustomersPlatform2 = useCustomersPlatformLimitsStatus(),
|
|
11358
11469
|
hasReachedCustomersWarningLimit = _useCustomersPlatform2.hasReachedCustomersWarningLimit,
|
|
11359
11470
|
hasReachedCustomersErrorLimit = _useCustomersPlatform2.hasReachedCustomersErrorLimit;
|
|
11360
|
-
const interceptNavigation = useInterceptNavigation(hasReachedCustomersErrorLimit);
|
|
11471
|
+
const interceptNavigation = useInterceptNavigation$1(hasReachedCustomersErrorLimit);
|
|
11361
11472
|
return {
|
|
11362
11473
|
CustomersLimits: {
|
|
11363
|
-
Notifications:
|
|
11364
|
-
Status:
|
|
11365
|
-
Combined:
|
|
11366
|
-
Tooltip:
|
|
11367
|
-
ErrorModal:
|
|
11474
|
+
Notifications: CustomersNotification,
|
|
11475
|
+
Status: CustomersStatus,
|
|
11476
|
+
Combined: CustomersCombined,
|
|
11477
|
+
Tooltip: CustomersTooltip,
|
|
11478
|
+
ErrorModal: CustomersErrorModal
|
|
11368
11479
|
},
|
|
11369
11480
|
refetchCustomersPlatformLimits: refetch,
|
|
11370
11481
|
interceptNavigation,
|
|
@@ -11374,23 +11485,25 @@ const useCustomersPlatformLimits = () => {
|
|
|
11374
11485
|
}
|
|
11375
11486
|
};
|
|
11376
11487
|
};
|
|
11488
|
+
var useCustomersPlatformLimits$1 = useCustomersPlatformLimits;
|
|
11377
11489
|
|
|
11378
11490
|
function ownKeys$c(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11379
11491
|
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(_context = ownKeys$c(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$c(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11380
11492
|
const injectCustomersPlatformLimits = () => WrappedComponent => {
|
|
11381
11493
|
const WithCustomersPlatformLimits = props => {
|
|
11382
|
-
const CustomersPlatformLimits = useCustomersPlatformLimits();
|
|
11494
|
+
const CustomersPlatformLimits = useCustomersPlatformLimits$1();
|
|
11383
11495
|
const customersProps = {
|
|
11384
11496
|
platformLimits: CustomersPlatformLimits
|
|
11385
11497
|
};
|
|
11386
11498
|
return jsx(WrappedComponent, _objectSpread$c(_objectSpread$c({}, props), customersProps));
|
|
11387
11499
|
};
|
|
11388
|
-
WithCustomersPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
11500
|
+
WithCustomersPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
11389
11501
|
return WithCustomersPlatformLimits;
|
|
11390
11502
|
};
|
|
11503
|
+
var injectCustomersPlatformLimits$1 = injectCustomersPlatformLimits;
|
|
11391
11504
|
|
|
11392
11505
|
const useCustomerGroupsPlatformLimitsFetcher = () => {
|
|
11393
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.customerGroups),
|
|
11506
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.customerGroups),
|
|
11394
11507
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
11395
11508
|
error = _usePlatformLimitsFet.error,
|
|
11396
11509
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -11402,9 +11515,10 @@ const useCustomerGroupsPlatformLimitsFetcher = () => {
|
|
|
11402
11515
|
refetch
|
|
11403
11516
|
};
|
|
11404
11517
|
};
|
|
11518
|
+
var useCustomerGroupsPlatformLimitsFetcher$1 = useCustomerGroupsPlatformLimitsFetcher;
|
|
11405
11519
|
|
|
11406
11520
|
const useCustomerGroupsPlatformLimitsStatus = () => {
|
|
11407
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher(),
|
|
11521
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
|
|
11408
11522
|
platformLimits = _useCustomerGroupsPla.platformLimits;
|
|
11409
11523
|
if (!platformLimits?.customerGroups?.total) {
|
|
11410
11524
|
return {
|
|
@@ -11428,10 +11542,11 @@ const useCustomerGroupsPlatformLimitsStatus = () => {
|
|
|
11428
11542
|
hasReachedCustomerGroupsErrorLimit
|
|
11429
11543
|
};
|
|
11430
11544
|
};
|
|
11545
|
+
var useCustomerGroupsPlatformLimitsStatus$1 = useCustomerGroupsPlatformLimitsStatus;
|
|
11431
11546
|
|
|
11432
11547
|
const useCustomerGroupsPlatormLimitsModalState = () => {
|
|
11433
|
-
const customerGroupsPlatformLimitsStatus = useCustomerGroupsPlatformLimitsStatus();
|
|
11434
|
-
const limitsModalState = useLimitsModalState(false);
|
|
11548
|
+
const customerGroupsPlatformLimitsStatus = useCustomerGroupsPlatformLimitsStatus$1();
|
|
11549
|
+
const limitsModalState = useLimitsModalState$1(false);
|
|
11435
11550
|
useEffect(() => {
|
|
11436
11551
|
if (customerGroupsPlatformLimitsStatus.hasReachedCustomerGroupsErrorLimit) {
|
|
11437
11552
|
limitsModalState.openModal();
|
|
@@ -11441,24 +11556,25 @@ const useCustomerGroupsPlatormLimitsModalState = () => {
|
|
|
11441
11556
|
isModalOpen: limitsModalState.isModalOpen
|
|
11442
11557
|
};
|
|
11443
11558
|
};
|
|
11559
|
+
var useCustomerGroupsPlatormLimitsModalState$1 = useCustomerGroupsPlatormLimitsModalState;
|
|
11444
11560
|
|
|
11445
11561
|
const PlatformLimitsCustomerGroupsNotifications = () => {
|
|
11446
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher(),
|
|
11562
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
|
|
11447
11563
|
platformLimits = _useCustomerGroupsPla.platformLimits;
|
|
11448
|
-
const _useCustomerGroupsPla2 = useCustomerGroupsPlatformLimitsStatus(),
|
|
11564
|
+
const _useCustomerGroupsPla2 = useCustomerGroupsPlatformLimitsStatus$1(),
|
|
11449
11565
|
hasReachedCustomerGroupsWarningLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsWarningLimit,
|
|
11450
11566
|
hasReachedCustomerGroupsErrorLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsErrorLimit;
|
|
11451
11567
|
if (!platformLimits?.customerGroups?.total) {
|
|
11452
11568
|
return jsx("div", {});
|
|
11453
11569
|
}
|
|
11454
11570
|
if (hasReachedCustomerGroupsErrorLimit) {
|
|
11455
|
-
return jsx(Notifications.Error, {
|
|
11571
|
+
return jsx(Notifications$1.Error, {
|
|
11456
11572
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.customerGroups,
|
|
11457
11573
|
limit: platformLimits.customerGroups.total.limit
|
|
11458
11574
|
});
|
|
11459
11575
|
}
|
|
11460
11576
|
if (hasReachedCustomerGroupsWarningLimit) {
|
|
11461
|
-
return jsx(Notifications.Warning, {
|
|
11577
|
+
return jsx(Notifications$1.Warning, {
|
|
11462
11578
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.customerGroups,
|
|
11463
11579
|
limit: platformLimits.customerGroups.total.limit
|
|
11464
11580
|
});
|
|
@@ -11466,8 +11582,9 @@ const PlatformLimitsCustomerGroupsNotifications = () => {
|
|
|
11466
11582
|
return jsx("div", {});
|
|
11467
11583
|
};
|
|
11468
11584
|
PlatformLimitsCustomerGroupsNotifications.displayName = 'PlatformLimitsCustomerGroupsNotifications';
|
|
11585
|
+
var CustomerGroupsNotification = PlatformLimitsCustomerGroupsNotifications;
|
|
11469
11586
|
|
|
11470
|
-
var messages$
|
|
11587
|
+
var messages$f = defineMessages({
|
|
11471
11588
|
customerGroupsPlatformLimitReached: {
|
|
11472
11589
|
id: 'PlatformLimits.Tooltip.customerGroupsLimitReached',
|
|
11473
11590
|
description: 'The message for custome groups platform limit being reached',
|
|
@@ -11480,12 +11597,13 @@ function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
11480
11597
|
const PlatformLimitsCustomerGroupsTooltip = props => {
|
|
11481
11598
|
const intl = useIntl();
|
|
11482
11599
|
return jsx(Tooltip, _objectSpread$b(_objectSpread$b({}, props), {}, {
|
|
11483
|
-
title: intl.formatMessage(messages$
|
|
11600
|
+
title: intl.formatMessage(messages$f.customerGroupsPlatformLimitReached)
|
|
11484
11601
|
}));
|
|
11485
11602
|
};
|
|
11486
11603
|
PlatformLimitsCustomerGroupsTooltip.displayName = 'PlatformLimitsCustomerGroupsTooltip';
|
|
11604
|
+
var CustomerGroupsTooltip = PlatformLimitsCustomerGroupsTooltip;
|
|
11487
11605
|
|
|
11488
|
-
var messages$
|
|
11606
|
+
var messages$e = defineMessages({
|
|
11489
11607
|
customerGroupsStatus: {
|
|
11490
11608
|
id: 'PlatformLimits.Status.customerGroups',
|
|
11491
11609
|
description: 'The message for customer groups platform limit values',
|
|
@@ -11500,7 +11618,7 @@ var styles$4 = {
|
|
|
11500
11618
|
};
|
|
11501
11619
|
const PlatformLimitsCustomerGroupsStatus = () => {
|
|
11502
11620
|
const intl = useIntl();
|
|
11503
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher(),
|
|
11621
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
|
|
11504
11622
|
platformLimits = _useCustomerGroupsPla.platformLimits;
|
|
11505
11623
|
if (!platformLimits?.customerGroups?.total) {
|
|
11506
11624
|
return null;
|
|
@@ -11513,7 +11631,7 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
11513
11631
|
children: jsx(Text.Detail, {
|
|
11514
11632
|
tone: "secondary",
|
|
11515
11633
|
isInline: true,
|
|
11516
|
-
intlMessage: _objectSpread$a(_objectSpread$a({}, messages$
|
|
11634
|
+
intlMessage: _objectSpread$a(_objectSpread$a({}, messages$e.customerGroupsStatus), {}, {
|
|
11517
11635
|
values: {
|
|
11518
11636
|
current: intl.formatNumber(current),
|
|
11519
11637
|
limit: intl.formatNumber(limit)
|
|
@@ -11523,8 +11641,9 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
11523
11641
|
});
|
|
11524
11642
|
};
|
|
11525
11643
|
PlatformLimitsCustomerGroupsStatus.displayName = 'PlatformLimitsCustomerGroupsStatus';
|
|
11644
|
+
var CustomerGroupsStatus = PlatformLimitsCustomerGroupsStatus;
|
|
11526
11645
|
|
|
11527
|
-
var messages$
|
|
11646
|
+
var messages$d = defineMessages({
|
|
11528
11647
|
title: {
|
|
11529
11648
|
id: 'PlatformLimits.CustomerGroups.modalTitle',
|
|
11530
11649
|
description: 'The modal title for the customer groups platform limits error',
|
|
@@ -11644,20 +11763,20 @@ LimitsReachedErrorGraphic.defaultProps = {
|
|
|
11644
11763
|
const PlatformLimitsCustomerGroupsErrorModal = _ref => {
|
|
11645
11764
|
let onClose = _ref.onClose;
|
|
11646
11765
|
const intl = useIntl();
|
|
11647
|
-
const customerGroupsPlatformLimitsModalState = useCustomerGroupsPlatormLimitsModalState();
|
|
11766
|
+
const customerGroupsPlatformLimitsModalState = useCustomerGroupsPlatormLimitsModalState$1();
|
|
11648
11767
|
return jsx(InfoDialog, {
|
|
11649
11768
|
isOpen: customerGroupsPlatformLimitsModalState.isModalOpen,
|
|
11650
11769
|
onClose: onClose,
|
|
11651
|
-
title: intl.formatMessage(messages$
|
|
11770
|
+
title: intl.formatMessage(messages$d.title),
|
|
11652
11771
|
children: jsxs(Spacings.Stack, {
|
|
11653
11772
|
scale: "m",
|
|
11654
11773
|
alignItems: "center",
|
|
11655
11774
|
children: [jsx(LimitsReachedErrorGraphic, {}), jsxs(Spacings.Stack, {
|
|
11656
11775
|
scale: "l",
|
|
11657
11776
|
alignItems: "center",
|
|
11658
|
-
children: [jsx(
|
|
11777
|
+
children: [jsx(CustomerGroupsNotification, {}), jsx(FlatButton, {
|
|
11659
11778
|
onClick: onClose,
|
|
11660
|
-
label: intl.formatMessage(messages$
|
|
11779
|
+
label: intl.formatMessage(messages$d.backToList),
|
|
11661
11780
|
icon: jsx(ListIcon, {
|
|
11662
11781
|
size: "medium",
|
|
11663
11782
|
color: "primary"
|
|
@@ -11668,13 +11787,14 @@ const PlatformLimitsCustomerGroupsErrorModal = _ref => {
|
|
|
11668
11787
|
});
|
|
11669
11788
|
};
|
|
11670
11789
|
PlatformLimitsCustomerGroupsErrorModal.displayName = 'PlatformLimitsCustomerGroupsErrorModal';
|
|
11790
|
+
var CustomerGroupsErrorModal = PlatformLimitsCustomerGroupsErrorModal;
|
|
11671
11791
|
|
|
11672
11792
|
var styles$3 = {
|
|
11673
11793
|
"combined": "platform-limits-customer-groups-combined-module__combined___WjRoI"
|
|
11674
11794
|
};
|
|
11675
11795
|
const PlatformLimitsCustomerGroupsCombined = () => {
|
|
11676
11796
|
// on the customer create only show the warning message
|
|
11677
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsStatus(),
|
|
11797
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsStatus$1(),
|
|
11678
11798
|
hasReachedCustomerGroupsErrorLimit = _useCustomerGroupsPla.hasReachedCustomerGroupsErrorLimit,
|
|
11679
11799
|
hasReachedCustomerGroupsWarningLimit = _useCustomerGroupsPla.hasReachedCustomerGroupsWarningLimit;
|
|
11680
11800
|
return jsx("div", {
|
|
@@ -11682,26 +11802,27 @@ const PlatformLimitsCustomerGroupsCombined = () => {
|
|
|
11682
11802
|
children: jsxs(Spacings.Inline, {
|
|
11683
11803
|
scale: "xl",
|
|
11684
11804
|
justifyContent: "space-between",
|
|
11685
|
-
children: [hasReachedCustomerGroupsWarningLimit && !hasReachedCustomerGroupsErrorLimit ? jsx(
|
|
11805
|
+
children: [hasReachedCustomerGroupsWarningLimit && !hasReachedCustomerGroupsErrorLimit ? jsx(CustomerGroupsNotification, {}) : null, jsx(CustomerGroupsStatus, {})]
|
|
11686
11806
|
})
|
|
11687
11807
|
});
|
|
11688
11808
|
};
|
|
11689
11809
|
PlatformLimitsCustomerGroupsCombined.displayName = 'PlatformLimitsCustomerGroupsCombined';
|
|
11810
|
+
var CustomerGroupsCombined = PlatformLimitsCustomerGroupsCombined;
|
|
11690
11811
|
|
|
11691
11812
|
const useCustomerGroupsPlatformLimits = () => {
|
|
11692
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher(),
|
|
11813
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
|
|
11693
11814
|
refetch = _useCustomerGroupsPla.refetch;
|
|
11694
|
-
const _useCustomerGroupsPla2 = useCustomerGroupsPlatformLimitsStatus(),
|
|
11815
|
+
const _useCustomerGroupsPla2 = useCustomerGroupsPlatformLimitsStatus$1(),
|
|
11695
11816
|
hasReachedCustomerGroupsWarningLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsWarningLimit,
|
|
11696
11817
|
hasReachedCustomerGroupsErrorLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsErrorLimit;
|
|
11697
|
-
const interceptNavigation = useInterceptNavigation(hasReachedCustomerGroupsErrorLimit);
|
|
11818
|
+
const interceptNavigation = useInterceptNavigation$1(hasReachedCustomerGroupsErrorLimit);
|
|
11698
11819
|
return {
|
|
11699
11820
|
CustomerGroupsLimits: {
|
|
11700
|
-
Notifications:
|
|
11701
|
-
Status:
|
|
11702
|
-
Combined:
|
|
11703
|
-
Tooltip:
|
|
11704
|
-
ErrorModal:
|
|
11821
|
+
Notifications: CustomerGroupsNotification,
|
|
11822
|
+
Status: CustomerGroupsStatus,
|
|
11823
|
+
Combined: CustomerGroupsCombined,
|
|
11824
|
+
Tooltip: CustomerGroupsTooltip,
|
|
11825
|
+
ErrorModal: CustomerGroupsErrorModal
|
|
11705
11826
|
},
|
|
11706
11827
|
refetchCustomerGroupsPlatformLimits: refetch,
|
|
11707
11828
|
interceptNavigation,
|
|
@@ -11711,22 +11832,24 @@ const useCustomerGroupsPlatformLimits = () => {
|
|
|
11711
11832
|
}
|
|
11712
11833
|
};
|
|
11713
11834
|
};
|
|
11835
|
+
var useCustomerGroupsPlatformLimits$1 = useCustomerGroupsPlatformLimits;
|
|
11714
11836
|
|
|
11715
11837
|
function ownKeys$8(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11716
11838
|
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$8(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$8(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11717
11839
|
const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
|
|
11718
11840
|
const WithCustomerGroupsPlatformLimits = props => {
|
|
11719
|
-
const CustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits();
|
|
11841
|
+
const CustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits$1();
|
|
11720
11842
|
const customersProps = {
|
|
11721
11843
|
platformLimits: CustomerGroupsPlatformLimits
|
|
11722
11844
|
};
|
|
11723
11845
|
return jsx(WrappedComponent, _objectSpread$8(_objectSpread$8({}, props), customersProps));
|
|
11724
11846
|
};
|
|
11725
|
-
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
11847
|
+
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
11726
11848
|
return WithCustomerGroupsPlatformLimits;
|
|
11727
11849
|
};
|
|
11850
|
+
var injectCustomerGroupsPlatformLimits$1 = injectCustomerGroupsPlatformLimits;
|
|
11728
11851
|
|
|
11729
|
-
var messages$
|
|
11852
|
+
var messages$c = defineMessages({
|
|
11730
11853
|
yes: {
|
|
11731
11854
|
id: 'BooleanField.yes',
|
|
11732
11855
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -11747,8 +11870,8 @@ const valueMapping = {
|
|
|
11747
11870
|
const BooleanField = props => {
|
|
11748
11871
|
let selectedValue;
|
|
11749
11872
|
if (typeof props.value === 'boolean') selectedValue = getBooleanValue(props.value);else if (props.isMulti && _Array$isArray(props.value) && props.value.length) selectedValue = props.value.length === 2 ? 'all' : getBooleanValue(props.value[0]);
|
|
11750
|
-
const yesLabel = props.intl.formatMessage(messages$
|
|
11751
|
-
const noLabel = props.intl.formatMessage(messages$
|
|
11873
|
+
const yesLabel = props.intl.formatMessage(messages$c.yes);
|
|
11874
|
+
const noLabel = props.intl.formatMessage(messages$c.no);
|
|
11752
11875
|
const options = [{
|
|
11753
11876
|
value: 'yes',
|
|
11754
11877
|
label: yesLabel
|
|
@@ -11786,7 +11909,7 @@ function getBooleanValue(value) {
|
|
|
11786
11909
|
return value === false ? 'no' : 'yes';
|
|
11787
11910
|
}
|
|
11788
11911
|
|
|
11789
|
-
const messages$
|
|
11912
|
+
const messages$a = defineMessages({
|
|
11790
11913
|
from: {
|
|
11791
11914
|
id: 'LabelRange.from',
|
|
11792
11915
|
description: 'The label for "from" range',
|
|
@@ -11798,6 +11921,7 @@ const messages$7 = defineMessages({
|
|
|
11798
11921
|
defaultMessage: 'To'
|
|
11799
11922
|
}
|
|
11800
11923
|
});
|
|
11924
|
+
var messages$b = messages$a;
|
|
11801
11925
|
|
|
11802
11926
|
function ownKeys$7(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11803
11927
|
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(_context = ownKeys$7(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$7(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -11808,12 +11932,13 @@ const LabelRange = _ref => {
|
|
|
11808
11932
|
let type = _ref.type;
|
|
11809
11933
|
return jsx("label", {
|
|
11810
11934
|
className: styles$2.label,
|
|
11811
|
-
children: jsx(FormattedMessage, _objectSpread$7({}, messages$
|
|
11935
|
+
children: jsx(FormattedMessage, _objectSpread$7({}, messages$b[type]))
|
|
11812
11936
|
});
|
|
11813
11937
|
};
|
|
11814
11938
|
LabelRange.displayName = 'LabelRange';
|
|
11939
|
+
var LabelRange$1 = LabelRange;
|
|
11815
11940
|
|
|
11816
|
-
var messages$
|
|
11941
|
+
var messages$9 = defineMessages({
|
|
11817
11942
|
label: {
|
|
11818
11943
|
id: 'MissingValueField.label',
|
|
11819
11944
|
description: 'The label text for the missing values option',
|
|
@@ -11827,13 +11952,14 @@ const MissingValueField = props => jsx(CheckboxInput, {
|
|
|
11827
11952
|
name: "missing-value",
|
|
11828
11953
|
isChecked: props.isChecked,
|
|
11829
11954
|
onChange: props.onChange,
|
|
11830
|
-
children: jsx(FormattedMessage, _objectSpread$6({}, messages$
|
|
11955
|
+
children: jsx(FormattedMessage, _objectSpread$6({}, messages$9.label))
|
|
11831
11956
|
});
|
|
11832
11957
|
MissingValueField.defaultProps = {
|
|
11833
11958
|
isChecked: false
|
|
11834
11959
|
};
|
|
11960
|
+
var MissingValueField$1 = MissingValueField;
|
|
11835
11961
|
|
|
11836
|
-
var messages$
|
|
11962
|
+
var messages$8 = defineMessages({
|
|
11837
11963
|
filterWholeInput: {
|
|
11838
11964
|
id: 'MultiValueSearchInput.buttonLabel',
|
|
11839
11965
|
description: 'Label for "MultiValueSearchInput" filter whole input.',
|
|
@@ -11871,7 +11997,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11871
11997
|
}),
|
|
11872
11998
|
children: jsx(Text.Body, {
|
|
11873
11999
|
truncate: true,
|
|
11874
|
-
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$
|
|
12000
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$8.filterWholeInput), {}, {
|
|
11875
12001
|
values: {
|
|
11876
12002
|
values: `"${props.value}"`
|
|
11877
12003
|
}
|
|
@@ -11884,7 +12010,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11884
12010
|
}),
|
|
11885
12011
|
children: jsx(Text.Body, {
|
|
11886
12012
|
truncate: true,
|
|
11887
|
-
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$
|
|
12013
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$8.filterSeparateValues), {}, {
|
|
11888
12014
|
values: {
|
|
11889
12015
|
values: `"${props.multiValue.join('", "')}"` || props.value
|
|
11890
12016
|
}
|
|
@@ -11994,6 +12120,7 @@ const MultiValueSearchInput = props => {
|
|
|
11994
12120
|
});
|
|
11995
12121
|
};
|
|
11996
12122
|
MultiValueSearchInput.displayName = 'MultiValueSearchInput';
|
|
12123
|
+
var MultiValueSearchInput$1 = MultiValueSearchInput;
|
|
11997
12124
|
|
|
11998
12125
|
function ownKeys$4(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11999
12126
|
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(_context = ownKeys$4(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$4(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -12133,7 +12260,7 @@ const withPropsForMoney = ownProps => ownProps.numberFormatType === 'money' ? {
|
|
|
12133
12260
|
},
|
|
12134
12261
|
numeralDecimalScale: 2
|
|
12135
12262
|
} : {};
|
|
12136
|
-
var numericFormatInput = withProps(withPropsForMoney)(NumericFormatInput);
|
|
12263
|
+
var numericFormatInput = withProps$1(withPropsForMoney)(NumericFormatInput);
|
|
12137
12264
|
|
|
12138
12265
|
/**
|
|
12139
12266
|
* @param mixed value
|
|
@@ -12190,6 +12317,7 @@ const buildSearchQuery = (searchQuery, searchMode, fragments) => {
|
|
|
12190
12317
|
}
|
|
12191
12318
|
return fragments[searchMode].getQuery(trimmedSearchQuery);
|
|
12192
12319
|
};
|
|
12320
|
+
var buildSearchQuery$1 = buildSearchQuery;
|
|
12193
12321
|
|
|
12194
12322
|
const getBulkNotification = _ref => {
|
|
12195
12323
|
let counts = _ref.counts,
|
|
@@ -12233,10 +12361,12 @@ const businessRoleConstants = {
|
|
|
12233
12361
|
SalesAndECommerceManager: 'SalesAndECommerceManager',
|
|
12234
12362
|
Other: 'Other'
|
|
12235
12363
|
};
|
|
12364
|
+
var businessRoleConstants$1 = businessRoleConstants;
|
|
12236
12365
|
|
|
12237
|
-
const businessRoleKeys = _Object$values(businessRoleConstants);
|
|
12366
|
+
const businessRoleKeys = _Object$values(businessRoleConstants$1);
|
|
12367
|
+
var businessRoleKeys$1 = businessRoleKeys;
|
|
12238
12368
|
|
|
12239
|
-
var messages$
|
|
12369
|
+
var messages$7 = defineMessages({
|
|
12240
12370
|
ExecutiveManagement: {
|
|
12241
12371
|
id: 'Shared.businessRoles.executiveManagement',
|
|
12242
12372
|
description: 'The label for one of the selectable business roles',
|
|
@@ -12411,6 +12541,7 @@ const createNextSortDefinition = _ref => {
|
|
|
12411
12541
|
};
|
|
12412
12542
|
}
|
|
12413
12543
|
};
|
|
12544
|
+
var createNextSortDefinition$1 = createNextSortDefinition;
|
|
12414
12545
|
|
|
12415
12546
|
function ownKeys$3(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12416
12547
|
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(_context = ownKeys$3(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$3(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -12830,7 +12961,7 @@ function isEmptyFilter(_ref) {
|
|
|
12830
12961
|
});
|
|
12831
12962
|
}
|
|
12832
12963
|
|
|
12833
|
-
const messages$
|
|
12964
|
+
const messages$5 = defineMessages({
|
|
12834
12965
|
inputFieldError: {
|
|
12835
12966
|
id: 'Search.Filters.validation.customField.inputFieldError',
|
|
12836
12967
|
description: 'Error message for empty input field ',
|
|
@@ -12842,6 +12973,7 @@ const messages$3 = defineMessages({
|
|
|
12842
12973
|
defaultMessage: 'Please select an option.'
|
|
12843
12974
|
}
|
|
12844
12975
|
});
|
|
12976
|
+
var messages$6 = messages$5;
|
|
12845
12977
|
|
|
12846
12978
|
const hasOptionDropdown = type => {
|
|
12847
12979
|
var _context;
|
|
@@ -12851,14 +12983,14 @@ const validateValue = (value, type, intl) => {
|
|
|
12851
12983
|
if (validateSingleFilter({
|
|
12852
12984
|
value
|
|
12853
12985
|
})) {
|
|
12854
|
-
return intl.formatMessage(messages$
|
|
12986
|
+
return intl.formatMessage(messages$6.inputFieldError);
|
|
12855
12987
|
}
|
|
12856
12988
|
if (type === FIELD_TYPES.Money && (validateSingleFilter({
|
|
12857
12989
|
value: value.currencyCode
|
|
12858
12990
|
}) || validateSingleFilter({
|
|
12859
12991
|
value: value.amount
|
|
12860
12992
|
}))) {
|
|
12861
|
-
return intl.formatMessage(messages$
|
|
12993
|
+
return intl.formatMessage(messages$6.inputFieldError);
|
|
12862
12994
|
}
|
|
12863
12995
|
return null;
|
|
12864
12996
|
};
|
|
@@ -12866,7 +12998,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
12866
12998
|
let value = _ref.value;
|
|
12867
12999
|
if (!value || !value.type) {
|
|
12868
13000
|
return {
|
|
12869
|
-
type: intl.formatMessage(messages$
|
|
13001
|
+
type: intl.formatMessage(messages$6.optionFieldError)
|
|
12870
13002
|
};
|
|
12871
13003
|
}
|
|
12872
13004
|
const typeName = value.type.name;
|
|
@@ -12874,7 +13006,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
12874
13006
|
const filterValue = value.value;
|
|
12875
13007
|
if (hasOption && !value.option) {
|
|
12876
13008
|
return {
|
|
12877
|
-
option: intl.formatMessage(messages$
|
|
13009
|
+
option: intl.formatMessage(messages$6.optionFieldError)
|
|
12878
13010
|
};
|
|
12879
13011
|
}
|
|
12880
13012
|
if (value.option === FILTER_TYPES.range) {
|
|
@@ -12893,7 +13025,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
12893
13025
|
} : null;
|
|
12894
13026
|
}
|
|
12895
13027
|
|
|
12896
|
-
const messages$
|
|
13028
|
+
const messages$3 = defineMessages({
|
|
12897
13029
|
rangeMissingValue: {
|
|
12898
13030
|
id: 'Search.Filters.validation.date.rangeMissingValue',
|
|
12899
13031
|
description: 'error message if missing a value in a range',
|
|
@@ -12910,6 +13042,7 @@ const messages$2 = defineMessages({
|
|
|
12910
13042
|
defaultMessage: 'Please enter a value for this field.'
|
|
12911
13043
|
}
|
|
12912
13044
|
});
|
|
13045
|
+
var messages$4 = messages$3;
|
|
12913
13046
|
|
|
12914
13047
|
function validateFilter$1(_ref, intl) {
|
|
12915
13048
|
let value = _ref.value,
|
|
@@ -12918,30 +13051,30 @@ function validateFilter$1(_ref, intl) {
|
|
|
12918
13051
|
if (validateSingleFilter({
|
|
12919
13052
|
value: value?.from
|
|
12920
13053
|
})) return {
|
|
12921
|
-
from: intl.formatMessage(messages$
|
|
13054
|
+
from: intl.formatMessage(messages$4.rangeMissingValue)
|
|
12922
13055
|
};
|
|
12923
13056
|
if (validateSingleFilter({
|
|
12924
13057
|
value: value?.to
|
|
12925
13058
|
})) return {
|
|
12926
|
-
to: intl.formatMessage(messages$
|
|
13059
|
+
to: intl.formatMessage(messages$4.rangeMissingValue)
|
|
12927
13060
|
};
|
|
12928
13061
|
if (moment(value?.to).isBefore(value?.from)) return {
|
|
12929
|
-
from: intl.formatMessage(messages$
|
|
13062
|
+
from: intl.formatMessage(messages$4.rangeToSmallerThanFrom)
|
|
12930
13063
|
};
|
|
12931
13064
|
} else if (type === 'equalTo' || type === 'lessThan' || type === 'moreThan') {
|
|
12932
13065
|
if (validateSingleFilter({
|
|
12933
13066
|
value
|
|
12934
|
-
})) return intl.formatMessage(messages$
|
|
13067
|
+
})) return intl.formatMessage(messages$4.missingValue);
|
|
12935
13068
|
}
|
|
12936
13069
|
return null;
|
|
12937
13070
|
}
|
|
12938
13071
|
|
|
12939
13072
|
const validateSingleOptionEnum = (selectedOption, intl) => {
|
|
12940
|
-
if (validateSingleFilter(selectedOption)) return intl.formatMessage(
|
|
13073
|
+
if (validateSingleFilter(selectedOption)) return intl.formatMessage(validationMessages.required);
|
|
12941
13074
|
return null;
|
|
12942
13075
|
};
|
|
12943
13076
|
const validateMultiOptionEnum = (selectedOption, intl) => {
|
|
12944
|
-
if (validateSingleFilter(selectedOption) || selectedOption.value.length === 0) return intl.formatMessage(
|
|
13077
|
+
if (validateSingleFilter(selectedOption) || selectedOption.value.length === 0) return intl.formatMessage(validationMessages.required);
|
|
12945
13078
|
return null;
|
|
12946
13079
|
};
|
|
12947
13080
|
|
|
@@ -12957,6 +13090,7 @@ const messages$1 = defineMessages({
|
|
|
12957
13090
|
defaultMessage: 'Please enter the smaller number first.'
|
|
12958
13091
|
}
|
|
12959
13092
|
});
|
|
13093
|
+
var messages$2 = messages$1;
|
|
12960
13094
|
|
|
12961
13095
|
function validateFilter(_ref, intl) {
|
|
12962
13096
|
let value = _ref.value,
|
|
@@ -12964,30 +13098,30 @@ function validateFilter(_ref, intl) {
|
|
|
12964
13098
|
_ref$allowFloat = _ref.allowFloat,
|
|
12965
13099
|
allowFloat = _ref$allowFloat === void 0 ? true : _ref$allowFloat;
|
|
12966
13100
|
if (type !== 'range') {
|
|
12967
|
-
if (!allowFloat && !isInteger(value)) return intl.formatMessage(
|
|
13101
|
+
if (!allowFloat && !isInteger(value)) return intl.formatMessage(validationMessages.integer);
|
|
12968
13102
|
return null;
|
|
12969
13103
|
}
|
|
12970
13104
|
|
|
12971
13105
|
// only range types from here
|
|
12972
13106
|
|
|
12973
13107
|
if (!allowFloat && !isInteger(value.from)) return {
|
|
12974
|
-
from: intl.formatMessage(
|
|
13108
|
+
from: intl.formatMessage(validationMessages.integer)
|
|
12975
13109
|
};
|
|
12976
13110
|
if (!allowFloat && !isInteger(value.to)) return {
|
|
12977
|
-
to: intl.formatMessage(
|
|
13111
|
+
to: intl.formatMessage(validationMessages.integer)
|
|
12978
13112
|
};
|
|
12979
13113
|
if (validateSingleFilter({
|
|
12980
13114
|
value: value.from
|
|
12981
13115
|
})) return {
|
|
12982
|
-
from: intl.formatMessage(messages$
|
|
13116
|
+
from: intl.formatMessage(messages$2.rangeMissingValue)
|
|
12983
13117
|
};
|
|
12984
13118
|
if (validateSingleFilter({
|
|
12985
13119
|
value: value.to
|
|
12986
13120
|
})) return {
|
|
12987
|
-
to: intl.formatMessage(messages$
|
|
13121
|
+
to: intl.formatMessage(messages$2.rangeMissingValue)
|
|
12988
13122
|
};
|
|
12989
13123
|
if (_parseFloat(value.to) < _parseFloat(value.from)) return {
|
|
12990
|
-
from: intl.formatMessage(messages$
|
|
13124
|
+
from: intl.formatMessage(messages$2.rangeToSmallerThanFrom)
|
|
12991
13125
|
};
|
|
12992
13126
|
return null;
|
|
12993
13127
|
}
|
|
@@ -12995,8 +13129,8 @@ function validateFilter(_ref, intl) {
|
|
|
12995
13129
|
// eslint-disable-next-line import/prefer-default-export
|
|
12996
13130
|
const validateText = function (text, intl) {
|
|
12997
13131
|
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
12998
|
-
if (validateSingleFilter(text)) return intl.formatMessage(
|
|
12999
|
-
if (type === 'id' && !isUUID(text.value)) return intl.formatMessage(
|
|
13132
|
+
if (validateSingleFilter(text)) return intl.formatMessage(validationMessages.required);
|
|
13133
|
+
if (type === 'id' && !isUUID$1(text.value)) return intl.formatMessage(validationMessages.uuid);
|
|
13000
13134
|
return null;
|
|
13001
13135
|
};
|
|
13002
13136
|
|
|
@@ -13025,10 +13159,13 @@ function convertRatioToPercentage(ratio) {
|
|
|
13025
13159
|
const hasErrorCode = (unmappedApiErrors, errorCode) => {
|
|
13026
13160
|
return _Array$isArray(unmappedApiErrors) && _someInstanceProperty(unmappedApiErrors).call(unmappedApiErrors, error => error.extensions?.code === errorCode);
|
|
13027
13161
|
};
|
|
13162
|
+
var hasErrorCode$1 = hasErrorCode;
|
|
13028
13163
|
|
|
13029
|
-
const hasInvalidInputError = errors => hasErrorCode(errors, ERROR_CODES.invalidInput);
|
|
13164
|
+
const hasInvalidInputError = errors => hasErrorCode$1(errors, ERROR_CODES.invalidInput);
|
|
13165
|
+
var hasInvalidInputError$1 = hasInvalidInputError;
|
|
13030
13166
|
|
|
13031
|
-
const hasSemanticError = errors => hasErrorCode(errors, ERROR_CODES.semanticError);
|
|
13167
|
+
const hasSemanticError = errors => hasErrorCode$1(errors, ERROR_CODES.semanticError);
|
|
13168
|
+
var hasSemanticError$1 = hasSemanticError;
|
|
13032
13169
|
|
|
13033
13170
|
function minusify(value) {
|
|
13034
13171
|
const minus = '-';
|
|
@@ -13345,6 +13482,7 @@ let RequestCache = /*#__PURE__*/function () {
|
|
|
13345
13482
|
}
|
|
13346
13483
|
}]);
|
|
13347
13484
|
}();
|
|
13485
|
+
var RequestCache$1 = RequestCache;
|
|
13348
13486
|
|
|
13349
13487
|
// copied from
|
|
13350
13488
|
// https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
@@ -13457,11 +13595,11 @@ function withPendingRequests() {
|
|
|
13457
13595
|
};
|
|
13458
13596
|
return jsx(Component, _objectSpread(_objectSpread({}, props), pendingProp));
|
|
13459
13597
|
};
|
|
13460
|
-
WrappedComponent.displayName = wrapDisplayName(Component, 'withPendingRequests');
|
|
13598
|
+
WrappedComponent.displayName = wrapDisplayName$1(Component, 'withPendingRequests');
|
|
13461
13599
|
return WrappedComponent;
|
|
13462
13600
|
};
|
|
13463
13601
|
}
|
|
13464
13602
|
|
|
13465
13603
|
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 } } } };
|
|
13466
13604
|
|
|
13467
|
-
export { booleanField as BooleanField, Button, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner, ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldTooltip, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields, CustomFieldsErrorTextNotification, CustomFieldsFormField, CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FileInput, FormattedDateTime$1 as FormattedDateTime, LabelRange, MC_RESOURCES_WITH_KEYS, MissingValueField, MultiValueSearchInput, numericFormatInput as NumericFormatInput, Option$2 as Option, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, ProductAttributeInput, ProductAttributes, ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, RequestCache, RequiredIndicator, ScrollToFieldError, searchInput as SearchInput, SelectableFieldSearchInput, StoreSelectField, StoreSelectInput, ThrottledField, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer, allowedProperties, and, attributesMapToNameValuePairs, base64ToString, messages$
|
|
13605
|
+
export { booleanField as BooleanField, Button$1 as Button, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner$1 as CenteredLoadingSpinner, ChannelPickerInput$1 as ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldTooltip$1 as CustomFieldTooltip, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields$1 as CustomFields, CustomFieldsErrorTextNotification$1 as CustomFieldsErrorTextNotification, CustomFieldsFormField$1 as CustomFieldsFormField, CustomerGroupPickerInput$1 as CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FileInput$1 as FileInput, FormattedDateTime$1 as FormattedDateTime, LabelRange$1 as LabelRange, MC_RESOURCES_WITH_KEYS, MissingValueField$1 as MissingValueField, MultiValueSearchInput$1 as MultiValueSearchInput, numericFormatInput as NumericFormatInput, Option$2 as Option, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, ProductAttributeInput, ProductAttributes, ProductPickerInput$1 as ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, RequestCache$1 as RequestCache, RequiredIndicator$1 as RequiredIndicator, ScrollToFieldError$1 as ScrollToFieldError, searchInput as SearchInput, SelectableFieldSearchInput$1 as SelectableFieldSearchInput, StoreSelectField$1 as StoreSelectField, StoreSelectInput$1 as StoreSelectInput, ThrottledField$1 as ThrottledField, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer$1 as WithPimIndexer, allowedProperties, and, attributesMapToNameValuePairs, base64ToString, messages$c as booleanMessages, buildSearchQuery$1 as buildSearchQuery, businessRoleConstants$1 as businessRoleConstants, messages$7 as businessRoleMessages, businessRoleKeys$1 as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition$1 as createNextSortDefinition, createReducer, createResourceReducer, customFields as customFieldsTransformer, dateTransformer$1 as dateTransformer, exact, exists, extractErrorFromGraphQlResponse, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomField, formatCustomerAddress, formatCustomerName, formatDateRangeValue, formatDateTime$1 as formatDateTime, formatDiscount, formatMoney$2 as formatMoney, formatMoneyRangeValue, formatMoneyValue, formatPercentage, formatAttribute as formatProductAttribute, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName$1 as getDisplayName, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds$1 as getPrefixSearchBounds, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, dateTransformer as graphqlDateTransformer, missingLocaleTransformer as graphqlMissingLocaleTransformer, missingTransformer as graphqlMissingTransformer, numberTransformer as graphqlNumberTransformer, graphqlQueryBuilder, referenceTransformer as graphqlReferenceTransformer, textTransformer as graphqlTextTransformer, hasInvalidInputError$1 as hasInvalidInputError, hasSemanticError$1 as hasSemanticError, injectCustomerGroupsPlatformLimits$1 as injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits$1 as injectCustomersPlatformLimits, injectDataTablePaginationState$1 as injectDataTablePaginationState, injectModalState$3 as injectModalState, injectNotifications$1 as injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits$1 as injectShippingMethodsPlatformLimits, injectStorage$1 as injectStorage, injectTaxCategoriesPlatformLimits$1 as injectTaxCategoriesPlatformLimits, injectModalState$1 as injectToggleState, injectZonesPlatformLimits$1 as injectZonesPlatformLimits, isEmptyFilter as isEmpty, isEmptyValue, isUUID$1 as isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName$1 as keepDisplayName, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$9 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, pickerMessages$1 as pickerMessages, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$M as searchInputMessages, setDisplayName$1 as setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useCurrentOption, useDnDContext as useCustomFieldsDnDContext, useCustomerGroupsPlatformLimits$1 as useCustomerGroupsPlatformLimits, useCustomersPlatformLimits$1 as useCustomersPlatformLimits, useDebouncedPromiseCallback$1 as useDebouncedPromiseCallback, useFormatLocalizedFieldToString, useIsFieldDuplicated$1 as useIsFieldDuplicated, useLoadOptions$1 as useLoadOptions, useLocalizedKeyFallback$1 as useLocalizedKeyFallback, usePendingRequests, usePersistedTableConfiguration$1 as usePersistedTableConfiguration, usePimIndexer, usePrevious$1 as usePrevious, useProductSelectionsFetcher$1 as useProductSelectionsFetcher, useProductSelectionsTotalFetcher$1 as useProductSelectionsTotalFetcher, useRoleNotificationEffect$1 as useRoleNotificationEffect, useShippingMethodsPlatformLimits, useStorage$1 as useStorage, useStoreKeysInDataFences$1 as useStoreKeysInDataFences, useStoresListFetcher$1 as useStoresListFetcher, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher$1 as useTotalNumberOfStoresFetcher, validateFilter$2 as validateCustomField, validations as validateCustomFields, validateFilter$1 as validateDate, validateMultiOptionEnum, validateFilter as validateNumber, validateSingleOptionEnum, validateText, validatedInput, validationMessages, withPendingRequests, withProps$1 as withProps, withRedirectTo$1 as withRedirectTo, withoutEmptyErrorsByField$1 as withoutEmptyErrorsByField, wrapDisplayName$1 as wrapDisplayName };
|