@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
|
@@ -4,9 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
6
6
|
var constants = require('@commercetools-frontend/constants');
|
|
7
|
-
var uiKit = require('@commercetools-frontend/ui-kit');
|
|
8
|
-
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
9
|
-
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
10
7
|
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
11
8
|
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
12
9
|
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
@@ -14,112 +11,114 @@ var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/in
|
|
|
14
11
|
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
15
12
|
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
16
13
|
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
14
|
+
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
17
15
|
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
18
16
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
17
|
+
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
18
|
+
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
19
|
+
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
20
|
+
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
21
|
+
var _parseFloat = require('@babel/runtime-corejs3/core-js-stable/parse-float');
|
|
22
|
+
var _valuesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/values');
|
|
23
|
+
var isEmpty$3 = require('lodash/isEmpty');
|
|
24
|
+
var omit = require('lodash/omit');
|
|
25
|
+
var pick = require('lodash/pick');
|
|
26
|
+
var l10n = require('@commercetools-frontend/l10n');
|
|
27
|
+
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
19
28
|
var React = require('react');
|
|
29
|
+
var client = require('@apollo/client');
|
|
30
|
+
var react = require('@apollo/client/react');
|
|
20
31
|
var reactIntl = require('react-intl');
|
|
21
32
|
var applicationShellConnectors = require('@commercetools-frontend/application-shell-connectors');
|
|
33
|
+
var uiKit = require('@commercetools-frontend/ui-kit');
|
|
34
|
+
var _Map = require('@babel/runtime-corejs3/core-js-stable/map');
|
|
35
|
+
var _everyInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/every');
|
|
36
|
+
var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
37
|
+
var _setTimeout = require('@babel/runtime-corejs3/core-js-stable/set-timeout');
|
|
38
|
+
var fastEquals = require('fast-equals');
|
|
39
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
40
|
+
var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
|
|
41
|
+
var classnames = require('classnames');
|
|
42
|
+
var camelCase = require('lodash/camelCase');
|
|
22
43
|
var _Reflect$construct = require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
23
44
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
24
45
|
var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
25
46
|
var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
26
47
|
var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
27
48
|
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
28
|
-
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
29
|
-
var _toArray = require('@babel/runtime-corejs3/helpers/toArray');
|
|
30
|
-
var _reverseInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reverse');
|
|
31
|
-
var _sliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
32
|
-
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
33
|
-
var client = require('@apollo/client');
|
|
34
|
-
var react = require('@apollo/client/react');
|
|
35
|
-
var sdk = require('@commercetools-frontend/sdk');
|
|
36
|
-
var classnames = require('classnames');
|
|
37
|
-
var fastEquals = require('fast-equals');
|
|
38
|
-
var flowRight = require('lodash/flowRight');
|
|
39
|
-
require('react-required-if');
|
|
40
|
-
var _setTimeout = require('@babel/runtime-corejs3/core-js-stable/set-timeout');
|
|
41
|
-
var Textarea = require('react-textarea-autosize');
|
|
42
|
-
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
43
|
-
var PropTypes = require('prop-types');
|
|
44
|
-
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
45
|
-
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
46
|
-
var l10n = require('@commercetools-frontend/l10n');
|
|
47
|
-
var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/values');
|
|
48
|
-
var hooks = require('@apollo/client/react/hooks');
|
|
49
|
-
var _sortInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/sort');
|
|
50
|
-
var camelCase = require('lodash/camelCase');
|
|
51
|
-
var get = require('lodash/get');
|
|
52
|
-
var formik = require('formik');
|
|
53
|
-
var _Date$now = require('@babel/runtime-corejs3/core-js-stable/date/now');
|
|
54
|
-
var applicationShell = require('@commercetools-frontend/application-shell');
|
|
55
|
-
var debounce = require('debounce-promise');
|
|
56
|
-
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
57
|
-
var pick = require('lodash/pick');
|
|
58
|
-
var oneLine = require('common-tags/lib/oneLine');
|
|
59
|
-
var moment = require('moment');
|
|
60
|
-
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
61
49
|
var _someInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/some');
|
|
50
|
+
var oneLine = require('common-tags/lib/oneLine');
|
|
62
51
|
var moment$1 = require('moment-timezone');
|
|
52
|
+
var formik = require('formik');
|
|
63
53
|
var isNil$1 = require('lodash/isNil');
|
|
64
|
-
var sentry = require('@commercetools-frontend/sentry');
|
|
65
|
-
var _valuesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/values');
|
|
66
|
-
var _Object$entries = require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
67
|
-
var _parseFloat = require('@babel/runtime-corejs3/core-js-stable/parse-float');
|
|
68
|
-
var isEmpty$3 = require('lodash/isEmpty');
|
|
69
|
-
var omit = require('lodash/omit');
|
|
70
|
-
var _Object$freeze = require('@babel/runtime-corejs3/core-js-stable/object/freeze');
|
|
71
|
-
var originalOmitDeep = require('omit-deep');
|
|
72
|
-
var _parseInt = require('@babel/runtime-corejs3/core-js-stable/parse-int');
|
|
73
|
-
var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
74
|
-
var _indexOfInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
|
|
75
|
-
var omitEmpty = require('omit-empty-es');
|
|
76
|
-
var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
|
|
77
|
-
var _Map = require('@babel/runtime-corejs3/core-js-stable/map');
|
|
78
|
-
var _everyInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/every');
|
|
79
|
-
var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
80
|
-
var keyBy = require('lodash/keyBy');
|
|
81
|
-
var _ = require('@commercetools-frontend/ui-kit/');
|
|
82
54
|
var omitBy = require('lodash/omitBy');
|
|
55
|
+
var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
56
|
+
var _sliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
83
57
|
var _lastIndexOfInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/last-index-of');
|
|
58
|
+
var _parseInt = require('@babel/runtime-corejs3/core-js-stable/parse-int');
|
|
84
59
|
var merge = require('lodash/merge');
|
|
85
60
|
var set = require('lodash/set');
|
|
86
61
|
var times = require('lodash/times');
|
|
87
62
|
var uuid = require('uuid');
|
|
63
|
+
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
88
64
|
var reselect = require('reselect');
|
|
89
65
|
var _endsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/ends-with');
|
|
66
|
+
var _toArray = require('@babel/runtime-corejs3/helpers/toArray');
|
|
67
|
+
var _reverseInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reverse');
|
|
68
|
+
var debounce = require('debounce-promise');
|
|
69
|
+
var sdk = require('@commercetools-frontend/sdk');
|
|
70
|
+
var keyBy = require('lodash/keyBy');
|
|
71
|
+
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
72
|
+
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
73
|
+
var applicationShell = require('@commercetools-frontend/application-shell');
|
|
74
|
+
var _ = require('@commercetools-frontend/ui-kit/');
|
|
75
|
+
var PropTypes = require('prop-types');
|
|
90
76
|
var react$1 = require('@emotion/react');
|
|
91
|
-
var ReactDOM = require('react-dom');
|
|
92
77
|
var reactBeautifulDnd = require('react-beautiful-dnd');
|
|
78
|
+
var ReactDOM = require('react-dom');
|
|
79
|
+
var _indexOfInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
|
|
93
80
|
var selectUtils = require('@commercetools-uikit/select-utils');
|
|
94
|
-
var memoize = require('memoize-one');
|
|
95
81
|
var utils = require('@commercetools-uikit/utils');
|
|
82
|
+
require('react-required-if');
|
|
83
|
+
var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/values');
|
|
84
|
+
var _sortInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/sort');
|
|
96
85
|
var commonTags = require('common-tags');
|
|
97
86
|
var has = require('lodash/has');
|
|
98
87
|
require('tiny-warning');
|
|
99
|
-
var hoc = require('@apollo/client/react/hoc');
|
|
100
|
-
var flatten = require('lodash/flatten');
|
|
101
|
-
var uniqBy = require('lodash/uniqBy');
|
|
102
|
-
var invariant = require('tiny-invariant');
|
|
103
|
-
var hoistNonReactStatics = require('hoist-non-react-statics');
|
|
104
|
-
var reactRedux = require('react-redux');
|
|
105
88
|
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
106
89
|
var _Math$trunc = require('@babel/runtime-corejs3/core-js-stable/math/trunc');
|
|
107
90
|
var _Number$isNaN = require('@babel/runtime-corejs3/core-js-stable/number/is-nan');
|
|
108
91
|
var Cleave = require('cleave.js/react');
|
|
109
92
|
var isFinite = require('lodash/isFinite');
|
|
110
93
|
var isUndefined = require('lodash/isUndefined');
|
|
94
|
+
var flowRight = require('lodash/flowRight');
|
|
95
|
+
var Textarea = require('react-textarea-autosize');
|
|
111
96
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
112
97
|
var _findIndexInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find-index');
|
|
113
|
-
var
|
|
98
|
+
var moment = require('moment');
|
|
99
|
+
var _Object$freeze = require('@babel/runtime-corejs3/core-js-stable/object/freeze');
|
|
100
|
+
var originalOmitDeep = require('omit-deep');
|
|
114
101
|
var compact = require('lodash/compact');
|
|
115
102
|
var _Set = require('@babel/runtime-corejs3/core-js-stable/set');
|
|
103
|
+
var flatMap = require('lodash/flatMap');
|
|
116
104
|
require('@babel/runtime-corejs3/helpers/get');
|
|
105
|
+
var _Date$now = require('@babel/runtime-corejs3/core-js-stable/date/now');
|
|
117
106
|
var _spliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/splice');
|
|
107
|
+
var memoize = require('memoize-one');
|
|
108
|
+
var omitEmpty = require('omit-empty-es');
|
|
109
|
+
var hoc = require('@apollo/client/react/hoc');
|
|
110
|
+
var flatten = require('lodash/flatten');
|
|
111
|
+
var uniqBy = require('lodash/uniqBy');
|
|
112
|
+
var invariant = require('tiny-invariant');
|
|
113
|
+
var hoistNonReactStatics = require('hoist-non-react-statics');
|
|
114
|
+
var sentry = require('@commercetools-frontend/sentry');
|
|
115
|
+
var hooks = require('@apollo/client/react/hooks');
|
|
116
|
+
var reactRedux = require('react-redux');
|
|
117
|
+
var get = require('lodash/get');
|
|
118
118
|
|
|
119
119
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
120
120
|
|
|
121
121
|
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
122
|
-
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
123
122
|
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
124
123
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
125
124
|
var _Object$getOwnPropertyDescriptor__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptor);
|
|
@@ -127,72 +126,73 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachIns
|
|
|
127
126
|
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
128
127
|
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
129
128
|
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
130
|
-
var
|
|
131
|
-
var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
|
|
132
|
-
var _reverseInstanceProperty__default = /*#__PURE__*/_interopDefault(_reverseInstanceProperty);
|
|
133
|
-
var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanceProperty);
|
|
129
|
+
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
134
130
|
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
135
|
-
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
136
|
-
var flowRight__default = /*#__PURE__*/_interopDefault(flowRight);
|
|
137
|
-
var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
|
|
138
|
-
var Textarea__default = /*#__PURE__*/_interopDefault(Textarea);
|
|
139
|
-
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
140
131
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
141
|
-
var _Object$values__default = /*#__PURE__*/_interopDefault(_Object$values);
|
|
142
|
-
var _sortInstanceProperty__default = /*#__PURE__*/_interopDefault(_sortInstanceProperty);
|
|
143
|
-
var camelCase__default = /*#__PURE__*/_interopDefault(camelCase);
|
|
144
|
-
var get__default = /*#__PURE__*/_interopDefault(get);
|
|
145
|
-
var _Date$now__default = /*#__PURE__*/_interopDefault(_Date$now);
|
|
146
|
-
var debounce__default = /*#__PURE__*/_interopDefault(debounce);
|
|
147
|
-
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
148
|
-
var pick__default = /*#__PURE__*/_interopDefault(pick);
|
|
149
|
-
var oneLine__default = /*#__PURE__*/_interopDefault(oneLine);
|
|
150
|
-
var moment__default = /*#__PURE__*/_interopDefault(moment);
|
|
151
|
-
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
152
|
-
var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
|
|
153
|
-
var moment__default$1 = /*#__PURE__*/_interopDefault(moment$1);
|
|
154
|
-
var isNil__default = /*#__PURE__*/_interopDefault(isNil$1);
|
|
155
|
-
var _valuesInstanceProperty__default = /*#__PURE__*/_interopDefault(_valuesInstanceProperty);
|
|
156
132
|
var _Object$entries__default = /*#__PURE__*/_interopDefault(_Object$entries);
|
|
157
133
|
var _parseFloat__default = /*#__PURE__*/_interopDefault(_parseFloat);
|
|
134
|
+
var _valuesInstanceProperty__default = /*#__PURE__*/_interopDefault(_valuesInstanceProperty);
|
|
158
135
|
var isEmpty__default = /*#__PURE__*/_interopDefault(isEmpty$3);
|
|
159
136
|
var omit__default = /*#__PURE__*/_interopDefault(omit);
|
|
160
|
-
var
|
|
161
|
-
var
|
|
162
|
-
var
|
|
163
|
-
var _Array$isArray__default = /*#__PURE__*/_interopDefault(_Array$isArray);
|
|
164
|
-
var _indexOfInstanceProperty__default = /*#__PURE__*/_interopDefault(_indexOfInstanceProperty);
|
|
165
|
-
var omitEmpty__default = /*#__PURE__*/_interopDefault(omitEmpty);
|
|
166
|
-
var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);
|
|
137
|
+
var pick__default = /*#__PURE__*/_interopDefault(pick);
|
|
138
|
+
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
139
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
167
140
|
var _Map__default = /*#__PURE__*/_interopDefault(_Map);
|
|
168
141
|
var _everyInstanceProperty__default = /*#__PURE__*/_interopDefault(_everyInstanceProperty);
|
|
169
142
|
var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
|
|
170
|
-
var
|
|
143
|
+
var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
|
|
144
|
+
var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);
|
|
145
|
+
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
146
|
+
var camelCase__default = /*#__PURE__*/_interopDefault(camelCase);
|
|
147
|
+
var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
|
|
148
|
+
var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
|
|
149
|
+
var oneLine__default = /*#__PURE__*/_interopDefault(oneLine);
|
|
150
|
+
var moment__default$1 = /*#__PURE__*/_interopDefault(moment$1);
|
|
151
|
+
var isNil__default = /*#__PURE__*/_interopDefault(isNil$1);
|
|
171
152
|
var omitBy__default = /*#__PURE__*/_interopDefault(omitBy);
|
|
153
|
+
var _Array$isArray__default = /*#__PURE__*/_interopDefault(_Array$isArray);
|
|
154
|
+
var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanceProperty);
|
|
172
155
|
var _lastIndexOfInstanceProperty__default = /*#__PURE__*/_interopDefault(_lastIndexOfInstanceProperty);
|
|
156
|
+
var _parseInt__default = /*#__PURE__*/_interopDefault(_parseInt);
|
|
173
157
|
var merge__default = /*#__PURE__*/_interopDefault(merge);
|
|
174
158
|
var set__default = /*#__PURE__*/_interopDefault(set);
|
|
175
159
|
var times__default = /*#__PURE__*/_interopDefault(times);
|
|
160
|
+
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
176
161
|
var _endsWithInstanceProperty__default = /*#__PURE__*/_interopDefault(_endsWithInstanceProperty);
|
|
162
|
+
var _reverseInstanceProperty__default = /*#__PURE__*/_interopDefault(_reverseInstanceProperty);
|
|
163
|
+
var debounce__default = /*#__PURE__*/_interopDefault(debounce);
|
|
164
|
+
var keyBy__default = /*#__PURE__*/_interopDefault(keyBy);
|
|
165
|
+
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
177
166
|
var ReactDOM__default = /*#__PURE__*/_interopDefault(ReactDOM);
|
|
178
|
-
var
|
|
167
|
+
var _indexOfInstanceProperty__default = /*#__PURE__*/_interopDefault(_indexOfInstanceProperty);
|
|
168
|
+
var _Object$values__default = /*#__PURE__*/_interopDefault(_Object$values);
|
|
169
|
+
var _sortInstanceProperty__default = /*#__PURE__*/_interopDefault(_sortInstanceProperty);
|
|
179
170
|
var has__default = /*#__PURE__*/_interopDefault(has);
|
|
180
|
-
var flatten__default = /*#__PURE__*/_interopDefault(flatten);
|
|
181
|
-
var uniqBy__default = /*#__PURE__*/_interopDefault(uniqBy);
|
|
182
|
-
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
183
|
-
var hoistNonReactStatics__default = /*#__PURE__*/_interopDefault(hoistNonReactStatics);
|
|
184
171
|
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
185
172
|
var _Math$trunc__default = /*#__PURE__*/_interopDefault(_Math$trunc);
|
|
186
173
|
var _Number$isNaN__default = /*#__PURE__*/_interopDefault(_Number$isNaN);
|
|
187
174
|
var Cleave__default = /*#__PURE__*/_interopDefault(Cleave);
|
|
188
175
|
var isFinite__default = /*#__PURE__*/_interopDefault(isFinite);
|
|
189
176
|
var isUndefined__default = /*#__PURE__*/_interopDefault(isUndefined);
|
|
177
|
+
var flowRight__default = /*#__PURE__*/_interopDefault(flowRight);
|
|
178
|
+
var Textarea__default = /*#__PURE__*/_interopDefault(Textarea);
|
|
190
179
|
var _Object$assign__default = /*#__PURE__*/_interopDefault(_Object$assign);
|
|
191
180
|
var _findIndexInstanceProperty__default = /*#__PURE__*/_interopDefault(_findIndexInstanceProperty);
|
|
192
|
-
var
|
|
181
|
+
var moment__default = /*#__PURE__*/_interopDefault(moment);
|
|
182
|
+
var _Object$freeze__default = /*#__PURE__*/_interopDefault(_Object$freeze);
|
|
183
|
+
var originalOmitDeep__default = /*#__PURE__*/_interopDefault(originalOmitDeep);
|
|
193
184
|
var compact__default = /*#__PURE__*/_interopDefault(compact);
|
|
194
185
|
var _Set__default = /*#__PURE__*/_interopDefault(_Set);
|
|
186
|
+
var flatMap__default = /*#__PURE__*/_interopDefault(flatMap);
|
|
187
|
+
var _Date$now__default = /*#__PURE__*/_interopDefault(_Date$now);
|
|
195
188
|
var _spliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_spliceInstanceProperty);
|
|
189
|
+
var memoize__default = /*#__PURE__*/_interopDefault(memoize);
|
|
190
|
+
var omitEmpty__default = /*#__PURE__*/_interopDefault(omitEmpty);
|
|
191
|
+
var flatten__default = /*#__PURE__*/_interopDefault(flatten);
|
|
192
|
+
var uniqBy__default = /*#__PURE__*/_interopDefault(uniqBy);
|
|
193
|
+
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
194
|
+
var hoistNonReactStatics__default = /*#__PURE__*/_interopDefault(hoistNonReactStatics);
|
|
195
|
+
var get__default = /*#__PURE__*/_interopDefault(get);
|
|
196
196
|
|
|
197
197
|
var styles$k = {
|
|
198
198
|
"loading-container": "centered-loading-spinner-module__loading-container___3_9-h"
|
|
@@ -207,6 +207,7 @@ const CenteredLoadingSpinner = () => jsxRuntime.jsx("div", {
|
|
|
207
207
|
children: jsxRuntime.jsx(uiKit.LoadingSpinner, {})
|
|
208
208
|
});
|
|
209
209
|
CenteredLoadingSpinner.displayName = 'CenteredLoadingSpinner';
|
|
210
|
+
var CenteredLoadingSpinner$1 = CenteredLoadingSpinner;
|
|
210
211
|
|
|
211
212
|
const QUERY_MAX_LIMIT = 500;
|
|
212
213
|
const SHOW_TOOLTIP_CHARS_COUNT = 40;
|
|
@@ -262,7 +263,7 @@ var pickerMessages$1 = reactIntl.defineMessages({
|
|
|
262
263
|
}
|
|
263
264
|
});
|
|
264
265
|
|
|
265
|
-
var messages$
|
|
266
|
+
var messages$Q = reactIntl.defineMessages({
|
|
266
267
|
noChannelsFound: {
|
|
267
268
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
268
269
|
description: 'The message to display when no channels were found',
|
|
@@ -323,7 +324,7 @@ const ChannelPickerInput = _ref => {
|
|
|
323
324
|
return channel;
|
|
324
325
|
}, [formatLocalizedFieldToString]);
|
|
325
326
|
const prefixSearchFields = React.useMemo(() => [`name.${dataLocale}`, 'key'], [dataLocale]);
|
|
326
|
-
const loadOptions = useLoadOptions({
|
|
327
|
+
const loadOptions = useLoadOptions$1({
|
|
327
328
|
query: GetChannelsQuery,
|
|
328
329
|
variables,
|
|
329
330
|
prefixSearchFields
|
|
@@ -348,8 +349,8 @@ const ChannelPickerInput = _ref => {
|
|
|
348
349
|
setLoadingError(error);
|
|
349
350
|
onError(error);
|
|
350
351
|
}), [loadOptions, convertChannelToOption, onError]);
|
|
351
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
352
|
-
const _useHandlers = useHandlers(onChange),
|
|
352
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
353
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
353
354
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
354
355
|
handleInternalInputChange = _useHandlers2[0],
|
|
355
356
|
handleChange = _useHandlers2[1];
|
|
@@ -362,18 +363,18 @@ const ChannelPickerInput = _ref => {
|
|
|
362
363
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
363
364
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
364
365
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
365
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
366
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$Q.noChannelsFound), [loadingError, formatMessage]);
|
|
366
367
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
367
368
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
368
369
|
max: "scale",
|
|
369
370
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
370
371
|
scale: "xs",
|
|
371
|
-
children: [jsxRuntime.jsx(CustomFieldTooltip, {
|
|
372
|
+
children: [jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
372
373
|
title: tooltipTitle,
|
|
373
374
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
374
375
|
id: name,
|
|
375
376
|
name: name,
|
|
376
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
377
|
+
placeholder: placeholder ?? formatMessage(messages$Q.placeholder),
|
|
377
378
|
loadOptions: loadOptionsDebounced,
|
|
378
379
|
defaultOptions: true,
|
|
379
380
|
showOptionGroupDivider: true,
|
|
@@ -401,6 +402,7 @@ const ChannelPickerInput = _ref => {
|
|
|
401
402
|
});
|
|
402
403
|
};
|
|
403
404
|
ChannelPickerInput.displayName = 'ChannelPickerInput';
|
|
405
|
+
var ChannelPickerInput$1 = ChannelPickerInput;
|
|
404
406
|
|
|
405
407
|
function _callSuper$9(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$9() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
406
408
|
function _isNativeReflectConstruct$9() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$9 = function () { return !!t; })(); }
|
|
@@ -428,7 +430,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
428
430
|
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
429
431
|
var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
430
432
|
|
|
431
|
-
var messages$
|
|
433
|
+
var messages$P = reactIntl.defineMessages({
|
|
432
434
|
noProductTypesFound: {
|
|
433
435
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
434
436
|
description: 'The message to display when no product types were found',
|
|
@@ -473,7 +475,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
473
475
|
_useState2 = _slicedToArray(_useState, 2),
|
|
474
476
|
loadingError = _useState2[0],
|
|
475
477
|
setLoadingError = _useState2[1];
|
|
476
|
-
const _useProductTypeOption = useProductTypeOptions({
|
|
478
|
+
const _useProductTypeOption = useProductTypeOptions$1({
|
|
477
479
|
prefixSearchFields
|
|
478
480
|
}),
|
|
479
481
|
loadProductTypes = _useProductTypeOption.loadProductTypes;
|
|
@@ -493,8 +495,8 @@ const ProductTypePickerInput = _ref => {
|
|
|
493
495
|
setLoadingError(error);
|
|
494
496
|
onError(error);
|
|
495
497
|
}), [loadProductTypes, onError]);
|
|
496
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
497
|
-
const _useHandlers = useHandlers(onChange),
|
|
498
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
499
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
498
500
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
499
501
|
handleInternalInputChange = _useHandlers2[0],
|
|
500
502
|
handleChange = _useHandlers2[1];
|
|
@@ -510,14 +512,14 @@ const ProductTypePickerInput = _ref => {
|
|
|
510
512
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
511
513
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
512
514
|
max: "scale",
|
|
513
|
-
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
515
|
+
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner$1, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
514
516
|
scale: "xs",
|
|
515
|
-
children: [jsxRuntime.jsx(CustomFieldTooltip, {
|
|
517
|
+
children: [jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
516
518
|
title: tooltipTitle,
|
|
517
519
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
518
520
|
id: name,
|
|
519
521
|
name: name,
|
|
520
|
-
placeholder: formatMessage(messages$
|
|
522
|
+
placeholder: formatMessage(messages$P.placeholder),
|
|
521
523
|
loadOptions: loadOptionsDebounced,
|
|
522
524
|
defaultOptions: [],
|
|
523
525
|
isClearable: isClearable,
|
|
@@ -530,7 +532,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
530
532
|
onInputChange: handleInputChange,
|
|
531
533
|
onBlur: onBlur,
|
|
532
534
|
value: currentOption.data,
|
|
533
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
535
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$P.noProductTypesFound),
|
|
534
536
|
hasError: hasError || isLoadingFailed,
|
|
535
537
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
536
538
|
menuPortalTarget: document.body,
|
|
@@ -544,8 +546,9 @@ const ProductTypePickerInput = _ref => {
|
|
|
544
546
|
});
|
|
545
547
|
};
|
|
546
548
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
549
|
+
var ProductTypePickerInput$1 = ProductTypePickerInput;
|
|
547
550
|
|
|
548
|
-
var messages$
|
|
551
|
+
var messages$O = reactIntl.defineMessages({
|
|
549
552
|
noStatesFound: {
|
|
550
553
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
551
554
|
description: 'The message to display when no states were found',
|
|
@@ -592,7 +595,7 @@ const StatePickerInput = _ref => {
|
|
|
592
595
|
loadingError = _useState2[0],
|
|
593
596
|
setLoadingError = _useState2[1];
|
|
594
597
|
const prefixSearchFields = React.useMemo(() => [`name.${dataLocale}`, 'key'], [dataLocale]);
|
|
595
|
-
const loadOptions = useLoadOptions({
|
|
598
|
+
const loadOptions = useLoadOptions$1({
|
|
596
599
|
query: GetStatesQuery,
|
|
597
600
|
variables,
|
|
598
601
|
prefixSearchFields
|
|
@@ -615,8 +618,8 @@ const StatePickerInput = _ref => {
|
|
|
615
618
|
setLoadingError(error);
|
|
616
619
|
onError(error);
|
|
617
620
|
}), [loadOptions, convertStateToOption, onError]);
|
|
618
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
619
|
-
const _useHandlers = useHandlers(onChange),
|
|
621
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
622
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
620
623
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
621
624
|
handleInternalInputChange = _useHandlers2[0],
|
|
622
625
|
handleChange = _useHandlers2[1];
|
|
@@ -629,19 +632,19 @@ const StatePickerInput = _ref => {
|
|
|
629
632
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
630
633
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
631
634
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
632
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
635
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$O.noStatesFound), [loadingError, formatMessage]);
|
|
633
636
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
634
637
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
635
638
|
max: "scale",
|
|
636
|
-
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
639
|
+
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner$1, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
637
640
|
scale: "xs",
|
|
638
|
-
children: [jsxRuntime.jsx(CustomFieldTooltip, {
|
|
641
|
+
children: [jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
639
642
|
title: tooltipTitle,
|
|
640
643
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
641
644
|
id: name,
|
|
642
645
|
name: name,
|
|
643
646
|
horizontalConstraint: "scale",
|
|
644
|
-
placeholder: formatMessage(messages$
|
|
647
|
+
placeholder: formatMessage(messages$O.placeholder),
|
|
645
648
|
loadOptions: loadOptionsDebounced,
|
|
646
649
|
defaultOptions: true,
|
|
647
650
|
showOptionGroupDivider: true,
|
|
@@ -669,6 +672,7 @@ const StatePickerInput = _ref => {
|
|
|
669
672
|
});
|
|
670
673
|
};
|
|
671
674
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
675
|
+
var StatePickerInput$1 = StatePickerInput;
|
|
672
676
|
|
|
673
677
|
function ownKeys$1q(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
674
678
|
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__default["default"](_context = ownKeys$1q(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1q(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -695,8 +699,9 @@ const CustomFieldTooltip = _ref => {
|
|
|
695
699
|
children: children
|
|
696
700
|
});
|
|
697
701
|
};
|
|
702
|
+
var CustomFieldTooltip$1 = CustomFieldTooltip;
|
|
698
703
|
|
|
699
|
-
var messages$
|
|
704
|
+
var messages$N = reactIntl.defineMessages({
|
|
700
705
|
bottomOption: {
|
|
701
706
|
id: 'Products.Pickers.bottomOption',
|
|
702
707
|
description: 'The message to display at the end of the options menu',
|
|
@@ -708,7 +713,7 @@ function ownKeys$1p(e, r) { var t = _Object$keys__default["default"](e); if (_Ob
|
|
|
708
713
|
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__default["default"](_context = ownKeys$1p(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1p(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
709
714
|
const getBottomOption = formatMessage => ({
|
|
710
715
|
options: [{
|
|
711
|
-
label: formatMessage ? formatMessage(messages$
|
|
716
|
+
label: formatMessage ? formatMessage(messages$N.bottomOption) : messages$N.bottomOption,
|
|
712
717
|
isBottomOption: true,
|
|
713
718
|
isDisabled: true
|
|
714
719
|
}]
|
|
@@ -743,7 +748,7 @@ const useHandlers = onChange => {
|
|
|
743
748
|
const handleInputChange = React.useCallback(changedValue => {
|
|
744
749
|
setInputValue(changedValue);
|
|
745
750
|
}, []);
|
|
746
|
-
const handleChange = useEventCallback(event => {
|
|
751
|
+
const handleChange = useEventCallback$1(event => {
|
|
747
752
|
const eventWithExtractedValue = _objectSpread$1o(_objectSpread$1o({}, event), {}, {
|
|
748
753
|
target: _objectSpread$1o(_objectSpread$1o({}, event.target), {}, {
|
|
749
754
|
value: event.target.value?.value
|
|
@@ -753,6 +758,7 @@ const useHandlers = onChange => {
|
|
|
753
758
|
}, [onChange, inputValue]);
|
|
754
759
|
return [handleInputChange, handleChange];
|
|
755
760
|
};
|
|
761
|
+
var useHandlers$1 = useHandlers;
|
|
756
762
|
|
|
757
763
|
const _excluded$3 = ["extraWhere"];
|
|
758
764
|
function ownKeys$1n(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -785,10 +791,10 @@ const useLoadOptions = _ref => {
|
|
|
785
791
|
let inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
786
792
|
let where;
|
|
787
793
|
if (inputValue.length) {
|
|
788
|
-
if (isUUID(inputValue)) {
|
|
794
|
+
if (isUUID$1(inputValue)) {
|
|
789
795
|
where = `id = "${inputValue}"`;
|
|
790
796
|
} else {
|
|
791
|
-
const _getPrefixSearchBound = getPrefixSearchBounds(inputValue),
|
|
797
|
+
const _getPrefixSearchBound = getPrefixSearchBounds$1(inputValue),
|
|
792
798
|
_getPrefixSearchBound2 = _slicedToArray(_getPrefixSearchBound, 2),
|
|
793
799
|
lowerBound = _getPrefixSearchBound2[0],
|
|
794
800
|
upperBound = _getPrefixSearchBound2[1];
|
|
@@ -814,6 +820,7 @@ const useLoadOptions = _ref => {
|
|
|
814
820
|
}, [client$1, query, variables, prefixSearchFields]);
|
|
815
821
|
return loadOptions;
|
|
816
822
|
};
|
|
823
|
+
var useLoadOptions$1 = useLoadOptions;
|
|
817
824
|
|
|
818
825
|
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 } } } };
|
|
819
826
|
const useExecuteGraphQLRequest = () => {
|
|
@@ -904,8 +911,8 @@ const constructPrefixSearchPredicate = (prefixSearchFields, lowerBound, upperBou
|
|
|
904
911
|
const constructWherePredicate = (inputValue, prefixSearchFields) => {
|
|
905
912
|
const wherePredicate = function () {
|
|
906
913
|
if (inputValue.length) {
|
|
907
|
-
if (isUUID(inputValue)) return `id = "${inputValue}"`;else {
|
|
908
|
-
const _getPrefixSearchBound = getPrefixSearchBounds(inputValue),
|
|
914
|
+
if (isUUID$1(inputValue)) return `id = "${inputValue}"`;else {
|
|
915
|
+
const _getPrefixSearchBound = getPrefixSearchBounds$1(inputValue),
|
|
909
916
|
_getPrefixSearchBound2 = _slicedToArray(_getPrefixSearchBound, 2),
|
|
910
917
|
lowerBound = _getPrefixSearchBound2[0],
|
|
911
918
|
upperBound = _getPrefixSearchBound2[1];
|
|
@@ -963,6 +970,7 @@ const useProductTypeOptions = _ref3 => {
|
|
|
963
970
|
loadProductTypes: isProjectIndexed ? fetchProductTypesFromPim : fetchProductTypessFromCTP
|
|
964
971
|
};
|
|
965
972
|
};
|
|
973
|
+
var useProductTypeOptions$1 = useProductTypeOptions;
|
|
966
974
|
|
|
967
975
|
function useCurrentOption(_ref) {
|
|
968
976
|
let id = _ref.id,
|
|
@@ -1014,16 +1022,20 @@ const getDisplayName = Component => {
|
|
|
1014
1022
|
}
|
|
1015
1023
|
return Component.displayName || Component.name || 'Component';
|
|
1016
1024
|
};
|
|
1025
|
+
var getDisplayName$1 = getDisplayName;
|
|
1017
1026
|
|
|
1018
1027
|
const setDisplayName = nextDisplayName => Component => {
|
|
1019
1028
|
// eslint-disable-next-line no-param-reassign
|
|
1020
1029
|
Component.displayName = nextDisplayName;
|
|
1021
1030
|
return Component;
|
|
1022
1031
|
};
|
|
1032
|
+
var setDisplayName$1 = setDisplayName;
|
|
1023
1033
|
|
|
1024
|
-
const keepDisplayName = component => setDisplayName(getDisplayName(component));
|
|
1034
|
+
const keepDisplayName = component => setDisplayName$1(getDisplayName$1(component));
|
|
1035
|
+
var keepDisplayName$1 = keepDisplayName;
|
|
1025
1036
|
|
|
1026
|
-
const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName(BaseComponent)})`;
|
|
1037
|
+
const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName$1(BaseComponent)})`;
|
|
1038
|
+
var wrapDisplayName$1 = wrapDisplayName;
|
|
1027
1039
|
|
|
1028
1040
|
function ownKeys$1m(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1029
1041
|
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__default["default"](_context = ownKeys$1m(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1m(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1061,9 +1073,10 @@ const withMouseOverState = BaseComponent => {
|
|
|
1061
1073
|
}
|
|
1062
1074
|
}]);
|
|
1063
1075
|
}(React.Component);
|
|
1064
|
-
WithMouseOverState.displayName = wrapDisplayName(BaseComponent, 'withMouseOverState');
|
|
1076
|
+
WithMouseOverState.displayName = wrapDisplayName$1(BaseComponent, 'withMouseOverState');
|
|
1065
1077
|
return WithMouseOverState;
|
|
1066
1078
|
};
|
|
1079
|
+
var withMouseOverState$1 = withMouseOverState;
|
|
1067
1080
|
|
|
1068
1081
|
function ownKeys$1l(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1069
1082
|
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__default["default"](_context = ownKeys$1l(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1l(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1221,8 +1234,9 @@ ThrottledField.defaultProps = {
|
|
|
1221
1234
|
autoFocus: false,
|
|
1222
1235
|
label: 'Throttled field'
|
|
1223
1236
|
};
|
|
1237
|
+
var ThrottledField$1 = ThrottledField;
|
|
1224
1238
|
|
|
1225
|
-
var messages$
|
|
1239
|
+
var messages$M = reactIntl.defineMessages({
|
|
1226
1240
|
buttonLabel: {
|
|
1227
1241
|
id: 'SearchInput.buttonLabel',
|
|
1228
1242
|
description: 'Label for "Search" button.',
|
|
@@ -1321,13 +1335,13 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
1321
1335
|
[styles$i['input-container-disabled']]: this.props.disabled && this.props.enableDisabledStyle,
|
|
1322
1336
|
[styles$i['input-container-granular']]: this.props.isGranular
|
|
1323
1337
|
}),
|
|
1324
|
-
children: jsxRuntime.jsx(ThrottledField, {
|
|
1338
|
+
children: jsxRuntime.jsx(ThrottledField$1, {
|
|
1325
1339
|
style: "primary",
|
|
1326
1340
|
name: "search-text",
|
|
1327
1341
|
"data-testid": this.props.testId || 'search-input',
|
|
1328
1342
|
value: this.state.text,
|
|
1329
1343
|
label: this.props.label,
|
|
1330
|
-
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$
|
|
1344
|
+
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$M.placeholder),
|
|
1331
1345
|
inputRef: this.props.inputRef || this.setInputRef,
|
|
1332
1346
|
onChange: this.handleInputChange,
|
|
1333
1347
|
onEnter: this.handleEnter,
|
|
@@ -1382,7 +1396,7 @@ SearchInput.defaultProps = {
|
|
|
1382
1396
|
label: 'Search input',
|
|
1383
1397
|
onChange: () => null
|
|
1384
1398
|
};
|
|
1385
|
-
var searchInput = flowRight__default["default"](keepDisplayName(SearchInput), withMouseOverState, reactIntl.injectIntl)(SearchInput);
|
|
1399
|
+
var searchInput = flowRight__default["default"](keepDisplayName$1(SearchInput), withMouseOverState$1, reactIntl.injectIntl)(SearchInput);
|
|
1386
1400
|
|
|
1387
1401
|
function ownKeys$1k(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1388
1402
|
function _objectSpread$1k(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1406,9 +1420,10 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1406
1420
|
}
|
|
1407
1421
|
}));
|
|
1408
1422
|
};
|
|
1409
|
-
WithDataTablePaginationState.displayName = wrapDisplayName(WithDataTablePaginationState, 'WithDataTablePaginationState');
|
|
1423
|
+
WithDataTablePaginationState.displayName = wrapDisplayName$1(WithDataTablePaginationState, 'WithDataTablePaginationState');
|
|
1410
1424
|
return WithDataTablePaginationState;
|
|
1411
1425
|
};
|
|
1426
|
+
var injectDataTablePaginationState$1 = injectDataTablePaginationState;
|
|
1412
1427
|
|
|
1413
1428
|
function ownKeys$1j(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1414
1429
|
function _objectSpread$1j(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1j(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1j(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1430,10 +1445,11 @@ const injectNotifications = function () {
|
|
|
1430
1445
|
[propName]: notifications
|
|
1431
1446
|
}));
|
|
1432
1447
|
};
|
|
1433
|
-
WrappedComponent.displayName = `withNotifications(${getDisplayName(Component)}`;
|
|
1448
|
+
WrappedComponent.displayName = `withNotifications(${getDisplayName$1(Component)}`;
|
|
1434
1449
|
return WrappedComponent;
|
|
1435
1450
|
};
|
|
1436
1451
|
};
|
|
1452
|
+
var injectNotifications$1 = injectNotifications;
|
|
1437
1453
|
|
|
1438
1454
|
function ownKeys$1i(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1439
1455
|
function _objectSpread$1i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1445,9 +1461,10 @@ const withProps = mapProps => Component => {
|
|
|
1445
1461
|
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1i(_objectSpread$1i({}, ownProps), mapProps(ownProps)) : _objectSpread$1i(_objectSpread$1i({}, ownProps), mapProps);
|
|
1446
1462
|
return jsxRuntime.jsx(Component, _objectSpread$1i({}, enhancedProps));
|
|
1447
1463
|
};
|
|
1448
|
-
EnhancedWithProps.displayName = wrapDisplayName(Component, 'withProps');
|
|
1464
|
+
EnhancedWithProps.displayName = wrapDisplayName$1(Component, 'withProps');
|
|
1449
1465
|
return EnhancedWithProps;
|
|
1450
1466
|
};
|
|
1467
|
+
var withProps$1 = withProps;
|
|
1451
1468
|
|
|
1452
1469
|
function ownKeys$1h(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1453
1470
|
function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1h(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1h(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1482,6 +1499,7 @@ const withRedirectTo = options => Component => {
|
|
|
1482
1499
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
1483
1500
|
return WithRedirectTo;
|
|
1484
1501
|
};
|
|
1502
|
+
var withRedirectTo$1 = withRedirectTo;
|
|
1485
1503
|
|
|
1486
1504
|
function ownKeys$1g(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1487
1505
|
function _objectSpread$1g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1g(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1489,7 +1507,7 @@ const defaultOptions$4 = {
|
|
|
1489
1507
|
propName: 'modalState',
|
|
1490
1508
|
isInitiallyOpen: false
|
|
1491
1509
|
};
|
|
1492
|
-
const injectModalState$
|
|
1510
|
+
const injectModalState$2 = options => Component => {
|
|
1493
1511
|
const mergedOptions = _objectSpread$1g(_objectSpread$1g({}, defaultOptions$4), options);
|
|
1494
1512
|
const WithModalState = props => {
|
|
1495
1513
|
const modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
@@ -1497,9 +1515,10 @@ const injectModalState$1 = options => Component => {
|
|
|
1497
1515
|
[mergedOptions.propName]: modalState
|
|
1498
1516
|
}));
|
|
1499
1517
|
};
|
|
1500
|
-
WithModalState.displayName = wrapDisplayName(WithModalState, 'WithModalState');
|
|
1518
|
+
WithModalState.displayName = wrapDisplayName$1(WithModalState, 'WithModalState');
|
|
1501
1519
|
return WithModalState;
|
|
1502
1520
|
};
|
|
1521
|
+
var injectModalState$3 = injectModalState$2;
|
|
1503
1522
|
|
|
1504
1523
|
function ownKeys$1f(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1505
1524
|
function _objectSpread$1f(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1f(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1515,9 +1534,10 @@ const injectModalState = options => Component => {
|
|
|
1515
1534
|
[mergedOptions.propName]: toggleState
|
|
1516
1535
|
}));
|
|
1517
1536
|
};
|
|
1518
|
-
WithToggleState.displayName = wrapDisplayName(WithToggleState, 'WithToggleState');
|
|
1537
|
+
WithToggleState.displayName = wrapDisplayName$1(WithToggleState, 'WithToggleState');
|
|
1519
1538
|
return WithToggleState;
|
|
1520
1539
|
};
|
|
1540
|
+
var injectModalState$1 = injectModalState;
|
|
1521
1541
|
|
|
1522
1542
|
function ownKeys$1e(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1523
1543
|
function _objectSpread$1e(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1e(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1e(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1581,6 +1601,7 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
1581
1601
|
}, [actualStorageValue, initialStorageValue, readFromStorage, writeToStorage]);
|
|
1582
1602
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
1583
1603
|
};
|
|
1604
|
+
var useStorage$1 = useStorage;
|
|
1584
1605
|
|
|
1585
1606
|
function ownKeys$1d(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1586
1607
|
function _objectSpread$1d(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1d(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1d(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1598,7 +1619,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1598
1619
|
*/
|
|
1599
1620
|
const mergedOptions = _objectSpread$1d(_objectSpread$1d({}, defaultOptions$1), options);
|
|
1600
1621
|
const WithStorage = props => {
|
|
1601
|
-
const _useStorage = useStorage(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
1622
|
+
const _useStorage = useStorage$1(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
1602
1623
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
1603
1624
|
actualStorageValue = _useStorage2[0],
|
|
1604
1625
|
writeToStorage = _useStorage2[1],
|
|
@@ -1612,9 +1633,10 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1612
1633
|
};
|
|
1613
1634
|
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1d(_objectSpread$1d({}, props), storageProp));
|
|
1614
1635
|
};
|
|
1615
|
-
WithStorage.displayName = wrapDisplayName(WrappedComponent, 'WithStorage');
|
|
1636
|
+
WithStorage.displayName = wrapDisplayName$1(WrappedComponent, 'WithStorage');
|
|
1616
1637
|
return WithStorage;
|
|
1617
1638
|
};
|
|
1639
|
+
var injectStorage$1 = injectStorage;
|
|
1618
1640
|
|
|
1619
1641
|
/**
|
|
1620
1642
|
* @returns function with the following parameters
|
|
@@ -1767,6 +1789,7 @@ const useIsFieldDuplicated = () => {
|
|
|
1767
1789
|
queryIsFieldDuplicated: execute
|
|
1768
1790
|
};
|
|
1769
1791
|
};
|
|
1792
|
+
var useIsFieldDuplicated$1 = useIsFieldDuplicated;
|
|
1770
1793
|
|
|
1771
1794
|
const usePrevious = value => {
|
|
1772
1795
|
const ref = React.useRef();
|
|
@@ -1775,6 +1798,7 @@ const usePrevious = value => {
|
|
|
1775
1798
|
}, [value]);
|
|
1776
1799
|
return ref.current;
|
|
1777
1800
|
};
|
|
1801
|
+
var usePrevious$1 = usePrevious;
|
|
1778
1802
|
|
|
1779
1803
|
function ownKeys$1b(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1780
1804
|
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__default["default"](_context2 = ownKeys$1b(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1b(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -1842,6 +1866,7 @@ const useStoresListFetcher = props => {
|
|
|
1842
1866
|
}
|
|
1843
1867
|
};
|
|
1844
1868
|
};
|
|
1869
|
+
var useStoresListFetcher$1 = useStoresListFetcher;
|
|
1845
1870
|
|
|
1846
1871
|
const toPermission = (permission, resourceName) => camelCase__default["default"](`can ${permission} ${resourceName}`);
|
|
1847
1872
|
const createPermissionsComposePath = permission =>
|
|
@@ -1871,6 +1896,7 @@ const useStoreKeysInDataFences = _ref => {
|
|
|
1871
1896
|
});
|
|
1872
1897
|
return storeKeysInDataFences;
|
|
1873
1898
|
};
|
|
1899
|
+
var useStoreKeysInDataFences$1 = useStoreKeysInDataFences;
|
|
1874
1900
|
|
|
1875
1901
|
function useDidFormValidationFail() {
|
|
1876
1902
|
const _useState = React.useState(false),
|
|
@@ -1930,7 +1956,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
1930
1956
|
const usePersistedReminder = function () {
|
|
1931
1957
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1932
1958
|
const mergedOptions = _objectSpread$1a(_objectSpread$1a({}, defaultOptions), options);
|
|
1933
|
-
const _useStorage = useStorage(mergedOptions.storageKey, null),
|
|
1959
|
+
const _useStorage = useStorage$1(mergedOptions.storageKey, null),
|
|
1934
1960
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
1935
1961
|
initialChosenReminderInterval = _useStorage2[0],
|
|
1936
1962
|
choseReminderInterval = _useStorage2[1],
|
|
@@ -1974,8 +2000,9 @@ const usePersistedReminder = function () {
|
|
|
1974
2000
|
}, []);
|
|
1975
2001
|
return [hasReminderExpired, hasChosenReminderRef, scheduleReminder];
|
|
1976
2002
|
};
|
|
2003
|
+
var usePersistedReminder$1 = usePersistedReminder;
|
|
1977
2004
|
|
|
1978
|
-
var messages$
|
|
2005
|
+
var messages$L = reactIntl.defineMessages({
|
|
1979
2006
|
profileUpdated: {
|
|
1980
2007
|
id: 'NotificationText.profileUpdated',
|
|
1981
2008
|
description: 'Label for the notification header',
|
|
@@ -2012,9 +2039,9 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2012
2039
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2013
2040
|
as: "p",
|
|
2014
2041
|
isBold: true,
|
|
2015
|
-
intlMessage: messages$
|
|
2042
|
+
intlMessage: messages$L.profileUpdated
|
|
2016
2043
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2017
|
-
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$
|
|
2044
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$L.addMoreInformation), {}, {
|
|
2018
2045
|
values: {
|
|
2019
2046
|
newline: getNewLine
|
|
2020
2047
|
}
|
|
@@ -2023,7 +2050,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2023
2050
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2024
2051
|
scale: "xs",
|
|
2025
2052
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2026
|
-
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$
|
|
2053
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$L.informationAndProfileLink), {}, {
|
|
2027
2054
|
values: {
|
|
2028
2055
|
newline: getNewLine,
|
|
2029
2056
|
link: getLinkToProfile
|
|
@@ -2033,6 +2060,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2033
2060
|
})]
|
|
2034
2061
|
});
|
|
2035
2062
|
NotificationText.displayName = 'NotificationText';
|
|
2063
|
+
var NotificationText$1 = NotificationText;
|
|
2036
2064
|
|
|
2037
2065
|
const useRoleNotification = _ref => {
|
|
2038
2066
|
let dismissNotification = _ref.onDismiss;
|
|
@@ -2044,13 +2072,14 @@ const useRoleNotification = _ref => {
|
|
|
2044
2072
|
return () => {
|
|
2045
2073
|
if (isBusinessRoleNotificationEnabled) {
|
|
2046
2074
|
notification({
|
|
2047
|
-
text: jsxRuntime.jsx(NotificationText, {})
|
|
2075
|
+
text: jsxRuntime.jsx(NotificationText$1, {})
|
|
2048
2076
|
}, {
|
|
2049
2077
|
onDismiss: () => dismissNotification()
|
|
2050
2078
|
});
|
|
2051
2079
|
}
|
|
2052
2080
|
};
|
|
2053
2081
|
};
|
|
2082
|
+
var useRoleNotification$1 = useRoleNotification;
|
|
2054
2083
|
|
|
2055
2084
|
const useRoleNotificationEffect = () => {
|
|
2056
2085
|
const _useAdapterStatus = applicationShell.useAdapterStatus(),
|
|
@@ -2059,7 +2088,7 @@ const useRoleNotificationEffect = () => {
|
|
|
2059
2088
|
const storageKey = 'roleExpiry';
|
|
2060
2089
|
const userBusinessRole = user.businessRole;
|
|
2061
2090
|
const scopedStorageKey = [user.id, storageKey].join('/');
|
|
2062
|
-
const _usePersistedReminder = usePersistedReminder({
|
|
2091
|
+
const _usePersistedReminder = usePersistedReminder$1({
|
|
2063
2092
|
storageKey,
|
|
2064
2093
|
reminderInterval: REMINDER_OPTION_3_DAY
|
|
2065
2094
|
}),
|
|
@@ -2067,7 +2096,7 @@ const useRoleNotificationEffect = () => {
|
|
|
2067
2096
|
hasReminderExpired = _usePersistedReminder2[0],
|
|
2068
2097
|
hasChosenReminderRef = _usePersistedReminder2[1],
|
|
2069
2098
|
scheduleReminder = _usePersistedReminder2[2];
|
|
2070
|
-
const roleNotification = useRoleNotification({
|
|
2099
|
+
const roleNotification = useRoleNotification$1({
|
|
2071
2100
|
onDismiss: scheduleReminder
|
|
2072
2101
|
});
|
|
2073
2102
|
const isFirstTimeUser = !hasChosenReminderRef.current;
|
|
@@ -2096,6 +2125,7 @@ const useRoleNotificationEffect = () => {
|
|
|
2096
2125
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2097
2126
|
[userBusinessRole, hasReminderExpired, isFlopFlipReady]);
|
|
2098
2127
|
};
|
|
2128
|
+
var useRoleNotificationEffect$1 = useRoleNotificationEffect;
|
|
2099
2129
|
|
|
2100
2130
|
function usePendingRequests() {
|
|
2101
2131
|
const _useState = React.useState(0),
|
|
@@ -2143,8 +2173,9 @@ const useEventCallback = (fn, dependencies) => {
|
|
|
2143
2173
|
return ref.current(...arguments);
|
|
2144
2174
|
}, [ref]);
|
|
2145
2175
|
};
|
|
2176
|
+
var useEventCallback$1 = useEventCallback;
|
|
2146
2177
|
|
|
2147
|
-
var messages$
|
|
2178
|
+
var messages$K = reactIntl.defineMessages({
|
|
2148
2179
|
fallbackHint: {
|
|
2149
2180
|
id: 'KeyFallback.fallbackHint',
|
|
2150
2181
|
description: 'key fallback for a specified resource key (e.g name)',
|
|
@@ -2168,17 +2199,19 @@ const useLocalizedKeyFallback = () => {
|
|
|
2168
2199
|
return values => {
|
|
2169
2200
|
if (!values.resource) return null;
|
|
2170
2201
|
const localizedString = values.resource[values.localizedStringFieldName];
|
|
2171
|
-
const fallbackHintWithKey = intl.formatMessage(messages$
|
|
2202
|
+
const fallbackHintWithKey = intl.formatMessage(messages$K.fallbackHint, {
|
|
2172
2203
|
key: values.resource.key
|
|
2173
2204
|
});
|
|
2174
2205
|
if (!localizedString) return fallbackHintWithKey;
|
|
2175
2206
|
return localizedString[language] || fallbackHintWithKey;
|
|
2176
2207
|
};
|
|
2177
2208
|
};
|
|
2209
|
+
var useLocalizedKeyFallback$1 = useLocalizedKeyFallback;
|
|
2178
2210
|
|
|
2179
2211
|
const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
2180
2212
|
// eslint-disable-next-line testing-library/await-async-utils
|
|
2181
2213
|
React.useCallback(debounce__default["default"](promiseCallback, wait), [promiseCallback]);
|
|
2214
|
+
var useDebouncedPromiseCallback$1 = useDebouncedPromiseCallback;
|
|
2182
2215
|
|
|
2183
2216
|
function ownKeys$18(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2184
2217
|
function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$18(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$18(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -2244,7 +2277,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2244
2277
|
displaySettings
|
|
2245
2278
|
};
|
|
2246
2279
|
}, [allAvailableColumnsConfiguration, initialVisibleColumnKeys, mutableColumnProps, displaySettings]);
|
|
2247
|
-
const _useStorage = useStorage(tableConfigurationStorageKey,
|
|
2280
|
+
const _useStorage = useStorage$1(tableConfigurationStorageKey,
|
|
2248
2281
|
// initialize with all the available columns
|
|
2249
2282
|
mappedInitialTableConfiguration, {
|
|
2250
2283
|
storageType
|
|
@@ -2280,6 +2313,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2280
2313
|
})
|
|
2281
2314
|
};
|
|
2282
2315
|
};
|
|
2316
|
+
var usePersistedTableConfiguration$1 = usePersistedTableConfiguration;
|
|
2283
2317
|
|
|
2284
2318
|
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 } } } };
|
|
2285
2319
|
const useProductSelectionsTotalFetcher = props => {
|
|
@@ -2295,6 +2329,7 @@ const useProductSelectionsTotalFetcher = props => {
|
|
|
2295
2329
|
total: data?.productSelections?.total
|
|
2296
2330
|
};
|
|
2297
2331
|
};
|
|
2332
|
+
var useProductSelectionsTotalFetcher$1 = useProductSelectionsTotalFetcher;
|
|
2298
2333
|
|
|
2299
2334
|
function ownKeys$17(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2300
2335
|
function _objectSpread$17(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$17(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$17(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -2343,6 +2378,7 @@ const useProductSelectionsFetcher = props => {
|
|
|
2343
2378
|
refetch
|
|
2344
2379
|
};
|
|
2345
2380
|
};
|
|
2381
|
+
var useProductSelectionsFetcher$1 = useProductSelectionsFetcher;
|
|
2346
2382
|
|
|
2347
2383
|
const setToArray = function () {
|
|
2348
2384
|
let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -3753,6 +3789,7 @@ const currencyData = {
|
|
|
3753
3789
|
countries: ['Zimbabwe']
|
|
3754
3790
|
}
|
|
3755
3791
|
};
|
|
3792
|
+
var currencyData$1 = currencyData;
|
|
3756
3793
|
|
|
3757
3794
|
/* This is is short-term solution that patches fraction digits not being available from the Dashboard backend.
|
|
3758
3795
|
|
|
@@ -3779,8 +3816,8 @@ SOFTWARE.
|
|
|
3779
3816
|
|
|
3780
3817
|
const getData = (code, field) => {
|
|
3781
3818
|
code = code !== undefined && code !== '' ? code.toUpperCase() : code;
|
|
3782
|
-
if (currencyData[code] !== undefined) {
|
|
3783
|
-
if (field === 'all') return currencyData[code];else return currencyData[code][field];
|
|
3819
|
+
if (currencyData$1[code] !== undefined) {
|
|
3820
|
+
if (field === 'all') return currencyData$1[code];else return currencyData$1[code][field];
|
|
3784
3821
|
} else return undefined;
|
|
3785
3822
|
};
|
|
3786
3823
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
@@ -3819,7 +3856,7 @@ function formatMoney$2(moneyValue, intl, options) {
|
|
|
3819
3856
|
}, options));
|
|
3820
3857
|
}
|
|
3821
3858
|
|
|
3822
|
-
var messages$
|
|
3859
|
+
var messages$J = reactIntl.defineMessages({
|
|
3823
3860
|
booleanYes: {
|
|
3824
3861
|
id: 'AttributeTypeFormats.boolean.yes',
|
|
3825
3862
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -3901,7 +3938,7 @@ const formatDateTime = _ref7 => {
|
|
|
3901
3938
|
const formatBoolean = _ref8 => {
|
|
3902
3939
|
let value = _ref8.value,
|
|
3903
3940
|
intl = _ref8.intl;
|
|
3904
|
-
return value ? intl.formatMessage(messages$
|
|
3941
|
+
return value ? intl.formatMessage(messages$J.booleanYes) : intl.formatMessage(messages$J.booleanNo);
|
|
3905
3942
|
};
|
|
3906
3943
|
const formatNilType = _ref9 => {
|
|
3907
3944
|
let value = _ref9.value,
|
|
@@ -4058,6 +4095,7 @@ const getPrefixSearchBounds = input => {
|
|
|
4058
4095
|
const getNextCharacter = character => String.fromCharCode(character.charCodeAt() + 1);
|
|
4059
4096
|
return [input, `${_sliceInstanceProperty__default["default"](input).call(input, 0, input.length - 1)}${getNextCharacter(_sliceInstanceProperty__default["default"](input).call(input, input.length - 1))}`];
|
|
4060
4097
|
};
|
|
4098
|
+
var getPrefixSearchBounds$1 = getPrefixSearchBounds;
|
|
4061
4099
|
|
|
4062
4100
|
const _excluded$2 = ["action"];
|
|
4063
4101
|
function ownKeys$15(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -4617,6 +4655,7 @@ const extractErrorFromGraphQlResponse = graphQlResponse => {
|
|
|
4617
4655
|
};
|
|
4618
4656
|
|
|
4619
4657
|
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);
|
|
4658
|
+
var isUUID$1 = isUUID;
|
|
4620
4659
|
|
|
4621
4660
|
const formats = {
|
|
4622
4661
|
en: [',', '.'],
|
|
@@ -5006,7 +5045,7 @@ function uniqueObjects(items) {
|
|
|
5006
5045
|
|
|
5007
5046
|
*/
|
|
5008
5047
|
|
|
5009
|
-
const messages$
|
|
5048
|
+
const messages$I = reactIntl.defineMessages({
|
|
5010
5049
|
unique: {
|
|
5011
5050
|
id: 'Validation.unique',
|
|
5012
5051
|
description: 'An error message to show if the field must be unique',
|
|
@@ -5048,6 +5087,7 @@ const messages$C = reactIntl.defineMessages({
|
|
|
5048
5087
|
defaultMessage: 'Invalid ID format. Please enter a valid ID.'
|
|
5049
5088
|
}
|
|
5050
5089
|
});
|
|
5090
|
+
var validationMessages = messages$I;
|
|
5051
5091
|
|
|
5052
5092
|
function getIndexesOfInvalidValues(values) {
|
|
5053
5093
|
let invalidValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
@@ -5061,6 +5101,7 @@ function getIndexesOfInvalidValues(values) {
|
|
|
5061
5101
|
}
|
|
5062
5102
|
|
|
5063
5103
|
const withoutEmptyErrorsByField = errorsByField => omitEmpty__default["default"](errorsByField);
|
|
5104
|
+
var withoutEmptyErrorsByField$1 = withoutEmptyErrorsByField;
|
|
5064
5105
|
|
|
5065
5106
|
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 } } } };
|
|
5066
5107
|
|
|
@@ -5130,7 +5171,7 @@ const getWhereClause = function () {
|
|
|
5130
5171
|
let searchText = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
5131
5172
|
let language = arguments.length > 1 ? arguments[1] : undefined;
|
|
5132
5173
|
const query = _trimInstanceProperty__default["default"](_context2 = _JSON$stringify__default["default"](searchText)).call(_context2);
|
|
5133
|
-
const idQuery = isUUID(searchText) && `id = ${query}`;
|
|
5174
|
+
const idQuery = isUUID$1(searchText) && `id = ${query}`;
|
|
5134
5175
|
const nameQuery = `name(${language} = ${query})`;
|
|
5135
5176
|
const keyQuery = `key = ${query}`;
|
|
5136
5177
|
return _filterInstanceProperty__default["default"](_context3 = [idQuery, nameQuery, keyQuery]).call(_context3, Boolean).join(' or ');
|
|
@@ -5197,7 +5238,7 @@ const useReferenceSearchItems = _ref => {
|
|
|
5197
5238
|
const putToCache = React.useCallback(items => {
|
|
5198
5239
|
_forEachInstanceProperty__default["default"](items).call(items, item => itemCache.set(item.id, item));
|
|
5199
5240
|
}, []);
|
|
5200
|
-
const prevIds = usePrevious(ids);
|
|
5241
|
+
const prevIds = usePrevious$1(ids);
|
|
5201
5242
|
React.useEffect(() => {
|
|
5202
5243
|
async function loadItems() {
|
|
5203
5244
|
const loadedItems = ids.length > 0 ? await loadItemsByIds(ids) : [];
|
|
@@ -5270,7 +5311,7 @@ function ReferenceSearch(props) {
|
|
|
5270
5311
|
children: [areSomeItemsMissing && jsxRuntime.jsx("div", {
|
|
5271
5312
|
className: styles$h['missing-label'],
|
|
5272
5313
|
children: props.referenceIsMissingLabel
|
|
5273
|
-
}), jsxRuntime.jsx(CustomFieldTooltip, {
|
|
5314
|
+
}), jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
5274
5315
|
title: tooltipTitle,
|
|
5275
5316
|
children: jsxRuntime.jsxs("div", {
|
|
5276
5317
|
children: [jsxRuntime.jsx(uiKit.AccessibleHidden, {
|
|
@@ -5302,7 +5343,7 @@ function ReferenceSearch(props) {
|
|
|
5302
5343
|
});
|
|
5303
5344
|
}
|
|
5304
5345
|
|
|
5305
|
-
const messages$
|
|
5346
|
+
const messages$G = reactIntl.defineMessages({
|
|
5306
5347
|
placeholder: {
|
|
5307
5348
|
id: 'CartDiscountReferenceSearch.placeholder',
|
|
5308
5349
|
description: 'Placeholder for search for a cart discount',
|
|
@@ -5329,6 +5370,7 @@ const messages$B = reactIntl.defineMessages({
|
|
|
5329
5370
|
defaultMessage: 'Enter search term'
|
|
5330
5371
|
}
|
|
5331
5372
|
});
|
|
5373
|
+
var messages$H = messages$G;
|
|
5332
5374
|
|
|
5333
5375
|
function ownKeys$11(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5334
5376
|
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$11(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$11(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -5353,7 +5395,7 @@ function Option$1(props) {
|
|
|
5353
5395
|
fallbackOrder: languages
|
|
5354
5396
|
})
|
|
5355
5397
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
5356
|
-
children: [formatMessage(messages$
|
|
5398
|
+
children: [formatMessage(messages$H.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
|
|
5357
5399
|
})]
|
|
5358
5400
|
})
|
|
5359
5401
|
}));
|
|
@@ -5429,10 +5471,10 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5429
5471
|
onBlur: props.onBlur,
|
|
5430
5472
|
onChange: props.onChange,
|
|
5431
5473
|
value: returnNullIfEmpty(props.value),
|
|
5432
|
-
placeholderLabel: formatMessage(messages$
|
|
5433
|
-
searchPromptLabel: formatMessage(messages$
|
|
5434
|
-
noResultsLabel: formatMessage(messages$
|
|
5435
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5474
|
+
placeholderLabel: formatMessage(messages$H.placeholder),
|
|
5475
|
+
searchPromptLabel: formatMessage(messages$H.searchPrompt),
|
|
5476
|
+
noResultsLabel: formatMessage(messages$H.noResults),
|
|
5477
|
+
referenceIsMissingLabel: formatMessage(messages$H.isMissing),
|
|
5436
5478
|
mapItemToOption: mapItemToOption,
|
|
5437
5479
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5438
5480
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5442,7 +5484,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5442
5484
|
});
|
|
5443
5485
|
}
|
|
5444
5486
|
|
|
5445
|
-
const messages$
|
|
5487
|
+
const messages$E = reactIntl.defineMessages({
|
|
5446
5488
|
placeholder: {
|
|
5447
5489
|
id: 'CategoryReferenceSearch.placeholder',
|
|
5448
5490
|
description: 'Placeholder for search for a category',
|
|
@@ -5474,6 +5516,7 @@ const messages$A = reactIntl.defineMessages({
|
|
|
5474
5516
|
defaultMessage: 'Parent Category'
|
|
5475
5517
|
}
|
|
5476
5518
|
});
|
|
5519
|
+
var messages$F = messages$E;
|
|
5477
5520
|
|
|
5478
5521
|
function ownKeys$$(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5479
5522
|
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$$(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$$(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -5498,7 +5541,7 @@ function Option(props) {
|
|
|
5498
5541
|
fallbackOrder: languages
|
|
5499
5542
|
})
|
|
5500
5543
|
}), category.parent && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5501
|
-
children: `${formatMessage(messages$
|
|
5544
|
+
children: `${formatMessage(messages$F.parentCategory)}: ${l10n.formatLocalizedString(category.parent, {
|
|
5502
5545
|
key: 'name',
|
|
5503
5546
|
locale: language,
|
|
5504
5547
|
fallbackOrder: languages
|
|
@@ -5510,7 +5553,7 @@ function Option(props) {
|
|
|
5510
5553
|
fallbackOrder: languages
|
|
5511
5554
|
})}`
|
|
5512
5555
|
}), category.externalId && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5513
|
-
children: `${formatMessage(messages$
|
|
5556
|
+
children: `${formatMessage(messages$F.externalId)}: ${category.externalId || constants.NO_VALUE_FALLBACK}`
|
|
5514
5557
|
})]
|
|
5515
5558
|
})
|
|
5516
5559
|
}));
|
|
@@ -5558,10 +5601,10 @@ function CategoryReferenceSearch(props) {
|
|
|
5558
5601
|
onBlur: props.onBlur,
|
|
5559
5602
|
onChange: props.onChange,
|
|
5560
5603
|
value: props.value,
|
|
5561
|
-
placeholderLabel: formatMessage(messages$
|
|
5562
|
-
searchPromptLabel: formatMessage(messages$
|
|
5563
|
-
noResultsLabel: formatMessage(messages$
|
|
5564
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5604
|
+
placeholderLabel: formatMessage(messages$F.placeholder),
|
|
5605
|
+
searchPromptLabel: formatMessage(messages$F.searchPrompt),
|
|
5606
|
+
noResultsLabel: formatMessage(messages$F.noResults),
|
|
5607
|
+
referenceIsMissingLabel: formatMessage(messages$F.isMissing),
|
|
5565
5608
|
mapItemToOption: mapItemToOption,
|
|
5566
5609
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5567
5610
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5635,8 +5678,9 @@ Button.displayName = 'Button';
|
|
|
5635
5678
|
Button.defaultProps = {
|
|
5636
5679
|
type: 'button'
|
|
5637
5680
|
};
|
|
5681
|
+
var Button$1 = Button;
|
|
5638
5682
|
|
|
5639
|
-
var messages$
|
|
5683
|
+
var messages$D = reactIntl.defineMessages({
|
|
5640
5684
|
chooseFile: {
|
|
5641
5685
|
id: 'ButtonFileInput.chooseFile',
|
|
5642
5686
|
description: 'The label text of the field for upload local file',
|
|
@@ -5665,12 +5709,13 @@ const FileInput = props => jsxRuntime.jsx("label", {
|
|
|
5665
5709
|
});
|
|
5666
5710
|
FileInput.displayName = 'FileInput';
|
|
5667
5711
|
FileInput.defaultProps = {
|
|
5668
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Y({}, messages$
|
|
5712
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Y({}, messages$D.chooseFile)),
|
|
5669
5713
|
allowMultiple: false,
|
|
5670
5714
|
acceptTypes: 'image/png,image/jpeg,image/gif'
|
|
5671
5715
|
};
|
|
5716
|
+
var FileInput$1 = FileInput;
|
|
5672
5717
|
|
|
5673
|
-
var messages$
|
|
5718
|
+
var messages$C = reactIntl.defineMessages({
|
|
5674
5719
|
countriesBasicSelectPlaceholder: {
|
|
5675
5720
|
id: 'CountriesPicker.countriesBasicSelectPlaceholder',
|
|
5676
5721
|
description: 'Placeholder of the basic field for countries',
|
|
@@ -5691,7 +5736,7 @@ var messages$y = reactIntl.defineMessages({
|
|
|
5691
5736
|
function ownKeys$X(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5692
5737
|
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$X(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$X(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5693
5738
|
const emptyCountryOption = intl => [{
|
|
5694
|
-
label: intl.formatMessage(messages$
|
|
5739
|
+
label: intl.formatMessage(messages$C.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
5695
5740
|
value: undefined,
|
|
5696
5741
|
isDisabled: true
|
|
5697
5742
|
}];
|
|
@@ -5733,7 +5778,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
5733
5778
|
var _context3;
|
|
5734
5779
|
return _findInstanceProperty__default["default"](_context3 = props.options).call(_context3, country => country.value === countryCode);
|
|
5735
5780
|
}),
|
|
5736
|
-
placeholder: intl.formatMessage(messages$
|
|
5781
|
+
placeholder: intl.formatMessage(messages$C.countriesAsyncSelectPlaceholder),
|
|
5737
5782
|
loadOptions: handleLoadOptions,
|
|
5738
5783
|
onChange: onOptionChange,
|
|
5739
5784
|
isDisabled: props.isDisabled,
|
|
@@ -5753,7 +5798,7 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
5753
5798
|
value: props.value,
|
|
5754
5799
|
isRequired: props.isRequired,
|
|
5755
5800
|
description: props.description,
|
|
5756
|
-
placeholder: intl.formatMessage(messages$
|
|
5801
|
+
placeholder: intl.formatMessage(messages$C.countriesBasicSelectPlaceholder),
|
|
5757
5802
|
options: props.options,
|
|
5758
5803
|
onChange: props.onChange,
|
|
5759
5804
|
isDisabled: props.isDisabled,
|
|
@@ -5780,7 +5825,7 @@ CountriesPicker.defaultProps = {
|
|
|
5780
5825
|
hasWarning: false
|
|
5781
5826
|
};
|
|
5782
5827
|
|
|
5783
|
-
var messages$
|
|
5828
|
+
var messages$B = reactIntl.defineMessages({
|
|
5784
5829
|
noCustomerGroupsFound: {
|
|
5785
5830
|
id: 'Prices.CustomerGroupPickerInput.noCustomerGroupsFound',
|
|
5786
5831
|
description: 'The message to display when no customer groups were found',
|
|
@@ -5831,7 +5876,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5831
5876
|
return customerGroup;
|
|
5832
5877
|
}, []);
|
|
5833
5878
|
const prefixSearchFields = React.useMemo(() => ['name', 'key'], []);
|
|
5834
|
-
const loadOptions = useLoadOptions({
|
|
5879
|
+
const loadOptions = useLoadOptions$1({
|
|
5835
5880
|
query: GetCustomerGroupsQuery,
|
|
5836
5881
|
variables,
|
|
5837
5882
|
prefixSearchFields
|
|
@@ -5856,8 +5901,8 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5856
5901
|
setLoadingError(error);
|
|
5857
5902
|
onError(error);
|
|
5858
5903
|
}), [loadOptions, convertCustomerGroupToOption, onError]);
|
|
5859
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
5860
|
-
const _useHandlers = useHandlers(onChange),
|
|
5904
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
5905
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
5861
5906
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
5862
5907
|
handleInternalInputChange = _useHandlers2[0],
|
|
5863
5908
|
handleChange = _useHandlers2[1];
|
|
@@ -5870,18 +5915,18 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5870
5915
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
5871
5916
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
5872
5917
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
5873
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
5918
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$B.noCustomerGroupsFound), [loadingError, formatMessage]);
|
|
5874
5919
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
5875
5920
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
5876
5921
|
max: "scale",
|
|
5877
5922
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
5878
5923
|
scale: "xs",
|
|
5879
|
-
children: [jsxRuntime.jsx(CustomFieldTooltip, {
|
|
5924
|
+
children: [jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
5880
5925
|
title: tooltipTitle,
|
|
5881
5926
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
5882
5927
|
id: name,
|
|
5883
5928
|
name: name,
|
|
5884
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
5929
|
+
placeholder: placeholder ?? formatMessage(messages$B.placeholder),
|
|
5885
5930
|
loadOptions: loadOptionsDebounced,
|
|
5886
5931
|
defaultOptions: true,
|
|
5887
5932
|
showOptionGroupDivider: true,
|
|
@@ -5906,6 +5951,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5906
5951
|
});
|
|
5907
5952
|
};
|
|
5908
5953
|
CustomerGroupPickerInput.displayName = 'CustomerGroupPickerInput';
|
|
5954
|
+
var CustomerGroupPickerInput$1 = CustomerGroupPickerInput;
|
|
5909
5955
|
|
|
5910
5956
|
var styles$e = {
|
|
5911
5957
|
"divider": "divider-module__divider___4-vdy",
|
|
@@ -5976,13 +6022,14 @@ const CustomFieldErrors = props => {
|
|
|
5976
6022
|
const errors = _Array$isArray__default["default"](props.errors) ? mergeSetItemsErrors(props.errors) : props.errors;
|
|
5977
6023
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5978
6024
|
children: [props.isTouched || didFormValidationFail && errors?.missing && jsxRuntime.jsx(_.ErrorMessage, {
|
|
5979
|
-
intlMessage:
|
|
6025
|
+
intlMessage: validationMessages.required
|
|
5980
6026
|
}), props.isTouched || didFormValidationFail && errors?.duplicated && jsxRuntime.jsx(_.ErrorMessage, {
|
|
5981
|
-
intlMessage:
|
|
6027
|
+
intlMessage: validationMessages.unique
|
|
5982
6028
|
})]
|
|
5983
6029
|
});
|
|
5984
6030
|
};
|
|
5985
6031
|
CustomFieldErrors.displayName = 'CustomFieldErrors';
|
|
6032
|
+
var CustomFieldErrors$1 = CustomFieldErrors;
|
|
5986
6033
|
|
|
5987
6034
|
const getType = fieldDefinition => {
|
|
5988
6035
|
const fieldDefinitionType = fieldDefinition.type.name.toLowerCase() === 'set' ? fieldDefinition.type.elementType : fieldDefinition.type;
|
|
@@ -6066,6 +6113,7 @@ const ExpandButton = props => props.totalValues > 1 ? jsxRuntime.jsxs(uiKit.Spac
|
|
|
6066
6113
|
})]
|
|
6067
6114
|
}) : null;
|
|
6068
6115
|
ExpandButton.displayName = 'ExpandButton';
|
|
6116
|
+
var ExpandButton$1 = ExpandButton;
|
|
6069
6117
|
|
|
6070
6118
|
var styles$d = {
|
|
6071
6119
|
"topAlign": "set-buttons-module__topAlign___3AZwc",
|
|
@@ -6094,6 +6142,7 @@ const SetButtons = props => {
|
|
|
6094
6142
|
});
|
|
6095
6143
|
};
|
|
6096
6144
|
SetButtons.displayName = 'SetButtons';
|
|
6145
|
+
var SetButtons$1 = SetButtons;
|
|
6097
6146
|
|
|
6098
6147
|
function ownKeys$U(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6099
6148
|
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__default["default"](_context2 = ownKeys$U(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$U(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -6238,7 +6287,7 @@ function CustomInputSet(props) {
|
|
|
6238
6287
|
const fieldValue = internalValue[index];
|
|
6239
6288
|
return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
6240
6289
|
alignItems: areButtonsTopAligned ? 'flex-start' : 'center',
|
|
6241
|
-
children: [jsxRuntime.jsx(CustomFieldInput, {
|
|
6290
|
+
children: [jsxRuntime.jsx(CustomFieldInput$1, {
|
|
6242
6291
|
name: fieldName,
|
|
6243
6292
|
fieldDefinition: itemFieldDefinition,
|
|
6244
6293
|
isDisabled: props.isDisabled,
|
|
@@ -6251,7 +6300,7 @@ function CustomInputSet(props) {
|
|
|
6251
6300
|
WrapperComponent: props.WrapperComponent,
|
|
6252
6301
|
renderWarnings: props.renderWarnings,
|
|
6253
6302
|
handleWarningChange: props.handleWarningChange
|
|
6254
|
-
}), jsxRuntime.jsx(SetButtons, {
|
|
6303
|
+
}), jsxRuntime.jsx(SetButtons$1, {
|
|
6255
6304
|
index: index,
|
|
6256
6305
|
isFirstItem: !isExpanded || index === 0,
|
|
6257
6306
|
onAddItem: addNewItem,
|
|
@@ -6261,7 +6310,7 @@ function CustomInputSet(props) {
|
|
|
6261
6310
|
isTopAligned: areButtonsTopAligned
|
|
6262
6311
|
})]
|
|
6263
6312
|
}, keys[index]);
|
|
6264
|
-
}), jsxRuntime.jsx(ExpandButton, {
|
|
6313
|
+
}), jsxRuntime.jsx(ExpandButton$1, {
|
|
6265
6314
|
totalValues: totalAmount,
|
|
6266
6315
|
isExpanded: isExpanded,
|
|
6267
6316
|
onExpand: toggleExpansion
|
|
@@ -6338,7 +6387,7 @@ function CustomEnumInput(props) {
|
|
|
6338
6387
|
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
6339
6388
|
});
|
|
6340
6389
|
const tooltipTitle = props.value ? _findInstanceProperty__default["default"](options).call(options, option => option.value === props.value)?.label ?? '' : '';
|
|
6341
|
-
return jsxRuntime.jsx(CustomFieldTooltip, {
|
|
6390
|
+
return jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
6342
6391
|
title: tooltipTitle,
|
|
6343
6392
|
children: jsxRuntime.jsx(uiKit.SelectInput, {
|
|
6344
6393
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -6384,7 +6433,7 @@ function CustomLocalizedEnumInput(props) {
|
|
|
6384
6433
|
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
6385
6434
|
});
|
|
6386
6435
|
const tooltipTitle = props.value ? _findInstanceProperty__default["default"](options).call(options, option => option.value === props.value)?.label ?? '' : '';
|
|
6387
|
-
return jsxRuntime.jsx(CustomFieldTooltip, {
|
|
6436
|
+
return jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
6388
6437
|
title: tooltipTitle,
|
|
6389
6438
|
children: jsxRuntime.jsx(uiKit.SelectInput, {
|
|
6390
6439
|
id: props.name,
|
|
@@ -6438,7 +6487,7 @@ function CustomLocalizedTextInput(props) {
|
|
|
6438
6487
|
});
|
|
6439
6488
|
const InputComponent = isMultiLine ? uiKit.LocalizedMultilineTextInput : uiKit.LocalizedTextInput;
|
|
6440
6489
|
const tooltipTitle = isMultiLine ? '' : value ? value[language] ?? '' : '';
|
|
6441
|
-
return jsxRuntime.jsx(CustomFieldTooltip, {
|
|
6490
|
+
return jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
6442
6491
|
title: tooltipTitle,
|
|
6443
6492
|
children: jsxRuntime.jsx(InputComponent, {
|
|
6444
6493
|
id: props.name,
|
|
@@ -6606,9 +6655,10 @@ function useNestedProductType(fieldDefinition) {
|
|
|
6606
6655
|
}
|
|
6607
6656
|
|
|
6608
6657
|
const NestingLevelContext = /*#__PURE__*/React.createContext(0);
|
|
6658
|
+
var NestingLevelContext$1 = NestingLevelContext;
|
|
6609
6659
|
|
|
6610
6660
|
// eslint-disable-next-line import/prefer-default-export
|
|
6611
|
-
const messages$
|
|
6661
|
+
const messages$A = reactIntl.defineMessages({
|
|
6612
6662
|
aboveFifthLevelWarning: {
|
|
6613
6663
|
id: 'attributeInputByType.nestedAttributes.aboveFifthLevelWarning',
|
|
6614
6664
|
description: 'Warning message shown when nested attribute are above the fifth level',
|
|
@@ -6620,8 +6670,9 @@ const messages$w = reactIntl.defineMessages({
|
|
|
6620
6670
|
defaultMessage: 'Empty'
|
|
6621
6671
|
}
|
|
6622
6672
|
});
|
|
6673
|
+
var customFieldsMessages = messages$A;
|
|
6623
6674
|
|
|
6624
|
-
var messages$
|
|
6675
|
+
var messages$z = reactIntl.defineMessages({
|
|
6625
6676
|
updateButton: {
|
|
6626
6677
|
id: 'NestedAttributes.Details.updateButton',
|
|
6627
6678
|
description: 'Update button label',
|
|
@@ -6706,7 +6757,7 @@ const EditButton = props => {
|
|
|
6706
6757
|
formatMessage = _useIntl.formatMessage;
|
|
6707
6758
|
return jsxRuntime.jsx(uiKit.Tooltip, {
|
|
6708
6759
|
placement: "top",
|
|
6709
|
-
title: formatMessage(messages$
|
|
6760
|
+
title: formatMessage(messages$z.editTooltip),
|
|
6710
6761
|
children: jsxRuntime.jsx(uiKit.IconButton, {
|
|
6711
6762
|
label: "Edit",
|
|
6712
6763
|
isDisabled: props.isDisabled,
|
|
@@ -6722,12 +6773,12 @@ const DropChangesConfirmation = props => {
|
|
|
6722
6773
|
formatMessage = _useIntl2.formatMessage;
|
|
6723
6774
|
return jsxRuntime.jsx(applicationComponents.ConfirmationDialog, {
|
|
6724
6775
|
isOpen: props.isOpen || false,
|
|
6725
|
-
title: formatMessage(messages$
|
|
6726
|
-
labelPrimary: formatMessage(messages$
|
|
6776
|
+
title: formatMessage(messages$z.confirmationDialogTitle),
|
|
6777
|
+
labelPrimary: formatMessage(messages$z.nestedAttributesConfirmLabel),
|
|
6727
6778
|
onConfirm: props.onConfirm,
|
|
6728
6779
|
onCancel: props.onCancel,
|
|
6729
6780
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6730
|
-
intlMessage: messages$
|
|
6781
|
+
intlMessage: messages$z.confirmationDialogBody
|
|
6731
6782
|
})
|
|
6732
6783
|
});
|
|
6733
6784
|
};
|
|
@@ -6752,11 +6803,11 @@ const NestedAttributeModalPage = props => {
|
|
|
6752
6803
|
children: [jsxRuntime.jsx(uiKit.SecondaryButton, {
|
|
6753
6804
|
isDisabled: !formik$1.dirty,
|
|
6754
6805
|
iconLeft: jsxRuntime.jsx(uiKit.RevertIcon, {}),
|
|
6755
|
-
label: formatMessage(messages$
|
|
6806
|
+
label: formatMessage(messages$z.cancelButton),
|
|
6756
6807
|
onClick: formik$1.resetForm
|
|
6757
6808
|
}), jsxRuntime.jsx(applicationComponents.CustomFormModalPage.FormPrimaryButton, {
|
|
6758
6809
|
isDisabled: !formik$1.dirty,
|
|
6759
|
-
label: formatMessage(messages$
|
|
6810
|
+
label: formatMessage(messages$z.updateButton),
|
|
6760
6811
|
onClick: formik$1.handleSubmit
|
|
6761
6812
|
})]
|
|
6762
6813
|
}),
|
|
@@ -6786,19 +6837,19 @@ NestedAttributeModalPage.displayName = 'NestedAttributeModalPage';
|
|
|
6786
6837
|
const MaxNestingLevelReached = () => jsxRuntime.jsx(uiKit.FieldLabel, {
|
|
6787
6838
|
title: "",
|
|
6788
6839
|
hint: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6789
|
-
intlMessage:
|
|
6840
|
+
intlMessage: customFieldsMessages.aboveFifthLevelWarning
|
|
6790
6841
|
}),
|
|
6791
6842
|
hintIcon: jsxRuntime.jsx(uiKit.WarningIcon, {})
|
|
6792
6843
|
});
|
|
6793
6844
|
MaxNestingLevelReached.displayName = 'MaxNestingLevelReached';
|
|
6794
6845
|
const NestedInputControls = props => {
|
|
6795
|
-
const nextNestingLevel = React.useContext(NestingLevelContext);
|
|
6846
|
+
const nextNestingLevel = React.useContext(NestingLevelContext$1);
|
|
6796
6847
|
const _useIntl4 = reactIntl.useIntl(),
|
|
6797
6848
|
formatMessage = _useIntl4.formatMessage;
|
|
6798
6849
|
if (nextNestingLevel >= 6) return jsxRuntime.jsx(MaxNestingLevelReached, {});
|
|
6799
6850
|
const hasAttributes = props.productType.attributeDefinitions.length > 0;
|
|
6800
6851
|
if (!hasAttributes) return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6801
|
-
intlMessage: messages$
|
|
6852
|
+
intlMessage: messages$z.emptyProductType,
|
|
6802
6853
|
tone: "secondary"
|
|
6803
6854
|
});
|
|
6804
6855
|
return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
@@ -6812,7 +6863,7 @@ const NestedInputControls = props => {
|
|
|
6812
6863
|
children: props.productType.name
|
|
6813
6864
|
}), props.isEmpty && jsxRuntime.jsx("span", {
|
|
6814
6865
|
children: jsxRuntime.jsx(uiKit.Tag, {
|
|
6815
|
-
children: formatMessage(
|
|
6866
|
+
children: formatMessage(customFieldsMessages.emptySetItem)
|
|
6816
6867
|
})
|
|
6817
6868
|
})]
|
|
6818
6869
|
}), jsxRuntime.jsx(EditButton, {
|
|
@@ -6834,7 +6885,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
6834
6885
|
const parentFormik = formik.useFormikContext();
|
|
6835
6886
|
const showNotification = actionsGlobal.useShowNotification();
|
|
6836
6887
|
const attributesForm = applicationComponents.useModalState();
|
|
6837
|
-
const nestingLevel = React.useContext(NestingLevelContext);
|
|
6888
|
+
const nestingLevel = React.useContext(NestingLevelContext$1);
|
|
6838
6889
|
const _useNestedProductType = useNestedProductType(props.fieldDefinition),
|
|
6839
6890
|
productType = _useNestedProductType.productType;
|
|
6840
6891
|
if (!productType) return null;
|
|
@@ -6863,7 +6914,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
6863
6914
|
max: "scale",
|
|
6864
6915
|
children: jsxRuntime.jsx("div", {
|
|
6865
6916
|
"data-testid": props.name,
|
|
6866
|
-
children: jsxRuntime.jsx(NestingLevelContext.Provider, {
|
|
6917
|
+
children: jsxRuntime.jsx(NestingLevelContext$1.Provider, {
|
|
6867
6918
|
value: nestingLevel + 1,
|
|
6868
6919
|
children: jsxRuntime.jsx(formik.Formik, {
|
|
6869
6920
|
enableReinitialize: true,
|
|
@@ -6874,7 +6925,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
6874
6925
|
if (nestingLevel !== 0) parentFormik.submitForm();else showNotification({
|
|
6875
6926
|
kind: 'success',
|
|
6876
6927
|
domain: constants.DOMAINS.SIDE,
|
|
6877
|
-
text: formatMessage(messages$
|
|
6928
|
+
text: formatMessage(messages$z.attributeUpdateSucceeded)
|
|
6878
6929
|
});
|
|
6879
6930
|
setSubmitting(false);
|
|
6880
6931
|
},
|
|
@@ -6900,6 +6951,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
6900
6951
|
});
|
|
6901
6952
|
});
|
|
6902
6953
|
CustomNestedInput.displayName = 'CustomNestedInput';
|
|
6954
|
+
var CustomNestedInput$1 = CustomNestedInput;
|
|
6903
6955
|
|
|
6904
6956
|
function CustomNumberInput(props) {
|
|
6905
6957
|
const value = props.value ?? '';
|
|
@@ -6977,7 +7029,7 @@ CustomCategoryReferenceInput.displayName = 'CustomCategoryReferenceInput';
|
|
|
6977
7029
|
|
|
6978
7030
|
function CustomChannelReferenceInput(props) {
|
|
6979
7031
|
const value = props.value?.id || '';
|
|
6980
|
-
return jsxRuntime.jsx(ChannelPickerInput, {
|
|
7032
|
+
return jsxRuntime.jsx(ChannelPickerInput$1, {
|
|
6981
7033
|
value: value,
|
|
6982
7034
|
name: props.name,
|
|
6983
7035
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -6992,7 +7044,7 @@ function CustomChannelReferenceInput(props) {
|
|
|
6992
7044
|
}
|
|
6993
7045
|
CustomChannelReferenceInput.displayName = 'CustomChannelReferenceInput';
|
|
6994
7046
|
|
|
6995
|
-
var messages$
|
|
7047
|
+
var messages$y = reactIntl.defineMessages({
|
|
6996
7048
|
noProductsFound: {
|
|
6997
7049
|
id: 'Shared.ProductPickerInput.noProductsFound',
|
|
6998
7050
|
description: 'The message to display when no products were found',
|
|
@@ -7045,7 +7097,7 @@ const ProductPickerInput = _ref => {
|
|
|
7045
7097
|
};
|
|
7046
7098
|
}, [formatLocalizedFieldToString]);
|
|
7047
7099
|
const prefixSearchFields = React.useMemo(() => [`masterData.current.name.${dataLocale}`, 'key'], [dataLocale]);
|
|
7048
|
-
const loadOptions = useLoadOptions({
|
|
7100
|
+
const loadOptions = useLoadOptions$1({
|
|
7049
7101
|
query: GetProductsQuery,
|
|
7050
7102
|
prefixSearchFields
|
|
7051
7103
|
});
|
|
@@ -7066,8 +7118,8 @@ const ProductPickerInput = _ref => {
|
|
|
7066
7118
|
setLoadingError(error);
|
|
7067
7119
|
onError(error);
|
|
7068
7120
|
}), [loadOptions, onError, convertProductToOption]);
|
|
7069
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
7070
|
-
const _useHandlers = useHandlers(onChange),
|
|
7121
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
7122
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
7071
7123
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
7072
7124
|
handleInternalInputChange = _useHandlers2[0],
|
|
7073
7125
|
handleChange = _useHandlers2[1];
|
|
@@ -7083,14 +7135,14 @@ const ProductPickerInput = _ref => {
|
|
|
7083
7135
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
7084
7136
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
7085
7137
|
max: "scale",
|
|
7086
|
-
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
7138
|
+
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner$1, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
7087
7139
|
scale: "xs",
|
|
7088
|
-
children: [jsxRuntime.jsx(CustomFieldTooltip, {
|
|
7140
|
+
children: [jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
7089
7141
|
title: tooltipTitle,
|
|
7090
7142
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
7091
7143
|
id: name,
|
|
7092
7144
|
name: name,
|
|
7093
|
-
placeholder: formatMessage(messages$
|
|
7145
|
+
placeholder: formatMessage(messages$y.placeholder),
|
|
7094
7146
|
loadOptions: loadOptionsDebounced,
|
|
7095
7147
|
defaultOptions: [],
|
|
7096
7148
|
isClearable: isClearable,
|
|
@@ -7104,7 +7156,7 @@ const ProductPickerInput = _ref => {
|
|
|
7104
7156
|
onInputChange: handleInputChange,
|
|
7105
7157
|
onBlur: onBlur,
|
|
7106
7158
|
value: currentOption.data,
|
|
7107
|
-
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$
|
|
7159
|
+
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$y.noProductsFound),
|
|
7108
7160
|
hasError: hasError || isLoadingFailed,
|
|
7109
7161
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
7110
7162
|
menuPortalTarget: document.body,
|
|
@@ -7118,10 +7170,11 @@ const ProductPickerInput = _ref => {
|
|
|
7118
7170
|
});
|
|
7119
7171
|
};
|
|
7120
7172
|
ProductPickerInput.displayName = 'ProductPickerInput';
|
|
7173
|
+
var ProductPickerInput$1 = ProductPickerInput;
|
|
7121
7174
|
|
|
7122
7175
|
function CustomProductReferenceInput(props) {
|
|
7123
7176
|
const value = props.value?.id || '';
|
|
7124
|
-
return jsxRuntime.jsx(ProductPickerInput, {
|
|
7177
|
+
return jsxRuntime.jsx(ProductPickerInput$1, {
|
|
7125
7178
|
value: value,
|
|
7126
7179
|
name: props.name,
|
|
7127
7180
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -7139,7 +7192,7 @@ CustomProductReferenceInput.displayName = 'CustomProductReferenceInput';
|
|
|
7139
7192
|
|
|
7140
7193
|
function CustomProductTypeReferenceInput(props) {
|
|
7141
7194
|
const value = props.value?.id || '';
|
|
7142
|
-
return jsxRuntime.jsx(ProductTypePickerInput, {
|
|
7195
|
+
return jsxRuntime.jsx(ProductTypePickerInput$1, {
|
|
7143
7196
|
value: value,
|
|
7144
7197
|
name: props.name,
|
|
7145
7198
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -7156,7 +7209,7 @@ CustomProductTypeReferenceInput.displayName = 'CustomProductTypeReferenceInput';
|
|
|
7156
7209
|
|
|
7157
7210
|
function CustomRawIdReferenceInput(props) {
|
|
7158
7211
|
const value = props.value?.id || '';
|
|
7159
|
-
return jsxRuntime.jsx(CustomFieldTooltip, {
|
|
7212
|
+
return jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
7160
7213
|
title: value,
|
|
7161
7214
|
children: jsxRuntime.jsx(uiKit.TextInput, {
|
|
7162
7215
|
id: props.name,
|
|
@@ -7174,7 +7227,7 @@ CustomRawIdReferenceInput.displayName = 'CustomRawIdReferenceInput';
|
|
|
7174
7227
|
|
|
7175
7228
|
function CustomStateReferenceInput(props) {
|
|
7176
7229
|
const value = props.value?.id || '';
|
|
7177
|
-
return jsxRuntime.jsx(StatePickerInput, {
|
|
7230
|
+
return jsxRuntime.jsx(StatePickerInput$1, {
|
|
7178
7231
|
value: value,
|
|
7179
7232
|
name: props.name,
|
|
7180
7233
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -7226,7 +7279,7 @@ function CustomTextInput(props) {
|
|
|
7226
7279
|
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
7227
7280
|
});
|
|
7228
7281
|
const tooltipValue = isMultiLine ? '' : value;
|
|
7229
|
-
return jsxRuntime.jsx(CustomFieldTooltip, {
|
|
7282
|
+
return jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
7230
7283
|
title: tooltipValue,
|
|
7231
7284
|
children: jsxRuntime.jsx(InputComponent, {
|
|
7232
7285
|
id: props.name,
|
|
@@ -7305,7 +7358,7 @@ const nonSetComponents = {
|
|
|
7305
7358
|
[CUSTOM_FIELD_TYPES.time]: CustomTimeInput,
|
|
7306
7359
|
[CUSTOM_FIELD_TYPES.datetime]: CustomDateTimeInput,
|
|
7307
7360
|
[CUSTOM_FIELD_TYPES.date]: CustomDateTimeInput,
|
|
7308
|
-
[CUSTOM_FIELD_TYPES.nested]: CustomNestedInput
|
|
7361
|
+
[CUSTOM_FIELD_TYPES.nested]: CustomNestedInput$1
|
|
7309
7362
|
};
|
|
7310
7363
|
const CustomFieldInput = /*#__PURE__*/React.memo(props => {
|
|
7311
7364
|
const InputComponent = React.useMemo(() => {
|
|
@@ -7338,8 +7391,9 @@ const CustomFieldInput = /*#__PURE__*/React.memo(props => {
|
|
|
7338
7391
|
});
|
|
7339
7392
|
});
|
|
7340
7393
|
CustomFieldInput.displayName = 'CustomFieldInput';
|
|
7394
|
+
var CustomFieldInput$1 = CustomFieldInput;
|
|
7341
7395
|
|
|
7342
|
-
var messages$
|
|
7396
|
+
var messages$x = reactIntl.defineMessages({
|
|
7343
7397
|
productReferenceLabel: {
|
|
7344
7398
|
id: 'CustomFieldsLabel.productReferenceLabel',
|
|
7345
7399
|
description: 'Label shown above the product picker input.',
|
|
@@ -7407,7 +7461,7 @@ const CustomFieldsLabelHint = _ref2 => {
|
|
|
7407
7461
|
children: [jsxRuntime.jsx(uiKit.WarningIcon, {
|
|
7408
7462
|
size: "medium",
|
|
7409
7463
|
color: "warning"
|
|
7410
|
-
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$P({}, messages$
|
|
7464
|
+
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$P({}, messages$x.cartDiscountMoreThan500))]
|
|
7411
7465
|
});
|
|
7412
7466
|
}
|
|
7413
7467
|
return l10n.formatLocalizedString(fieldDefinition, {
|
|
@@ -7421,8 +7475,8 @@ function CustomFieldsProductTypeReferenceSubtitle() {
|
|
|
7421
7475
|
formatMessage = _useIntl.formatMessage;
|
|
7422
7476
|
const _usePimStatus = usePimStatus(),
|
|
7423
7477
|
isProjectIndexed = _usePimStatus.isProjectIndexed;
|
|
7424
|
-
if (isProjectIndexed) return formatMessage(messages$
|
|
7425
|
-
return formatMessage(messages$
|
|
7478
|
+
if (isProjectIndexed) return formatMessage(messages$x.productTypeReferenceLabelI);
|
|
7479
|
+
return formatMessage(messages$x.productTypeReferenceLabel);
|
|
7426
7480
|
}
|
|
7427
7481
|
|
|
7428
7482
|
// TODO(pa3): this logic may be misplaced and probably
|
|
@@ -7438,7 +7492,7 @@ function CustomFieldsLabelSubtitle(_ref3) {
|
|
|
7438
7492
|
const referenceTypeId = type.referenceTypeId;
|
|
7439
7493
|
const referenceTypeName = capitalizeFirst(referenceTypeId);
|
|
7440
7494
|
if (_includesInstanceProperty__default["default"](_context = [SEARCHABLE_REFERENCES.category, SEARCHABLE_REFERENCES.cartDiscount]).call(_context, referenceTypeId)) return referenceTypeName;
|
|
7441
|
-
return referenceTypeId === SEARCHABLE_REFERENCES.product ? formatMessage(messages$
|
|
7495
|
+
return referenceTypeId === SEARCHABLE_REFERENCES.product ? formatMessage(messages$x.productReferenceLabel) : referenceTypeId === SEARCHABLE_REFERENCES.productType ? jsxRuntime.jsx(CustomFieldsProductTypeReferenceSubtitle, {}) : referenceTypeId === SEARCHABLE_REFERENCES.channel ? formatMessage(messages$x.channelReferenceLabel) : referenceTypeId === SEARCHABLE_REFERENCES.state ? formatMessage(messages$x.stateReferenceLabel) : `${referenceTypeName} ID`;
|
|
7442
7496
|
}
|
|
7443
7497
|
const Portal = props => /*#__PURE__*/ReactDOM__default["default"].createPortal(props.children, document.body);
|
|
7444
7498
|
var _ref$1 = {
|
|
@@ -7451,7 +7505,7 @@ function CustomFieldsCountIndicator(_ref4) {
|
|
|
7451
7505
|
const _useIntl3 = reactIntl.useIntl(),
|
|
7452
7506
|
formatMessage = _useIntl3.formatMessage;
|
|
7453
7507
|
return assignedAttributeGroups?.length > 1 ? jsxRuntime.jsx(uiKit.Tooltip, {
|
|
7454
|
-
title: formatMessage(messages$
|
|
7508
|
+
title: formatMessage(messages$x.attributeGroupCountTooltip, {
|
|
7455
7509
|
attributeGroups: _mapInstanceProperty__default["default"](assignedAttributeGroups).call(assignedAttributeGroups, assignedAttributeGroup => formatLocalizedField(assignedAttributeGroup.nameAllLocales)).join(', '),
|
|
7456
7510
|
count: assignedAttributeGroups.length
|
|
7457
7511
|
}),
|
|
@@ -7506,8 +7560,9 @@ const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref5 => {
|
|
|
7506
7560
|
});
|
|
7507
7561
|
});
|
|
7508
7562
|
CustomFieldsLabel.displayName = 'CustomFieldsTitle';
|
|
7563
|
+
var CustomFieldsLabel$1 = CustomFieldsLabel;
|
|
7509
7564
|
|
|
7510
|
-
var messages$
|
|
7565
|
+
var messages$w = reactIntl.defineMessages({
|
|
7511
7566
|
referencedProductType: {
|
|
7512
7567
|
id: 'NestedAttributes.referencedProductType',
|
|
7513
7568
|
description: 'Product type referenced hint',
|
|
@@ -7518,7 +7573,7 @@ var messages$s = reactIntl.defineMessages({
|
|
|
7518
7573
|
function ownKeys$O(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7519
7574
|
function _objectSpread$O(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$O(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$O(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7520
7575
|
function ProductTypeReference(props) {
|
|
7521
|
-
const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$
|
|
7576
|
+
const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$w.referencedProductType), {}, {
|
|
7522
7577
|
values: {
|
|
7523
7578
|
productTypeName: props.productType.name
|
|
7524
7579
|
}
|
|
@@ -7546,7 +7601,7 @@ function CustomNestedFieldInput(props) {
|
|
|
7546
7601
|
})]
|
|
7547
7602
|
});
|
|
7548
7603
|
if (!productType) return null;
|
|
7549
|
-
const InputComponent = isSet ? CustomInputSet : CustomNestedInput;
|
|
7604
|
+
const InputComponent = isSet ? CustomInputSet : CustomNestedInput$1;
|
|
7550
7605
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7551
7606
|
children: [jsxRuntime.jsx(ProductTypeReference, {
|
|
7552
7607
|
productType: productType
|
|
@@ -7764,7 +7819,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7764
7819
|
};
|
|
7765
7820
|
return undefined;
|
|
7766
7821
|
};
|
|
7767
|
-
const FieldComponent = isNested(fieldDefinition) ? CustomNestedFieldInput : CustomFieldInput;
|
|
7822
|
+
const FieldComponent = isNested(fieldDefinition) ? CustomNestedFieldInput : CustomFieldInput$1;
|
|
7768
7823
|
const fieldProps = {
|
|
7769
7824
|
name: fieldName,
|
|
7770
7825
|
value: value,
|
|
@@ -7792,7 +7847,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7792
7847
|
"aria-invalid": _Object$keys__default["default"](fieldErrors ?? {}).length > 0,
|
|
7793
7848
|
"aria-errormessage": `${fieldName}-error`,
|
|
7794
7849
|
id: `${fieldName}-error`,
|
|
7795
|
-
children: [jsxRuntime.jsx(CustomFieldsLabel, {
|
|
7850
|
+
children: [jsxRuntime.jsx(CustomFieldsLabel$1, {
|
|
7796
7851
|
name: fieldName,
|
|
7797
7852
|
fieldDefinition: fieldDefinition
|
|
7798
7853
|
}), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
@@ -7800,7 +7855,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7800
7855
|
alignItems: "stretch",
|
|
7801
7856
|
children: [WrapperComponent ? jsxRuntime.jsx(WrapperComponent, {
|
|
7802
7857
|
children: Field
|
|
7803
|
-
}) : Field, props.renderWarnings && status?.warnings[fieldName] && props.renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors, {
|
|
7858
|
+
}) : Field, props.renderWarnings && status?.warnings[fieldName] && props.renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors$1, {
|
|
7804
7859
|
isTouched: isTouched,
|
|
7805
7860
|
errors: fieldErrors
|
|
7806
7861
|
})]
|
|
@@ -7816,6 +7871,7 @@ CustomFieldsInternal.displayName = 'CustomFieldsInternal';
|
|
|
7816
7871
|
CustomFieldsInternal.defaultProps = {
|
|
7817
7872
|
renderCustomWarnings: () => null
|
|
7818
7873
|
};
|
|
7874
|
+
var CustomFieldsInternal$1 = CustomFieldsInternal;
|
|
7819
7875
|
|
|
7820
7876
|
function ownKeys$I(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7821
7877
|
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__default["default"](_context7 = ownKeys$I(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys$I(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -7911,7 +7967,7 @@ function ProductAttributes(_ref) {
|
|
|
7911
7967
|
max: "scale",
|
|
7912
7968
|
children: jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
7913
7969
|
scale: "xl",
|
|
7914
|
-
children: jsxRuntime.jsx(CustomFieldsInternal, {
|
|
7970
|
+
children: jsxRuntime.jsx(CustomFieldsInternal$1, {
|
|
7915
7971
|
name: props.name,
|
|
7916
7972
|
isReadOnly: props.isReadOnly,
|
|
7917
7973
|
isDisabled: props.isDisabled,
|
|
@@ -7946,7 +8002,7 @@ function ProductAttributeInput(props) {
|
|
|
7946
8002
|
// Just don't want to go with another several-weeks long refactoring and
|
|
7947
8003
|
// will address this step by step.
|
|
7948
8004
|
return jsxRuntime.jsx(formik.Formik, {
|
|
7949
|
-
children: jsxRuntime.jsx(CustomFieldInput, {
|
|
8005
|
+
children: jsxRuntime.jsx(CustomFieldInput$1, {
|
|
7950
8006
|
value: value,
|
|
7951
8007
|
name: props.name,
|
|
7952
8008
|
isDisabled: props.isDisabled,
|
|
@@ -8032,7 +8088,7 @@ const emptyStoreOption$1 = intl => [{
|
|
|
8032
8088
|
function ProductSelectionsAsyncSelectDropdown(props) {
|
|
8033
8089
|
const intl = reactIntl.useIntl();
|
|
8034
8090
|
const enableExcludingProducts = applicationShell.useFeatureToggle(EXCLUDING_PRODUCTS);
|
|
8035
|
-
const productSelectionsFetcher = useProductSelectionsFetcher({
|
|
8091
|
+
const productSelectionsFetcher = useProductSelectionsFetcher$1({
|
|
8036
8092
|
limit: props.upperProductSelectionsLimit
|
|
8037
8093
|
});
|
|
8038
8094
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -8088,7 +8144,7 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
8088
8144
|
options: emptyStoreOption$1(intl)
|
|
8089
8145
|
}];
|
|
8090
8146
|
};
|
|
8091
|
-
if (productSelectionsFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8147
|
+
if (productSelectionsFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8092
8148
|
return jsxRuntime.jsx(uiKit.AsyncSelectField, {
|
|
8093
8149
|
id: props.id,
|
|
8094
8150
|
name: props.name,
|
|
@@ -8148,7 +8204,7 @@ const mapProductSelectionsToOptions$1 = memoize__default["default"](function ()
|
|
|
8148
8204
|
function ProductSelectionBasicSelectDropdown(props) {
|
|
8149
8205
|
const intl = reactIntl.useIntl();
|
|
8150
8206
|
const enableExcludingProducts = applicationShell.useFeatureToggle(EXCLUDING_PRODUCTS);
|
|
8151
|
-
const productSelectionsFetcher = useProductSelectionsFetcher({
|
|
8207
|
+
const productSelectionsFetcher = useProductSelectionsFetcher$1({
|
|
8152
8208
|
limit: props.lowerProductSelectionsLimit
|
|
8153
8209
|
});
|
|
8154
8210
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -8157,7 +8213,7 @@ function ProductSelectionBasicSelectDropdown(props) {
|
|
|
8157
8213
|
})),
|
|
8158
8214
|
projectLanguages = _useApplicationContex.projectLanguages,
|
|
8159
8215
|
dataLocale = _useApplicationContex.dataLocale;
|
|
8160
|
-
if (productSelectionsFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8216
|
+
if (productSelectionsFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8161
8217
|
const productSelections = productSelectionsFetcher.productSelections?.results ?? [];
|
|
8162
8218
|
const filteredProductSelections = _filterInstanceProperty__default["default"](productSelections).call(productSelections, ps => {
|
|
8163
8219
|
var _context;
|
|
@@ -8216,6 +8272,7 @@ const useProductSelectionsByFieldFetcher = (productSelections, predicateField) =
|
|
|
8216
8272
|
isLoading: productSelectionsQuery.loading
|
|
8217
8273
|
};
|
|
8218
8274
|
};
|
|
8275
|
+
var useProductSelectionsByFieldFetcher$1 = useProductSelectionsByFieldFetcher;
|
|
8219
8276
|
|
|
8220
8277
|
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 } } } };
|
|
8221
8278
|
const mapProductSelectionsToOptions = memoize__default["default"](_ref => {
|
|
@@ -8253,7 +8310,7 @@ const createQueryVariables$3 = _ref3 => {
|
|
|
8253
8310
|
var _context;
|
|
8254
8311
|
let searchText = _ref3.searchText;
|
|
8255
8312
|
const sanitizedSearchText = sanitize(_trimInstanceProperty__default["default"](searchText).call(searchText, searchText));
|
|
8256
|
-
const idQuery = isUUID(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
|
|
8313
|
+
const idQuery = isUUID$1(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
|
|
8257
8314
|
const keyQuery = `key = "${sanitizedSearchText}"`;
|
|
8258
8315
|
const searchTextQuery = _filterInstanceProperty__default["default"](_context = [idQuery, keyQuery]).call(_context, Boolean).join(' or ');
|
|
8259
8316
|
return {
|
|
@@ -8275,7 +8332,7 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
8275
8332
|
})),
|
|
8276
8333
|
projectLanguages = _useApplicationContex.projectLanguages,
|
|
8277
8334
|
dataLocale = _useApplicationContex.dataLocale;
|
|
8278
|
-
const productSelectionsByFieldFetcher = useProductSelectionsByFieldFetcher(props.value, props.renderSelectInputOptionValuesByField);
|
|
8335
|
+
const productSelectionsByFieldFetcher = useProductSelectionsByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField);
|
|
8279
8336
|
const handleLoadOptions = async searchText => {
|
|
8280
8337
|
const _await$client$query = await client$1.query({
|
|
8281
8338
|
query: ProductSelectionsPickerFetcher,
|
|
@@ -8308,7 +8365,7 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
8308
8365
|
const currentProductSelection = _findInstanceProperty__default["default"](productionSelectionResults).call(productionSelectionResults, productSelection => productSelection.id === productSelectionId);
|
|
8309
8366
|
props.onChange(currentProductSelection);
|
|
8310
8367
|
};
|
|
8311
|
-
if (productSelectionsByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8368
|
+
if (productSelectionsByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8312
8369
|
return jsxRuntime.jsx(uiKit.SearchSelectField, {
|
|
8313
8370
|
id: props.id,
|
|
8314
8371
|
name: props.name,
|
|
@@ -8369,7 +8426,7 @@ function ModeSelectInputOption(props) {
|
|
|
8369
8426
|
function ownKeys$F(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8370
8427
|
function _objectSpread$F(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$F(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$F(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8371
8428
|
function ProductSelectionsPicker(props) {
|
|
8372
|
-
const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher();
|
|
8429
|
+
const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1();
|
|
8373
8430
|
const components = React.useMemo(() => {
|
|
8374
8431
|
return {
|
|
8375
8432
|
Option: optionInnerProps => {
|
|
@@ -8386,7 +8443,7 @@ function ProductSelectionsPicker(props) {
|
|
|
8386
8443
|
}
|
|
8387
8444
|
};
|
|
8388
8445
|
}, [props.optionType]);
|
|
8389
|
-
if (productSelectionsTotalFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8446
|
+
if (productSelectionsTotalFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8390
8447
|
const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= props.lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= props.upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
|
|
8391
8448
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8392
8449
|
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$F(_objectSpread$F({}, props), {}, {
|
|
@@ -8426,6 +8483,7 @@ const RequiredIndicator = _ref => {
|
|
|
8426
8483
|
});
|
|
8427
8484
|
};
|
|
8428
8485
|
RequiredIndicator.displayName = 'RequiredIndicator';
|
|
8486
|
+
var RequiredIndicator$1 = RequiredIndicator;
|
|
8429
8487
|
|
|
8430
8488
|
const ScrollToFieldError = () => {
|
|
8431
8489
|
const formik$1 = formik.useFormikContext();
|
|
@@ -8461,8 +8519,9 @@ const ScrollToFieldError = () => {
|
|
|
8461
8519
|
}, [dataLocale, isValid, submitCount]);
|
|
8462
8520
|
return null;
|
|
8463
8521
|
};
|
|
8522
|
+
var ScrollToFieldError$1 = ScrollToFieldError;
|
|
8464
8523
|
|
|
8465
|
-
var messages$
|
|
8524
|
+
var messages$v = reactIntl.defineMessages({
|
|
8466
8525
|
buttonLabel: {
|
|
8467
8526
|
id: 'SearchInput.buttonLabel',
|
|
8468
8527
|
description: 'Label for "Search" button.',
|
|
@@ -8516,14 +8575,15 @@ const SelectableFieldSearchInput = props => {
|
|
|
8516
8575
|
});
|
|
8517
8576
|
},
|
|
8518
8577
|
onReset: props.onReset,
|
|
8519
|
-
placeholder: props.placeholder ?? intl.formatMessage(messages$
|
|
8578
|
+
placeholder: props.placeholder ?? intl.formatMessage(messages$v.placeholder),
|
|
8520
8579
|
isDisabled: props.disabled
|
|
8521
8580
|
})
|
|
8522
8581
|
});
|
|
8523
8582
|
};
|
|
8524
8583
|
SelectableFieldSearchInput.displayName = 'SelectableFieldSearchInput';
|
|
8584
|
+
var SelectableFieldSearchInput$1 = SelectableFieldSearchInput;
|
|
8525
8585
|
|
|
8526
|
-
var messages$
|
|
8586
|
+
var messages$u = reactIntl.defineMessages({
|
|
8527
8587
|
basicSelectInputPlaceholder: {
|
|
8528
8588
|
id: 'Shared.StoreSelectInput.basicSelectInputPlaceholder',
|
|
8529
8589
|
description: 'The placeholder shown for basic select input',
|
|
@@ -8626,7 +8686,7 @@ const getValueFromOptions$1 = _ref => {
|
|
|
8626
8686
|
return _findInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, store => currentlySelectedStores === store.value);
|
|
8627
8687
|
};
|
|
8628
8688
|
const emptyStoreOption = intl => [{
|
|
8629
|
-
label: intl.formatMessage(messages$
|
|
8689
|
+
label: intl.formatMessage(messages$u.asyncSelectDropdownTypeAheadPrompt),
|
|
8630
8690
|
value: undefined,
|
|
8631
8691
|
isDisabled: true
|
|
8632
8692
|
}];
|
|
@@ -8639,7 +8699,7 @@ const StoresAsyncSelectInput = props => {
|
|
|
8639
8699
|
dataLocale = _useApplicationContex.dataLocale,
|
|
8640
8700
|
projectLanguages = _useApplicationContex.projectLanguages;
|
|
8641
8701
|
const keysOfStores = props.allAccessibleStoreKeysThroughDataFencePermissions;
|
|
8642
|
-
const storesListFetcher = useStoresListFetcher({
|
|
8702
|
+
const storesListFetcher = useStoresListFetcher$1({
|
|
8643
8703
|
limit: 500,
|
|
8644
8704
|
offset: 0,
|
|
8645
8705
|
sort: 'createdAt asc',
|
|
@@ -8681,12 +8741,12 @@ const StoresAsyncSelectInput = props => {
|
|
|
8681
8741
|
options: emptyStoreOption(intl)
|
|
8682
8742
|
}];
|
|
8683
8743
|
};
|
|
8684
|
-
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8744
|
+
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8685
8745
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8686
8746
|
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$E(_objectSpread$E(_objectSpread$E({
|
|
8687
8747
|
id: props.id,
|
|
8688
8748
|
name: props.name,
|
|
8689
|
-
placeholder: intl.formatMessage(messages$
|
|
8749
|
+
placeholder: intl.formatMessage(messages$u.basicSelectInputPlaceholder),
|
|
8690
8750
|
horizontalConstraint: props.horizontalConstraint,
|
|
8691
8751
|
loadOptions: handleLoadOptions,
|
|
8692
8752
|
defaultOptions: true,
|
|
@@ -8728,6 +8788,7 @@ StoresAsyncSelectInput.displayName = 'StoresAsyncSelectInput';
|
|
|
8728
8788
|
StoresAsyncSelectInput.defaultProps = {
|
|
8729
8789
|
shouldFetchProductSelections: false
|
|
8730
8790
|
};
|
|
8791
|
+
var StoresAsyncSelectInput$1 = StoresAsyncSelectInput;
|
|
8731
8792
|
|
|
8732
8793
|
function ownKeys$D(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8733
8794
|
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__default["default"](_context3 = ownKeys$D(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$D(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -8744,7 +8805,7 @@ const StoresBasicSelectInput = props => {
|
|
|
8744
8805
|
dataLocale = _useApplicationContex.dataLocale,
|
|
8745
8806
|
projectLanguages = _useApplicationContex.projectLanguages;
|
|
8746
8807
|
const keysOfStores = props.allAccessibleStoreKeysThroughDataFencePermissions;
|
|
8747
|
-
const storesListFetcher = useStoresListFetcher({
|
|
8808
|
+
const storesListFetcher = useStoresListFetcher$1({
|
|
8748
8809
|
limit: 60,
|
|
8749
8810
|
offset: 0,
|
|
8750
8811
|
sort: 'createdAt asc',
|
|
@@ -8784,12 +8845,12 @@ const StoresBasicSelectInput = props => {
|
|
|
8784
8845
|
});
|
|
8785
8846
|
}
|
|
8786
8847
|
};
|
|
8787
|
-
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8848
|
+
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8788
8849
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8789
8850
|
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$D(_objectSpread$D(_objectSpread$D({
|
|
8790
8851
|
id: props.id,
|
|
8791
8852
|
name: props.name,
|
|
8792
|
-
placeholder: props.placeholder || intl.formatMessage(messages$
|
|
8853
|
+
placeholder: props.placeholder || intl.formatMessage(messages$u.basicSelectInputPlaceholder),
|
|
8793
8854
|
horizontalConstraint: props.horizontalConstraint,
|
|
8794
8855
|
options: mappedStoresListOptions,
|
|
8795
8856
|
isMulti: props.isMulti,
|
|
@@ -8825,6 +8886,7 @@ StoresBasicSelectInput.displayName = 'StoresBasicSelectInput';
|
|
|
8825
8886
|
StoresBasicSelectInput.defaultProps = {
|
|
8826
8887
|
shouldFetchProductSelections: false
|
|
8827
8888
|
};
|
|
8889
|
+
var StoresBasicSelectInput$1 = StoresBasicSelectInput;
|
|
8828
8890
|
|
|
8829
8891
|
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 } } } };
|
|
8830
8892
|
const useTotalNumberOfStoresFetcher = projectKey => {
|
|
@@ -8840,6 +8902,7 @@ const useTotalNumberOfStoresFetcher = projectKey => {
|
|
|
8840
8902
|
isLoading: totalNumberOfStoresQuery.loading
|
|
8841
8903
|
};
|
|
8842
8904
|
};
|
|
8905
|
+
var useTotalNumberOfStoresFetcher$1 = useTotalNumberOfStoresFetcher;
|
|
8843
8906
|
|
|
8844
8907
|
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 } } } };
|
|
8845
8908
|
const createQueryVariables$2 = (stores, predicateField, shouldFetchProductSelections) => ({
|
|
@@ -8867,6 +8930,7 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
8867
8930
|
isLoading: storesQuery.loading
|
|
8868
8931
|
};
|
|
8869
8932
|
};
|
|
8933
|
+
var useStoresByFieldFetcher$1 = useStoresByFieldFetcher;
|
|
8870
8934
|
|
|
8871
8935
|
function ownKeys$C(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8872
8936
|
function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$C(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$C(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -8905,7 +8969,7 @@ const createQueryVariables$1 = _ref => {
|
|
|
8905
8969
|
excludeProductSelections: !shouldFetchProductSelections
|
|
8906
8970
|
};
|
|
8907
8971
|
}
|
|
8908
|
-
const idQuery = isUUID(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
|
|
8972
|
+
const idQuery = isUUID$1(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
|
|
8909
8973
|
const nameQuery = `name(${dataLocale} = "${sanitizedSearchText}")`;
|
|
8910
8974
|
const searchTextQuery = _filterInstanceProperty__default["default"](_context2 = [idQuery, nameQuery, keyQuery]).call(_context2, Boolean).join(' or ');
|
|
8911
8975
|
return {
|
|
@@ -8948,7 +9012,7 @@ const StoresSearchSelectInput = props => {
|
|
|
8948
9012
|
projectLanguages = _useApplicationContex.projectLanguages;
|
|
8949
9013
|
const intl = reactIntl.useIntl();
|
|
8950
9014
|
const client$1 = client.useApolloClient();
|
|
8951
|
-
const storesByFieldFetcher = useStoresByFieldFetcher(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, props.shouldFetchProductSelections);
|
|
9015
|
+
const storesByFieldFetcher = useStoresByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, props.shouldFetchProductSelections);
|
|
8952
9016
|
const hasError = uiKit.AsyncSelectInput.isTouched(props.touched) && hasErrors(props.errors) || props.hasError;
|
|
8953
9017
|
const handleLoadOptions = searchText => {
|
|
8954
9018
|
const extractMatchedStores = client$1.query({
|
|
@@ -8990,16 +9054,16 @@ const StoresSearchSelectInput = props => {
|
|
|
8990
9054
|
className: styles$9.customLabel,
|
|
8991
9055
|
children: props?.renderLabel && props?.renderLabel
|
|
8992
9056
|
}), jsxRuntime.jsx("div", {
|
|
8993
|
-
children: intl.formatMessage(inputValue ? messages$
|
|
9057
|
+
children: intl.formatMessage(inputValue ? messages$u.searchSelectInputNoOptionsFoundMessage : messages$u.searchSelectInputNoValueMessage)
|
|
8994
9058
|
})]
|
|
8995
9059
|
});
|
|
8996
9060
|
};
|
|
8997
|
-
if (storesByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
9061
|
+
if (storesByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8998
9062
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8999
9063
|
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$C(_objectSpread$C({
|
|
9000
9064
|
id: props.id,
|
|
9001
9065
|
name: props.name,
|
|
9002
|
-
placeholder: intl.formatMessage(messages$
|
|
9066
|
+
placeholder: intl.formatMessage(messages$u.searchSelectInputPlaceholder),
|
|
9003
9067
|
horizontalConstraint: props.horizontalConstraint,
|
|
9004
9068
|
loadOptions: loadOptionsDebounced,
|
|
9005
9069
|
defaultOptions: false,
|
|
@@ -9014,7 +9078,7 @@ const StoresSearchSelectInput = props => {
|
|
|
9014
9078
|
}),
|
|
9015
9079
|
onChange: props.onChange,
|
|
9016
9080
|
onBlur: props.onBlur,
|
|
9017
|
-
loadingMessage: intl.formatMessage(messages$
|
|
9081
|
+
loadingMessage: intl.formatMessage(messages$u.searchSelectInputLoadingMessage),
|
|
9018
9082
|
noOptionsMessage: renderNoOptions,
|
|
9019
9083
|
isDisabled: props.isDisabled || storesByFieldFetcher.isLoading,
|
|
9020
9084
|
isReadOnly: props.isReadOnly,
|
|
@@ -9043,6 +9107,7 @@ StoresSearchSelectInput.displayName = 'StoresSearchSelectInput';
|
|
|
9043
9107
|
StoresSearchSelectInput.defaultProps = {
|
|
9044
9108
|
shouldFetchProductSelections: false
|
|
9045
9109
|
};
|
|
9110
|
+
var StoresSearchSelectInput$1 = StoresSearchSelectInput;
|
|
9046
9111
|
|
|
9047
9112
|
function ownKeys$B(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9048
9113
|
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__default["default"](_context = ownKeys$B(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$B(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -9050,7 +9115,7 @@ var styles$8 = {
|
|
|
9050
9115
|
"customOption": "store-select-input-module__customOption___2SC00"
|
|
9051
9116
|
};
|
|
9052
9117
|
const StoreSelectInput = props => {
|
|
9053
|
-
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher(props.projectKey);
|
|
9118
|
+
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1(props.projectKey);
|
|
9054
9119
|
const components = React.useMemo(() => {
|
|
9055
9120
|
return {
|
|
9056
9121
|
// eslint-disable-next-line react/display-name
|
|
@@ -9069,8 +9134,8 @@ const StoreSelectInput = props => {
|
|
|
9069
9134
|
}
|
|
9070
9135
|
};
|
|
9071
9136
|
}, [props.optionType, totalNumberOfStoresFetcher.total, props.upperStoresLimit]);
|
|
9072
|
-
if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
9073
|
-
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput : StoresSearchSelectInput;
|
|
9137
|
+
if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
9138
|
+
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput$1 : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput$1 : StoresSearchSelectInput$1;
|
|
9074
9139
|
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$B(_objectSpread$B({
|
|
9075
9140
|
menuIsOpen: props.menuIsOpen,
|
|
9076
9141
|
placeholder: props.placeholder,
|
|
@@ -9115,6 +9180,7 @@ StoreSelectInput.defaultProps = {
|
|
|
9115
9180
|
optionType: 'double-property',
|
|
9116
9181
|
shouldFetchProductSelections: false
|
|
9117
9182
|
};
|
|
9183
|
+
var StoreSelectInput$1 = StoreSelectInput;
|
|
9118
9184
|
|
|
9119
9185
|
function ownKeys$A(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9120
9186
|
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$A(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$A(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -9131,7 +9197,7 @@ const StoreSelectField = props => {
|
|
|
9131
9197
|
htmlFor: props.id,
|
|
9132
9198
|
hasRequiredIndicator: props.isRequired,
|
|
9133
9199
|
isBold: true
|
|
9134
|
-
}), jsxRuntime.jsx(StoreSelectInput, _objectSpread$A(_objectSpread$A({
|
|
9200
|
+
}), jsxRuntime.jsx(StoreSelectInput$1, _objectSpread$A(_objectSpread$A({
|
|
9135
9201
|
projectKey: props.projectKey,
|
|
9136
9202
|
id: props.id,
|
|
9137
9203
|
name: props.name,
|
|
@@ -9169,6 +9235,7 @@ StoreSelectField.defaultProps = {
|
|
|
9169
9235
|
upperStoresLimit: UPPER_STORES_LIMIT,
|
|
9170
9236
|
mappedValueField: 'id'
|
|
9171
9237
|
};
|
|
9238
|
+
var StoreSelectField$1 = StoreSelectField;
|
|
9172
9239
|
|
|
9173
9240
|
function ownKeys$z(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9174
9241
|
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__default["default"](_context5 = ownKeys$z(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$z(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -9188,7 +9255,7 @@ const validateRequired = value => {
|
|
|
9188
9255
|
};
|
|
9189
9256
|
const VALIDATOR_REQUIRED = {
|
|
9190
9257
|
name: 'required',
|
|
9191
|
-
message:
|
|
9258
|
+
message: validationMessages.required,
|
|
9192
9259
|
permanent: true,
|
|
9193
9260
|
validators: {
|
|
9194
9261
|
change(value) {
|
|
@@ -9202,7 +9269,7 @@ const VALIDATOR_REQUIRED = {
|
|
|
9202
9269
|
};
|
|
9203
9270
|
const VALIDATOR_NUMERIC = {
|
|
9204
9271
|
name: 'numeric',
|
|
9205
|
-
message:
|
|
9272
|
+
message: validationMessages.numeric,
|
|
9206
9273
|
permanent: false,
|
|
9207
9274
|
validators: {
|
|
9208
9275
|
change: v => {
|
|
@@ -9217,7 +9284,7 @@ const VALIDATOR_NUMERIC = {
|
|
|
9217
9284
|
};
|
|
9218
9285
|
const VALIDATOR_INTEGER = {
|
|
9219
9286
|
name: 'integer',
|
|
9220
|
-
message:
|
|
9287
|
+
message: validationMessages.integer,
|
|
9221
9288
|
permanent: false,
|
|
9222
9289
|
validators: {
|
|
9223
9290
|
change: v => {
|
|
@@ -9232,7 +9299,7 @@ const VALIDATOR_INTEGER = {
|
|
|
9232
9299
|
};
|
|
9233
9300
|
({
|
|
9234
9301
|
name: 'email',
|
|
9235
|
-
message:
|
|
9302
|
+
message: validationMessages.email,
|
|
9236
9303
|
permanent: false,
|
|
9237
9304
|
validators: {
|
|
9238
9305
|
// Note: it's a bit weird to validate it on every change,
|
|
@@ -9661,7 +9728,7 @@ const CustomFields = props => {
|
|
|
9661
9728
|
css: /*#__PURE__*/react$1.css("min-width:", props.isWidthExpanded ? '100%' : uiKit.customProperties.constraint11, ";" + ("" ), "" ),
|
|
9662
9729
|
children: jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
9663
9730
|
scale: "xl",
|
|
9664
|
-
children: jsxRuntime.jsx(CustomFieldsInternal, {
|
|
9731
|
+
children: jsxRuntime.jsx(CustomFieldsInternal$1, {
|
|
9665
9732
|
name: props.name,
|
|
9666
9733
|
isReadOnly: props.isReadOnly,
|
|
9667
9734
|
isDisabled: props.isDisabled,
|
|
@@ -9674,6 +9741,7 @@ const CustomFields = props => {
|
|
|
9674
9741
|
});
|
|
9675
9742
|
};
|
|
9676
9743
|
CustomFields.displayName = 'CustomFields';
|
|
9744
|
+
var CustomFields$1 = CustomFields;
|
|
9677
9745
|
|
|
9678
9746
|
function ownKeys$w(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9679
9747
|
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$w(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$w(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -9746,12 +9814,12 @@ function validations (formValues, language, languages) {
|
|
|
9746
9814
|
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$w(_objectSpread$w({}, acc), {}, {
|
|
9747
9815
|
[fieldDefinition.name]: _objectSpread$w(_objectSpread$w({}, setMissingIfRequired(formValues, fieldDefinition)), setDuplicatedIfSet(formValues, fieldDefinition, language, languages))
|
|
9748
9816
|
}), {});
|
|
9749
|
-
return withoutEmptyErrorsByField(errors);
|
|
9817
|
+
return withoutEmptyErrorsByField$1(errors);
|
|
9750
9818
|
}
|
|
9751
9819
|
|
|
9752
|
-
CustomFields.DndProvider = DndProvider;
|
|
9820
|
+
CustomFields$1.DndProvider = DndProvider;
|
|
9753
9821
|
|
|
9754
|
-
var messages$
|
|
9822
|
+
var messages$t = reactIntl.defineMessages({
|
|
9755
9823
|
customFieldsError: {
|
|
9756
9824
|
id: 'CustomFieldsError.Error',
|
|
9757
9825
|
description: 'The message when there are errors adding custom fields',
|
|
@@ -9766,7 +9834,7 @@ const CustomFieldsErrorTextNotification = props => {
|
|
|
9766
9834
|
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
9767
9835
|
scale: "s",
|
|
9768
9836
|
children: [jsxRuntime.jsx(uiKit.Text.Wrap, {
|
|
9769
|
-
intlMessage: _objectSpread$v({}, messages$
|
|
9837
|
+
intlMessage: _objectSpread$v({}, messages$t.customFieldsError)
|
|
9770
9838
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
9771
9839
|
scale: "xs",
|
|
9772
9840
|
children: _mapInstanceProperty__default["default"](_context = props.formErrors).call(_context, formError => jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -9777,8 +9845,9 @@ const CustomFieldsErrorTextNotification = props => {
|
|
|
9777
9845
|
});
|
|
9778
9846
|
};
|
|
9779
9847
|
CustomFieldsErrorTextNotification.displayName = 'CustomFieldsErrorTextNotification';
|
|
9848
|
+
var CustomFieldsErrorTextNotification$1 = CustomFieldsErrorTextNotification;
|
|
9780
9849
|
|
|
9781
|
-
var messages$
|
|
9850
|
+
var messages$s = reactIntl.defineMessages({
|
|
9782
9851
|
noCustomFields: {
|
|
9783
9852
|
id: 'CustomTypesSubform.noCustomFields',
|
|
9784
9853
|
description: 'The label when there are no custom fields defined',
|
|
@@ -9932,20 +10001,20 @@ const CustomFieldsInputWrapper = _ref2 => {
|
|
|
9932
10001
|
formValues = _valuesInstanceProperty__default["default"](_useFormikContext);
|
|
9933
10002
|
const rootFieldName = createRootFieldName(rootFormStateFieldName);
|
|
9934
10003
|
if (!typeDefinitionsExist(typeDefinitions)) {
|
|
9935
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$
|
|
10004
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$s.noTypes));
|
|
9936
10005
|
}
|
|
9937
10006
|
if (!typeDefinitionSelected(formValues, rootFieldName)) {
|
|
9938
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$
|
|
10007
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$s.noCustomType));
|
|
9939
10008
|
}
|
|
9940
10009
|
if (!typeDefinitionContainsFieldDefinitions(formValues, rootFieldName)) {
|
|
9941
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$
|
|
10010
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$s.noCustomFields));
|
|
9942
10011
|
}
|
|
9943
10012
|
if (fieldDefinitionsWithValues(formValues, rootFieldName).length === 0 && isReadOnly && hideEmptyFields) {
|
|
9944
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$
|
|
10013
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$s.noInputValues));
|
|
9945
10014
|
}
|
|
9946
10015
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
9947
10016
|
max: "scale",
|
|
9948
|
-
children: jsxRuntime.jsx(CustomFields, {
|
|
10017
|
+
children: jsxRuntime.jsx(CustomFields$1, {
|
|
9949
10018
|
isReadOnly: isReadOnly,
|
|
9950
10019
|
name: `${rootFieldName}.fields`,
|
|
9951
10020
|
fieldDefinitions: isReadOnly && hideEmptyFields ? fieldDefinitionsWithValues(formValues, rootFieldName) : formik.getIn(formValues, rootFieldName).type.obj.fieldDefinitions
|
|
@@ -9953,6 +10022,7 @@ const CustomFieldsInputWrapper = _ref2 => {
|
|
|
9953
10022
|
});
|
|
9954
10023
|
};
|
|
9955
10024
|
CustomFieldsInputWrapper.displayName = 'CustomFieldsInputWrapper';
|
|
10025
|
+
var CustomFieldsInputWrapper$1 = CustomFieldsInputWrapper;
|
|
9956
10026
|
|
|
9957
10027
|
function ownKeys$s(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9958
10028
|
function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$s(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$s(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -10042,7 +10112,7 @@ const CustomTypeSubform = _ref => {
|
|
|
10042
10112
|
return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
10043
10113
|
header: jsxRuntime.jsx(uiKit.CollapsiblePanel.Header, {
|
|
10044
10114
|
isCondensed: isCondensed,
|
|
10045
|
-
children: panelTitle || jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$s({}, messages$
|
|
10115
|
+
children: panelTitle || jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$s({}, messages$s.title))
|
|
10046
10116
|
}),
|
|
10047
10117
|
headerControls: typeDefinitions.length > 0 && jsxRuntime.jsx("div", {
|
|
10048
10118
|
css: /*#__PURE__*/react$1.css("min-width:", uiKit.designTokens.constraint11, ";" + ("" ), "" ),
|
|
@@ -10053,12 +10123,12 @@ const CustomTypeSubform = _ref => {
|
|
|
10053
10123
|
options: mapTypeDefinitionsToOptions(typeDefinitions, language, languages, formik.getIn(formValues, rootFieldName)?.type?.id),
|
|
10054
10124
|
value: formik.getIn(formValues, rootFieldName)?.type?.obj?.key,
|
|
10055
10125
|
onChange: handleTypeDefinitionSelect,
|
|
10056
|
-
placeholder: formatMessage(messages$
|
|
10126
|
+
placeholder: formatMessage(messages$s.typesPlaceholder),
|
|
10057
10127
|
isReadOnly: isReadOnly
|
|
10058
10128
|
})
|
|
10059
10129
|
}),
|
|
10060
10130
|
headerControlsAlignment: "right",
|
|
10061
|
-
children: jsxRuntime.jsx(CustomFieldsInputWrapper, {
|
|
10131
|
+
children: jsxRuntime.jsx(CustomFieldsInputWrapper$1, {
|
|
10062
10132
|
typeDefinitions: typeDefinitions,
|
|
10063
10133
|
isReadOnly: isReadOnly,
|
|
10064
10134
|
hideEmptyFields: hideEmptyFields,
|
|
@@ -10067,6 +10137,7 @@ const CustomTypeSubform = _ref => {
|
|
|
10067
10137
|
});
|
|
10068
10138
|
};
|
|
10069
10139
|
CustomTypeSubform.displayName = 'CustomTypeSubform';
|
|
10140
|
+
var CustomTypeSubform$1 = CustomTypeSubform;
|
|
10070
10141
|
|
|
10071
10142
|
const CustomFieldsFormField = _ref => {
|
|
10072
10143
|
let resources = _ref.resources,
|
|
@@ -10088,7 +10159,7 @@ const CustomFieldsFormField = _ref => {
|
|
|
10088
10159
|
return jsxRuntime.jsx(uiKit.LoadingSpinner, {});
|
|
10089
10160
|
}
|
|
10090
10161
|
const typeDefinitions = _mapInstanceProperty__default["default"](_context = customFieldTypeDefinitions.results).call(_context, CustomFieldTypeDefinitionsConnector$1.graphQlDocToForm);
|
|
10091
|
-
return jsxRuntime.jsx(CustomTypeSubform, {
|
|
10162
|
+
return jsxRuntime.jsx(CustomTypeSubform$1, {
|
|
10092
10163
|
typeDefinitions: typeDefinitions,
|
|
10093
10164
|
isReadOnly: isReadOnly,
|
|
10094
10165
|
isCondensed: isCondensed,
|
|
@@ -10101,6 +10172,7 @@ const CustomFieldsFormField = _ref => {
|
|
|
10101
10172
|
};
|
|
10102
10173
|
CustomFieldsFormField.createFormStateFromResource = createFormStateFromResource;
|
|
10103
10174
|
CustomFieldsFormField.createGraphQlDocFromFormState = createGraphQlDocFromFormState;
|
|
10175
|
+
var CustomFieldsFormField$1 = CustomFieldsFormField;
|
|
10104
10176
|
|
|
10105
10177
|
/**
|
|
10106
10178
|
* @typedef {object} TPimIndexer
|
|
@@ -10126,6 +10198,7 @@ const defaultValue = {
|
|
|
10126
10198
|
* @type {import('react').Context<TPimIndexer>}
|
|
10127
10199
|
*/
|
|
10128
10200
|
const PimIndexerContext = /*#__PURE__*/React.createContext(defaultValue);
|
|
10201
|
+
var PimIndexerContext$1 = PimIndexerContext;
|
|
10129
10202
|
|
|
10130
10203
|
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 } } } };
|
|
10131
10204
|
var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
|
|
@@ -10168,7 +10241,7 @@ var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
|
|
|
10168
10241
|
}
|
|
10169
10242
|
};
|
|
10170
10243
|
|
|
10171
|
-
var messages$
|
|
10244
|
+
var messages$r = reactIntl.defineMessages({
|
|
10172
10245
|
indexingSucceed: {
|
|
10173
10246
|
id: 'Products.PimIndexer.Notifications.indexingSucceed',
|
|
10174
10247
|
description: 'Message to be shown to user when PIM successfully finishes initial project indexing.',
|
|
@@ -10274,7 +10347,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10274
10347
|
_this.props.notifications.showNotification({
|
|
10275
10348
|
kind: 'error',
|
|
10276
10349
|
domain: constants.DOMAINS.SIDE,
|
|
10277
|
-
text: _this.props.intl.formatMessage(messages$
|
|
10350
|
+
text: _this.props.intl.formatMessage(messages$r.indexingFailed)
|
|
10278
10351
|
});
|
|
10279
10352
|
};
|
|
10280
10353
|
_this.getIndexingProgress = async () => {
|
|
@@ -10315,7 +10388,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10315
10388
|
_this.props.notifications.showNotification({
|
|
10316
10389
|
kind: 'success',
|
|
10317
10390
|
domain: constants.DOMAINS.SIDE,
|
|
10318
|
-
text: _this.props.intl.formatMessage(messages$
|
|
10391
|
+
text: _this.props.intl.formatMessage(messages$r.indexingSucceed)
|
|
10319
10392
|
},
|
|
10320
10393
|
// because the indexing may take so long, the success notification
|
|
10321
10394
|
// may be dismissed without being seen by the user. Set `dismissAfter`
|
|
@@ -10389,7 +10462,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10389
10462
|
}, {
|
|
10390
10463
|
key: "render",
|
|
10391
10464
|
value: function render() {
|
|
10392
|
-
return jsxRuntime.jsx(PimIndexerContext.Provider, {
|
|
10465
|
+
return jsxRuntime.jsx(PimIndexerContext$1.Provider, {
|
|
10393
10466
|
value: _objectSpread$r(_objectSpread$r({}, this.state), {}, {
|
|
10394
10467
|
attemptToRefreshProducts: this.attemptToRefreshProducts,
|
|
10395
10468
|
indexProject: this.indexProject
|
|
@@ -10408,7 +10481,7 @@ var pimIndexerProvider = flowRight__default["default"](applicationShellConnector
|
|
|
10408
10481
|
name: 'refreshProductIndicesByIds'
|
|
10409
10482
|
}), hoc.graphql(IndexProject, {
|
|
10410
10483
|
name: 'indexProject'
|
|
10411
|
-
}), hoc.withApollo, reactIntl.injectIntl, injectNotifications())(PimIndexerProvider);
|
|
10484
|
+
}), hoc.withApollo, reactIntl.injectIntl, injectNotifications$1())(PimIndexerProvider);
|
|
10412
10485
|
|
|
10413
10486
|
function _callSuper$1(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10414
10487
|
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function () { return !!t; })(); }
|
|
@@ -10421,31 +10494,32 @@ let WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
|
10421
10494
|
return _createClass(WithPimIndexer, [{
|
|
10422
10495
|
key: "render",
|
|
10423
10496
|
value: function render() {
|
|
10424
|
-
return jsxRuntime.jsx(PimIndexerContext.Consumer, {
|
|
10497
|
+
return jsxRuntime.jsx(PimIndexerContext$1.Consumer, {
|
|
10425
10498
|
children: pimIndexerProps => this.props.children(pimIndexerProps)
|
|
10426
10499
|
});
|
|
10427
10500
|
}
|
|
10428
10501
|
}]);
|
|
10429
10502
|
}(React.PureComponent);
|
|
10430
10503
|
WithPimIndexer.displayName = 'WithPimIndexer';
|
|
10504
|
+
var WithPimIndexer$1 = WithPimIndexer;
|
|
10431
10505
|
|
|
10432
10506
|
function ownKeys$q(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10433
10507
|
function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$q(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$q(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10434
10508
|
var injectPimIndexer = (function () {
|
|
10435
10509
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pimIndexer';
|
|
10436
10510
|
return Component => {
|
|
10437
|
-
const WrappedComponent = props => jsxRuntime.jsx(WithPimIndexer, {
|
|
10511
|
+
const WrappedComponent = props => jsxRuntime.jsx(WithPimIndexer$1, {
|
|
10438
10512
|
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$q(_objectSpread$q({}, props), {}, {
|
|
10439
10513
|
[propName]: pimIndexerProps
|
|
10440
10514
|
}))
|
|
10441
10515
|
});
|
|
10442
|
-
WrappedComponent.displayName = wrapDisplayName(Component, 'InjectPimIndexer');
|
|
10516
|
+
WrappedComponent.displayName = wrapDisplayName$1(Component, 'InjectPimIndexer');
|
|
10443
10517
|
return WrappedComponent;
|
|
10444
10518
|
};
|
|
10445
10519
|
});
|
|
10446
10520
|
|
|
10447
10521
|
function usePimIndexer() {
|
|
10448
|
-
return React.useContext(PimIndexerContext);
|
|
10522
|
+
return React.useContext(PimIndexerContext$1);
|
|
10449
10523
|
}
|
|
10450
10524
|
|
|
10451
10525
|
// eslint-disable-next-line import/prefer-default-export
|
|
@@ -10469,11 +10543,12 @@ const resourcesWithPlatformLimits = _Object$keys__default["default"](RESOURCES_W
|
|
|
10469
10543
|
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$p({
|
|
10470
10544
|
[camelCase__default["default"](`should include ${nextNameOfLimit}`)]: platformLimit ? nextNameOfLimit === platformLimit : true
|
|
10471
10545
|
}, previousIncludedLimits), {});
|
|
10546
|
+
var createPlatformLimitsQueryVariables = createQueryVariables;
|
|
10472
10547
|
|
|
10473
10548
|
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 } } } };
|
|
10474
10549
|
const usePlatformLimitsFetcher = platformLimit => {
|
|
10475
10550
|
const _useQuery = react.useQuery(PlatformLimitsFetcherQuery, {
|
|
10476
|
-
variables:
|
|
10551
|
+
variables: createPlatformLimitsQueryVariables(platformLimit),
|
|
10477
10552
|
context: {
|
|
10478
10553
|
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
10479
10554
|
},
|
|
@@ -10491,6 +10566,7 @@ const usePlatformLimitsFetcher = platformLimit => {
|
|
|
10491
10566
|
refetch
|
|
10492
10567
|
};
|
|
10493
10568
|
};
|
|
10569
|
+
var usePlatformLimitsFetcher$1 = usePlatformLimitsFetcher;
|
|
10494
10570
|
|
|
10495
10571
|
const useLimitsModalState = function () {
|
|
10496
10572
|
let isInitiallyOpen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
@@ -10506,6 +10582,7 @@ const useLimitsModalState = function () {
|
|
|
10506
10582
|
openModal
|
|
10507
10583
|
};
|
|
10508
10584
|
};
|
|
10585
|
+
var useLimitsModalState$1 = useLimitsModalState;
|
|
10509
10586
|
|
|
10510
10587
|
const useInterceptNavigation = hasReachedErrorLimit => {
|
|
10511
10588
|
const _useState = React.useState(false),
|
|
@@ -10527,8 +10604,9 @@ const useInterceptNavigation = hasReachedErrorLimit => {
|
|
|
10527
10604
|
setPlatformLimitToBeNotExceeded
|
|
10528
10605
|
};
|
|
10529
10606
|
};
|
|
10607
|
+
var useInterceptNavigation$1 = useInterceptNavigation;
|
|
10530
10608
|
|
|
10531
|
-
var messages$
|
|
10609
|
+
var messages$q = reactIntl.defineMessages({
|
|
10532
10610
|
shippingMethods: {
|
|
10533
10611
|
id: 'PlatformLimits.Notifications.shippingMethodsError',
|
|
10534
10612
|
description: 'error message about platform limit exceeded',
|
|
@@ -10568,7 +10646,7 @@ const PlatformLimitErrorNotification = _ref => {
|
|
|
10568
10646
|
limit = _ref.limit;
|
|
10569
10647
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
10570
10648
|
type: "error",
|
|
10571
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$o(_objectSpread$o({}, messages$
|
|
10649
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$o(_objectSpread$o({}, messages$q[resource]), {}, {
|
|
10572
10650
|
values: {
|
|
10573
10651
|
limit,
|
|
10574
10652
|
customersupport: getCustomerSupportLink$1
|
|
@@ -10580,8 +10658,9 @@ const PlatformLimitErrorNotification = _ref => {
|
|
|
10580
10658
|
});
|
|
10581
10659
|
};
|
|
10582
10660
|
PlatformLimitErrorNotification.displayName = 'PlatformLimitErrorNotification';
|
|
10661
|
+
var Error$1 = PlatformLimitErrorNotification;
|
|
10583
10662
|
|
|
10584
|
-
var messages$
|
|
10663
|
+
var messages$p = reactIntl.defineMessages({
|
|
10585
10664
|
shippingMethods: {
|
|
10586
10665
|
id: 'PlatformLimits.Notifications.shippingMethodsWarning',
|
|
10587
10666
|
description: 'warning message about platform limit exceeded',
|
|
@@ -10621,7 +10700,7 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
10621
10700
|
limit = _ref.limit;
|
|
10622
10701
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
10623
10702
|
type: "warning",
|
|
10624
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$n(_objectSpread$n({}, messages$
|
|
10703
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$n(_objectSpread$n({}, messages$p[resource]), {}, {
|
|
10625
10704
|
values: {
|
|
10626
10705
|
limit,
|
|
10627
10706
|
customersupport: getCustomerSupportLink
|
|
@@ -10633,11 +10712,13 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
10633
10712
|
});
|
|
10634
10713
|
};
|
|
10635
10714
|
PlatformLimitWarningNotification.displayName = 'PlatformLimitWarningNotification';
|
|
10715
|
+
var Warning = PlatformLimitWarningNotification;
|
|
10636
10716
|
|
|
10637
10717
|
const Notifications = {
|
|
10638
|
-
Warning
|
|
10639
|
-
Error:
|
|
10718
|
+
Warning,
|
|
10719
|
+
Error: Error$1
|
|
10640
10720
|
};
|
|
10721
|
+
var Notifications$1 = Notifications;
|
|
10641
10722
|
|
|
10642
10723
|
function ownKeys$m(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10643
10724
|
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$m(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$m(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -10657,6 +10738,7 @@ const PlatformLimitsStatusText = _ref => {
|
|
|
10657
10738
|
});
|
|
10658
10739
|
};
|
|
10659
10740
|
PlatformLimitsStatusText.displayName = 'PlatformLimitsStatusText';
|
|
10741
|
+
var StatusText = PlatformLimitsStatusText;
|
|
10660
10742
|
|
|
10661
10743
|
const getHasExceededWarningThreshold = _ref => {
|
|
10662
10744
|
let limit = _ref.limit,
|
|
@@ -10683,7 +10765,7 @@ const getPlatformLimitsStatus = _ref3 => {
|
|
|
10683
10765
|
};
|
|
10684
10766
|
|
|
10685
10767
|
const useShippingMethodsPlatformLimitsFetcher = () => {
|
|
10686
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.shippingMethods),
|
|
10768
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.shippingMethods),
|
|
10687
10769
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
10688
10770
|
error = _usePlatformLimitsFet.error,
|
|
10689
10771
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -10695,9 +10777,10 @@ const useShippingMethodsPlatformLimitsFetcher = () => {
|
|
|
10695
10777
|
refetch
|
|
10696
10778
|
};
|
|
10697
10779
|
};
|
|
10780
|
+
var useShippingMethodsPlatformLimitsFetcher$1 = useShippingMethodsPlatformLimitsFetcher;
|
|
10698
10781
|
|
|
10699
|
-
const useShippingMethodsPlatformLimits = () => {
|
|
10700
|
-
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
10782
|
+
const useShippingMethodsPlatformLimits$1 = () => {
|
|
10783
|
+
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
|
|
10701
10784
|
platformLimits = _useShippingMethodsPl.platformLimits;
|
|
10702
10785
|
if (!platformLimits?.shippingMethods?.total) {
|
|
10703
10786
|
return {
|
|
@@ -10721,24 +10804,25 @@ const useShippingMethodsPlatformLimits = () => {
|
|
|
10721
10804
|
hasReachedShippingMethodsErrorLimit
|
|
10722
10805
|
};
|
|
10723
10806
|
};
|
|
10807
|
+
var useShippingMethodsPlatformLimitsStatus = useShippingMethodsPlatformLimits$1;
|
|
10724
10808
|
|
|
10725
10809
|
const PlatformLimitsShippingMethodsNotifications = () => {
|
|
10726
|
-
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
10810
|
+
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
|
|
10727
10811
|
platformLimits = _useShippingMethodsPl.platformLimits;
|
|
10728
|
-
const _useShippingMethodsPl2 =
|
|
10812
|
+
const _useShippingMethodsPl2 = useShippingMethodsPlatformLimitsStatus(),
|
|
10729
10813
|
hasReachedShippingMethodsWarningLimit = _useShippingMethodsPl2.hasReachedShippingMethodsWarningLimit,
|
|
10730
10814
|
hasReachedShippingMethodsErrorLimit = _useShippingMethodsPl2.hasReachedShippingMethodsErrorLimit;
|
|
10731
10815
|
if (!platformLimits?.shippingMethods?.total) {
|
|
10732
10816
|
return null;
|
|
10733
10817
|
}
|
|
10734
10818
|
if (hasReachedShippingMethodsErrorLimit) {
|
|
10735
|
-
return jsxRuntime.jsx(Notifications.Error, {
|
|
10819
|
+
return jsxRuntime.jsx(Notifications$1.Error, {
|
|
10736
10820
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.shippingMethods,
|
|
10737
10821
|
limit: platformLimits.shippingMethods.total.limit
|
|
10738
10822
|
});
|
|
10739
10823
|
}
|
|
10740
10824
|
if (hasReachedShippingMethodsWarningLimit) {
|
|
10741
|
-
return jsxRuntime.jsx(Notifications.Warning, {
|
|
10825
|
+
return jsxRuntime.jsx(Notifications$1.Warning, {
|
|
10742
10826
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.shippingMethods,
|
|
10743
10827
|
limit: platformLimits.shippingMethods.total.limit
|
|
10744
10828
|
});
|
|
@@ -10746,8 +10830,9 @@ const PlatformLimitsShippingMethodsNotifications = () => {
|
|
|
10746
10830
|
return null;
|
|
10747
10831
|
};
|
|
10748
10832
|
PlatformLimitsShippingMethodsNotifications.displayName = 'PlatformLimitsShippingMethodsNotifications';
|
|
10833
|
+
var ShippingMethodsNotification = PlatformLimitsShippingMethodsNotifications;
|
|
10749
10834
|
|
|
10750
|
-
var messages$
|
|
10835
|
+
var messages$o = reactIntl.defineMessages({
|
|
10751
10836
|
shippingMethodsPlatformLimitReached: {
|
|
10752
10837
|
id: 'PlatformLimits.Tooltip.shippingMethodsLimitReached',
|
|
10753
10838
|
description: 'The message for shipping methods platform limit being reached',
|
|
@@ -10760,12 +10845,13 @@ function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
10760
10845
|
const PlatformLimitsShippingMethodsTooltip = props => {
|
|
10761
10846
|
const intl = reactIntl.useIntl();
|
|
10762
10847
|
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
10763
|
-
title: intl.formatMessage(messages$
|
|
10848
|
+
title: intl.formatMessage(messages$o.shippingMethodsPlatformLimitReached)
|
|
10764
10849
|
}));
|
|
10765
10850
|
};
|
|
10766
10851
|
PlatformLimitsShippingMethodsTooltip.displayName = 'PlatformLimitsShippingMethodsTooltip';
|
|
10852
|
+
var ShippingMethodsTooltip = PlatformLimitsShippingMethodsTooltip;
|
|
10767
10853
|
|
|
10768
|
-
var messages$
|
|
10854
|
+
var messages$n = reactIntl.defineMessages({
|
|
10769
10855
|
shippingMethodsStatus: {
|
|
10770
10856
|
id: 'PlatformLimits.Status.shippingMethods',
|
|
10771
10857
|
description: 'The message for shipping methods platform limit values',
|
|
@@ -10776,12 +10862,12 @@ var messages$j = reactIntl.defineMessages({
|
|
|
10776
10862
|
const PlatformLimitsShippingMethodsStatus = _ref => {
|
|
10777
10863
|
let total = _ref.total;
|
|
10778
10864
|
const intl = reactIntl.useIntl();
|
|
10779
|
-
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
10865
|
+
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
|
|
10780
10866
|
platformLimits = _useShippingMethodsPl.platformLimits;
|
|
10781
10867
|
const current = platformLimits?.shippingMethods?.total?.current;
|
|
10782
10868
|
const limit = platformLimits?.shippingMethods?.total?.limit;
|
|
10783
|
-
return jsxRuntime.jsx(
|
|
10784
|
-
intlMessage: messages$
|
|
10869
|
+
return jsxRuntime.jsx(StatusText, {
|
|
10870
|
+
intlMessage: messages$n.shippingMethodsStatus,
|
|
10785
10871
|
children: getPlatformLimitsStatus({
|
|
10786
10872
|
limit,
|
|
10787
10873
|
current,
|
|
@@ -10791,18 +10877,19 @@ const PlatformLimitsShippingMethodsStatus = _ref => {
|
|
|
10791
10877
|
});
|
|
10792
10878
|
};
|
|
10793
10879
|
PlatformLimitsShippingMethodsStatus.displayName = 'PlatformLimitsShippingMethodsStatus';
|
|
10880
|
+
var ShippingMethodsStatus = PlatformLimitsShippingMethodsStatus;
|
|
10794
10881
|
|
|
10795
10882
|
const useShippingMethodsLimits = () => {
|
|
10796
|
-
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
10883
|
+
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
|
|
10797
10884
|
refetch = _useShippingMethodsPl.refetch;
|
|
10798
|
-
const _useShippingMethodsPl2 =
|
|
10885
|
+
const _useShippingMethodsPl2 = useShippingMethodsPlatformLimitsStatus(),
|
|
10799
10886
|
hasReachedShippingMethodsWarningLimit = _useShippingMethodsPl2.hasReachedShippingMethodsWarningLimit,
|
|
10800
10887
|
hasReachedShippingMethodsErrorLimit = _useShippingMethodsPl2.hasReachedShippingMethodsErrorLimit;
|
|
10801
10888
|
return {
|
|
10802
10889
|
ShippingMethodsLimits: {
|
|
10803
|
-
Notifications:
|
|
10804
|
-
Status:
|
|
10805
|
-
Tooltip:
|
|
10890
|
+
Notifications: ShippingMethodsNotification,
|
|
10891
|
+
Status: ShippingMethodsStatus,
|
|
10892
|
+
Tooltip: ShippingMethodsTooltip
|
|
10806
10893
|
},
|
|
10807
10894
|
refetchShippingMethodsPlatformLimits: refetch,
|
|
10808
10895
|
status: {
|
|
@@ -10811,23 +10898,25 @@ const useShippingMethodsLimits = () => {
|
|
|
10811
10898
|
}
|
|
10812
10899
|
};
|
|
10813
10900
|
};
|
|
10901
|
+
var useShippingMethodsPlatformLimits = useShippingMethodsLimits;
|
|
10814
10902
|
|
|
10815
10903
|
function ownKeys$k(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10816
10904
|
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10817
10905
|
const injectShippingMethodsPlatformLimits = () => WrappedComponent => {
|
|
10818
10906
|
const WithShippingMethodsPlatformLimits = props => {
|
|
10819
|
-
const shippingMethodsPlatformLimits =
|
|
10907
|
+
const shippingMethodsPlatformLimits = useShippingMethodsPlatformLimits();
|
|
10820
10908
|
const shippingMethodsProps = {
|
|
10821
10909
|
platformLimits: shippingMethodsPlatformLimits
|
|
10822
10910
|
};
|
|
10823
10911
|
return jsxRuntime.jsx(WrappedComponent, _objectSpread$k(_objectSpread$k({}, props), shippingMethodsProps));
|
|
10824
10912
|
};
|
|
10825
|
-
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
10913
|
+
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
10826
10914
|
return WithShippingMethodsPlatformLimits;
|
|
10827
10915
|
};
|
|
10916
|
+
var injectShippingMethodsPlatformLimits$1 = injectShippingMethodsPlatformLimits;
|
|
10828
10917
|
|
|
10829
10918
|
const useTaxCategoriesPlatformLimitsFetcher = () => {
|
|
10830
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.taxCategories),
|
|
10919
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.taxCategories),
|
|
10831
10920
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
10832
10921
|
error = _usePlatformLimitsFet.error,
|
|
10833
10922
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -10839,9 +10928,10 @@ const useTaxCategoriesPlatformLimitsFetcher = () => {
|
|
|
10839
10928
|
refetch
|
|
10840
10929
|
};
|
|
10841
10930
|
};
|
|
10931
|
+
var useTaxCategoriesPlatformLimitsFetcher$1 = useTaxCategoriesPlatformLimitsFetcher;
|
|
10842
10932
|
|
|
10843
|
-
const useTaxCategoriesPlatformLimits = () => {
|
|
10844
|
-
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
10933
|
+
const useTaxCategoriesPlatformLimits$1 = () => {
|
|
10934
|
+
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
|
|
10845
10935
|
platformLimits = _useTaxCategoriesPlat.platformLimits;
|
|
10846
10936
|
if (!platformLimits?.taxCategories?.total) {
|
|
10847
10937
|
return {
|
|
@@ -10865,24 +10955,25 @@ const useTaxCategoriesPlatformLimits = () => {
|
|
|
10865
10955
|
hasReachedTaxCategoriesErrorLimit
|
|
10866
10956
|
};
|
|
10867
10957
|
};
|
|
10958
|
+
var useTaxCategoriesPlatformLimitsStatus = useTaxCategoriesPlatformLimits$1;
|
|
10868
10959
|
|
|
10869
10960
|
const PlatformLimitsTaxCategoriesNotifications = () => {
|
|
10870
|
-
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
10961
|
+
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
|
|
10871
10962
|
platformLimits = _useTaxCategoriesPlat.platformLimits;
|
|
10872
|
-
const _useTaxCategoriesPlat2 =
|
|
10963
|
+
const _useTaxCategoriesPlat2 = useTaxCategoriesPlatformLimitsStatus(),
|
|
10873
10964
|
hasReachedTaxCategoriesWarningLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesWarningLimit,
|
|
10874
10965
|
hasReachedTaxCategoriesErrorLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesErrorLimit;
|
|
10875
10966
|
if (!platformLimits?.taxCategories?.total) {
|
|
10876
10967
|
return null;
|
|
10877
10968
|
}
|
|
10878
10969
|
if (hasReachedTaxCategoriesErrorLimit) {
|
|
10879
|
-
return jsxRuntime.jsx(Notifications.Error, {
|
|
10970
|
+
return jsxRuntime.jsx(Notifications$1.Error, {
|
|
10880
10971
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.taxCategories,
|
|
10881
10972
|
limit: platformLimits.taxCategories.total.limit
|
|
10882
10973
|
});
|
|
10883
10974
|
}
|
|
10884
10975
|
if (hasReachedTaxCategoriesWarningLimit) {
|
|
10885
|
-
return jsxRuntime.jsx(Notifications.Warning, {
|
|
10976
|
+
return jsxRuntime.jsx(Notifications$1.Warning, {
|
|
10886
10977
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.taxCategories,
|
|
10887
10978
|
limit: platformLimits.taxCategories.total.limit
|
|
10888
10979
|
});
|
|
@@ -10890,8 +10981,9 @@ const PlatformLimitsTaxCategoriesNotifications = () => {
|
|
|
10890
10981
|
return null;
|
|
10891
10982
|
};
|
|
10892
10983
|
PlatformLimitsTaxCategoriesNotifications.displayName = 'PlatformLimitsTaxCategoriesNotifications';
|
|
10984
|
+
var TaxCategoriesNotification = PlatformLimitsTaxCategoriesNotifications;
|
|
10893
10985
|
|
|
10894
|
-
var messages$
|
|
10986
|
+
var messages$m = reactIntl.defineMessages({
|
|
10895
10987
|
taxCategoriesPlatformLimitReached: {
|
|
10896
10988
|
id: 'PlatformLimits.Tooltip.taxCategoriesLimitReached',
|
|
10897
10989
|
description: 'The message for tax categories platform limit being reached',
|
|
@@ -10904,12 +10996,13 @@ function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
10904
10996
|
const PlatformLimitsTaxCategoriesTooltip = props => {
|
|
10905
10997
|
const intl = reactIntl.useIntl();
|
|
10906
10998
|
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$j(_objectSpread$j({}, props), {}, {
|
|
10907
|
-
title: intl.formatMessage(messages$
|
|
10999
|
+
title: intl.formatMessage(messages$m.taxCategoriesPlatformLimitReached)
|
|
10908
11000
|
}));
|
|
10909
11001
|
};
|
|
10910
11002
|
PlatformLimitsTaxCategoriesTooltip.displayName = 'PlatformLimitsTaxCategoriesTooltip';
|
|
11003
|
+
var TaxCategoriesTooltip = PlatformLimitsTaxCategoriesTooltip;
|
|
10911
11004
|
|
|
10912
|
-
var messages$
|
|
11005
|
+
var messages$l = reactIntl.defineMessages({
|
|
10913
11006
|
taxCategoriesStatus: {
|
|
10914
11007
|
id: 'PlatformLimits.Status.taxCategories',
|
|
10915
11008
|
description: 'The message for tax categories platform limit values',
|
|
@@ -10920,12 +11013,12 @@ var messages$h = reactIntl.defineMessages({
|
|
|
10920
11013
|
const PlatformLimitsTaxCategoriesStatus = _ref => {
|
|
10921
11014
|
let total = _ref.total;
|
|
10922
11015
|
const intl = reactIntl.useIntl();
|
|
10923
|
-
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
11016
|
+
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
|
|
10924
11017
|
platformLimits = _useTaxCategoriesPlat.platformLimits;
|
|
10925
11018
|
const current = platformLimits?.taxCategories?.total?.current;
|
|
10926
11019
|
const limit = platformLimits?.taxCategories?.total?.limit;
|
|
10927
|
-
return jsxRuntime.jsx(
|
|
10928
|
-
intlMessage: messages$
|
|
11020
|
+
return jsxRuntime.jsx(StatusText, {
|
|
11021
|
+
intlMessage: messages$l.taxCategoriesStatus,
|
|
10929
11022
|
children: getPlatformLimitsStatus({
|
|
10930
11023
|
limit,
|
|
10931
11024
|
current,
|
|
@@ -10935,18 +11028,19 @@ const PlatformLimitsTaxCategoriesStatus = _ref => {
|
|
|
10935
11028
|
});
|
|
10936
11029
|
};
|
|
10937
11030
|
PlatformLimitsTaxCategoriesStatus.displayName = 'PlatformLimitsTaxCategoriesStatus';
|
|
11031
|
+
var TaxCategoriesStatus = PlatformLimitsTaxCategoriesStatus;
|
|
10938
11032
|
|
|
10939
11033
|
const useTaxCategoriesLimits = () => {
|
|
10940
|
-
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
11034
|
+
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
|
|
10941
11035
|
refetch = _useTaxCategoriesPlat.refetch;
|
|
10942
|
-
const _useTaxCategoriesPlat2 =
|
|
11036
|
+
const _useTaxCategoriesPlat2 = useTaxCategoriesPlatformLimitsStatus(),
|
|
10943
11037
|
hasReachedTaxCategoriesWarningLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesWarningLimit,
|
|
10944
11038
|
hasReachedTaxCategoriesErrorLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesErrorLimit;
|
|
10945
11039
|
return {
|
|
10946
11040
|
TaxCategoriesLimits: {
|
|
10947
|
-
Notifications:
|
|
10948
|
-
Status:
|
|
10949
|
-
Tooltip:
|
|
11041
|
+
Notifications: TaxCategoriesNotification,
|
|
11042
|
+
Status: TaxCategoriesStatus,
|
|
11043
|
+
Tooltip: TaxCategoriesTooltip
|
|
10950
11044
|
},
|
|
10951
11045
|
refetchTaxCategoriesPlatformLimits: refetch,
|
|
10952
11046
|
status: {
|
|
@@ -10955,23 +11049,25 @@ const useTaxCategoriesLimits = () => {
|
|
|
10955
11049
|
}
|
|
10956
11050
|
};
|
|
10957
11051
|
};
|
|
11052
|
+
var useTaxCategoriesPlatformLimits = useTaxCategoriesLimits;
|
|
10958
11053
|
|
|
10959
11054
|
function ownKeys$i(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10960
11055
|
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10961
11056
|
const injectTaxCategoriesPlatformLimits = WrappedComponent => {
|
|
10962
11057
|
const WithTaxCategoriesPlatformLimits = props => {
|
|
10963
|
-
const taxCategoriesPlatformLimits =
|
|
11058
|
+
const taxCategoriesPlatformLimits = useTaxCategoriesPlatformLimits();
|
|
10964
11059
|
const taxCategoriesProps = {
|
|
10965
11060
|
platformLimits: taxCategoriesPlatformLimits
|
|
10966
11061
|
};
|
|
10967
11062
|
return jsxRuntime.jsx(WrappedComponent, _objectSpread$i(_objectSpread$i({}, props), taxCategoriesProps));
|
|
10968
11063
|
};
|
|
10969
|
-
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
11064
|
+
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
10970
11065
|
return WithTaxCategoriesPlatformLimits;
|
|
10971
11066
|
};
|
|
11067
|
+
var injectTaxCategoriesPlatformLimits$1 = injectTaxCategoriesPlatformLimits;
|
|
10972
11068
|
|
|
10973
11069
|
const useZonesPlatformLimitsFetcher = () => {
|
|
10974
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.zones),
|
|
11070
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.zones),
|
|
10975
11071
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
10976
11072
|
error = _usePlatformLimitsFet.error,
|
|
10977
11073
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -10983,9 +11079,10 @@ const useZonesPlatformLimitsFetcher = () => {
|
|
|
10983
11079
|
refetch
|
|
10984
11080
|
};
|
|
10985
11081
|
};
|
|
11082
|
+
var useZonesPlatformLimitsFetcher$1 = useZonesPlatformLimitsFetcher;
|
|
10986
11083
|
|
|
10987
|
-
const useZonesPlatformLimits = () => {
|
|
10988
|
-
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
11084
|
+
const useZonesPlatformLimits$1 = () => {
|
|
11085
|
+
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
|
|
10989
11086
|
platformLimits = _useZonesPlatformLimi.platformLimits;
|
|
10990
11087
|
if (!platformLimits?.zones?.total) {
|
|
10991
11088
|
return {
|
|
@@ -11009,24 +11106,25 @@ const useZonesPlatformLimits = () => {
|
|
|
11009
11106
|
hasReachedZonesErrorLimit
|
|
11010
11107
|
};
|
|
11011
11108
|
};
|
|
11109
|
+
var useZonesPlatformLimitsStatus = useZonesPlatformLimits$1;
|
|
11012
11110
|
|
|
11013
11111
|
const PlatformLimitsZonesNotifications = () => {
|
|
11014
|
-
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
11112
|
+
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
|
|
11015
11113
|
platformLimits = _useZonesPlatformLimi.platformLimits;
|
|
11016
|
-
const _useZonesPlatformLimi2 =
|
|
11114
|
+
const _useZonesPlatformLimi2 = useZonesPlatformLimitsStatus(),
|
|
11017
11115
|
hasReachedZonesWarningLimit = _useZonesPlatformLimi2.hasReachedZonesWarningLimit,
|
|
11018
11116
|
hasReachedZonesErrorLimit = _useZonesPlatformLimi2.hasReachedZonesErrorLimit;
|
|
11019
11117
|
if (!platformLimits?.zones?.total) {
|
|
11020
11118
|
return null;
|
|
11021
11119
|
}
|
|
11022
11120
|
if (hasReachedZonesErrorLimit) {
|
|
11023
|
-
return jsxRuntime.jsx(Notifications.Error, {
|
|
11121
|
+
return jsxRuntime.jsx(Notifications$1.Error, {
|
|
11024
11122
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.zones,
|
|
11025
11123
|
limit: platformLimits.zones.total.limit
|
|
11026
11124
|
});
|
|
11027
11125
|
}
|
|
11028
11126
|
if (hasReachedZonesWarningLimit) {
|
|
11029
|
-
return jsxRuntime.jsx(Notifications.Warning, {
|
|
11127
|
+
return jsxRuntime.jsx(Notifications$1.Warning, {
|
|
11030
11128
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.zones,
|
|
11031
11129
|
limit: platformLimits.zones.total.limit
|
|
11032
11130
|
});
|
|
@@ -11034,8 +11132,9 @@ const PlatformLimitsZonesNotifications = () => {
|
|
|
11034
11132
|
return null;
|
|
11035
11133
|
};
|
|
11036
11134
|
PlatformLimitsZonesNotifications.displayName = 'PlatformLimitsZonesNotifications';
|
|
11135
|
+
var ZonesNotification = PlatformLimitsZonesNotifications;
|
|
11037
11136
|
|
|
11038
|
-
var messages$
|
|
11137
|
+
var messages$k = reactIntl.defineMessages({
|
|
11039
11138
|
zonesPlatformLimitReached: {
|
|
11040
11139
|
id: 'PlatformLimits.Tooltip.zonesLimitReached',
|
|
11041
11140
|
description: 'The message for zones platform limit being reached',
|
|
@@ -11048,12 +11147,13 @@ function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
11048
11147
|
const PlatformLimitsZonesTooltip = props => {
|
|
11049
11148
|
const intl = reactIntl.useIntl();
|
|
11050
11149
|
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$h(_objectSpread$h({}, props), {}, {
|
|
11051
|
-
title: intl.formatMessage(messages$
|
|
11150
|
+
title: intl.formatMessage(messages$k.zonesPlatformLimitReached)
|
|
11052
11151
|
}));
|
|
11053
11152
|
};
|
|
11054
11153
|
PlatformLimitsZonesTooltip.displayName = 'PlatformLimitsZonesTooltip';
|
|
11154
|
+
var ZonesTooltip = PlatformLimitsZonesTooltip;
|
|
11055
11155
|
|
|
11056
|
-
var messages$
|
|
11156
|
+
var messages$j = reactIntl.defineMessages({
|
|
11057
11157
|
zonesStatus: {
|
|
11058
11158
|
id: 'PlatformLimits.Status.zones',
|
|
11059
11159
|
description: 'The message for zones platform limit values',
|
|
@@ -11064,12 +11164,12 @@ var messages$f = reactIntl.defineMessages({
|
|
|
11064
11164
|
const PlatformLimitsZonesStatus = _ref => {
|
|
11065
11165
|
let total = _ref.total;
|
|
11066
11166
|
const intl = reactIntl.useIntl();
|
|
11067
|
-
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
11167
|
+
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
|
|
11068
11168
|
platformLimits = _useZonesPlatformLimi.platformLimits;
|
|
11069
11169
|
const current = platformLimits?.zones?.total?.current;
|
|
11070
11170
|
const limit = platformLimits?.zones?.total?.limit;
|
|
11071
|
-
return jsxRuntime.jsx(
|
|
11072
|
-
intlMessage: messages$
|
|
11171
|
+
return jsxRuntime.jsx(StatusText, {
|
|
11172
|
+
intlMessage: messages$j.zonesStatus,
|
|
11073
11173
|
children: getPlatformLimitsStatus({
|
|
11074
11174
|
limit,
|
|
11075
11175
|
current,
|
|
@@ -11079,18 +11179,19 @@ const PlatformLimitsZonesStatus = _ref => {
|
|
|
11079
11179
|
});
|
|
11080
11180
|
};
|
|
11081
11181
|
PlatformLimitsZonesStatus.displayName = 'PlatformLimitsZonesStatus';
|
|
11182
|
+
var ZonesStatus = PlatformLimitsZonesStatus;
|
|
11082
11183
|
|
|
11083
11184
|
const useZonesLimits = () => {
|
|
11084
|
-
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
11185
|
+
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
|
|
11085
11186
|
refetch = _useZonesPlatformLimi.refetch;
|
|
11086
|
-
const _useZonesPlatformLimi2 =
|
|
11187
|
+
const _useZonesPlatformLimi2 = useZonesPlatformLimitsStatus(),
|
|
11087
11188
|
hasReachedZonesWarningLimit = _useZonesPlatformLimi2.hasReachedZonesWarningLimit,
|
|
11088
11189
|
hasReachedZonesErrorLimit = _useZonesPlatformLimi2.hasReachedZonesErrorLimit;
|
|
11089
11190
|
return {
|
|
11090
11191
|
ZonesLimits: {
|
|
11091
|
-
Notifications:
|
|
11092
|
-
Status:
|
|
11093
|
-
Tooltip:
|
|
11192
|
+
Notifications: ZonesNotification,
|
|
11193
|
+
Status: ZonesStatus,
|
|
11194
|
+
Tooltip: ZonesTooltip
|
|
11094
11195
|
},
|
|
11095
11196
|
refetchZonesPlatformLimits: refetch,
|
|
11096
11197
|
status: {
|
|
@@ -11099,23 +11200,25 @@ const useZonesLimits = () => {
|
|
|
11099
11200
|
}
|
|
11100
11201
|
};
|
|
11101
11202
|
};
|
|
11203
|
+
var useZonesPlatformLimits = useZonesLimits;
|
|
11102
11204
|
|
|
11103
11205
|
function ownKeys$g(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11104
11206
|
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$g(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11105
11207
|
const injectZonesPlatformLimits = () => WrappedComponent => {
|
|
11106
11208
|
const WithZonesPlatformLimits = props => {
|
|
11107
|
-
const zonesPlatformLimits =
|
|
11209
|
+
const zonesPlatformLimits = useZonesPlatformLimits();
|
|
11108
11210
|
const zonesProps = {
|
|
11109
11211
|
platformLimits: zonesPlatformLimits
|
|
11110
11212
|
};
|
|
11111
11213
|
return jsxRuntime.jsx(WrappedComponent, _objectSpread$g(_objectSpread$g({}, props), zonesProps));
|
|
11112
11214
|
};
|
|
11113
|
-
WithZonesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithZonesPlatformLimits');
|
|
11215
|
+
WithZonesPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithZonesPlatformLimits');
|
|
11114
11216
|
return WithZonesPlatformLimits;
|
|
11115
11217
|
};
|
|
11218
|
+
var injectZonesPlatformLimits$1 = injectZonesPlatformLimits;
|
|
11116
11219
|
|
|
11117
11220
|
const useCustomersPlatformLimitsFetcher = () => {
|
|
11118
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.customers),
|
|
11221
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.customers),
|
|
11119
11222
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
11120
11223
|
error = _usePlatformLimitsFet.error,
|
|
11121
11224
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -11127,9 +11230,10 @@ const useCustomersPlatformLimitsFetcher = () => {
|
|
|
11127
11230
|
refetch
|
|
11128
11231
|
};
|
|
11129
11232
|
};
|
|
11233
|
+
var useCustomersPlatformLimitsFetcher$1 = useCustomersPlatformLimitsFetcher;
|
|
11130
11234
|
|
|
11131
|
-
const useCustomersPlatformLimits$
|
|
11132
|
-
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher(),
|
|
11235
|
+
const useCustomersPlatformLimits$2 = () => {
|
|
11236
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
11133
11237
|
platformLimits = _useCustomersPlatform.platformLimits;
|
|
11134
11238
|
if (!platformLimits?.customers?.total) {
|
|
11135
11239
|
return {
|
|
@@ -11153,10 +11257,11 @@ const useCustomersPlatformLimits$1 = () => {
|
|
|
11153
11257
|
hasReachedCustomersErrorLimit
|
|
11154
11258
|
};
|
|
11155
11259
|
};
|
|
11260
|
+
var useCustomersPlatformLimitsStatus = useCustomersPlatformLimits$2;
|
|
11156
11261
|
|
|
11157
11262
|
const useCustomersPlatormLimitsModalState = () => {
|
|
11158
|
-
const customersPlatformLimitsStatus =
|
|
11159
|
-
const limitsModalState = useLimitsModalState(false);
|
|
11263
|
+
const customersPlatformLimitsStatus = useCustomersPlatformLimitsStatus();
|
|
11264
|
+
const limitsModalState = useLimitsModalState$1(false);
|
|
11160
11265
|
React.useEffect(() => {
|
|
11161
11266
|
if (customersPlatformLimitsStatus.hasReachedCustomersErrorLimit) {
|
|
11162
11267
|
limitsModalState.openModal();
|
|
@@ -11166,24 +11271,25 @@ const useCustomersPlatormLimitsModalState = () => {
|
|
|
11166
11271
|
isModalOpen: limitsModalState.isModalOpen
|
|
11167
11272
|
};
|
|
11168
11273
|
};
|
|
11274
|
+
var useCustomersPlatormLimitsModalState$1 = useCustomersPlatormLimitsModalState;
|
|
11169
11275
|
|
|
11170
11276
|
const PlatformLimitsCustomersNotifications = () => {
|
|
11171
|
-
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher(),
|
|
11277
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
11172
11278
|
platformLimits = _useCustomersPlatform.platformLimits;
|
|
11173
|
-
const _useCustomersPlatform2 =
|
|
11279
|
+
const _useCustomersPlatform2 = useCustomersPlatformLimitsStatus(),
|
|
11174
11280
|
hasReachedCustomersWarningLimit = _useCustomersPlatform2.hasReachedCustomersWarningLimit,
|
|
11175
11281
|
hasReachedCustomersErrorLimit = _useCustomersPlatform2.hasReachedCustomersErrorLimit;
|
|
11176
11282
|
if (!platformLimits?.customers?.total) {
|
|
11177
11283
|
return jsxRuntime.jsx("div", {});
|
|
11178
11284
|
}
|
|
11179
11285
|
if (hasReachedCustomersErrorLimit) {
|
|
11180
|
-
return jsxRuntime.jsx(Notifications.Error, {
|
|
11286
|
+
return jsxRuntime.jsx(Notifications$1.Error, {
|
|
11181
11287
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.customers,
|
|
11182
11288
|
limit: platformLimits.customers.total.limit
|
|
11183
11289
|
});
|
|
11184
11290
|
}
|
|
11185
11291
|
if (hasReachedCustomersWarningLimit) {
|
|
11186
|
-
return jsxRuntime.jsx(Notifications.Warning, {
|
|
11292
|
+
return jsxRuntime.jsx(Notifications$1.Warning, {
|
|
11187
11293
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.customers,
|
|
11188
11294
|
limit: platformLimits.customers.total.limit
|
|
11189
11295
|
});
|
|
@@ -11191,8 +11297,9 @@ const PlatformLimitsCustomersNotifications = () => {
|
|
|
11191
11297
|
return jsxRuntime.jsx("div", {});
|
|
11192
11298
|
};
|
|
11193
11299
|
PlatformLimitsCustomersNotifications.displayName = 'PlatformLimitsCustomersNotifications';
|
|
11300
|
+
var CustomersNotification = PlatformLimitsCustomersNotifications;
|
|
11194
11301
|
|
|
11195
|
-
var messages$
|
|
11302
|
+
var messages$i = reactIntl.defineMessages({
|
|
11196
11303
|
customersPlatformLimitReached: {
|
|
11197
11304
|
id: 'PlatformLimits.Tooltip.customersLimitReached',
|
|
11198
11305
|
description: 'The message for customers platform limit being reached',
|
|
@@ -11205,12 +11312,13 @@ function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
11205
11312
|
const PlatformLimitsCustomersTooltip = props => {
|
|
11206
11313
|
const intl = reactIntl.useIntl();
|
|
11207
11314
|
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$f(_objectSpread$f({}, props), {}, {
|
|
11208
|
-
title: intl.formatMessage(messages$
|
|
11315
|
+
title: intl.formatMessage(messages$i.customersPlatformLimitReached)
|
|
11209
11316
|
}));
|
|
11210
11317
|
};
|
|
11211
11318
|
PlatformLimitsCustomersTooltip.displayName = 'PlatformLimitsCustomersTooltip';
|
|
11319
|
+
var CustomersTooltip = PlatformLimitsCustomersTooltip;
|
|
11212
11320
|
|
|
11213
|
-
var messages$
|
|
11321
|
+
var messages$h = reactIntl.defineMessages({
|
|
11214
11322
|
customersStatus: {
|
|
11215
11323
|
id: 'PlatformLimits.Status.customers',
|
|
11216
11324
|
description: 'The message for customers platform limit values',
|
|
@@ -11225,7 +11333,7 @@ var styles$6 = {
|
|
|
11225
11333
|
};
|
|
11226
11334
|
const PlatformLimitsCustomersStatus = () => {
|
|
11227
11335
|
const intl = reactIntl.useIntl();
|
|
11228
|
-
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher(),
|
|
11336
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
11229
11337
|
platformLimits = _useCustomersPlatform.platformLimits;
|
|
11230
11338
|
if (!platformLimits?.customers?.total) {
|
|
11231
11339
|
return null;
|
|
@@ -11238,7 +11346,7 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
11238
11346
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
11239
11347
|
tone: "secondary",
|
|
11240
11348
|
isInline: true,
|
|
11241
|
-
intlMessage: _objectSpread$e(_objectSpread$e({}, messages$
|
|
11349
|
+
intlMessage: _objectSpread$e(_objectSpread$e({}, messages$h.customersStatus), {}, {
|
|
11242
11350
|
values: {
|
|
11243
11351
|
current: intl.formatNumber(current),
|
|
11244
11352
|
limit: intl.formatNumber(limit)
|
|
@@ -11248,8 +11356,9 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
11248
11356
|
});
|
|
11249
11357
|
};
|
|
11250
11358
|
PlatformLimitsCustomersStatus.displayName = 'PlatformLimitsCustomersStatus';
|
|
11359
|
+
var CustomersStatus = PlatformLimitsCustomersStatus;
|
|
11251
11360
|
|
|
11252
|
-
var messages$
|
|
11361
|
+
var messages$g = reactIntl.defineMessages({
|
|
11253
11362
|
title: {
|
|
11254
11363
|
id: 'PlatformLimits.Customers.modalTitle',
|
|
11255
11364
|
description: 'The modal title for the customer platform limits error',
|
|
@@ -11369,20 +11478,20 @@ LimitsReachedErrorGraphic$1.defaultProps = {
|
|
|
11369
11478
|
const PlatformLimitsCustomersErrorModal = _ref => {
|
|
11370
11479
|
let onClose = _ref.onClose;
|
|
11371
11480
|
const intl = reactIntl.useIntl();
|
|
11372
|
-
const customersPlatformLimitsModalState = useCustomersPlatormLimitsModalState();
|
|
11481
|
+
const customersPlatformLimitsModalState = useCustomersPlatormLimitsModalState$1();
|
|
11373
11482
|
return jsxRuntime.jsx(applicationComponents.InfoDialog, {
|
|
11374
11483
|
isOpen: customersPlatformLimitsModalState.isModalOpen,
|
|
11375
11484
|
onClose: onClose,
|
|
11376
|
-
title: intl.formatMessage(messages$
|
|
11485
|
+
title: intl.formatMessage(messages$g.title),
|
|
11377
11486
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
11378
11487
|
scale: "m",
|
|
11379
11488
|
alignItems: "center",
|
|
11380
11489
|
children: [jsxRuntime.jsx(LimitsReachedErrorGraphic$1, {}), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
11381
11490
|
scale: "l",
|
|
11382
11491
|
alignItems: "center",
|
|
11383
|
-
children: [jsxRuntime.jsx(
|
|
11492
|
+
children: [jsxRuntime.jsx(CustomersNotification, {}), jsxRuntime.jsx(uiKit.FlatButton, {
|
|
11384
11493
|
onClick: onClose,
|
|
11385
|
-
label: intl.formatMessage(messages$
|
|
11494
|
+
label: intl.formatMessage(messages$g.backToList),
|
|
11386
11495
|
icon: jsxRuntime.jsx(uiKit.ListIcon, {
|
|
11387
11496
|
size: "medium",
|
|
11388
11497
|
color: "primary"
|
|
@@ -11393,13 +11502,14 @@ const PlatformLimitsCustomersErrorModal = _ref => {
|
|
|
11393
11502
|
});
|
|
11394
11503
|
};
|
|
11395
11504
|
PlatformLimitsCustomersErrorModal.displayName = 'PlatformLimitsCustomersErrorModal';
|
|
11505
|
+
var CustomersErrorModal = PlatformLimitsCustomersErrorModal;
|
|
11396
11506
|
|
|
11397
11507
|
var styles$5 = {
|
|
11398
11508
|
"combined": "platform-limits-customers-combined-module__combined___OszDd"
|
|
11399
11509
|
};
|
|
11400
11510
|
const PlatformLimitsCustomersCombined = () => {
|
|
11401
11511
|
// on the customer create only show the warning message
|
|
11402
|
-
const _useCustomersPlatform =
|
|
11512
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsStatus(),
|
|
11403
11513
|
hasReachedCustomersErrorLimit = _useCustomersPlatform.hasReachedCustomersErrorLimit,
|
|
11404
11514
|
hasReachedCustomersWarningLimit = _useCustomersPlatform.hasReachedCustomersWarningLimit;
|
|
11405
11515
|
return jsxRuntime.jsx("div", {
|
|
@@ -11407,26 +11517,27 @@ const PlatformLimitsCustomersCombined = () => {
|
|
|
11407
11517
|
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
11408
11518
|
scale: "xl",
|
|
11409
11519
|
justifyContent: "space-between",
|
|
11410
|
-
children: [hasReachedCustomersWarningLimit && !hasReachedCustomersErrorLimit ? jsxRuntime.jsx(
|
|
11520
|
+
children: [hasReachedCustomersWarningLimit && !hasReachedCustomersErrorLimit ? jsxRuntime.jsx(CustomersNotification, {}) : null, jsxRuntime.jsx(CustomersStatus, {})]
|
|
11411
11521
|
})
|
|
11412
11522
|
});
|
|
11413
11523
|
};
|
|
11414
11524
|
PlatformLimitsCustomersCombined.displayName = 'PlatformLimitsCustomersCombined';
|
|
11525
|
+
var CustomersCombined = PlatformLimitsCustomersCombined;
|
|
11415
11526
|
|
|
11416
11527
|
const useCustomersPlatformLimits = () => {
|
|
11417
|
-
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher(),
|
|
11528
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
11418
11529
|
refetch = _useCustomersPlatform.refetch;
|
|
11419
|
-
const _useCustomersPlatform2 =
|
|
11530
|
+
const _useCustomersPlatform2 = useCustomersPlatformLimitsStatus(),
|
|
11420
11531
|
hasReachedCustomersWarningLimit = _useCustomersPlatform2.hasReachedCustomersWarningLimit,
|
|
11421
11532
|
hasReachedCustomersErrorLimit = _useCustomersPlatform2.hasReachedCustomersErrorLimit;
|
|
11422
|
-
const interceptNavigation = useInterceptNavigation(hasReachedCustomersErrorLimit);
|
|
11533
|
+
const interceptNavigation = useInterceptNavigation$1(hasReachedCustomersErrorLimit);
|
|
11423
11534
|
return {
|
|
11424
11535
|
CustomersLimits: {
|
|
11425
|
-
Notifications:
|
|
11426
|
-
Status:
|
|
11427
|
-
Combined:
|
|
11428
|
-
Tooltip:
|
|
11429
|
-
ErrorModal:
|
|
11536
|
+
Notifications: CustomersNotification,
|
|
11537
|
+
Status: CustomersStatus,
|
|
11538
|
+
Combined: CustomersCombined,
|
|
11539
|
+
Tooltip: CustomersTooltip,
|
|
11540
|
+
ErrorModal: CustomersErrorModal
|
|
11430
11541
|
},
|
|
11431
11542
|
refetchCustomersPlatformLimits: refetch,
|
|
11432
11543
|
interceptNavigation,
|
|
@@ -11436,23 +11547,25 @@ const useCustomersPlatformLimits = () => {
|
|
|
11436
11547
|
}
|
|
11437
11548
|
};
|
|
11438
11549
|
};
|
|
11550
|
+
var useCustomersPlatformLimits$1 = useCustomersPlatformLimits;
|
|
11439
11551
|
|
|
11440
11552
|
function ownKeys$c(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11441
11553
|
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$c(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$c(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11442
11554
|
const injectCustomersPlatformLimits = () => WrappedComponent => {
|
|
11443
11555
|
const WithCustomersPlatformLimits = props => {
|
|
11444
|
-
const CustomersPlatformLimits = useCustomersPlatformLimits();
|
|
11556
|
+
const CustomersPlatformLimits = useCustomersPlatformLimits$1();
|
|
11445
11557
|
const customersProps = {
|
|
11446
11558
|
platformLimits: CustomersPlatformLimits
|
|
11447
11559
|
};
|
|
11448
11560
|
return jsxRuntime.jsx(WrappedComponent, _objectSpread$c(_objectSpread$c({}, props), customersProps));
|
|
11449
11561
|
};
|
|
11450
|
-
WithCustomersPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
11562
|
+
WithCustomersPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
11451
11563
|
return WithCustomersPlatformLimits;
|
|
11452
11564
|
};
|
|
11565
|
+
var injectCustomersPlatformLimits$1 = injectCustomersPlatformLimits;
|
|
11453
11566
|
|
|
11454
11567
|
const useCustomerGroupsPlatformLimitsFetcher = () => {
|
|
11455
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.customerGroups),
|
|
11568
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.customerGroups),
|
|
11456
11569
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
11457
11570
|
error = _usePlatformLimitsFet.error,
|
|
11458
11571
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -11464,9 +11577,10 @@ const useCustomerGroupsPlatformLimitsFetcher = () => {
|
|
|
11464
11577
|
refetch
|
|
11465
11578
|
};
|
|
11466
11579
|
};
|
|
11580
|
+
var useCustomerGroupsPlatformLimitsFetcher$1 = useCustomerGroupsPlatformLimitsFetcher;
|
|
11467
11581
|
|
|
11468
11582
|
const useCustomerGroupsPlatformLimitsStatus = () => {
|
|
11469
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher(),
|
|
11583
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
|
|
11470
11584
|
platformLimits = _useCustomerGroupsPla.platformLimits;
|
|
11471
11585
|
if (!platformLimits?.customerGroups?.total) {
|
|
11472
11586
|
return {
|
|
@@ -11490,10 +11604,11 @@ const useCustomerGroupsPlatformLimitsStatus = () => {
|
|
|
11490
11604
|
hasReachedCustomerGroupsErrorLimit
|
|
11491
11605
|
};
|
|
11492
11606
|
};
|
|
11607
|
+
var useCustomerGroupsPlatformLimitsStatus$1 = useCustomerGroupsPlatformLimitsStatus;
|
|
11493
11608
|
|
|
11494
11609
|
const useCustomerGroupsPlatormLimitsModalState = () => {
|
|
11495
|
-
const customerGroupsPlatformLimitsStatus = useCustomerGroupsPlatformLimitsStatus();
|
|
11496
|
-
const limitsModalState = useLimitsModalState(false);
|
|
11610
|
+
const customerGroupsPlatformLimitsStatus = useCustomerGroupsPlatformLimitsStatus$1();
|
|
11611
|
+
const limitsModalState = useLimitsModalState$1(false);
|
|
11497
11612
|
React.useEffect(() => {
|
|
11498
11613
|
if (customerGroupsPlatformLimitsStatus.hasReachedCustomerGroupsErrorLimit) {
|
|
11499
11614
|
limitsModalState.openModal();
|
|
@@ -11503,24 +11618,25 @@ const useCustomerGroupsPlatormLimitsModalState = () => {
|
|
|
11503
11618
|
isModalOpen: limitsModalState.isModalOpen
|
|
11504
11619
|
};
|
|
11505
11620
|
};
|
|
11621
|
+
var useCustomerGroupsPlatormLimitsModalState$1 = useCustomerGroupsPlatormLimitsModalState;
|
|
11506
11622
|
|
|
11507
11623
|
const PlatformLimitsCustomerGroupsNotifications = () => {
|
|
11508
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher(),
|
|
11624
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
|
|
11509
11625
|
platformLimits = _useCustomerGroupsPla.platformLimits;
|
|
11510
|
-
const _useCustomerGroupsPla2 = useCustomerGroupsPlatformLimitsStatus(),
|
|
11626
|
+
const _useCustomerGroupsPla2 = useCustomerGroupsPlatformLimitsStatus$1(),
|
|
11511
11627
|
hasReachedCustomerGroupsWarningLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsWarningLimit,
|
|
11512
11628
|
hasReachedCustomerGroupsErrorLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsErrorLimit;
|
|
11513
11629
|
if (!platformLimits?.customerGroups?.total) {
|
|
11514
11630
|
return jsxRuntime.jsx("div", {});
|
|
11515
11631
|
}
|
|
11516
11632
|
if (hasReachedCustomerGroupsErrorLimit) {
|
|
11517
|
-
return jsxRuntime.jsx(Notifications.Error, {
|
|
11633
|
+
return jsxRuntime.jsx(Notifications$1.Error, {
|
|
11518
11634
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.customerGroups,
|
|
11519
11635
|
limit: platformLimits.customerGroups.total.limit
|
|
11520
11636
|
});
|
|
11521
11637
|
}
|
|
11522
11638
|
if (hasReachedCustomerGroupsWarningLimit) {
|
|
11523
|
-
return jsxRuntime.jsx(Notifications.Warning, {
|
|
11639
|
+
return jsxRuntime.jsx(Notifications$1.Warning, {
|
|
11524
11640
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.customerGroups,
|
|
11525
11641
|
limit: platformLimits.customerGroups.total.limit
|
|
11526
11642
|
});
|
|
@@ -11528,8 +11644,9 @@ const PlatformLimitsCustomerGroupsNotifications = () => {
|
|
|
11528
11644
|
return jsxRuntime.jsx("div", {});
|
|
11529
11645
|
};
|
|
11530
11646
|
PlatformLimitsCustomerGroupsNotifications.displayName = 'PlatformLimitsCustomerGroupsNotifications';
|
|
11647
|
+
var CustomerGroupsNotification = PlatformLimitsCustomerGroupsNotifications;
|
|
11531
11648
|
|
|
11532
|
-
var messages$
|
|
11649
|
+
var messages$f = reactIntl.defineMessages({
|
|
11533
11650
|
customerGroupsPlatformLimitReached: {
|
|
11534
11651
|
id: 'PlatformLimits.Tooltip.customerGroupsLimitReached',
|
|
11535
11652
|
description: 'The message for custome groups platform limit being reached',
|
|
@@ -11542,12 +11659,13 @@ function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
11542
11659
|
const PlatformLimitsCustomerGroupsTooltip = props => {
|
|
11543
11660
|
const intl = reactIntl.useIntl();
|
|
11544
11661
|
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$b(_objectSpread$b({}, props), {}, {
|
|
11545
|
-
title: intl.formatMessage(messages$
|
|
11662
|
+
title: intl.formatMessage(messages$f.customerGroupsPlatformLimitReached)
|
|
11546
11663
|
}));
|
|
11547
11664
|
};
|
|
11548
11665
|
PlatformLimitsCustomerGroupsTooltip.displayName = 'PlatformLimitsCustomerGroupsTooltip';
|
|
11666
|
+
var CustomerGroupsTooltip = PlatformLimitsCustomerGroupsTooltip;
|
|
11549
11667
|
|
|
11550
|
-
var messages$
|
|
11668
|
+
var messages$e = reactIntl.defineMessages({
|
|
11551
11669
|
customerGroupsStatus: {
|
|
11552
11670
|
id: 'PlatformLimits.Status.customerGroups',
|
|
11553
11671
|
description: 'The message for customer groups platform limit values',
|
|
@@ -11562,7 +11680,7 @@ var styles$4 = {
|
|
|
11562
11680
|
};
|
|
11563
11681
|
const PlatformLimitsCustomerGroupsStatus = () => {
|
|
11564
11682
|
const intl = reactIntl.useIntl();
|
|
11565
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher(),
|
|
11683
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
|
|
11566
11684
|
platformLimits = _useCustomerGroupsPla.platformLimits;
|
|
11567
11685
|
if (!platformLimits?.customerGroups?.total) {
|
|
11568
11686
|
return null;
|
|
@@ -11575,7 +11693,7 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
11575
11693
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
11576
11694
|
tone: "secondary",
|
|
11577
11695
|
isInline: true,
|
|
11578
|
-
intlMessage: _objectSpread$a(_objectSpread$a({}, messages$
|
|
11696
|
+
intlMessage: _objectSpread$a(_objectSpread$a({}, messages$e.customerGroupsStatus), {}, {
|
|
11579
11697
|
values: {
|
|
11580
11698
|
current: intl.formatNumber(current),
|
|
11581
11699
|
limit: intl.formatNumber(limit)
|
|
@@ -11585,8 +11703,9 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
11585
11703
|
});
|
|
11586
11704
|
};
|
|
11587
11705
|
PlatformLimitsCustomerGroupsStatus.displayName = 'PlatformLimitsCustomerGroupsStatus';
|
|
11706
|
+
var CustomerGroupsStatus = PlatformLimitsCustomerGroupsStatus;
|
|
11588
11707
|
|
|
11589
|
-
var messages$
|
|
11708
|
+
var messages$d = reactIntl.defineMessages({
|
|
11590
11709
|
title: {
|
|
11591
11710
|
id: 'PlatformLimits.CustomerGroups.modalTitle',
|
|
11592
11711
|
description: 'The modal title for the customer groups platform limits error',
|
|
@@ -11706,20 +11825,20 @@ LimitsReachedErrorGraphic.defaultProps = {
|
|
|
11706
11825
|
const PlatformLimitsCustomerGroupsErrorModal = _ref => {
|
|
11707
11826
|
let onClose = _ref.onClose;
|
|
11708
11827
|
const intl = reactIntl.useIntl();
|
|
11709
|
-
const customerGroupsPlatformLimitsModalState = useCustomerGroupsPlatormLimitsModalState();
|
|
11828
|
+
const customerGroupsPlatformLimitsModalState = useCustomerGroupsPlatormLimitsModalState$1();
|
|
11710
11829
|
return jsxRuntime.jsx(applicationComponents.InfoDialog, {
|
|
11711
11830
|
isOpen: customerGroupsPlatformLimitsModalState.isModalOpen,
|
|
11712
11831
|
onClose: onClose,
|
|
11713
|
-
title: intl.formatMessage(messages$
|
|
11832
|
+
title: intl.formatMessage(messages$d.title),
|
|
11714
11833
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
11715
11834
|
scale: "m",
|
|
11716
11835
|
alignItems: "center",
|
|
11717
11836
|
children: [jsxRuntime.jsx(LimitsReachedErrorGraphic, {}), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
11718
11837
|
scale: "l",
|
|
11719
11838
|
alignItems: "center",
|
|
11720
|
-
children: [jsxRuntime.jsx(
|
|
11839
|
+
children: [jsxRuntime.jsx(CustomerGroupsNotification, {}), jsxRuntime.jsx(uiKit.FlatButton, {
|
|
11721
11840
|
onClick: onClose,
|
|
11722
|
-
label: intl.formatMessage(messages$
|
|
11841
|
+
label: intl.formatMessage(messages$d.backToList),
|
|
11723
11842
|
icon: jsxRuntime.jsx(uiKit.ListIcon, {
|
|
11724
11843
|
size: "medium",
|
|
11725
11844
|
color: "primary"
|
|
@@ -11730,13 +11849,14 @@ const PlatformLimitsCustomerGroupsErrorModal = _ref => {
|
|
|
11730
11849
|
});
|
|
11731
11850
|
};
|
|
11732
11851
|
PlatformLimitsCustomerGroupsErrorModal.displayName = 'PlatformLimitsCustomerGroupsErrorModal';
|
|
11852
|
+
var CustomerGroupsErrorModal = PlatformLimitsCustomerGroupsErrorModal;
|
|
11733
11853
|
|
|
11734
11854
|
var styles$3 = {
|
|
11735
11855
|
"combined": "platform-limits-customer-groups-combined-module__combined___WjRoI"
|
|
11736
11856
|
};
|
|
11737
11857
|
const PlatformLimitsCustomerGroupsCombined = () => {
|
|
11738
11858
|
// on the customer create only show the warning message
|
|
11739
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsStatus(),
|
|
11859
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsStatus$1(),
|
|
11740
11860
|
hasReachedCustomerGroupsErrorLimit = _useCustomerGroupsPla.hasReachedCustomerGroupsErrorLimit,
|
|
11741
11861
|
hasReachedCustomerGroupsWarningLimit = _useCustomerGroupsPla.hasReachedCustomerGroupsWarningLimit;
|
|
11742
11862
|
return jsxRuntime.jsx("div", {
|
|
@@ -11744,26 +11864,27 @@ const PlatformLimitsCustomerGroupsCombined = () => {
|
|
|
11744
11864
|
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
11745
11865
|
scale: "xl",
|
|
11746
11866
|
justifyContent: "space-between",
|
|
11747
|
-
children: [hasReachedCustomerGroupsWarningLimit && !hasReachedCustomerGroupsErrorLimit ? jsxRuntime.jsx(
|
|
11867
|
+
children: [hasReachedCustomerGroupsWarningLimit && !hasReachedCustomerGroupsErrorLimit ? jsxRuntime.jsx(CustomerGroupsNotification, {}) : null, jsxRuntime.jsx(CustomerGroupsStatus, {})]
|
|
11748
11868
|
})
|
|
11749
11869
|
});
|
|
11750
11870
|
};
|
|
11751
11871
|
PlatformLimitsCustomerGroupsCombined.displayName = 'PlatformLimitsCustomerGroupsCombined';
|
|
11872
|
+
var CustomerGroupsCombined = PlatformLimitsCustomerGroupsCombined;
|
|
11752
11873
|
|
|
11753
11874
|
const useCustomerGroupsPlatformLimits = () => {
|
|
11754
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher(),
|
|
11875
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
|
|
11755
11876
|
refetch = _useCustomerGroupsPla.refetch;
|
|
11756
|
-
const _useCustomerGroupsPla2 = useCustomerGroupsPlatformLimitsStatus(),
|
|
11877
|
+
const _useCustomerGroupsPla2 = useCustomerGroupsPlatformLimitsStatus$1(),
|
|
11757
11878
|
hasReachedCustomerGroupsWarningLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsWarningLimit,
|
|
11758
11879
|
hasReachedCustomerGroupsErrorLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsErrorLimit;
|
|
11759
|
-
const interceptNavigation = useInterceptNavigation(hasReachedCustomerGroupsErrorLimit);
|
|
11880
|
+
const interceptNavigation = useInterceptNavigation$1(hasReachedCustomerGroupsErrorLimit);
|
|
11760
11881
|
return {
|
|
11761
11882
|
CustomerGroupsLimits: {
|
|
11762
|
-
Notifications:
|
|
11763
|
-
Status:
|
|
11764
|
-
Combined:
|
|
11765
|
-
Tooltip:
|
|
11766
|
-
ErrorModal:
|
|
11883
|
+
Notifications: CustomerGroupsNotification,
|
|
11884
|
+
Status: CustomerGroupsStatus,
|
|
11885
|
+
Combined: CustomerGroupsCombined,
|
|
11886
|
+
Tooltip: CustomerGroupsTooltip,
|
|
11887
|
+
ErrorModal: CustomerGroupsErrorModal
|
|
11767
11888
|
},
|
|
11768
11889
|
refetchCustomerGroupsPlatformLimits: refetch,
|
|
11769
11890
|
interceptNavigation,
|
|
@@ -11773,22 +11894,24 @@ const useCustomerGroupsPlatformLimits = () => {
|
|
|
11773
11894
|
}
|
|
11774
11895
|
};
|
|
11775
11896
|
};
|
|
11897
|
+
var useCustomerGroupsPlatformLimits$1 = useCustomerGroupsPlatformLimits;
|
|
11776
11898
|
|
|
11777
11899
|
function ownKeys$8(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11778
11900
|
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__default["default"](_context = ownKeys$8(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$8(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11779
11901
|
const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
|
|
11780
11902
|
const WithCustomerGroupsPlatformLimits = props => {
|
|
11781
|
-
const CustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits();
|
|
11903
|
+
const CustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits$1();
|
|
11782
11904
|
const customersProps = {
|
|
11783
11905
|
platformLimits: CustomerGroupsPlatformLimits
|
|
11784
11906
|
};
|
|
11785
11907
|
return jsxRuntime.jsx(WrappedComponent, _objectSpread$8(_objectSpread$8({}, props), customersProps));
|
|
11786
11908
|
};
|
|
11787
|
-
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
11909
|
+
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
11788
11910
|
return WithCustomerGroupsPlatformLimits;
|
|
11789
11911
|
};
|
|
11912
|
+
var injectCustomerGroupsPlatformLimits$1 = injectCustomerGroupsPlatformLimits;
|
|
11790
11913
|
|
|
11791
|
-
var messages$
|
|
11914
|
+
var messages$c = reactIntl.defineMessages({
|
|
11792
11915
|
yes: {
|
|
11793
11916
|
id: 'BooleanField.yes',
|
|
11794
11917
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -11809,8 +11932,8 @@ const valueMapping = {
|
|
|
11809
11932
|
const BooleanField = props => {
|
|
11810
11933
|
let selectedValue;
|
|
11811
11934
|
if (typeof props.value === 'boolean') selectedValue = getBooleanValue(props.value);else if (props.isMulti && _Array$isArray__default["default"](props.value) && props.value.length) selectedValue = props.value.length === 2 ? 'all' : getBooleanValue(props.value[0]);
|
|
11812
|
-
const yesLabel = props.intl.formatMessage(messages$
|
|
11813
|
-
const noLabel = props.intl.formatMessage(messages$
|
|
11935
|
+
const yesLabel = props.intl.formatMessage(messages$c.yes);
|
|
11936
|
+
const noLabel = props.intl.formatMessage(messages$c.no);
|
|
11814
11937
|
const options = [{
|
|
11815
11938
|
value: 'yes',
|
|
11816
11939
|
label: yesLabel
|
|
@@ -11848,7 +11971,7 @@ function getBooleanValue(value) {
|
|
|
11848
11971
|
return value === false ? 'no' : 'yes';
|
|
11849
11972
|
}
|
|
11850
11973
|
|
|
11851
|
-
const messages$
|
|
11974
|
+
const messages$a = reactIntl.defineMessages({
|
|
11852
11975
|
from: {
|
|
11853
11976
|
id: 'LabelRange.from',
|
|
11854
11977
|
description: 'The label for "from" range',
|
|
@@ -11860,6 +11983,7 @@ const messages$7 = reactIntl.defineMessages({
|
|
|
11860
11983
|
defaultMessage: 'To'
|
|
11861
11984
|
}
|
|
11862
11985
|
});
|
|
11986
|
+
var messages$b = messages$a;
|
|
11863
11987
|
|
|
11864
11988
|
function ownKeys$7(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11865
11989
|
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$7(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$7(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -11870,12 +11994,13 @@ const LabelRange = _ref => {
|
|
|
11870
11994
|
let type = _ref.type;
|
|
11871
11995
|
return jsxRuntime.jsx("label", {
|
|
11872
11996
|
className: styles$2.label,
|
|
11873
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$7({}, messages$
|
|
11997
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$7({}, messages$b[type]))
|
|
11874
11998
|
});
|
|
11875
11999
|
};
|
|
11876
12000
|
LabelRange.displayName = 'LabelRange';
|
|
12001
|
+
var LabelRange$1 = LabelRange;
|
|
11877
12002
|
|
|
11878
|
-
var messages$
|
|
12003
|
+
var messages$9 = reactIntl.defineMessages({
|
|
11879
12004
|
label: {
|
|
11880
12005
|
id: 'MissingValueField.label',
|
|
11881
12006
|
description: 'The label text for the missing values option',
|
|
@@ -11889,13 +12014,14 @@ const MissingValueField = props => jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
|
11889
12014
|
name: "missing-value",
|
|
11890
12015
|
isChecked: props.isChecked,
|
|
11891
12016
|
onChange: props.onChange,
|
|
11892
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$6({}, messages$
|
|
12017
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$6({}, messages$9.label))
|
|
11893
12018
|
});
|
|
11894
12019
|
MissingValueField.defaultProps = {
|
|
11895
12020
|
isChecked: false
|
|
11896
12021
|
};
|
|
12022
|
+
var MissingValueField$1 = MissingValueField;
|
|
11897
12023
|
|
|
11898
|
-
var messages$
|
|
12024
|
+
var messages$8 = reactIntl.defineMessages({
|
|
11899
12025
|
filterWholeInput: {
|
|
11900
12026
|
id: 'MultiValueSearchInput.buttonLabel',
|
|
11901
12027
|
description: 'Label for "MultiValueSearchInput" filter whole input.',
|
|
@@ -11933,7 +12059,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11933
12059
|
}),
|
|
11934
12060
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11935
12061
|
truncate: true,
|
|
11936
|
-
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$
|
|
12062
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$8.filterWholeInput), {}, {
|
|
11937
12063
|
values: {
|
|
11938
12064
|
values: `"${props.value}"`
|
|
11939
12065
|
}
|
|
@@ -11946,7 +12072,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11946
12072
|
}),
|
|
11947
12073
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11948
12074
|
truncate: true,
|
|
11949
|
-
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$
|
|
12075
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$8.filterSeparateValues), {}, {
|
|
11950
12076
|
values: {
|
|
11951
12077
|
values: `"${props.multiValue.join('", "')}"` || props.value
|
|
11952
12078
|
}
|
|
@@ -12056,6 +12182,7 @@ const MultiValueSearchInput = props => {
|
|
|
12056
12182
|
});
|
|
12057
12183
|
};
|
|
12058
12184
|
MultiValueSearchInput.displayName = 'MultiValueSearchInput';
|
|
12185
|
+
var MultiValueSearchInput$1 = MultiValueSearchInput;
|
|
12059
12186
|
|
|
12060
12187
|
function ownKeys$4(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12061
12188
|
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -12195,7 +12322,7 @@ const withPropsForMoney = ownProps => ownProps.numberFormatType === 'money' ? {
|
|
|
12195
12322
|
},
|
|
12196
12323
|
numeralDecimalScale: 2
|
|
12197
12324
|
} : {};
|
|
12198
|
-
var numericFormatInput = withProps(withPropsForMoney)(NumericFormatInput);
|
|
12325
|
+
var numericFormatInput = withProps$1(withPropsForMoney)(NumericFormatInput);
|
|
12199
12326
|
|
|
12200
12327
|
/**
|
|
12201
12328
|
* @param mixed value
|
|
@@ -12252,6 +12379,7 @@ const buildSearchQuery = (searchQuery, searchMode, fragments) => {
|
|
|
12252
12379
|
}
|
|
12253
12380
|
return fragments[searchMode].getQuery(trimmedSearchQuery);
|
|
12254
12381
|
};
|
|
12382
|
+
var buildSearchQuery$1 = buildSearchQuery;
|
|
12255
12383
|
|
|
12256
12384
|
const getBulkNotification = _ref => {
|
|
12257
12385
|
let counts = _ref.counts,
|
|
@@ -12295,10 +12423,12 @@ const businessRoleConstants = {
|
|
|
12295
12423
|
SalesAndECommerceManager: 'SalesAndECommerceManager',
|
|
12296
12424
|
Other: 'Other'
|
|
12297
12425
|
};
|
|
12426
|
+
var businessRoleConstants$1 = businessRoleConstants;
|
|
12298
12427
|
|
|
12299
|
-
const businessRoleKeys = _Object$values__default["default"](businessRoleConstants);
|
|
12428
|
+
const businessRoleKeys = _Object$values__default["default"](businessRoleConstants$1);
|
|
12429
|
+
var businessRoleKeys$1 = businessRoleKeys;
|
|
12300
12430
|
|
|
12301
|
-
var messages$
|
|
12431
|
+
var messages$7 = reactIntl.defineMessages({
|
|
12302
12432
|
ExecutiveManagement: {
|
|
12303
12433
|
id: 'Shared.businessRoles.executiveManagement',
|
|
12304
12434
|
description: 'The label for one of the selectable business roles',
|
|
@@ -12473,6 +12603,7 @@ const createNextSortDefinition = _ref => {
|
|
|
12473
12603
|
};
|
|
12474
12604
|
}
|
|
12475
12605
|
};
|
|
12606
|
+
var createNextSortDefinition$1 = createNextSortDefinition;
|
|
12476
12607
|
|
|
12477
12608
|
function ownKeys$3(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12478
12609
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$3(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -12892,7 +13023,7 @@ function isEmptyFilter(_ref) {
|
|
|
12892
13023
|
});
|
|
12893
13024
|
}
|
|
12894
13025
|
|
|
12895
|
-
const messages$
|
|
13026
|
+
const messages$5 = reactIntl.defineMessages({
|
|
12896
13027
|
inputFieldError: {
|
|
12897
13028
|
id: 'Search.Filters.validation.customField.inputFieldError',
|
|
12898
13029
|
description: 'Error message for empty input field ',
|
|
@@ -12904,6 +13035,7 @@ const messages$3 = reactIntl.defineMessages({
|
|
|
12904
13035
|
defaultMessage: 'Please select an option.'
|
|
12905
13036
|
}
|
|
12906
13037
|
});
|
|
13038
|
+
var messages$6 = messages$5;
|
|
12907
13039
|
|
|
12908
13040
|
const hasOptionDropdown = type => {
|
|
12909
13041
|
var _context;
|
|
@@ -12913,14 +13045,14 @@ const validateValue = (value, type, intl) => {
|
|
|
12913
13045
|
if (validateSingleFilter({
|
|
12914
13046
|
value
|
|
12915
13047
|
})) {
|
|
12916
|
-
return intl.formatMessage(messages$
|
|
13048
|
+
return intl.formatMessage(messages$6.inputFieldError);
|
|
12917
13049
|
}
|
|
12918
13050
|
if (type === FIELD_TYPES.Money && (validateSingleFilter({
|
|
12919
13051
|
value: value.currencyCode
|
|
12920
13052
|
}) || validateSingleFilter({
|
|
12921
13053
|
value: value.amount
|
|
12922
13054
|
}))) {
|
|
12923
|
-
return intl.formatMessage(messages$
|
|
13055
|
+
return intl.formatMessage(messages$6.inputFieldError);
|
|
12924
13056
|
}
|
|
12925
13057
|
return null;
|
|
12926
13058
|
};
|
|
@@ -12928,7 +13060,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
12928
13060
|
let value = _ref.value;
|
|
12929
13061
|
if (!value || !value.type) {
|
|
12930
13062
|
return {
|
|
12931
|
-
type: intl.formatMessage(messages$
|
|
13063
|
+
type: intl.formatMessage(messages$6.optionFieldError)
|
|
12932
13064
|
};
|
|
12933
13065
|
}
|
|
12934
13066
|
const typeName = value.type.name;
|
|
@@ -12936,7 +13068,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
12936
13068
|
const filterValue = value.value;
|
|
12937
13069
|
if (hasOption && !value.option) {
|
|
12938
13070
|
return {
|
|
12939
|
-
option: intl.formatMessage(messages$
|
|
13071
|
+
option: intl.formatMessage(messages$6.optionFieldError)
|
|
12940
13072
|
};
|
|
12941
13073
|
}
|
|
12942
13074
|
if (value.option === FILTER_TYPES.range) {
|
|
@@ -12955,7 +13087,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
12955
13087
|
} : null;
|
|
12956
13088
|
}
|
|
12957
13089
|
|
|
12958
|
-
const messages$
|
|
13090
|
+
const messages$3 = reactIntl.defineMessages({
|
|
12959
13091
|
rangeMissingValue: {
|
|
12960
13092
|
id: 'Search.Filters.validation.date.rangeMissingValue',
|
|
12961
13093
|
description: 'error message if missing a value in a range',
|
|
@@ -12972,6 +13104,7 @@ const messages$2 = reactIntl.defineMessages({
|
|
|
12972
13104
|
defaultMessage: 'Please enter a value for this field.'
|
|
12973
13105
|
}
|
|
12974
13106
|
});
|
|
13107
|
+
var messages$4 = messages$3;
|
|
12975
13108
|
|
|
12976
13109
|
function validateFilter$1(_ref, intl) {
|
|
12977
13110
|
let value = _ref.value,
|
|
@@ -12980,30 +13113,30 @@ function validateFilter$1(_ref, intl) {
|
|
|
12980
13113
|
if (validateSingleFilter({
|
|
12981
13114
|
value: value?.from
|
|
12982
13115
|
})) return {
|
|
12983
|
-
from: intl.formatMessage(messages$
|
|
13116
|
+
from: intl.formatMessage(messages$4.rangeMissingValue)
|
|
12984
13117
|
};
|
|
12985
13118
|
if (validateSingleFilter({
|
|
12986
13119
|
value: value?.to
|
|
12987
13120
|
})) return {
|
|
12988
|
-
to: intl.formatMessage(messages$
|
|
13121
|
+
to: intl.formatMessage(messages$4.rangeMissingValue)
|
|
12989
13122
|
};
|
|
12990
13123
|
if (moment__default["default"](value?.to).isBefore(value?.from)) return {
|
|
12991
|
-
from: intl.formatMessage(messages$
|
|
13124
|
+
from: intl.formatMessage(messages$4.rangeToSmallerThanFrom)
|
|
12992
13125
|
};
|
|
12993
13126
|
} else if (type === 'equalTo' || type === 'lessThan' || type === 'moreThan') {
|
|
12994
13127
|
if (validateSingleFilter({
|
|
12995
13128
|
value
|
|
12996
|
-
})) return intl.formatMessage(messages$
|
|
13129
|
+
})) return intl.formatMessage(messages$4.missingValue);
|
|
12997
13130
|
}
|
|
12998
13131
|
return null;
|
|
12999
13132
|
}
|
|
13000
13133
|
|
|
13001
13134
|
const validateSingleOptionEnum = (selectedOption, intl) => {
|
|
13002
|
-
if (validateSingleFilter(selectedOption)) return intl.formatMessage(
|
|
13135
|
+
if (validateSingleFilter(selectedOption)) return intl.formatMessage(validationMessages.required);
|
|
13003
13136
|
return null;
|
|
13004
13137
|
};
|
|
13005
13138
|
const validateMultiOptionEnum = (selectedOption, intl) => {
|
|
13006
|
-
if (validateSingleFilter(selectedOption) || selectedOption.value.length === 0) return intl.formatMessage(
|
|
13139
|
+
if (validateSingleFilter(selectedOption) || selectedOption.value.length === 0) return intl.formatMessage(validationMessages.required);
|
|
13007
13140
|
return null;
|
|
13008
13141
|
};
|
|
13009
13142
|
|
|
@@ -13019,6 +13152,7 @@ const messages$1 = reactIntl.defineMessages({
|
|
|
13019
13152
|
defaultMessage: 'Please enter the smaller number first.'
|
|
13020
13153
|
}
|
|
13021
13154
|
});
|
|
13155
|
+
var messages$2 = messages$1;
|
|
13022
13156
|
|
|
13023
13157
|
function validateFilter(_ref, intl) {
|
|
13024
13158
|
let value = _ref.value,
|
|
@@ -13026,30 +13160,30 @@ function validateFilter(_ref, intl) {
|
|
|
13026
13160
|
_ref$allowFloat = _ref.allowFloat,
|
|
13027
13161
|
allowFloat = _ref$allowFloat === void 0 ? true : _ref$allowFloat;
|
|
13028
13162
|
if (type !== 'range') {
|
|
13029
|
-
if (!allowFloat && !isInteger(value)) return intl.formatMessage(
|
|
13163
|
+
if (!allowFloat && !isInteger(value)) return intl.formatMessage(validationMessages.integer);
|
|
13030
13164
|
return null;
|
|
13031
13165
|
}
|
|
13032
13166
|
|
|
13033
13167
|
// only range types from here
|
|
13034
13168
|
|
|
13035
13169
|
if (!allowFloat && !isInteger(value.from)) return {
|
|
13036
|
-
from: intl.formatMessage(
|
|
13170
|
+
from: intl.formatMessage(validationMessages.integer)
|
|
13037
13171
|
};
|
|
13038
13172
|
if (!allowFloat && !isInteger(value.to)) return {
|
|
13039
|
-
to: intl.formatMessage(
|
|
13173
|
+
to: intl.formatMessage(validationMessages.integer)
|
|
13040
13174
|
};
|
|
13041
13175
|
if (validateSingleFilter({
|
|
13042
13176
|
value: value.from
|
|
13043
13177
|
})) return {
|
|
13044
|
-
from: intl.formatMessage(messages$
|
|
13178
|
+
from: intl.formatMessage(messages$2.rangeMissingValue)
|
|
13045
13179
|
};
|
|
13046
13180
|
if (validateSingleFilter({
|
|
13047
13181
|
value: value.to
|
|
13048
13182
|
})) return {
|
|
13049
|
-
to: intl.formatMessage(messages$
|
|
13183
|
+
to: intl.formatMessage(messages$2.rangeMissingValue)
|
|
13050
13184
|
};
|
|
13051
13185
|
if (_parseFloat__default["default"](value.to) < _parseFloat__default["default"](value.from)) return {
|
|
13052
|
-
from: intl.formatMessage(messages$
|
|
13186
|
+
from: intl.formatMessage(messages$2.rangeToSmallerThanFrom)
|
|
13053
13187
|
};
|
|
13054
13188
|
return null;
|
|
13055
13189
|
}
|
|
@@ -13057,8 +13191,8 @@ function validateFilter(_ref, intl) {
|
|
|
13057
13191
|
// eslint-disable-next-line import/prefer-default-export
|
|
13058
13192
|
const validateText = function (text, intl) {
|
|
13059
13193
|
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
13060
|
-
if (validateSingleFilter(text)) return intl.formatMessage(
|
|
13061
|
-
if (type === 'id' && !isUUID(text.value)) return intl.formatMessage(
|
|
13194
|
+
if (validateSingleFilter(text)) return intl.formatMessage(validationMessages.required);
|
|
13195
|
+
if (type === 'id' && !isUUID$1(text.value)) return intl.formatMessage(validationMessages.uuid);
|
|
13062
13196
|
return null;
|
|
13063
13197
|
};
|
|
13064
13198
|
|
|
@@ -13087,10 +13221,13 @@ function convertRatioToPercentage(ratio) {
|
|
|
13087
13221
|
const hasErrorCode = (unmappedApiErrors, errorCode) => {
|
|
13088
13222
|
return _Array$isArray__default["default"](unmappedApiErrors) && _someInstanceProperty__default["default"](unmappedApiErrors).call(unmappedApiErrors, error => error.extensions?.code === errorCode);
|
|
13089
13223
|
};
|
|
13224
|
+
var hasErrorCode$1 = hasErrorCode;
|
|
13090
13225
|
|
|
13091
|
-
const hasInvalidInputError = errors => hasErrorCode(errors, ERROR_CODES.invalidInput);
|
|
13226
|
+
const hasInvalidInputError = errors => hasErrorCode$1(errors, ERROR_CODES.invalidInput);
|
|
13227
|
+
var hasInvalidInputError$1 = hasInvalidInputError;
|
|
13092
13228
|
|
|
13093
|
-
const hasSemanticError = errors => hasErrorCode(errors, ERROR_CODES.semanticError);
|
|
13229
|
+
const hasSemanticError = errors => hasErrorCode$1(errors, ERROR_CODES.semanticError);
|
|
13230
|
+
var hasSemanticError$1 = hasSemanticError;
|
|
13094
13231
|
|
|
13095
13232
|
function minusify(value) {
|
|
13096
13233
|
const minus = '-';
|
|
@@ -13407,6 +13544,7 @@ let RequestCache = /*#__PURE__*/function () {
|
|
|
13407
13544
|
}
|
|
13408
13545
|
}]);
|
|
13409
13546
|
}();
|
|
13547
|
+
var RequestCache$1 = RequestCache;
|
|
13410
13548
|
|
|
13411
13549
|
// copied from
|
|
13412
13550
|
// https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
@@ -13519,7 +13657,7 @@ function withPendingRequests() {
|
|
|
13519
13657
|
};
|
|
13520
13658
|
return jsxRuntime.jsx(Component, _objectSpread(_objectSpread({}, props), pendingProp));
|
|
13521
13659
|
};
|
|
13522
|
-
WrappedComponent.displayName = wrapDisplayName(Component, 'withPendingRequests');
|
|
13660
|
+
WrappedComponent.displayName = wrapDisplayName$1(Component, 'withPendingRequests');
|
|
13523
13661
|
return WrappedComponent;
|
|
13524
13662
|
};
|
|
13525
13663
|
}
|
|
@@ -13527,58 +13665,58 @@ function withPendingRequests() {
|
|
|
13527
13665
|
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 } } } };
|
|
13528
13666
|
|
|
13529
13667
|
exports.BooleanField = booleanField;
|
|
13530
|
-
exports.Button = Button;
|
|
13668
|
+
exports.Button = Button$1;
|
|
13531
13669
|
exports.CartDiscountReferenceSearch = CartDiscountReferenceSearch;
|
|
13532
13670
|
exports.CategoryReferenceSearch = CategoryReferenceSearch;
|
|
13533
13671
|
exports.CategorySearchPickerOptionFragment = CategorySearchPickerOptionFragment;
|
|
13534
|
-
exports.CenteredLoadingSpinner = CenteredLoadingSpinner;
|
|
13535
|
-
exports.ChannelPickerInput = ChannelPickerInput;
|
|
13672
|
+
exports.CenteredLoadingSpinner = CenteredLoadingSpinner$1;
|
|
13673
|
+
exports.ChannelPickerInput = ChannelPickerInput$1;
|
|
13536
13674
|
exports.CountriesPicker = CountriesPicker;
|
|
13537
13675
|
exports.CustomFieldDefinitionsConnector = customFieldDefinitionsConnector;
|
|
13538
|
-
exports.CustomFieldTooltip = CustomFieldTooltip;
|
|
13676
|
+
exports.CustomFieldTooltip = CustomFieldTooltip$1;
|
|
13539
13677
|
exports.CustomFieldTypeDefinitionsConnector = CustomFieldTypeDefinitionsConnector$1;
|
|
13540
|
-
exports.CustomFields = CustomFields;
|
|
13541
|
-
exports.CustomFieldsErrorTextNotification = CustomFieldsErrorTextNotification;
|
|
13542
|
-
exports.CustomFieldsFormField = CustomFieldsFormField;
|
|
13543
|
-
exports.CustomerGroupPickerInput = CustomerGroupPickerInput;
|
|
13678
|
+
exports.CustomFields = CustomFields$1;
|
|
13679
|
+
exports.CustomFieldsErrorTextNotification = CustomFieldsErrorTextNotification$1;
|
|
13680
|
+
exports.CustomFieldsFormField = CustomFieldsFormField$1;
|
|
13681
|
+
exports.CustomerGroupPickerInput = CustomerGroupPickerInput$1;
|
|
13544
13682
|
exports.DefaultPageSizes = DefaultPageSizes;
|
|
13545
13683
|
exports.Divider = Divider;
|
|
13546
13684
|
exports.EMAIL_REGEX = EMAIL_REGEX;
|
|
13547
|
-
exports.FileInput = FileInput;
|
|
13685
|
+
exports.FileInput = FileInput$1;
|
|
13548
13686
|
exports.FormattedDateTime = FormattedDateTime$1;
|
|
13549
|
-
exports.LabelRange = LabelRange;
|
|
13687
|
+
exports.LabelRange = LabelRange$1;
|
|
13550
13688
|
exports.MC_RESOURCES_WITH_KEYS = MC_RESOURCES_WITH_KEYS;
|
|
13551
|
-
exports.MissingValueField = MissingValueField;
|
|
13552
|
-
exports.MultiValueSearchInput = MultiValueSearchInput;
|
|
13689
|
+
exports.MissingValueField = MissingValueField$1;
|
|
13690
|
+
exports.MultiValueSearchInput = MultiValueSearchInput$1;
|
|
13553
13691
|
exports.NumericFormatInput = numericFormatInput;
|
|
13554
13692
|
exports.Option = Option$2;
|
|
13555
13693
|
exports.PRECISION_TYPES = PRECISION_TYPES;
|
|
13556
13694
|
exports.PimIndexerProvider = pimIndexerProvider;
|
|
13557
13695
|
exports.ProductAttributeInput = ProductAttributeInput;
|
|
13558
13696
|
exports.ProductAttributes = ProductAttributes;
|
|
13559
|
-
exports.ProductPickerInput = ProductPickerInput;
|
|
13697
|
+
exports.ProductPickerInput = ProductPickerInput$1;
|
|
13560
13698
|
exports.ProductSelectionPicker = ProductSelectionsPicker;
|
|
13561
|
-
exports.RequestCache = RequestCache;
|
|
13562
|
-
exports.RequiredIndicator = RequiredIndicator;
|
|
13563
|
-
exports.ScrollToFieldError = ScrollToFieldError;
|
|
13699
|
+
exports.RequestCache = RequestCache$1;
|
|
13700
|
+
exports.RequiredIndicator = RequiredIndicator$1;
|
|
13701
|
+
exports.ScrollToFieldError = ScrollToFieldError$1;
|
|
13564
13702
|
exports.SearchInput = searchInput;
|
|
13565
|
-
exports.SelectableFieldSearchInput = SelectableFieldSearchInput;
|
|
13566
|
-
exports.StoreSelectField = StoreSelectField;
|
|
13567
|
-
exports.StoreSelectInput = StoreSelectInput;
|
|
13568
|
-
exports.ThrottledField = ThrottledField;
|
|
13703
|
+
exports.SelectableFieldSearchInput = SelectableFieldSearchInput$1;
|
|
13704
|
+
exports.StoreSelectField = StoreSelectField$1;
|
|
13705
|
+
exports.StoreSelectInput = StoreSelectInput$1;
|
|
13706
|
+
exports.ThrottledField = ThrottledField$1;
|
|
13569
13707
|
exports.VALIDATOR_INTEGER = VALIDATOR_INTEGER;
|
|
13570
13708
|
exports.VALIDATOR_NUMERIC = VALIDATOR_NUMERIC;
|
|
13571
13709
|
exports.VALIDATOR_REQUIRED = VALIDATOR_REQUIRED;
|
|
13572
|
-
exports.WithPimIndexer = WithPimIndexer;
|
|
13710
|
+
exports.WithPimIndexer = WithPimIndexer$1;
|
|
13573
13711
|
exports.allowedProperties = allowedProperties;
|
|
13574
13712
|
exports.and = and;
|
|
13575
13713
|
exports.attributesMapToNameValuePairs = attributesMapToNameValuePairs;
|
|
13576
13714
|
exports.base64ToString = base64ToString;
|
|
13577
|
-
exports.booleanMessages = messages$
|
|
13578
|
-
exports.buildSearchQuery = buildSearchQuery;
|
|
13579
|
-
exports.businessRoleConstants = businessRoleConstants;
|
|
13580
|
-
exports.businessRoleMessages = messages$
|
|
13581
|
-
exports.businessRoles = businessRoleKeys;
|
|
13715
|
+
exports.booleanMessages = messages$c;
|
|
13716
|
+
exports.buildSearchQuery = buildSearchQuery$1;
|
|
13717
|
+
exports.businessRoleConstants = businessRoleConstants$1;
|
|
13718
|
+
exports.businessRoleMessages = messages$7;
|
|
13719
|
+
exports.businessRoles = businessRoleKeys$1;
|
|
13582
13720
|
exports.capitalizeFirst = capitalizeFirst;
|
|
13583
13721
|
exports.clone = clone;
|
|
13584
13722
|
exports.coerceToInteger = coerceToInteger;
|
|
@@ -13588,7 +13726,7 @@ exports.convertApolloQueryDataToConnectorData = convertApolloQueryDataToConnecto
|
|
|
13588
13726
|
exports.convertProductSelectionFromGraphQl = convertProductSelectionFromGraphQl;
|
|
13589
13727
|
exports.convertRatioToPercentage = convertRatioToPercentage;
|
|
13590
13728
|
exports.createGraphQlUpdateActions = createGraphQlUpdateActions;
|
|
13591
|
-
exports.createNextSortDefinition = createNextSortDefinition;
|
|
13729
|
+
exports.createNextSortDefinition = createNextSortDefinition$1;
|
|
13592
13730
|
exports.createReducer = createReducer;
|
|
13593
13731
|
exports.createResourceReducer = createResourceReducer;
|
|
13594
13732
|
exports.customFieldsTransformer = customFields;
|
|
@@ -13618,13 +13756,13 @@ exports.getBulkNotification = getBulkNotification;
|
|
|
13618
13756
|
exports.getCategoryLevel = getCategoryLevel;
|
|
13619
13757
|
exports.getCountsFromBulkSummary = getCountsFromBulkSummary;
|
|
13620
13758
|
exports.getDiscountValue = getDiscountValue;
|
|
13621
|
-
exports.getDisplayName = getDisplayName;
|
|
13759
|
+
exports.getDisplayName = getDisplayName$1;
|
|
13622
13760
|
exports.getFractionedAmount = getFractionedAmount;
|
|
13623
13761
|
exports.getIndexesOfInvalidValues = getIndexesOfInvalidValues;
|
|
13624
13762
|
exports.getMinimumPricesByCurrencyCode = getMinimumPricesByCurrencyCode;
|
|
13625
13763
|
exports.getNetUnitPrice = getNetUnitPrice;
|
|
13626
13764
|
exports.getPathName = getPathName;
|
|
13627
|
-
exports.getPrefixSearchBounds = getPrefixSearchBounds;
|
|
13765
|
+
exports.getPrefixSearchBounds = getPrefixSearchBounds$1;
|
|
13628
13766
|
exports.getPriceChannelName = getPriceChannelName;
|
|
13629
13767
|
exports.getReferenceTypeId = getReferenceTypeId;
|
|
13630
13768
|
exports.getSelectedPrice = getSelectedPrice;
|
|
@@ -13639,30 +13777,30 @@ exports.graphqlNumberTransformer = numberTransformer;
|
|
|
13639
13777
|
exports.graphqlQueryBuilder = graphqlQueryBuilder;
|
|
13640
13778
|
exports.graphqlReferenceTransformer = referenceTransformer;
|
|
13641
13779
|
exports.graphqlTextTransformer = textTransformer;
|
|
13642
|
-
exports.hasInvalidInputError = hasInvalidInputError;
|
|
13643
|
-
exports.hasSemanticError = hasSemanticError;
|
|
13644
|
-
exports.injectCustomerGroupsPlatformLimits = injectCustomerGroupsPlatformLimits;
|
|
13645
|
-
exports.injectCustomersPlatformLimits = injectCustomersPlatformLimits;
|
|
13646
|
-
exports.injectDataTablePaginationState = injectDataTablePaginationState;
|
|
13647
|
-
exports.injectModalState = injectModalState$
|
|
13648
|
-
exports.injectNotifications = injectNotifications;
|
|
13780
|
+
exports.hasInvalidInputError = hasInvalidInputError$1;
|
|
13781
|
+
exports.hasSemanticError = hasSemanticError$1;
|
|
13782
|
+
exports.injectCustomerGroupsPlatformLimits = injectCustomerGroupsPlatformLimits$1;
|
|
13783
|
+
exports.injectCustomersPlatformLimits = injectCustomersPlatformLimits$1;
|
|
13784
|
+
exports.injectDataTablePaginationState = injectDataTablePaginationState$1;
|
|
13785
|
+
exports.injectModalState = injectModalState$3;
|
|
13786
|
+
exports.injectNotifications = injectNotifications$1;
|
|
13649
13787
|
exports.injectPimIndexer = injectPimIndexer;
|
|
13650
|
-
exports.injectShippingMethodsPlatformLimits = injectShippingMethodsPlatformLimits;
|
|
13651
|
-
exports.injectStorage = injectStorage;
|
|
13652
|
-
exports.injectTaxCategoriesPlatformLimits = injectTaxCategoriesPlatformLimits;
|
|
13653
|
-
exports.injectToggleState = injectModalState;
|
|
13654
|
-
exports.injectZonesPlatformLimits = injectZonesPlatformLimits;
|
|
13788
|
+
exports.injectShippingMethodsPlatformLimits = injectShippingMethodsPlatformLimits$1;
|
|
13789
|
+
exports.injectStorage = injectStorage$1;
|
|
13790
|
+
exports.injectTaxCategoriesPlatformLimits = injectTaxCategoriesPlatformLimits$1;
|
|
13791
|
+
exports.injectToggleState = injectModalState$1;
|
|
13792
|
+
exports.injectZonesPlatformLimits = injectZonesPlatformLimits$1;
|
|
13655
13793
|
exports.isEmpty = isEmptyFilter;
|
|
13656
13794
|
exports.isEmptyValue = isEmptyValue;
|
|
13657
|
-
exports.isUUID = isUUID;
|
|
13795
|
+
exports.isUUID = isUUID$1;
|
|
13658
13796
|
exports.isValidISODate = isValidISODate;
|
|
13659
13797
|
exports.isValidISODateTime = isValidISODateTime;
|
|
13660
13798
|
exports.isValidISOTime = isValidISOTime;
|
|
13661
|
-
exports.keepDisplayName = keepDisplayName;
|
|
13799
|
+
exports.keepDisplayName = keepDisplayName$1;
|
|
13662
13800
|
exports.mapStoresToOptions = mapStoresToOptions;
|
|
13663
13801
|
exports.mapTimeZonesToOptions = mapTimeZonesToOptions;
|
|
13664
13802
|
exports.minusify = minusify;
|
|
13665
|
-
exports.missingValueMessages = messages$
|
|
13803
|
+
exports.missingValueMessages = messages$9;
|
|
13666
13804
|
exports.nameValuePairsToMap = nameValuePairsToMap;
|
|
13667
13805
|
exports.normalizeProductSettings = normalizeProductSettings;
|
|
13668
13806
|
exports.not = not;
|
|
@@ -13676,8 +13814,8 @@ exports.resolveStatusType = resolveStatusType;
|
|
|
13676
13814
|
exports.safelyAddFallback = safelyAddFallback;
|
|
13677
13815
|
exports.sanitize = sanitize;
|
|
13678
13816
|
exports.searchCategories = searchCategories;
|
|
13679
|
-
exports.searchInputMessages = messages$
|
|
13680
|
-
exports.setDisplayName = setDisplayName;
|
|
13817
|
+
exports.searchInputMessages = messages$M;
|
|
13818
|
+
exports.setDisplayName = setDisplayName$1;
|
|
13681
13819
|
exports.setToArray = setToArray;
|
|
13682
13820
|
exports.shallowEqual = shallowEqual;
|
|
13683
13821
|
exports.shouldUpdateAttributeInput = shouldUpdateAttributeInput;
|
|
@@ -13696,26 +13834,26 @@ exports.uniqueObjects = uniqueObjects;
|
|
|
13696
13834
|
exports.useCachedCategoryOptions = useCachedCategoryOptions;
|
|
13697
13835
|
exports.useCurrentOption = useCurrentOption;
|
|
13698
13836
|
exports.useCustomFieldsDnDContext = useDnDContext;
|
|
13699
|
-
exports.useCustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits;
|
|
13700
|
-
exports.useCustomersPlatformLimits = useCustomersPlatformLimits;
|
|
13701
|
-
exports.useDebouncedPromiseCallback = useDebouncedPromiseCallback;
|
|
13837
|
+
exports.useCustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits$1;
|
|
13838
|
+
exports.useCustomersPlatformLimits = useCustomersPlatformLimits$1;
|
|
13839
|
+
exports.useDebouncedPromiseCallback = useDebouncedPromiseCallback$1;
|
|
13702
13840
|
exports.useFormatLocalizedFieldToString = useFormatLocalizedFieldToString;
|
|
13703
|
-
exports.useIsFieldDuplicated = useIsFieldDuplicated;
|
|
13704
|
-
exports.useLoadOptions = useLoadOptions;
|
|
13705
|
-
exports.useLocalizedKeyFallback = useLocalizedKeyFallback;
|
|
13841
|
+
exports.useIsFieldDuplicated = useIsFieldDuplicated$1;
|
|
13842
|
+
exports.useLoadOptions = useLoadOptions$1;
|
|
13843
|
+
exports.useLocalizedKeyFallback = useLocalizedKeyFallback$1;
|
|
13706
13844
|
exports.usePendingRequests = usePendingRequests;
|
|
13707
|
-
exports.usePersistedTableConfiguration = usePersistedTableConfiguration;
|
|
13845
|
+
exports.usePersistedTableConfiguration = usePersistedTableConfiguration$1;
|
|
13708
13846
|
exports.usePimIndexer = usePimIndexer;
|
|
13709
|
-
exports.usePrevious = usePrevious;
|
|
13710
|
-
exports.useProductSelectionsFetcher = useProductSelectionsFetcher;
|
|
13711
|
-
exports.useProductSelectionsTotalFetcher = useProductSelectionsTotalFetcher;
|
|
13712
|
-
exports.useRoleNotificationEffect = useRoleNotificationEffect;
|
|
13713
|
-
exports.useShippingMethodsPlatformLimits =
|
|
13714
|
-
exports.useStorage = useStorage;
|
|
13715
|
-
exports.useStoreKeysInDataFences = useStoreKeysInDataFences;
|
|
13716
|
-
exports.useStoresListFetcher = useStoresListFetcher;
|
|
13717
|
-
exports.useTaxCategoriesPlatformLimits =
|
|
13718
|
-
exports.useTotalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher;
|
|
13847
|
+
exports.usePrevious = usePrevious$1;
|
|
13848
|
+
exports.useProductSelectionsFetcher = useProductSelectionsFetcher$1;
|
|
13849
|
+
exports.useProductSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1;
|
|
13850
|
+
exports.useRoleNotificationEffect = useRoleNotificationEffect$1;
|
|
13851
|
+
exports.useShippingMethodsPlatformLimits = useShippingMethodsPlatformLimits;
|
|
13852
|
+
exports.useStorage = useStorage$1;
|
|
13853
|
+
exports.useStoreKeysInDataFences = useStoreKeysInDataFences$1;
|
|
13854
|
+
exports.useStoresListFetcher = useStoresListFetcher$1;
|
|
13855
|
+
exports.useTaxCategoriesPlatformLimits = useTaxCategoriesPlatformLimits;
|
|
13856
|
+
exports.useTotalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1;
|
|
13719
13857
|
exports.validateCustomField = validateFilter$2;
|
|
13720
13858
|
exports.validateCustomFields = validations;
|
|
13721
13859
|
exports.validateDate = validateFilter$1;
|
|
@@ -13724,9 +13862,9 @@ exports.validateNumber = validateFilter;
|
|
|
13724
13862
|
exports.validateSingleOptionEnum = validateSingleOptionEnum;
|
|
13725
13863
|
exports.validateText = validateText;
|
|
13726
13864
|
exports.validatedInput = validatedInput;
|
|
13727
|
-
exports.validationMessages =
|
|
13865
|
+
exports.validationMessages = validationMessages;
|
|
13728
13866
|
exports.withPendingRequests = withPendingRequests;
|
|
13729
|
-
exports.withProps = withProps;
|
|
13730
|
-
exports.withRedirectTo = withRedirectTo;
|
|
13731
|
-
exports.withoutEmptyErrorsByField = withoutEmptyErrorsByField;
|
|
13732
|
-
exports.wrapDisplayName = wrapDisplayName;
|
|
13867
|
+
exports.withProps = withProps$1;
|
|
13868
|
+
exports.withRedirectTo = withRedirectTo$1;
|
|
13869
|
+
exports.withoutEmptyErrorsByField = withoutEmptyErrorsByField$1;
|
|
13870
|
+
exports.wrapDisplayName = wrapDisplayName$1;
|