@commercetools-frontend/experimental-components 6.2.2 → 6.2.4
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 +674 -536
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +673 -535
- package/dist/commercetools-frontend-experimental-components.esm.js +568 -430
- package/dist/styles.css +14 -14
- 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
|
var warning = 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,73 +126,74 @@ 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
171
|
var warning__default = /*#__PURE__*/_interopDefault(warning);
|
|
181
|
-
var flatten__default = /*#__PURE__*/_interopDefault(flatten);
|
|
182
|
-
var uniqBy__default = /*#__PURE__*/_interopDefault(uniqBy);
|
|
183
|
-
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
184
|
-
var hoistNonReactStatics__default = /*#__PURE__*/_interopDefault(hoistNonReactStatics);
|
|
185
172
|
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
186
173
|
var _Math$trunc__default = /*#__PURE__*/_interopDefault(_Math$trunc);
|
|
187
174
|
var _Number$isNaN__default = /*#__PURE__*/_interopDefault(_Number$isNaN);
|
|
188
175
|
var Cleave__default = /*#__PURE__*/_interopDefault(Cleave);
|
|
189
176
|
var isFinite__default = /*#__PURE__*/_interopDefault(isFinite);
|
|
190
177
|
var isUndefined__default = /*#__PURE__*/_interopDefault(isUndefined);
|
|
178
|
+
var flowRight__default = /*#__PURE__*/_interopDefault(flowRight);
|
|
179
|
+
var Textarea__default = /*#__PURE__*/_interopDefault(Textarea);
|
|
191
180
|
var _Object$assign__default = /*#__PURE__*/_interopDefault(_Object$assign);
|
|
192
181
|
var _findIndexInstanceProperty__default = /*#__PURE__*/_interopDefault(_findIndexInstanceProperty);
|
|
193
|
-
var
|
|
182
|
+
var moment__default = /*#__PURE__*/_interopDefault(moment);
|
|
183
|
+
var _Object$freeze__default = /*#__PURE__*/_interopDefault(_Object$freeze);
|
|
184
|
+
var originalOmitDeep__default = /*#__PURE__*/_interopDefault(originalOmitDeep);
|
|
194
185
|
var compact__default = /*#__PURE__*/_interopDefault(compact);
|
|
195
186
|
var _Set__default = /*#__PURE__*/_interopDefault(_Set);
|
|
187
|
+
var flatMap__default = /*#__PURE__*/_interopDefault(flatMap);
|
|
188
|
+
var _Date$now__default = /*#__PURE__*/_interopDefault(_Date$now);
|
|
196
189
|
var _spliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_spliceInstanceProperty);
|
|
190
|
+
var memoize__default = /*#__PURE__*/_interopDefault(memoize);
|
|
191
|
+
var omitEmpty__default = /*#__PURE__*/_interopDefault(omitEmpty);
|
|
192
|
+
var flatten__default = /*#__PURE__*/_interopDefault(flatten);
|
|
193
|
+
var uniqBy__default = /*#__PURE__*/_interopDefault(uniqBy);
|
|
194
|
+
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
195
|
+
var hoistNonReactStatics__default = /*#__PURE__*/_interopDefault(hoistNonReactStatics);
|
|
196
|
+
var get__default = /*#__PURE__*/_interopDefault(get);
|
|
197
197
|
|
|
198
198
|
var styles$k = {
|
|
199
199
|
"loading-container": "centered-loading-spinner-module__loading-container___3_9-h"
|
|
@@ -208,6 +208,7 @@ const CenteredLoadingSpinner = () => jsxRuntime.jsx("div", {
|
|
|
208
208
|
children: jsxRuntime.jsx(uiKit.LoadingSpinner, {})
|
|
209
209
|
});
|
|
210
210
|
CenteredLoadingSpinner.displayName = 'CenteredLoadingSpinner';
|
|
211
|
+
var CenteredLoadingSpinner$1 = CenteredLoadingSpinner;
|
|
211
212
|
|
|
212
213
|
const QUERY_MAX_LIMIT = 500;
|
|
213
214
|
const SHOW_TOOLTIP_CHARS_COUNT = 40;
|
|
@@ -263,7 +264,7 @@ var pickerMessages$1 = reactIntl.defineMessages({
|
|
|
263
264
|
}
|
|
264
265
|
});
|
|
265
266
|
|
|
266
|
-
var messages$
|
|
267
|
+
var messages$Q = reactIntl.defineMessages({
|
|
267
268
|
noChannelsFound: {
|
|
268
269
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
269
270
|
description: 'The message to display when no channels were found',
|
|
@@ -324,7 +325,7 @@ const ChannelPickerInput = _ref => {
|
|
|
324
325
|
return channel;
|
|
325
326
|
}, [formatLocalizedFieldToString]);
|
|
326
327
|
const prefixSearchFields = React.useMemo(() => [`name.${dataLocale}`, 'key'], [dataLocale]);
|
|
327
|
-
const loadOptions = useLoadOptions({
|
|
328
|
+
const loadOptions = useLoadOptions$1({
|
|
328
329
|
query: GetChannelsQuery,
|
|
329
330
|
variables,
|
|
330
331
|
prefixSearchFields
|
|
@@ -349,8 +350,8 @@ const ChannelPickerInput = _ref => {
|
|
|
349
350
|
setLoadingError(error);
|
|
350
351
|
onError(error);
|
|
351
352
|
}), [loadOptions, convertChannelToOption, onError]);
|
|
352
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
353
|
-
const _useHandlers = useHandlers(onChange),
|
|
353
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
354
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
354
355
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
355
356
|
handleInternalInputChange = _useHandlers2[0],
|
|
356
357
|
handleChange = _useHandlers2[1];
|
|
@@ -363,18 +364,18 @@ const ChannelPickerInput = _ref => {
|
|
|
363
364
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
364
365
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
365
366
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
366
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
367
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$Q.noChannelsFound), [loadingError, formatMessage]);
|
|
367
368
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
368
369
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
369
370
|
max: "scale",
|
|
370
371
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
371
372
|
scale: "xs",
|
|
372
|
-
children: [jsxRuntime.jsx(CustomFieldTooltip, {
|
|
373
|
+
children: [jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
373
374
|
title: tooltipTitle,
|
|
374
375
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
375
376
|
id: name,
|
|
376
377
|
name: name,
|
|
377
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
378
|
+
placeholder: placeholder ?? formatMessage(messages$Q.placeholder),
|
|
378
379
|
loadOptions: loadOptionsDebounced,
|
|
379
380
|
defaultOptions: true,
|
|
380
381
|
showOptionGroupDivider: true,
|
|
@@ -402,6 +403,7 @@ const ChannelPickerInput = _ref => {
|
|
|
402
403
|
});
|
|
403
404
|
};
|
|
404
405
|
ChannelPickerInput.displayName = 'ChannelPickerInput';
|
|
406
|
+
var ChannelPickerInput$1 = ChannelPickerInput;
|
|
405
407
|
|
|
406
408
|
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)); }
|
|
407
409
|
function _isNativeReflectConstruct$9() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$9 = function () { return !!t; })(); }
|
|
@@ -429,7 +431,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
429
431
|
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
430
432
|
var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
431
433
|
|
|
432
|
-
var messages$
|
|
434
|
+
var messages$P = reactIntl.defineMessages({
|
|
433
435
|
noProductTypesFound: {
|
|
434
436
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
435
437
|
description: 'The message to display when no product types were found',
|
|
@@ -474,7 +476,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
474
476
|
_useState2 = _slicedToArray(_useState, 2),
|
|
475
477
|
loadingError = _useState2[0],
|
|
476
478
|
setLoadingError = _useState2[1];
|
|
477
|
-
const _useProductTypeOption = useProductTypeOptions({
|
|
479
|
+
const _useProductTypeOption = useProductTypeOptions$1({
|
|
478
480
|
prefixSearchFields
|
|
479
481
|
}),
|
|
480
482
|
loadProductTypes = _useProductTypeOption.loadProductTypes;
|
|
@@ -494,8 +496,8 @@ const ProductTypePickerInput = _ref => {
|
|
|
494
496
|
setLoadingError(error);
|
|
495
497
|
onError(error);
|
|
496
498
|
}), [loadProductTypes, onError]);
|
|
497
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
498
|
-
const _useHandlers = useHandlers(onChange),
|
|
499
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
500
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
499
501
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
500
502
|
handleInternalInputChange = _useHandlers2[0],
|
|
501
503
|
handleChange = _useHandlers2[1];
|
|
@@ -511,14 +513,14 @@ const ProductTypePickerInput = _ref => {
|
|
|
511
513
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
512
514
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
513
515
|
max: "scale",
|
|
514
|
-
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
516
|
+
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner$1, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
515
517
|
scale: "xs",
|
|
516
|
-
children: [jsxRuntime.jsx(CustomFieldTooltip, {
|
|
518
|
+
children: [jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
517
519
|
title: tooltipTitle,
|
|
518
520
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
519
521
|
id: name,
|
|
520
522
|
name: name,
|
|
521
|
-
placeholder: formatMessage(messages$
|
|
523
|
+
placeholder: formatMessage(messages$P.placeholder),
|
|
522
524
|
loadOptions: loadOptionsDebounced,
|
|
523
525
|
defaultOptions: [],
|
|
524
526
|
isClearable: isClearable,
|
|
@@ -531,7 +533,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
531
533
|
onInputChange: handleInputChange,
|
|
532
534
|
onBlur: onBlur,
|
|
533
535
|
value: currentOption.data,
|
|
534
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
536
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$P.noProductTypesFound),
|
|
535
537
|
hasError: hasError || isLoadingFailed,
|
|
536
538
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
537
539
|
menuPortalTarget: document.body,
|
|
@@ -545,8 +547,9 @@ const ProductTypePickerInput = _ref => {
|
|
|
545
547
|
});
|
|
546
548
|
};
|
|
547
549
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
550
|
+
var ProductTypePickerInput$1 = ProductTypePickerInput;
|
|
548
551
|
|
|
549
|
-
var messages$
|
|
552
|
+
var messages$O = reactIntl.defineMessages({
|
|
550
553
|
noStatesFound: {
|
|
551
554
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
552
555
|
description: 'The message to display when no states were found',
|
|
@@ -593,7 +596,7 @@ const StatePickerInput = _ref => {
|
|
|
593
596
|
loadingError = _useState2[0],
|
|
594
597
|
setLoadingError = _useState2[1];
|
|
595
598
|
const prefixSearchFields = React.useMemo(() => [`name.${dataLocale}`, 'key'], [dataLocale]);
|
|
596
|
-
const loadOptions = useLoadOptions({
|
|
599
|
+
const loadOptions = useLoadOptions$1({
|
|
597
600
|
query: GetStatesQuery,
|
|
598
601
|
variables,
|
|
599
602
|
prefixSearchFields
|
|
@@ -616,8 +619,8 @@ const StatePickerInput = _ref => {
|
|
|
616
619
|
setLoadingError(error);
|
|
617
620
|
onError(error);
|
|
618
621
|
}), [loadOptions, convertStateToOption, onError]);
|
|
619
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
620
|
-
const _useHandlers = useHandlers(onChange),
|
|
622
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
623
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
621
624
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
622
625
|
handleInternalInputChange = _useHandlers2[0],
|
|
623
626
|
handleChange = _useHandlers2[1];
|
|
@@ -630,19 +633,19 @@ const StatePickerInput = _ref => {
|
|
|
630
633
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
631
634
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
632
635
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
633
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
636
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$O.noStatesFound), [loadingError, formatMessage]);
|
|
634
637
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
635
638
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
636
639
|
max: "scale",
|
|
637
|
-
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
640
|
+
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner$1, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
638
641
|
scale: "xs",
|
|
639
|
-
children: [jsxRuntime.jsx(CustomFieldTooltip, {
|
|
642
|
+
children: [jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
640
643
|
title: tooltipTitle,
|
|
641
644
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
642
645
|
id: name,
|
|
643
646
|
name: name,
|
|
644
647
|
horizontalConstraint: "scale",
|
|
645
|
-
placeholder: formatMessage(messages$
|
|
648
|
+
placeholder: formatMessage(messages$O.placeholder),
|
|
646
649
|
loadOptions: loadOptionsDebounced,
|
|
647
650
|
defaultOptions: true,
|
|
648
651
|
showOptionGroupDivider: true,
|
|
@@ -670,6 +673,7 @@ const StatePickerInput = _ref => {
|
|
|
670
673
|
});
|
|
671
674
|
};
|
|
672
675
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
676
|
+
var StatePickerInput$1 = StatePickerInput;
|
|
673
677
|
|
|
674
678
|
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; }
|
|
675
679
|
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; }
|
|
@@ -696,8 +700,9 @@ const CustomFieldTooltip = _ref => {
|
|
|
696
700
|
children: children
|
|
697
701
|
});
|
|
698
702
|
};
|
|
703
|
+
var CustomFieldTooltip$1 = CustomFieldTooltip;
|
|
699
704
|
|
|
700
|
-
var messages$
|
|
705
|
+
var messages$N = reactIntl.defineMessages({
|
|
701
706
|
bottomOption: {
|
|
702
707
|
id: 'Products.Pickers.bottomOption',
|
|
703
708
|
description: 'The message to display at the end of the options menu',
|
|
@@ -709,7 +714,7 @@ function ownKeys$1p(e, r) { var t = _Object$keys__default["default"](e); if (_Ob
|
|
|
709
714
|
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; }
|
|
710
715
|
const getBottomOption = formatMessage => ({
|
|
711
716
|
options: [{
|
|
712
|
-
label: formatMessage ? formatMessage(messages$
|
|
717
|
+
label: formatMessage ? formatMessage(messages$N.bottomOption) : messages$N.bottomOption,
|
|
713
718
|
isBottomOption: true,
|
|
714
719
|
isDisabled: true
|
|
715
720
|
}]
|
|
@@ -744,7 +749,7 @@ const useHandlers = onChange => {
|
|
|
744
749
|
const handleInputChange = React.useCallback(changedValue => {
|
|
745
750
|
setInputValue(changedValue);
|
|
746
751
|
}, []);
|
|
747
|
-
const handleChange = useEventCallback(event => {
|
|
752
|
+
const handleChange = useEventCallback$1(event => {
|
|
748
753
|
const eventWithExtractedValue = _objectSpread$1o(_objectSpread$1o({}, event), {}, {
|
|
749
754
|
target: _objectSpread$1o(_objectSpread$1o({}, event.target), {}, {
|
|
750
755
|
value: event.target.value?.value
|
|
@@ -754,6 +759,7 @@ const useHandlers = onChange => {
|
|
|
754
759
|
}, [onChange, inputValue]);
|
|
755
760
|
return [handleInputChange, handleChange];
|
|
756
761
|
};
|
|
762
|
+
var useHandlers$1 = useHandlers;
|
|
757
763
|
|
|
758
764
|
const _excluded$3 = ["extraWhere"];
|
|
759
765
|
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; }
|
|
@@ -786,10 +792,10 @@ const useLoadOptions = _ref => {
|
|
|
786
792
|
let inputValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
787
793
|
let where;
|
|
788
794
|
if (inputValue.length) {
|
|
789
|
-
if (isUUID(inputValue)) {
|
|
795
|
+
if (isUUID$1(inputValue)) {
|
|
790
796
|
where = `id = "${inputValue}"`;
|
|
791
797
|
} else {
|
|
792
|
-
const _getPrefixSearchBound = getPrefixSearchBounds(inputValue),
|
|
798
|
+
const _getPrefixSearchBound = getPrefixSearchBounds$1(inputValue),
|
|
793
799
|
_getPrefixSearchBound2 = _slicedToArray(_getPrefixSearchBound, 2),
|
|
794
800
|
lowerBound = _getPrefixSearchBound2[0],
|
|
795
801
|
upperBound = _getPrefixSearchBound2[1];
|
|
@@ -815,6 +821,7 @@ const useLoadOptions = _ref => {
|
|
|
815
821
|
}, [client$1, query, variables, prefixSearchFields]);
|
|
816
822
|
return loadOptions;
|
|
817
823
|
};
|
|
824
|
+
var useLoadOptions$1 = useLoadOptions;
|
|
818
825
|
|
|
819
826
|
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 } } } };
|
|
820
827
|
const useExecuteGraphQLRequest = () => {
|
|
@@ -905,8 +912,8 @@ const constructPrefixSearchPredicate = (prefixSearchFields, lowerBound, upperBou
|
|
|
905
912
|
const constructWherePredicate = (inputValue, prefixSearchFields) => {
|
|
906
913
|
const wherePredicate = function () {
|
|
907
914
|
if (inputValue.length) {
|
|
908
|
-
if (isUUID(inputValue)) return `id = "${inputValue}"`;else {
|
|
909
|
-
const _getPrefixSearchBound = getPrefixSearchBounds(inputValue),
|
|
915
|
+
if (isUUID$1(inputValue)) return `id = "${inputValue}"`;else {
|
|
916
|
+
const _getPrefixSearchBound = getPrefixSearchBounds$1(inputValue),
|
|
910
917
|
_getPrefixSearchBound2 = _slicedToArray(_getPrefixSearchBound, 2),
|
|
911
918
|
lowerBound = _getPrefixSearchBound2[0],
|
|
912
919
|
upperBound = _getPrefixSearchBound2[1];
|
|
@@ -964,6 +971,7 @@ const useProductTypeOptions = _ref3 => {
|
|
|
964
971
|
loadProductTypes: isProjectIndexed ? fetchProductTypesFromPim : fetchProductTypessFromCTP
|
|
965
972
|
};
|
|
966
973
|
};
|
|
974
|
+
var useProductTypeOptions$1 = useProductTypeOptions;
|
|
967
975
|
|
|
968
976
|
function useCurrentOption(_ref) {
|
|
969
977
|
let id = _ref.id,
|
|
@@ -1015,16 +1023,20 @@ const getDisplayName = Component => {
|
|
|
1015
1023
|
}
|
|
1016
1024
|
return Component.displayName || Component.name || 'Component';
|
|
1017
1025
|
};
|
|
1026
|
+
var getDisplayName$1 = getDisplayName;
|
|
1018
1027
|
|
|
1019
1028
|
const setDisplayName = nextDisplayName => Component => {
|
|
1020
1029
|
// eslint-disable-next-line no-param-reassign
|
|
1021
1030
|
Component.displayName = nextDisplayName;
|
|
1022
1031
|
return Component;
|
|
1023
1032
|
};
|
|
1033
|
+
var setDisplayName$1 = setDisplayName;
|
|
1024
1034
|
|
|
1025
|
-
const keepDisplayName = component => setDisplayName(getDisplayName(component));
|
|
1035
|
+
const keepDisplayName = component => setDisplayName$1(getDisplayName$1(component));
|
|
1036
|
+
var keepDisplayName$1 = keepDisplayName;
|
|
1026
1037
|
|
|
1027
|
-
const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName(BaseComponent)})`;
|
|
1038
|
+
const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName$1(BaseComponent)})`;
|
|
1039
|
+
var wrapDisplayName$1 = wrapDisplayName;
|
|
1028
1040
|
|
|
1029
1041
|
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; }
|
|
1030
1042
|
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; }
|
|
@@ -1062,9 +1074,10 @@ const withMouseOverState = BaseComponent => {
|
|
|
1062
1074
|
}
|
|
1063
1075
|
}]);
|
|
1064
1076
|
}(React.Component);
|
|
1065
|
-
WithMouseOverState.displayName = wrapDisplayName(BaseComponent, 'withMouseOverState');
|
|
1077
|
+
WithMouseOverState.displayName = wrapDisplayName$1(BaseComponent, 'withMouseOverState');
|
|
1066
1078
|
return WithMouseOverState;
|
|
1067
1079
|
};
|
|
1080
|
+
var withMouseOverState$1 = withMouseOverState;
|
|
1068
1081
|
|
|
1069
1082
|
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; }
|
|
1070
1083
|
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; }
|
|
@@ -1222,8 +1235,9 @@ ThrottledField.defaultProps = {
|
|
|
1222
1235
|
autoFocus: false,
|
|
1223
1236
|
label: 'Throttled field'
|
|
1224
1237
|
};
|
|
1238
|
+
var ThrottledField$1 = ThrottledField;
|
|
1225
1239
|
|
|
1226
|
-
var messages$
|
|
1240
|
+
var messages$M = reactIntl.defineMessages({
|
|
1227
1241
|
buttonLabel: {
|
|
1228
1242
|
id: 'SearchInput.buttonLabel',
|
|
1229
1243
|
description: 'Label for "Search" button.',
|
|
@@ -1322,13 +1336,13 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
1322
1336
|
[styles$i['input-container-disabled']]: this.props.disabled && this.props.enableDisabledStyle,
|
|
1323
1337
|
[styles$i['input-container-granular']]: this.props.isGranular
|
|
1324
1338
|
}),
|
|
1325
|
-
children: jsxRuntime.jsx(ThrottledField, {
|
|
1339
|
+
children: jsxRuntime.jsx(ThrottledField$1, {
|
|
1326
1340
|
style: "primary",
|
|
1327
1341
|
name: "search-text",
|
|
1328
1342
|
"data-testid": this.props.testId || 'search-input',
|
|
1329
1343
|
value: this.state.text,
|
|
1330
1344
|
label: this.props.label,
|
|
1331
|
-
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$
|
|
1345
|
+
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$M.placeholder),
|
|
1332
1346
|
inputRef: this.props.inputRef || this.setInputRef,
|
|
1333
1347
|
onChange: this.handleInputChange,
|
|
1334
1348
|
onEnter: this.handleEnter,
|
|
@@ -1383,7 +1397,7 @@ SearchInput.defaultProps = {
|
|
|
1383
1397
|
label: 'Search input',
|
|
1384
1398
|
onChange: () => null
|
|
1385
1399
|
};
|
|
1386
|
-
var searchInput = flowRight__default["default"](keepDisplayName(SearchInput), withMouseOverState, reactIntl.injectIntl)(SearchInput);
|
|
1400
|
+
var searchInput = flowRight__default["default"](keepDisplayName$1(SearchInput), withMouseOverState$1, reactIntl.injectIntl)(SearchInput);
|
|
1387
1401
|
|
|
1388
1402
|
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; }
|
|
1389
1403
|
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; }
|
|
@@ -1407,9 +1421,10 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1407
1421
|
}
|
|
1408
1422
|
}));
|
|
1409
1423
|
};
|
|
1410
|
-
WithDataTablePaginationState.displayName = wrapDisplayName(WithDataTablePaginationState, 'WithDataTablePaginationState');
|
|
1424
|
+
WithDataTablePaginationState.displayName = wrapDisplayName$1(WithDataTablePaginationState, 'WithDataTablePaginationState');
|
|
1411
1425
|
return WithDataTablePaginationState;
|
|
1412
1426
|
};
|
|
1427
|
+
var injectDataTablePaginationState$1 = injectDataTablePaginationState;
|
|
1413
1428
|
|
|
1414
1429
|
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; }
|
|
1415
1430
|
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; }
|
|
@@ -1431,10 +1446,11 @@ const injectNotifications = function () {
|
|
|
1431
1446
|
[propName]: notifications
|
|
1432
1447
|
}));
|
|
1433
1448
|
};
|
|
1434
|
-
WrappedComponent.displayName = `withNotifications(${getDisplayName(Component)}`;
|
|
1449
|
+
WrappedComponent.displayName = `withNotifications(${getDisplayName$1(Component)}`;
|
|
1435
1450
|
return WrappedComponent;
|
|
1436
1451
|
};
|
|
1437
1452
|
};
|
|
1453
|
+
var injectNotifications$1 = injectNotifications;
|
|
1438
1454
|
|
|
1439
1455
|
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; }
|
|
1440
1456
|
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; }
|
|
@@ -1446,9 +1462,10 @@ const withProps = mapProps => Component => {
|
|
|
1446
1462
|
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1i(_objectSpread$1i({}, ownProps), mapProps(ownProps)) : _objectSpread$1i(_objectSpread$1i({}, ownProps), mapProps);
|
|
1447
1463
|
return jsxRuntime.jsx(Component, _objectSpread$1i({}, enhancedProps));
|
|
1448
1464
|
};
|
|
1449
|
-
EnhancedWithProps.displayName = wrapDisplayName(Component, 'withProps');
|
|
1465
|
+
EnhancedWithProps.displayName = wrapDisplayName$1(Component, 'withProps');
|
|
1450
1466
|
return EnhancedWithProps;
|
|
1451
1467
|
};
|
|
1468
|
+
var withProps$1 = withProps;
|
|
1452
1469
|
|
|
1453
1470
|
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; }
|
|
1454
1471
|
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; }
|
|
@@ -1483,6 +1500,7 @@ const withRedirectTo = options => Component => {
|
|
|
1483
1500
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
1484
1501
|
return WithRedirectTo;
|
|
1485
1502
|
};
|
|
1503
|
+
var withRedirectTo$1 = withRedirectTo;
|
|
1486
1504
|
|
|
1487
1505
|
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; }
|
|
1488
1506
|
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; }
|
|
@@ -1490,7 +1508,7 @@ const defaultOptions$4 = {
|
|
|
1490
1508
|
propName: 'modalState',
|
|
1491
1509
|
isInitiallyOpen: false
|
|
1492
1510
|
};
|
|
1493
|
-
const injectModalState$
|
|
1511
|
+
const injectModalState$2 = options => Component => {
|
|
1494
1512
|
const mergedOptions = _objectSpread$1g(_objectSpread$1g({}, defaultOptions$4), options);
|
|
1495
1513
|
const WithModalState = props => {
|
|
1496
1514
|
const modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
@@ -1498,9 +1516,10 @@ const injectModalState$1 = options => Component => {
|
|
|
1498
1516
|
[mergedOptions.propName]: modalState
|
|
1499
1517
|
}));
|
|
1500
1518
|
};
|
|
1501
|
-
WithModalState.displayName = wrapDisplayName(WithModalState, 'WithModalState');
|
|
1519
|
+
WithModalState.displayName = wrapDisplayName$1(WithModalState, 'WithModalState');
|
|
1502
1520
|
return WithModalState;
|
|
1503
1521
|
};
|
|
1522
|
+
var injectModalState$3 = injectModalState$2;
|
|
1504
1523
|
|
|
1505
1524
|
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; }
|
|
1506
1525
|
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; }
|
|
@@ -1516,9 +1535,10 @@ const injectModalState = options => Component => {
|
|
|
1516
1535
|
[mergedOptions.propName]: toggleState
|
|
1517
1536
|
}));
|
|
1518
1537
|
};
|
|
1519
|
-
WithToggleState.displayName = wrapDisplayName(WithToggleState, 'WithToggleState');
|
|
1538
|
+
WithToggleState.displayName = wrapDisplayName$1(WithToggleState, 'WithToggleState');
|
|
1520
1539
|
return WithToggleState;
|
|
1521
1540
|
};
|
|
1541
|
+
var injectModalState$1 = injectModalState;
|
|
1522
1542
|
|
|
1523
1543
|
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; }
|
|
1524
1544
|
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; }
|
|
@@ -1582,6 +1602,7 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
1582
1602
|
}, [actualStorageValue, initialStorageValue, readFromStorage, writeToStorage]);
|
|
1583
1603
|
return [actualStorageValue, writeToStorage, readFromStorage];
|
|
1584
1604
|
};
|
|
1605
|
+
var useStorage$1 = useStorage;
|
|
1585
1606
|
|
|
1586
1607
|
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; }
|
|
1587
1608
|
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; }
|
|
@@ -1599,7 +1620,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1599
1620
|
*/
|
|
1600
1621
|
const mergedOptions = _objectSpread$1d(_objectSpread$1d({}, defaultOptions$1), options);
|
|
1601
1622
|
const WithStorage = props => {
|
|
1602
|
-
const _useStorage = useStorage(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
1623
|
+
const _useStorage = useStorage$1(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
1603
1624
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
1604
1625
|
actualStorageValue = _useStorage2[0],
|
|
1605
1626
|
writeToStorage = _useStorage2[1],
|
|
@@ -1613,9 +1634,10 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1613
1634
|
};
|
|
1614
1635
|
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1d(_objectSpread$1d({}, props), storageProp));
|
|
1615
1636
|
};
|
|
1616
|
-
WithStorage.displayName = wrapDisplayName(WrappedComponent, 'WithStorage');
|
|
1637
|
+
WithStorage.displayName = wrapDisplayName$1(WrappedComponent, 'WithStorage');
|
|
1617
1638
|
return WithStorage;
|
|
1618
1639
|
};
|
|
1640
|
+
var injectStorage$1 = injectStorage;
|
|
1619
1641
|
|
|
1620
1642
|
/**
|
|
1621
1643
|
* @returns function with the following parameters
|
|
@@ -1768,6 +1790,7 @@ const useIsFieldDuplicated = () => {
|
|
|
1768
1790
|
queryIsFieldDuplicated: execute
|
|
1769
1791
|
};
|
|
1770
1792
|
};
|
|
1793
|
+
var useIsFieldDuplicated$1 = useIsFieldDuplicated;
|
|
1771
1794
|
|
|
1772
1795
|
const usePrevious = value => {
|
|
1773
1796
|
const ref = React.useRef();
|
|
@@ -1776,6 +1799,7 @@ const usePrevious = value => {
|
|
|
1776
1799
|
}, [value]);
|
|
1777
1800
|
return ref.current;
|
|
1778
1801
|
};
|
|
1802
|
+
var usePrevious$1 = usePrevious;
|
|
1779
1803
|
|
|
1780
1804
|
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; }
|
|
1781
1805
|
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; }
|
|
@@ -1843,6 +1867,7 @@ const useStoresListFetcher = props => {
|
|
|
1843
1867
|
}
|
|
1844
1868
|
};
|
|
1845
1869
|
};
|
|
1870
|
+
var useStoresListFetcher$1 = useStoresListFetcher;
|
|
1846
1871
|
|
|
1847
1872
|
const toPermission = (permission, resourceName) => camelCase__default["default"](`can ${permission} ${resourceName}`);
|
|
1848
1873
|
const createPermissionsComposePath = permission =>
|
|
@@ -1872,6 +1897,7 @@ const useStoreKeysInDataFences = _ref => {
|
|
|
1872
1897
|
});
|
|
1873
1898
|
return storeKeysInDataFences;
|
|
1874
1899
|
};
|
|
1900
|
+
var useStoreKeysInDataFences$1 = useStoreKeysInDataFences;
|
|
1875
1901
|
|
|
1876
1902
|
function useDidFormValidationFail() {
|
|
1877
1903
|
const _useState = React.useState(false),
|
|
@@ -1931,7 +1957,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
1931
1957
|
const usePersistedReminder = function () {
|
|
1932
1958
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1933
1959
|
const mergedOptions = _objectSpread$1a(_objectSpread$1a({}, defaultOptions), options);
|
|
1934
|
-
const _useStorage = useStorage(mergedOptions.storageKey, null),
|
|
1960
|
+
const _useStorage = useStorage$1(mergedOptions.storageKey, null),
|
|
1935
1961
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
1936
1962
|
initialChosenReminderInterval = _useStorage2[0],
|
|
1937
1963
|
choseReminderInterval = _useStorage2[1],
|
|
@@ -1975,8 +2001,9 @@ const usePersistedReminder = function () {
|
|
|
1975
2001
|
}, []);
|
|
1976
2002
|
return [hasReminderExpired, hasChosenReminderRef, scheduleReminder];
|
|
1977
2003
|
};
|
|
2004
|
+
var usePersistedReminder$1 = usePersistedReminder;
|
|
1978
2005
|
|
|
1979
|
-
var messages$
|
|
2006
|
+
var messages$L = reactIntl.defineMessages({
|
|
1980
2007
|
profileUpdated: {
|
|
1981
2008
|
id: 'NotificationText.profileUpdated',
|
|
1982
2009
|
description: 'Label for the notification header',
|
|
@@ -2013,9 +2040,9 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2013
2040
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2014
2041
|
as: "p",
|
|
2015
2042
|
isBold: true,
|
|
2016
|
-
intlMessage: messages$
|
|
2043
|
+
intlMessage: messages$L.profileUpdated
|
|
2017
2044
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2018
|
-
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$
|
|
2045
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$L.addMoreInformation), {}, {
|
|
2019
2046
|
values: {
|
|
2020
2047
|
newline: getNewLine
|
|
2021
2048
|
}
|
|
@@ -2024,7 +2051,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2024
2051
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2025
2052
|
scale: "xs",
|
|
2026
2053
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2027
|
-
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$
|
|
2054
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$L.informationAndProfileLink), {}, {
|
|
2028
2055
|
values: {
|
|
2029
2056
|
newline: getNewLine,
|
|
2030
2057
|
link: getLinkToProfile
|
|
@@ -2034,6 +2061,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2034
2061
|
})]
|
|
2035
2062
|
});
|
|
2036
2063
|
NotificationText.displayName = 'NotificationText';
|
|
2064
|
+
var NotificationText$1 = NotificationText;
|
|
2037
2065
|
|
|
2038
2066
|
const useRoleNotification = _ref => {
|
|
2039
2067
|
let dismissNotification = _ref.onDismiss;
|
|
@@ -2045,13 +2073,14 @@ const useRoleNotification = _ref => {
|
|
|
2045
2073
|
return () => {
|
|
2046
2074
|
if (isBusinessRoleNotificationEnabled) {
|
|
2047
2075
|
notification({
|
|
2048
|
-
text: jsxRuntime.jsx(NotificationText, {})
|
|
2076
|
+
text: jsxRuntime.jsx(NotificationText$1, {})
|
|
2049
2077
|
}, {
|
|
2050
2078
|
onDismiss: () => dismissNotification()
|
|
2051
2079
|
});
|
|
2052
2080
|
}
|
|
2053
2081
|
};
|
|
2054
2082
|
};
|
|
2083
|
+
var useRoleNotification$1 = useRoleNotification;
|
|
2055
2084
|
|
|
2056
2085
|
const useRoleNotificationEffect = () => {
|
|
2057
2086
|
const _useAdapterStatus = applicationShell.useAdapterStatus(),
|
|
@@ -2060,7 +2089,7 @@ const useRoleNotificationEffect = () => {
|
|
|
2060
2089
|
const storageKey = 'roleExpiry';
|
|
2061
2090
|
const userBusinessRole = user.businessRole;
|
|
2062
2091
|
const scopedStorageKey = [user.id, storageKey].join('/');
|
|
2063
|
-
const _usePersistedReminder = usePersistedReminder({
|
|
2092
|
+
const _usePersistedReminder = usePersistedReminder$1({
|
|
2064
2093
|
storageKey,
|
|
2065
2094
|
reminderInterval: REMINDER_OPTION_3_DAY
|
|
2066
2095
|
}),
|
|
@@ -2068,7 +2097,7 @@ const useRoleNotificationEffect = () => {
|
|
|
2068
2097
|
hasReminderExpired = _usePersistedReminder2[0],
|
|
2069
2098
|
hasChosenReminderRef = _usePersistedReminder2[1],
|
|
2070
2099
|
scheduleReminder = _usePersistedReminder2[2];
|
|
2071
|
-
const roleNotification = useRoleNotification({
|
|
2100
|
+
const roleNotification = useRoleNotification$1({
|
|
2072
2101
|
onDismiss: scheduleReminder
|
|
2073
2102
|
});
|
|
2074
2103
|
const isFirstTimeUser = !hasChosenReminderRef.current;
|
|
@@ -2097,6 +2126,7 @@ const useRoleNotificationEffect = () => {
|
|
|
2097
2126
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2098
2127
|
[userBusinessRole, hasReminderExpired, isFlopFlipReady]);
|
|
2099
2128
|
};
|
|
2129
|
+
var useRoleNotificationEffect$1 = useRoleNotificationEffect;
|
|
2100
2130
|
|
|
2101
2131
|
function usePendingRequests() {
|
|
2102
2132
|
const _useState = React.useState(0),
|
|
@@ -2144,8 +2174,9 @@ const useEventCallback = (fn, dependencies) => {
|
|
|
2144
2174
|
return ref.current(...arguments);
|
|
2145
2175
|
}, [ref]);
|
|
2146
2176
|
};
|
|
2177
|
+
var useEventCallback$1 = useEventCallback;
|
|
2147
2178
|
|
|
2148
|
-
var messages$
|
|
2179
|
+
var messages$K = reactIntl.defineMessages({
|
|
2149
2180
|
fallbackHint: {
|
|
2150
2181
|
id: 'KeyFallback.fallbackHint',
|
|
2151
2182
|
description: 'key fallback for a specified resource key (e.g name)',
|
|
@@ -2169,17 +2200,19 @@ const useLocalizedKeyFallback = () => {
|
|
|
2169
2200
|
return values => {
|
|
2170
2201
|
if (!values.resource) return null;
|
|
2171
2202
|
const localizedString = values.resource[values.localizedStringFieldName];
|
|
2172
|
-
const fallbackHintWithKey = intl.formatMessage(messages$
|
|
2203
|
+
const fallbackHintWithKey = intl.formatMessage(messages$K.fallbackHint, {
|
|
2173
2204
|
key: values.resource.key
|
|
2174
2205
|
});
|
|
2175
2206
|
if (!localizedString) return fallbackHintWithKey;
|
|
2176
2207
|
return localizedString[language] || fallbackHintWithKey;
|
|
2177
2208
|
};
|
|
2178
2209
|
};
|
|
2210
|
+
var useLocalizedKeyFallback$1 = useLocalizedKeyFallback;
|
|
2179
2211
|
|
|
2180
2212
|
const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
2181
2213
|
// eslint-disable-next-line testing-library/await-async-utils
|
|
2182
2214
|
React.useCallback(debounce__default["default"](promiseCallback, wait), [promiseCallback]);
|
|
2215
|
+
var useDebouncedPromiseCallback$1 = useDebouncedPromiseCallback;
|
|
2183
2216
|
|
|
2184
2217
|
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; }
|
|
2185
2218
|
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; }
|
|
@@ -2245,7 +2278,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2245
2278
|
displaySettings
|
|
2246
2279
|
};
|
|
2247
2280
|
}, [allAvailableColumnsConfiguration, initialVisibleColumnKeys, mutableColumnProps, displaySettings]);
|
|
2248
|
-
const _useStorage = useStorage(tableConfigurationStorageKey,
|
|
2281
|
+
const _useStorage = useStorage$1(tableConfigurationStorageKey,
|
|
2249
2282
|
// initialize with all the available columns
|
|
2250
2283
|
mappedInitialTableConfiguration, {
|
|
2251
2284
|
storageType
|
|
@@ -2281,6 +2314,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2281
2314
|
})
|
|
2282
2315
|
};
|
|
2283
2316
|
};
|
|
2317
|
+
var usePersistedTableConfiguration$1 = usePersistedTableConfiguration;
|
|
2284
2318
|
|
|
2285
2319
|
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 } } } };
|
|
2286
2320
|
const useProductSelectionsTotalFetcher = props => {
|
|
@@ -2296,6 +2330,7 @@ const useProductSelectionsTotalFetcher = props => {
|
|
|
2296
2330
|
total: data?.productSelections?.total
|
|
2297
2331
|
};
|
|
2298
2332
|
};
|
|
2333
|
+
var useProductSelectionsTotalFetcher$1 = useProductSelectionsTotalFetcher;
|
|
2299
2334
|
|
|
2300
2335
|
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; }
|
|
2301
2336
|
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; }
|
|
@@ -2344,6 +2379,7 @@ const useProductSelectionsFetcher = props => {
|
|
|
2344
2379
|
refetch
|
|
2345
2380
|
};
|
|
2346
2381
|
};
|
|
2382
|
+
var useProductSelectionsFetcher$1 = useProductSelectionsFetcher;
|
|
2347
2383
|
|
|
2348
2384
|
const setToArray = function () {
|
|
2349
2385
|
let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -3754,6 +3790,7 @@ const currencyData = {
|
|
|
3754
3790
|
countries: ['Zimbabwe']
|
|
3755
3791
|
}
|
|
3756
3792
|
};
|
|
3793
|
+
var currencyData$1 = currencyData;
|
|
3757
3794
|
|
|
3758
3795
|
/* This is is short-term solution that patches fraction digits not being available from the Dashboard backend.
|
|
3759
3796
|
|
|
@@ -3780,8 +3817,8 @@ SOFTWARE.
|
|
|
3780
3817
|
|
|
3781
3818
|
const getData = (code, field) => {
|
|
3782
3819
|
code = code !== undefined && code !== '' ? code.toUpperCase() : code;
|
|
3783
|
-
if (currencyData[code] !== undefined) {
|
|
3784
|
-
if (field === 'all') return currencyData[code];else return currencyData[code][field];
|
|
3820
|
+
if (currencyData$1[code] !== undefined) {
|
|
3821
|
+
if (field === 'all') return currencyData$1[code];else return currencyData$1[code][field];
|
|
3785
3822
|
} else return undefined;
|
|
3786
3823
|
};
|
|
3787
3824
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
@@ -3820,7 +3857,7 @@ function formatMoney$2(moneyValue, intl, options) {
|
|
|
3820
3857
|
}, options));
|
|
3821
3858
|
}
|
|
3822
3859
|
|
|
3823
|
-
var messages$
|
|
3860
|
+
var messages$J = reactIntl.defineMessages({
|
|
3824
3861
|
booleanYes: {
|
|
3825
3862
|
id: 'AttributeTypeFormats.boolean.yes',
|
|
3826
3863
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -3902,7 +3939,7 @@ const formatDateTime = _ref7 => {
|
|
|
3902
3939
|
const formatBoolean = _ref8 => {
|
|
3903
3940
|
let value = _ref8.value,
|
|
3904
3941
|
intl = _ref8.intl;
|
|
3905
|
-
return value ? intl.formatMessage(messages$
|
|
3942
|
+
return value ? intl.formatMessage(messages$J.booleanYes) : intl.formatMessage(messages$J.booleanNo);
|
|
3906
3943
|
};
|
|
3907
3944
|
const formatNilType = _ref9 => {
|
|
3908
3945
|
let value = _ref9.value,
|
|
@@ -4059,6 +4096,7 @@ const getPrefixSearchBounds = input => {
|
|
|
4059
4096
|
const getNextCharacter = character => String.fromCharCode(character.charCodeAt() + 1);
|
|
4060
4097
|
return [input, `${_sliceInstanceProperty__default["default"](input).call(input, 0, input.length - 1)}${getNextCharacter(_sliceInstanceProperty__default["default"](input).call(input, input.length - 1))}`];
|
|
4061
4098
|
};
|
|
4099
|
+
var getPrefixSearchBounds$1 = getPrefixSearchBounds;
|
|
4062
4100
|
|
|
4063
4101
|
const _excluded$2 = ["action"];
|
|
4064
4102
|
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; }
|
|
@@ -4618,6 +4656,7 @@ const extractErrorFromGraphQlResponse = graphQlResponse => {
|
|
|
4618
4656
|
};
|
|
4619
4657
|
|
|
4620
4658
|
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);
|
|
4659
|
+
var isUUID$1 = isUUID;
|
|
4621
4660
|
|
|
4622
4661
|
const formats = {
|
|
4623
4662
|
en: [',', '.'],
|
|
@@ -5007,7 +5046,7 @@ function uniqueObjects(items) {
|
|
|
5007
5046
|
|
|
5008
5047
|
*/
|
|
5009
5048
|
|
|
5010
|
-
const messages$
|
|
5049
|
+
const messages$I = reactIntl.defineMessages({
|
|
5011
5050
|
unique: {
|
|
5012
5051
|
id: 'Validation.unique',
|
|
5013
5052
|
description: 'An error message to show if the field must be unique',
|
|
@@ -5049,6 +5088,7 @@ const messages$C = reactIntl.defineMessages({
|
|
|
5049
5088
|
defaultMessage: 'Invalid ID format. Please enter a valid ID.'
|
|
5050
5089
|
}
|
|
5051
5090
|
});
|
|
5091
|
+
var validationMessages = messages$I;
|
|
5052
5092
|
|
|
5053
5093
|
function getIndexesOfInvalidValues(values) {
|
|
5054
5094
|
let invalidValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
@@ -5062,6 +5102,7 @@ function getIndexesOfInvalidValues(values) {
|
|
|
5062
5102
|
}
|
|
5063
5103
|
|
|
5064
5104
|
const withoutEmptyErrorsByField = errorsByField => omitEmpty__default["default"](errorsByField);
|
|
5105
|
+
var withoutEmptyErrorsByField$1 = withoutEmptyErrorsByField;
|
|
5065
5106
|
|
|
5066
5107
|
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 } } } };
|
|
5067
5108
|
|
|
@@ -5131,7 +5172,7 @@ const getWhereClause = function () {
|
|
|
5131
5172
|
let searchText = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
5132
5173
|
let language = arguments.length > 1 ? arguments[1] : undefined;
|
|
5133
5174
|
const query = _trimInstanceProperty__default["default"](_context2 = _JSON$stringify__default["default"](searchText)).call(_context2);
|
|
5134
|
-
const idQuery = isUUID(searchText) && `id = ${query}`;
|
|
5175
|
+
const idQuery = isUUID$1(searchText) && `id = ${query}`;
|
|
5135
5176
|
const nameQuery = `name(${language} = ${query})`;
|
|
5136
5177
|
const keyQuery = `key = ${query}`;
|
|
5137
5178
|
return _filterInstanceProperty__default["default"](_context3 = [idQuery, nameQuery, keyQuery]).call(_context3, Boolean).join(' or ');
|
|
@@ -5198,7 +5239,7 @@ const useReferenceSearchItems = _ref => {
|
|
|
5198
5239
|
const putToCache = React.useCallback(items => {
|
|
5199
5240
|
_forEachInstanceProperty__default["default"](items).call(items, item => itemCache.set(item.id, item));
|
|
5200
5241
|
}, []);
|
|
5201
|
-
const prevIds = usePrevious(ids);
|
|
5242
|
+
const prevIds = usePrevious$1(ids);
|
|
5202
5243
|
React.useEffect(() => {
|
|
5203
5244
|
async function loadItems() {
|
|
5204
5245
|
const loadedItems = ids.length > 0 ? await loadItemsByIds(ids) : [];
|
|
@@ -5271,7 +5312,7 @@ function ReferenceSearch(props) {
|
|
|
5271
5312
|
children: [areSomeItemsMissing && jsxRuntime.jsx("div", {
|
|
5272
5313
|
className: styles$h['missing-label'],
|
|
5273
5314
|
children: props.referenceIsMissingLabel
|
|
5274
|
-
}), jsxRuntime.jsx(CustomFieldTooltip, {
|
|
5315
|
+
}), jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
5275
5316
|
title: tooltipTitle,
|
|
5276
5317
|
children: jsxRuntime.jsxs("div", {
|
|
5277
5318
|
children: [jsxRuntime.jsx(uiKit.AccessibleHidden, {
|
|
@@ -5303,7 +5344,7 @@ function ReferenceSearch(props) {
|
|
|
5303
5344
|
});
|
|
5304
5345
|
}
|
|
5305
5346
|
|
|
5306
|
-
const messages$
|
|
5347
|
+
const messages$G = reactIntl.defineMessages({
|
|
5307
5348
|
placeholder: {
|
|
5308
5349
|
id: 'CartDiscountReferenceSearch.placeholder',
|
|
5309
5350
|
description: 'Placeholder for search for a cart discount',
|
|
@@ -5330,6 +5371,7 @@ const messages$B = reactIntl.defineMessages({
|
|
|
5330
5371
|
defaultMessage: 'Enter search term'
|
|
5331
5372
|
}
|
|
5332
5373
|
});
|
|
5374
|
+
var messages$H = messages$G;
|
|
5333
5375
|
|
|
5334
5376
|
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; }
|
|
5335
5377
|
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; }
|
|
@@ -5354,7 +5396,7 @@ function Option$1(props) {
|
|
|
5354
5396
|
fallbackOrder: languages
|
|
5355
5397
|
})
|
|
5356
5398
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
5357
|
-
children: [formatMessage(messages$
|
|
5399
|
+
children: [formatMessage(messages$H.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
|
|
5358
5400
|
})]
|
|
5359
5401
|
})
|
|
5360
5402
|
}));
|
|
@@ -5430,10 +5472,10 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5430
5472
|
onBlur: props.onBlur,
|
|
5431
5473
|
onChange: props.onChange,
|
|
5432
5474
|
value: returnNullIfEmpty(props.value),
|
|
5433
|
-
placeholderLabel: formatMessage(messages$
|
|
5434
|
-
searchPromptLabel: formatMessage(messages$
|
|
5435
|
-
noResultsLabel: formatMessage(messages$
|
|
5436
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5475
|
+
placeholderLabel: formatMessage(messages$H.placeholder),
|
|
5476
|
+
searchPromptLabel: formatMessage(messages$H.searchPrompt),
|
|
5477
|
+
noResultsLabel: formatMessage(messages$H.noResults),
|
|
5478
|
+
referenceIsMissingLabel: formatMessage(messages$H.isMissing),
|
|
5437
5479
|
mapItemToOption: mapItemToOption,
|
|
5438
5480
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5439
5481
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5443,7 +5485,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5443
5485
|
});
|
|
5444
5486
|
}
|
|
5445
5487
|
|
|
5446
|
-
const messages$
|
|
5488
|
+
const messages$E = reactIntl.defineMessages({
|
|
5447
5489
|
placeholder: {
|
|
5448
5490
|
id: 'CategoryReferenceSearch.placeholder',
|
|
5449
5491
|
description: 'Placeholder for search for a category',
|
|
@@ -5475,6 +5517,7 @@ const messages$A = reactIntl.defineMessages({
|
|
|
5475
5517
|
defaultMessage: 'Parent Category'
|
|
5476
5518
|
}
|
|
5477
5519
|
});
|
|
5520
|
+
var messages$F = messages$E;
|
|
5478
5521
|
|
|
5479
5522
|
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; }
|
|
5480
5523
|
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; }
|
|
@@ -5499,7 +5542,7 @@ function Option(props) {
|
|
|
5499
5542
|
fallbackOrder: languages
|
|
5500
5543
|
})
|
|
5501
5544
|
}), category.parent && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5502
|
-
children: `${formatMessage(messages$
|
|
5545
|
+
children: `${formatMessage(messages$F.parentCategory)}: ${l10n.formatLocalizedString(category.parent, {
|
|
5503
5546
|
key: 'name',
|
|
5504
5547
|
locale: language,
|
|
5505
5548
|
fallbackOrder: languages
|
|
@@ -5511,7 +5554,7 @@ function Option(props) {
|
|
|
5511
5554
|
fallbackOrder: languages
|
|
5512
5555
|
})}`
|
|
5513
5556
|
}), category.externalId && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5514
|
-
children: `${formatMessage(messages$
|
|
5557
|
+
children: `${formatMessage(messages$F.externalId)}: ${category.externalId || constants.NO_VALUE_FALLBACK}`
|
|
5515
5558
|
})]
|
|
5516
5559
|
})
|
|
5517
5560
|
}));
|
|
@@ -5559,10 +5602,10 @@ function CategoryReferenceSearch(props) {
|
|
|
5559
5602
|
onBlur: props.onBlur,
|
|
5560
5603
|
onChange: props.onChange,
|
|
5561
5604
|
value: props.value,
|
|
5562
|
-
placeholderLabel: formatMessage(messages$
|
|
5563
|
-
searchPromptLabel: formatMessage(messages$
|
|
5564
|
-
noResultsLabel: formatMessage(messages$
|
|
5565
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5605
|
+
placeholderLabel: formatMessage(messages$F.placeholder),
|
|
5606
|
+
searchPromptLabel: formatMessage(messages$F.searchPrompt),
|
|
5607
|
+
noResultsLabel: formatMessage(messages$F.noResults),
|
|
5608
|
+
referenceIsMissingLabel: formatMessage(messages$F.isMissing),
|
|
5566
5609
|
mapItemToOption: mapItemToOption,
|
|
5567
5610
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5568
5611
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5636,8 +5679,9 @@ Button.displayName = 'Button';
|
|
|
5636
5679
|
Button.defaultProps = {
|
|
5637
5680
|
type: 'button'
|
|
5638
5681
|
};
|
|
5682
|
+
var Button$1 = Button;
|
|
5639
5683
|
|
|
5640
|
-
var messages$
|
|
5684
|
+
var messages$D = reactIntl.defineMessages({
|
|
5641
5685
|
chooseFile: {
|
|
5642
5686
|
id: 'ButtonFileInput.chooseFile',
|
|
5643
5687
|
description: 'The label text of the field for upload local file',
|
|
@@ -5666,12 +5710,13 @@ const FileInput = props => jsxRuntime.jsx("label", {
|
|
|
5666
5710
|
});
|
|
5667
5711
|
FileInput.displayName = 'FileInput';
|
|
5668
5712
|
FileInput.defaultProps = {
|
|
5669
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Y({}, messages$
|
|
5713
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Y({}, messages$D.chooseFile)),
|
|
5670
5714
|
allowMultiple: false,
|
|
5671
5715
|
acceptTypes: 'image/png,image/jpeg,image/gif'
|
|
5672
5716
|
};
|
|
5717
|
+
var FileInput$1 = FileInput;
|
|
5673
5718
|
|
|
5674
|
-
var messages$
|
|
5719
|
+
var messages$C = reactIntl.defineMessages({
|
|
5675
5720
|
countriesBasicSelectPlaceholder: {
|
|
5676
5721
|
id: 'CountriesPicker.countriesBasicSelectPlaceholder',
|
|
5677
5722
|
description: 'Placeholder of the basic field for countries',
|
|
@@ -5692,7 +5737,7 @@ var messages$y = reactIntl.defineMessages({
|
|
|
5692
5737
|
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; }
|
|
5693
5738
|
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; }
|
|
5694
5739
|
const emptyCountryOption = intl => [{
|
|
5695
|
-
label: intl.formatMessage(messages$
|
|
5740
|
+
label: intl.formatMessage(messages$C.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
5696
5741
|
value: undefined,
|
|
5697
5742
|
isDisabled: true
|
|
5698
5743
|
}];
|
|
@@ -5734,7 +5779,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
5734
5779
|
var _context3;
|
|
5735
5780
|
return _findInstanceProperty__default["default"](_context3 = props.options).call(_context3, country => country.value === countryCode);
|
|
5736
5781
|
}),
|
|
5737
|
-
placeholder: intl.formatMessage(messages$
|
|
5782
|
+
placeholder: intl.formatMessage(messages$C.countriesAsyncSelectPlaceholder),
|
|
5738
5783
|
loadOptions: handleLoadOptions,
|
|
5739
5784
|
onChange: onOptionChange,
|
|
5740
5785
|
isDisabled: props.isDisabled,
|
|
@@ -5754,7 +5799,7 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
5754
5799
|
value: props.value,
|
|
5755
5800
|
isRequired: props.isRequired,
|
|
5756
5801
|
description: props.description,
|
|
5757
|
-
placeholder: intl.formatMessage(messages$
|
|
5802
|
+
placeholder: intl.formatMessage(messages$C.countriesBasicSelectPlaceholder),
|
|
5758
5803
|
options: props.options,
|
|
5759
5804
|
onChange: props.onChange,
|
|
5760
5805
|
isDisabled: props.isDisabled,
|
|
@@ -5781,7 +5826,7 @@ CountriesPicker.defaultProps = {
|
|
|
5781
5826
|
hasWarning: false
|
|
5782
5827
|
};
|
|
5783
5828
|
|
|
5784
|
-
var messages$
|
|
5829
|
+
var messages$B = reactIntl.defineMessages({
|
|
5785
5830
|
noCustomerGroupsFound: {
|
|
5786
5831
|
id: 'Prices.CustomerGroupPickerInput.noCustomerGroupsFound',
|
|
5787
5832
|
description: 'The message to display when no customer groups were found',
|
|
@@ -5832,7 +5877,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5832
5877
|
return customerGroup;
|
|
5833
5878
|
}, []);
|
|
5834
5879
|
const prefixSearchFields = React.useMemo(() => ['name', 'key'], []);
|
|
5835
|
-
const loadOptions = useLoadOptions({
|
|
5880
|
+
const loadOptions = useLoadOptions$1({
|
|
5836
5881
|
query: GetCustomerGroupsQuery,
|
|
5837
5882
|
variables,
|
|
5838
5883
|
prefixSearchFields
|
|
@@ -5857,8 +5902,8 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5857
5902
|
setLoadingError(error);
|
|
5858
5903
|
onError(error);
|
|
5859
5904
|
}), [loadOptions, convertCustomerGroupToOption, onError]);
|
|
5860
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
5861
|
-
const _useHandlers = useHandlers(onChange),
|
|
5905
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
5906
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
5862
5907
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
5863
5908
|
handleInternalInputChange = _useHandlers2[0],
|
|
5864
5909
|
handleChange = _useHandlers2[1];
|
|
@@ -5871,18 +5916,18 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5871
5916
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
5872
5917
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
5873
5918
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
5874
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
5919
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$B.noCustomerGroupsFound), [loadingError, formatMessage]);
|
|
5875
5920
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
5876
5921
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
5877
5922
|
max: "scale",
|
|
5878
5923
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
5879
5924
|
scale: "xs",
|
|
5880
|
-
children: [jsxRuntime.jsx(CustomFieldTooltip, {
|
|
5925
|
+
children: [jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
5881
5926
|
title: tooltipTitle,
|
|
5882
5927
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
5883
5928
|
id: name,
|
|
5884
5929
|
name: name,
|
|
5885
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
5930
|
+
placeholder: placeholder ?? formatMessage(messages$B.placeholder),
|
|
5886
5931
|
loadOptions: loadOptionsDebounced,
|
|
5887
5932
|
defaultOptions: true,
|
|
5888
5933
|
showOptionGroupDivider: true,
|
|
@@ -5907,6 +5952,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5907
5952
|
});
|
|
5908
5953
|
};
|
|
5909
5954
|
CustomerGroupPickerInput.displayName = 'CustomerGroupPickerInput';
|
|
5955
|
+
var CustomerGroupPickerInput$1 = CustomerGroupPickerInput;
|
|
5910
5956
|
|
|
5911
5957
|
var styles$e = {
|
|
5912
5958
|
"divider": "divider-module__divider___4-vdy",
|
|
@@ -5977,13 +6023,14 @@ const CustomFieldErrors = props => {
|
|
|
5977
6023
|
const errors = _Array$isArray__default["default"](props.errors) ? mergeSetItemsErrors(props.errors) : props.errors;
|
|
5978
6024
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5979
6025
|
children: [props.isTouched || didFormValidationFail && errors?.missing && jsxRuntime.jsx(_.ErrorMessage, {
|
|
5980
|
-
intlMessage:
|
|
6026
|
+
intlMessage: validationMessages.required
|
|
5981
6027
|
}), props.isTouched || didFormValidationFail && errors?.duplicated && jsxRuntime.jsx(_.ErrorMessage, {
|
|
5982
|
-
intlMessage:
|
|
6028
|
+
intlMessage: validationMessages.unique
|
|
5983
6029
|
})]
|
|
5984
6030
|
});
|
|
5985
6031
|
};
|
|
5986
6032
|
CustomFieldErrors.displayName = 'CustomFieldErrors';
|
|
6033
|
+
var CustomFieldErrors$1 = CustomFieldErrors;
|
|
5987
6034
|
|
|
5988
6035
|
const getType = fieldDefinition => {
|
|
5989
6036
|
const fieldDefinitionType = fieldDefinition.type.name.toLowerCase() === 'set' ? fieldDefinition.type.elementType : fieldDefinition.type;
|
|
@@ -6067,6 +6114,7 @@ const ExpandButton = props => props.totalValues > 1 ? jsxRuntime.jsxs(uiKit.Spac
|
|
|
6067
6114
|
})]
|
|
6068
6115
|
}) : null;
|
|
6069
6116
|
ExpandButton.displayName = 'ExpandButton';
|
|
6117
|
+
var ExpandButton$1 = ExpandButton;
|
|
6070
6118
|
|
|
6071
6119
|
var styles$d = {
|
|
6072
6120
|
"topAlign": "set-buttons-module__topAlign___3AZwc",
|
|
@@ -6095,6 +6143,7 @@ const SetButtons = props => {
|
|
|
6095
6143
|
});
|
|
6096
6144
|
};
|
|
6097
6145
|
SetButtons.displayName = 'SetButtons';
|
|
6146
|
+
var SetButtons$1 = SetButtons;
|
|
6098
6147
|
|
|
6099
6148
|
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; }
|
|
6100
6149
|
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; }
|
|
@@ -6239,7 +6288,7 @@ function CustomInputSet(props) {
|
|
|
6239
6288
|
const fieldValue = internalValue[index];
|
|
6240
6289
|
return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
6241
6290
|
alignItems: areButtonsTopAligned ? 'flex-start' : 'center',
|
|
6242
|
-
children: [jsxRuntime.jsx(CustomFieldInput, {
|
|
6291
|
+
children: [jsxRuntime.jsx(CustomFieldInput$1, {
|
|
6243
6292
|
name: fieldName,
|
|
6244
6293
|
fieldDefinition: itemFieldDefinition,
|
|
6245
6294
|
isDisabled: props.isDisabled,
|
|
@@ -6252,7 +6301,7 @@ function CustomInputSet(props) {
|
|
|
6252
6301
|
WrapperComponent: props.WrapperComponent,
|
|
6253
6302
|
renderWarnings: props.renderWarnings,
|
|
6254
6303
|
handleWarningChange: props.handleWarningChange
|
|
6255
|
-
}), jsxRuntime.jsx(SetButtons, {
|
|
6304
|
+
}), jsxRuntime.jsx(SetButtons$1, {
|
|
6256
6305
|
index: index,
|
|
6257
6306
|
isFirstItem: !isExpanded || index === 0,
|
|
6258
6307
|
onAddItem: addNewItem,
|
|
@@ -6262,7 +6311,7 @@ function CustomInputSet(props) {
|
|
|
6262
6311
|
isTopAligned: areButtonsTopAligned
|
|
6263
6312
|
})]
|
|
6264
6313
|
}, keys[index]);
|
|
6265
|
-
}), jsxRuntime.jsx(ExpandButton, {
|
|
6314
|
+
}), jsxRuntime.jsx(ExpandButton$1, {
|
|
6266
6315
|
totalValues: totalAmount,
|
|
6267
6316
|
isExpanded: isExpanded,
|
|
6268
6317
|
onExpand: toggleExpansion
|
|
@@ -6339,7 +6388,7 @@ function CustomEnumInput(props) {
|
|
|
6339
6388
|
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
6340
6389
|
});
|
|
6341
6390
|
const tooltipTitle = props.value ? _findInstanceProperty__default["default"](options).call(options, option => option.value === props.value)?.label ?? '' : '';
|
|
6342
|
-
return jsxRuntime.jsx(CustomFieldTooltip, {
|
|
6391
|
+
return jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
6343
6392
|
title: tooltipTitle,
|
|
6344
6393
|
children: jsxRuntime.jsx(uiKit.SelectInput, {
|
|
6345
6394
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -6385,7 +6434,7 @@ function CustomLocalizedEnumInput(props) {
|
|
|
6385
6434
|
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
6386
6435
|
});
|
|
6387
6436
|
const tooltipTitle = props.value ? _findInstanceProperty__default["default"](options).call(options, option => option.value === props.value)?.label ?? '' : '';
|
|
6388
|
-
return jsxRuntime.jsx(CustomFieldTooltip, {
|
|
6437
|
+
return jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
6389
6438
|
title: tooltipTitle,
|
|
6390
6439
|
children: jsxRuntime.jsx(uiKit.SelectInput, {
|
|
6391
6440
|
id: props.name,
|
|
@@ -6439,7 +6488,7 @@ function CustomLocalizedTextInput(props) {
|
|
|
6439
6488
|
});
|
|
6440
6489
|
const InputComponent = isMultiLine ? uiKit.LocalizedMultilineTextInput : uiKit.LocalizedTextInput;
|
|
6441
6490
|
const tooltipTitle = isMultiLine ? '' : value ? value[language] ?? '' : '';
|
|
6442
|
-
return jsxRuntime.jsx(CustomFieldTooltip, {
|
|
6491
|
+
return jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
6443
6492
|
title: tooltipTitle,
|
|
6444
6493
|
children: jsxRuntime.jsx(InputComponent, {
|
|
6445
6494
|
id: props.name,
|
|
@@ -6607,9 +6656,10 @@ function useNestedProductType(fieldDefinition) {
|
|
|
6607
6656
|
}
|
|
6608
6657
|
|
|
6609
6658
|
const NestingLevelContext = /*#__PURE__*/React.createContext(0);
|
|
6659
|
+
var NestingLevelContext$1 = NestingLevelContext;
|
|
6610
6660
|
|
|
6611
6661
|
// eslint-disable-next-line import/prefer-default-export
|
|
6612
|
-
const messages$
|
|
6662
|
+
const messages$A = reactIntl.defineMessages({
|
|
6613
6663
|
aboveFifthLevelWarning: {
|
|
6614
6664
|
id: 'attributeInputByType.nestedAttributes.aboveFifthLevelWarning',
|
|
6615
6665
|
description: 'Warning message shown when nested attribute are above the fifth level',
|
|
@@ -6621,8 +6671,9 @@ const messages$w = reactIntl.defineMessages({
|
|
|
6621
6671
|
defaultMessage: 'Empty'
|
|
6622
6672
|
}
|
|
6623
6673
|
});
|
|
6674
|
+
var customFieldsMessages = messages$A;
|
|
6624
6675
|
|
|
6625
|
-
var messages$
|
|
6676
|
+
var messages$z = reactIntl.defineMessages({
|
|
6626
6677
|
updateButton: {
|
|
6627
6678
|
id: 'NestedAttributes.Details.updateButton',
|
|
6628
6679
|
description: 'Update button label',
|
|
@@ -6707,7 +6758,7 @@ const EditButton = props => {
|
|
|
6707
6758
|
formatMessage = _useIntl.formatMessage;
|
|
6708
6759
|
return jsxRuntime.jsx(uiKit.Tooltip, {
|
|
6709
6760
|
placement: "top",
|
|
6710
|
-
title: formatMessage(messages$
|
|
6761
|
+
title: formatMessage(messages$z.editTooltip),
|
|
6711
6762
|
children: jsxRuntime.jsx(uiKit.IconButton, {
|
|
6712
6763
|
label: "Edit",
|
|
6713
6764
|
isDisabled: props.isDisabled,
|
|
@@ -6723,12 +6774,12 @@ const DropChangesConfirmation = props => {
|
|
|
6723
6774
|
formatMessage = _useIntl2.formatMessage;
|
|
6724
6775
|
return jsxRuntime.jsx(applicationComponents.ConfirmationDialog, {
|
|
6725
6776
|
isOpen: props.isOpen || false,
|
|
6726
|
-
title: formatMessage(messages$
|
|
6727
|
-
labelPrimary: formatMessage(messages$
|
|
6777
|
+
title: formatMessage(messages$z.confirmationDialogTitle),
|
|
6778
|
+
labelPrimary: formatMessage(messages$z.nestedAttributesConfirmLabel),
|
|
6728
6779
|
onConfirm: props.onConfirm,
|
|
6729
6780
|
onCancel: props.onCancel,
|
|
6730
6781
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6731
|
-
intlMessage: messages$
|
|
6782
|
+
intlMessage: messages$z.confirmationDialogBody
|
|
6732
6783
|
})
|
|
6733
6784
|
});
|
|
6734
6785
|
};
|
|
@@ -6753,11 +6804,11 @@ const NestedAttributeModalPage = props => {
|
|
|
6753
6804
|
children: [jsxRuntime.jsx(uiKit.SecondaryButton, {
|
|
6754
6805
|
isDisabled: !formik$1.dirty,
|
|
6755
6806
|
iconLeft: jsxRuntime.jsx(uiKit.RevertIcon, {}),
|
|
6756
|
-
label: formatMessage(messages$
|
|
6807
|
+
label: formatMessage(messages$z.cancelButton),
|
|
6757
6808
|
onClick: formik$1.resetForm
|
|
6758
6809
|
}), jsxRuntime.jsx(applicationComponents.CustomFormModalPage.FormPrimaryButton, {
|
|
6759
6810
|
isDisabled: !formik$1.dirty,
|
|
6760
|
-
label: formatMessage(messages$
|
|
6811
|
+
label: formatMessage(messages$z.updateButton),
|
|
6761
6812
|
onClick: formik$1.handleSubmit
|
|
6762
6813
|
})]
|
|
6763
6814
|
}),
|
|
@@ -6787,19 +6838,19 @@ NestedAttributeModalPage.displayName = 'NestedAttributeModalPage';
|
|
|
6787
6838
|
const MaxNestingLevelReached = () => jsxRuntime.jsx(uiKit.FieldLabel, {
|
|
6788
6839
|
title: "",
|
|
6789
6840
|
hint: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6790
|
-
intlMessage:
|
|
6841
|
+
intlMessage: customFieldsMessages.aboveFifthLevelWarning
|
|
6791
6842
|
}),
|
|
6792
6843
|
hintIcon: jsxRuntime.jsx(uiKit.WarningIcon, {})
|
|
6793
6844
|
});
|
|
6794
6845
|
MaxNestingLevelReached.displayName = 'MaxNestingLevelReached';
|
|
6795
6846
|
const NestedInputControls = props => {
|
|
6796
|
-
const nextNestingLevel = React.useContext(NestingLevelContext);
|
|
6847
|
+
const nextNestingLevel = React.useContext(NestingLevelContext$1);
|
|
6797
6848
|
const _useIntl4 = reactIntl.useIntl(),
|
|
6798
6849
|
formatMessage = _useIntl4.formatMessage;
|
|
6799
6850
|
if (nextNestingLevel >= 6) return jsxRuntime.jsx(MaxNestingLevelReached, {});
|
|
6800
6851
|
const hasAttributes = props.productType.attributeDefinitions.length > 0;
|
|
6801
6852
|
if (!hasAttributes) return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6802
|
-
intlMessage: messages$
|
|
6853
|
+
intlMessage: messages$z.emptyProductType,
|
|
6803
6854
|
tone: "secondary"
|
|
6804
6855
|
});
|
|
6805
6856
|
return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
@@ -6813,7 +6864,7 @@ const NestedInputControls = props => {
|
|
|
6813
6864
|
children: props.productType.name
|
|
6814
6865
|
}), props.isEmpty && jsxRuntime.jsx("span", {
|
|
6815
6866
|
children: jsxRuntime.jsx(uiKit.Tag, {
|
|
6816
|
-
children: formatMessage(
|
|
6867
|
+
children: formatMessage(customFieldsMessages.emptySetItem)
|
|
6817
6868
|
})
|
|
6818
6869
|
})]
|
|
6819
6870
|
}), jsxRuntime.jsx(EditButton, {
|
|
@@ -6835,7 +6886,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
6835
6886
|
const parentFormik = formik.useFormikContext();
|
|
6836
6887
|
const showNotification = actionsGlobal.useShowNotification();
|
|
6837
6888
|
const attributesForm = applicationComponents.useModalState();
|
|
6838
|
-
const nestingLevel = React.useContext(NestingLevelContext);
|
|
6889
|
+
const nestingLevel = React.useContext(NestingLevelContext$1);
|
|
6839
6890
|
const _useNestedProductType = useNestedProductType(props.fieldDefinition),
|
|
6840
6891
|
productType = _useNestedProductType.productType;
|
|
6841
6892
|
if (!productType) return null;
|
|
@@ -6864,7 +6915,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
6864
6915
|
max: "scale",
|
|
6865
6916
|
children: jsxRuntime.jsx("div", {
|
|
6866
6917
|
"data-testid": props.name,
|
|
6867
|
-
children: jsxRuntime.jsx(NestingLevelContext.Provider, {
|
|
6918
|
+
children: jsxRuntime.jsx(NestingLevelContext$1.Provider, {
|
|
6868
6919
|
value: nestingLevel + 1,
|
|
6869
6920
|
children: jsxRuntime.jsx(formik.Formik, {
|
|
6870
6921
|
enableReinitialize: true,
|
|
@@ -6875,7 +6926,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
6875
6926
|
if (nestingLevel !== 0) parentFormik.submitForm();else showNotification({
|
|
6876
6927
|
kind: 'success',
|
|
6877
6928
|
domain: constants.DOMAINS.SIDE,
|
|
6878
|
-
text: formatMessage(messages$
|
|
6929
|
+
text: formatMessage(messages$z.attributeUpdateSucceeded)
|
|
6879
6930
|
});
|
|
6880
6931
|
setSubmitting(false);
|
|
6881
6932
|
},
|
|
@@ -6901,6 +6952,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
6901
6952
|
});
|
|
6902
6953
|
});
|
|
6903
6954
|
CustomNestedInput.displayName = 'CustomNestedInput';
|
|
6955
|
+
var CustomNestedInput$1 = CustomNestedInput;
|
|
6904
6956
|
|
|
6905
6957
|
function CustomNumberInput(props) {
|
|
6906
6958
|
const value = props.value ?? '';
|
|
@@ -6978,7 +7030,7 @@ CustomCategoryReferenceInput.displayName = 'CustomCategoryReferenceInput';
|
|
|
6978
7030
|
|
|
6979
7031
|
function CustomChannelReferenceInput(props) {
|
|
6980
7032
|
const value = props.value?.id || '';
|
|
6981
|
-
return jsxRuntime.jsx(ChannelPickerInput, {
|
|
7033
|
+
return jsxRuntime.jsx(ChannelPickerInput$1, {
|
|
6982
7034
|
value: value,
|
|
6983
7035
|
name: props.name,
|
|
6984
7036
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -6993,7 +7045,7 @@ function CustomChannelReferenceInput(props) {
|
|
|
6993
7045
|
}
|
|
6994
7046
|
CustomChannelReferenceInput.displayName = 'CustomChannelReferenceInput';
|
|
6995
7047
|
|
|
6996
|
-
var messages$
|
|
7048
|
+
var messages$y = reactIntl.defineMessages({
|
|
6997
7049
|
noProductsFound: {
|
|
6998
7050
|
id: 'Shared.ProductPickerInput.noProductsFound',
|
|
6999
7051
|
description: 'The message to display when no products were found',
|
|
@@ -7046,7 +7098,7 @@ const ProductPickerInput = _ref => {
|
|
|
7046
7098
|
};
|
|
7047
7099
|
}, [formatLocalizedFieldToString]);
|
|
7048
7100
|
const prefixSearchFields = React.useMemo(() => [`masterData.current.name.${dataLocale}`, 'key'], [dataLocale]);
|
|
7049
|
-
const loadOptions = useLoadOptions({
|
|
7101
|
+
const loadOptions = useLoadOptions$1({
|
|
7050
7102
|
query: GetProductsQuery,
|
|
7051
7103
|
prefixSearchFields
|
|
7052
7104
|
});
|
|
@@ -7067,8 +7119,8 @@ const ProductPickerInput = _ref => {
|
|
|
7067
7119
|
setLoadingError(error);
|
|
7068
7120
|
onError(error);
|
|
7069
7121
|
}), [loadOptions, onError, convertProductToOption]);
|
|
7070
|
-
const loadOptionsDebounced = useDebouncedPromiseCallback(handleLoadOptions, 300);
|
|
7071
|
-
const _useHandlers = useHandlers(onChange),
|
|
7122
|
+
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
7123
|
+
const _useHandlers = useHandlers$1(onChange),
|
|
7072
7124
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
7073
7125
|
handleInternalInputChange = _useHandlers2[0],
|
|
7074
7126
|
handleChange = _useHandlers2[1];
|
|
@@ -7084,14 +7136,14 @@ const ProductPickerInput = _ref => {
|
|
|
7084
7136
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
7085
7137
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
7086
7138
|
max: "scale",
|
|
7087
|
-
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
7139
|
+
children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner$1, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
7088
7140
|
scale: "xs",
|
|
7089
|
-
children: [jsxRuntime.jsx(CustomFieldTooltip, {
|
|
7141
|
+
children: [jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
7090
7142
|
title: tooltipTitle,
|
|
7091
7143
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
7092
7144
|
id: name,
|
|
7093
7145
|
name: name,
|
|
7094
|
-
placeholder: formatMessage(messages$
|
|
7146
|
+
placeholder: formatMessage(messages$y.placeholder),
|
|
7095
7147
|
loadOptions: loadOptionsDebounced,
|
|
7096
7148
|
defaultOptions: [],
|
|
7097
7149
|
isClearable: isClearable,
|
|
@@ -7105,7 +7157,7 @@ const ProductPickerInput = _ref => {
|
|
|
7105
7157
|
onInputChange: handleInputChange,
|
|
7106
7158
|
onBlur: onBlur,
|
|
7107
7159
|
value: currentOption.data,
|
|
7108
|
-
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$
|
|
7160
|
+
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$y.noProductsFound),
|
|
7109
7161
|
hasError: hasError || isLoadingFailed,
|
|
7110
7162
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
7111
7163
|
menuPortalTarget: document.body,
|
|
@@ -7119,10 +7171,11 @@ const ProductPickerInput = _ref => {
|
|
|
7119
7171
|
});
|
|
7120
7172
|
};
|
|
7121
7173
|
ProductPickerInput.displayName = 'ProductPickerInput';
|
|
7174
|
+
var ProductPickerInput$1 = ProductPickerInput;
|
|
7122
7175
|
|
|
7123
7176
|
function CustomProductReferenceInput(props) {
|
|
7124
7177
|
const value = props.value?.id || '';
|
|
7125
|
-
return jsxRuntime.jsx(ProductPickerInput, {
|
|
7178
|
+
return jsxRuntime.jsx(ProductPickerInput$1, {
|
|
7126
7179
|
value: value,
|
|
7127
7180
|
name: props.name,
|
|
7128
7181
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -7140,7 +7193,7 @@ CustomProductReferenceInput.displayName = 'CustomProductReferenceInput';
|
|
|
7140
7193
|
|
|
7141
7194
|
function CustomProductTypeReferenceInput(props) {
|
|
7142
7195
|
const value = props.value?.id || '';
|
|
7143
|
-
return jsxRuntime.jsx(ProductTypePickerInput, {
|
|
7196
|
+
return jsxRuntime.jsx(ProductTypePickerInput$1, {
|
|
7144
7197
|
value: value,
|
|
7145
7198
|
name: props.name,
|
|
7146
7199
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -7157,7 +7210,7 @@ CustomProductTypeReferenceInput.displayName = 'CustomProductTypeReferenceInput';
|
|
|
7157
7210
|
|
|
7158
7211
|
function CustomRawIdReferenceInput(props) {
|
|
7159
7212
|
const value = props.value?.id || '';
|
|
7160
|
-
return jsxRuntime.jsx(CustomFieldTooltip, {
|
|
7213
|
+
return jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
7161
7214
|
title: value,
|
|
7162
7215
|
children: jsxRuntime.jsx(uiKit.TextInput, {
|
|
7163
7216
|
id: props.name,
|
|
@@ -7175,7 +7228,7 @@ CustomRawIdReferenceInput.displayName = 'CustomRawIdReferenceInput';
|
|
|
7175
7228
|
|
|
7176
7229
|
function CustomStateReferenceInput(props) {
|
|
7177
7230
|
const value = props.value?.id || '';
|
|
7178
|
-
return jsxRuntime.jsx(StatePickerInput, {
|
|
7231
|
+
return jsxRuntime.jsx(StatePickerInput$1, {
|
|
7179
7232
|
value: value,
|
|
7180
7233
|
name: props.name,
|
|
7181
7234
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -7227,7 +7280,7 @@ function CustomTextInput(props) {
|
|
|
7227
7280
|
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
7228
7281
|
});
|
|
7229
7282
|
const tooltipValue = isMultiLine ? '' : value;
|
|
7230
|
-
return jsxRuntime.jsx(CustomFieldTooltip, {
|
|
7283
|
+
return jsxRuntime.jsx(CustomFieldTooltip$1, {
|
|
7231
7284
|
title: tooltipValue,
|
|
7232
7285
|
children: jsxRuntime.jsx(InputComponent, {
|
|
7233
7286
|
id: props.name,
|
|
@@ -7306,7 +7359,7 @@ const nonSetComponents = {
|
|
|
7306
7359
|
[CUSTOM_FIELD_TYPES.time]: CustomTimeInput,
|
|
7307
7360
|
[CUSTOM_FIELD_TYPES.datetime]: CustomDateTimeInput,
|
|
7308
7361
|
[CUSTOM_FIELD_TYPES.date]: CustomDateTimeInput,
|
|
7309
|
-
[CUSTOM_FIELD_TYPES.nested]: CustomNestedInput
|
|
7362
|
+
[CUSTOM_FIELD_TYPES.nested]: CustomNestedInput$1
|
|
7310
7363
|
};
|
|
7311
7364
|
const CustomFieldInput = /*#__PURE__*/React.memo(props => {
|
|
7312
7365
|
const InputComponent = React.useMemo(() => {
|
|
@@ -7339,8 +7392,9 @@ const CustomFieldInput = /*#__PURE__*/React.memo(props => {
|
|
|
7339
7392
|
});
|
|
7340
7393
|
});
|
|
7341
7394
|
CustomFieldInput.displayName = 'CustomFieldInput';
|
|
7395
|
+
var CustomFieldInput$1 = CustomFieldInput;
|
|
7342
7396
|
|
|
7343
|
-
var messages$
|
|
7397
|
+
var messages$x = reactIntl.defineMessages({
|
|
7344
7398
|
productReferenceLabel: {
|
|
7345
7399
|
id: 'CustomFieldsLabel.productReferenceLabel',
|
|
7346
7400
|
description: 'Label shown above the product picker input.',
|
|
@@ -7409,7 +7463,7 @@ const CustomFieldsLabelHint = _ref2 => {
|
|
|
7409
7463
|
children: [jsxRuntime.jsx(uiKit.WarningIcon, {
|
|
7410
7464
|
size: "medium",
|
|
7411
7465
|
color: "warning"
|
|
7412
|
-
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$P({}, messages$
|
|
7466
|
+
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$P({}, messages$x.cartDiscountMoreThan500))]
|
|
7413
7467
|
});
|
|
7414
7468
|
}
|
|
7415
7469
|
return l10n.formatLocalizedString(fieldDefinition, {
|
|
@@ -7423,8 +7477,8 @@ function CustomFieldsProductTypeReferenceSubtitle() {
|
|
|
7423
7477
|
formatMessage = _useIntl.formatMessage;
|
|
7424
7478
|
const _usePimStatus = usePimStatus(),
|
|
7425
7479
|
isProjectIndexed = _usePimStatus.isProjectIndexed;
|
|
7426
|
-
if (isProjectIndexed) return formatMessage(messages$
|
|
7427
|
-
return formatMessage(messages$
|
|
7480
|
+
if (isProjectIndexed) return formatMessage(messages$x.productTypeReferenceLabelI);
|
|
7481
|
+
return formatMessage(messages$x.productTypeReferenceLabel);
|
|
7428
7482
|
}
|
|
7429
7483
|
|
|
7430
7484
|
// TODO(pa3): this logic may be misplaced and probably
|
|
@@ -7440,7 +7494,7 @@ function CustomFieldsLabelSubtitle(_ref3) {
|
|
|
7440
7494
|
const referenceTypeId = type.referenceTypeId;
|
|
7441
7495
|
const referenceTypeName = capitalizeFirst(referenceTypeId);
|
|
7442
7496
|
if (_includesInstanceProperty__default["default"](_context = [SEARCHABLE_REFERENCES.category, SEARCHABLE_REFERENCES.cartDiscount]).call(_context, referenceTypeId)) return referenceTypeName;
|
|
7443
|
-
return referenceTypeId === SEARCHABLE_REFERENCES.product ? formatMessage(messages$
|
|
7497
|
+
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`;
|
|
7444
7498
|
}
|
|
7445
7499
|
const Portal = props => /*#__PURE__*/ReactDOM__default["default"].createPortal(props.children, document.body);
|
|
7446
7500
|
var _ref$1 = process.env.NODE_ENV === "production" ? {
|
|
@@ -7458,7 +7512,7 @@ function CustomFieldsCountIndicator(_ref4) {
|
|
|
7458
7512
|
const _useIntl3 = reactIntl.useIntl(),
|
|
7459
7513
|
formatMessage = _useIntl3.formatMessage;
|
|
7460
7514
|
return assignedAttributeGroups?.length > 1 ? jsxRuntime.jsx(uiKit.Tooltip, {
|
|
7461
|
-
title: formatMessage(messages$
|
|
7515
|
+
title: formatMessage(messages$x.attributeGroupCountTooltip, {
|
|
7462
7516
|
attributeGroups: _mapInstanceProperty__default["default"](assignedAttributeGroups).call(assignedAttributeGroups, assignedAttributeGroup => formatLocalizedField(assignedAttributeGroup.nameAllLocales)).join(', '),
|
|
7463
7517
|
count: assignedAttributeGroups.length
|
|
7464
7518
|
}),
|
|
@@ -7513,8 +7567,9 @@ const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref5 => {
|
|
|
7513
7567
|
});
|
|
7514
7568
|
});
|
|
7515
7569
|
CustomFieldsLabel.displayName = 'CustomFieldsTitle';
|
|
7570
|
+
var CustomFieldsLabel$1 = CustomFieldsLabel;
|
|
7516
7571
|
|
|
7517
|
-
var messages$
|
|
7572
|
+
var messages$w = reactIntl.defineMessages({
|
|
7518
7573
|
referencedProductType: {
|
|
7519
7574
|
id: 'NestedAttributes.referencedProductType',
|
|
7520
7575
|
description: 'Product type referenced hint',
|
|
@@ -7525,7 +7580,7 @@ var messages$s = reactIntl.defineMessages({
|
|
|
7525
7580
|
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; }
|
|
7526
7581
|
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; }
|
|
7527
7582
|
function ProductTypeReference(props) {
|
|
7528
|
-
const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$
|
|
7583
|
+
const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$w.referencedProductType), {}, {
|
|
7529
7584
|
values: {
|
|
7530
7585
|
productTypeName: props.productType.name
|
|
7531
7586
|
}
|
|
@@ -7553,7 +7608,7 @@ function CustomNestedFieldInput(props) {
|
|
|
7553
7608
|
})]
|
|
7554
7609
|
});
|
|
7555
7610
|
if (!productType) return null;
|
|
7556
|
-
const InputComponent = isSet ? CustomInputSet : CustomNestedInput;
|
|
7611
|
+
const InputComponent = isSet ? CustomInputSet : CustomNestedInput$1;
|
|
7557
7612
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7558
7613
|
children: [jsxRuntime.jsx(ProductTypeReference, {
|
|
7559
7614
|
productType: productType
|
|
@@ -7777,7 +7832,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7777
7832
|
};
|
|
7778
7833
|
return undefined;
|
|
7779
7834
|
};
|
|
7780
|
-
const FieldComponent = isNested(fieldDefinition) ? CustomNestedFieldInput : CustomFieldInput;
|
|
7835
|
+
const FieldComponent = isNested(fieldDefinition) ? CustomNestedFieldInput : CustomFieldInput$1;
|
|
7781
7836
|
const fieldProps = {
|
|
7782
7837
|
name: fieldName,
|
|
7783
7838
|
value: value,
|
|
@@ -7805,7 +7860,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7805
7860
|
"aria-invalid": _Object$keys__default["default"](fieldErrors ?? {}).length > 0,
|
|
7806
7861
|
"aria-errormessage": `${fieldName}-error`,
|
|
7807
7862
|
id: `${fieldName}-error`,
|
|
7808
|
-
children: [jsxRuntime.jsx(CustomFieldsLabel, {
|
|
7863
|
+
children: [jsxRuntime.jsx(CustomFieldsLabel$1, {
|
|
7809
7864
|
name: fieldName,
|
|
7810
7865
|
fieldDefinition: fieldDefinition
|
|
7811
7866
|
}), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
@@ -7813,7 +7868,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7813
7868
|
alignItems: "stretch",
|
|
7814
7869
|
children: [WrapperComponent ? jsxRuntime.jsx(WrapperComponent, {
|
|
7815
7870
|
children: Field
|
|
7816
|
-
}) : Field, props.renderWarnings && status?.warnings[fieldName] && props.renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors, {
|
|
7871
|
+
}) : Field, props.renderWarnings && status?.warnings[fieldName] && props.renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors$1, {
|
|
7817
7872
|
isTouched: isTouched,
|
|
7818
7873
|
errors: fieldErrors
|
|
7819
7874
|
})]
|
|
@@ -7829,6 +7884,7 @@ CustomFieldsInternal.displayName = 'CustomFieldsInternal';
|
|
|
7829
7884
|
CustomFieldsInternal.defaultProps = {
|
|
7830
7885
|
renderCustomWarnings: () => null
|
|
7831
7886
|
};
|
|
7887
|
+
var CustomFieldsInternal$1 = CustomFieldsInternal;
|
|
7832
7888
|
|
|
7833
7889
|
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; }
|
|
7834
7890
|
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; }
|
|
@@ -7924,7 +7980,7 @@ function ProductAttributes(_ref) {
|
|
|
7924
7980
|
max: "scale",
|
|
7925
7981
|
children: jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
7926
7982
|
scale: "xl",
|
|
7927
|
-
children: jsxRuntime.jsx(CustomFieldsInternal, {
|
|
7983
|
+
children: jsxRuntime.jsx(CustomFieldsInternal$1, {
|
|
7928
7984
|
name: props.name,
|
|
7929
7985
|
isReadOnly: props.isReadOnly,
|
|
7930
7986
|
isDisabled: props.isDisabled,
|
|
@@ -7959,7 +8015,7 @@ function ProductAttributeInput(props) {
|
|
|
7959
8015
|
// Just don't want to go with another several-weeks long refactoring and
|
|
7960
8016
|
// will address this step by step.
|
|
7961
8017
|
return jsxRuntime.jsx(formik.Formik, {
|
|
7962
|
-
children: jsxRuntime.jsx(CustomFieldInput, {
|
|
8018
|
+
children: jsxRuntime.jsx(CustomFieldInput$1, {
|
|
7963
8019
|
value: value,
|
|
7964
8020
|
name: props.name,
|
|
7965
8021
|
isDisabled: props.isDisabled,
|
|
@@ -8045,7 +8101,7 @@ const emptyStoreOption$1 = intl => [{
|
|
|
8045
8101
|
function ProductSelectionsAsyncSelectDropdown(props) {
|
|
8046
8102
|
const intl = reactIntl.useIntl();
|
|
8047
8103
|
const enableExcludingProducts = applicationShell.useFeatureToggle(EXCLUDING_PRODUCTS);
|
|
8048
|
-
const productSelectionsFetcher = useProductSelectionsFetcher({
|
|
8104
|
+
const productSelectionsFetcher = useProductSelectionsFetcher$1({
|
|
8049
8105
|
limit: props.upperProductSelectionsLimit
|
|
8050
8106
|
});
|
|
8051
8107
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -8101,7 +8157,7 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
8101
8157
|
options: emptyStoreOption$1(intl)
|
|
8102
8158
|
}];
|
|
8103
8159
|
};
|
|
8104
|
-
if (productSelectionsFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8160
|
+
if (productSelectionsFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8105
8161
|
return jsxRuntime.jsx(uiKit.AsyncSelectField, {
|
|
8106
8162
|
id: props.id,
|
|
8107
8163
|
name: props.name,
|
|
@@ -8161,7 +8217,7 @@ const mapProductSelectionsToOptions$1 = memoize__default["default"](function ()
|
|
|
8161
8217
|
function ProductSelectionBasicSelectDropdown(props) {
|
|
8162
8218
|
const intl = reactIntl.useIntl();
|
|
8163
8219
|
const enableExcludingProducts = applicationShell.useFeatureToggle(EXCLUDING_PRODUCTS);
|
|
8164
|
-
const productSelectionsFetcher = useProductSelectionsFetcher({
|
|
8220
|
+
const productSelectionsFetcher = useProductSelectionsFetcher$1({
|
|
8165
8221
|
limit: props.lowerProductSelectionsLimit
|
|
8166
8222
|
});
|
|
8167
8223
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -8170,7 +8226,7 @@ function ProductSelectionBasicSelectDropdown(props) {
|
|
|
8170
8226
|
})),
|
|
8171
8227
|
projectLanguages = _useApplicationContex.projectLanguages,
|
|
8172
8228
|
dataLocale = _useApplicationContex.dataLocale;
|
|
8173
|
-
if (productSelectionsFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8229
|
+
if (productSelectionsFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8174
8230
|
const productSelections = productSelectionsFetcher.productSelections?.results ?? [];
|
|
8175
8231
|
const filteredProductSelections = _filterInstanceProperty__default["default"](productSelections).call(productSelections, ps => {
|
|
8176
8232
|
var _context;
|
|
@@ -8229,6 +8285,7 @@ const useProductSelectionsByFieldFetcher = (productSelections, predicateField) =
|
|
|
8229
8285
|
isLoading: productSelectionsQuery.loading
|
|
8230
8286
|
};
|
|
8231
8287
|
};
|
|
8288
|
+
var useProductSelectionsByFieldFetcher$1 = useProductSelectionsByFieldFetcher;
|
|
8232
8289
|
|
|
8233
8290
|
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 } } } };
|
|
8234
8291
|
const mapProductSelectionsToOptions = memoize__default["default"](_ref => {
|
|
@@ -8266,7 +8323,7 @@ const createQueryVariables$3 = _ref3 => {
|
|
|
8266
8323
|
var _context;
|
|
8267
8324
|
let searchText = _ref3.searchText;
|
|
8268
8325
|
const sanitizedSearchText = sanitize(_trimInstanceProperty__default["default"](searchText).call(searchText, searchText));
|
|
8269
|
-
const idQuery = isUUID(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
|
|
8326
|
+
const idQuery = isUUID$1(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
|
|
8270
8327
|
const keyQuery = `key = "${sanitizedSearchText}"`;
|
|
8271
8328
|
const searchTextQuery = _filterInstanceProperty__default["default"](_context = [idQuery, keyQuery]).call(_context, Boolean).join(' or ');
|
|
8272
8329
|
return {
|
|
@@ -8288,7 +8345,7 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
8288
8345
|
})),
|
|
8289
8346
|
projectLanguages = _useApplicationContex.projectLanguages,
|
|
8290
8347
|
dataLocale = _useApplicationContex.dataLocale;
|
|
8291
|
-
const productSelectionsByFieldFetcher = useProductSelectionsByFieldFetcher(props.value, props.renderSelectInputOptionValuesByField);
|
|
8348
|
+
const productSelectionsByFieldFetcher = useProductSelectionsByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField);
|
|
8292
8349
|
const handleLoadOptions = async searchText => {
|
|
8293
8350
|
const _await$client$query = await client$1.query({
|
|
8294
8351
|
query: ProductSelectionsPickerFetcher,
|
|
@@ -8321,7 +8378,7 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
8321
8378
|
const currentProductSelection = _findInstanceProperty__default["default"](productionSelectionResults).call(productionSelectionResults, productSelection => productSelection.id === productSelectionId);
|
|
8322
8379
|
props.onChange(currentProductSelection);
|
|
8323
8380
|
};
|
|
8324
|
-
if (productSelectionsByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8381
|
+
if (productSelectionsByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8325
8382
|
return jsxRuntime.jsx(uiKit.SearchSelectField, {
|
|
8326
8383
|
id: props.id,
|
|
8327
8384
|
name: props.name,
|
|
@@ -8382,7 +8439,7 @@ function ModeSelectInputOption(props) {
|
|
|
8382
8439
|
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; }
|
|
8383
8440
|
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; }
|
|
8384
8441
|
function ProductSelectionsPicker(props) {
|
|
8385
|
-
const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher();
|
|
8442
|
+
const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1();
|
|
8386
8443
|
const components = React.useMemo(() => {
|
|
8387
8444
|
return {
|
|
8388
8445
|
Option: optionInnerProps => {
|
|
@@ -8399,7 +8456,7 @@ function ProductSelectionsPicker(props) {
|
|
|
8399
8456
|
}
|
|
8400
8457
|
};
|
|
8401
8458
|
}, [props.optionType]);
|
|
8402
|
-
if (productSelectionsTotalFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8459
|
+
if (productSelectionsTotalFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8403
8460
|
const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= props.lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= props.upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
|
|
8404
8461
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8405
8462
|
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$F(_objectSpread$F({}, props), {}, {
|
|
@@ -8439,6 +8496,7 @@ const RequiredIndicator = _ref => {
|
|
|
8439
8496
|
});
|
|
8440
8497
|
};
|
|
8441
8498
|
RequiredIndicator.displayName = 'RequiredIndicator';
|
|
8499
|
+
var RequiredIndicator$1 = RequiredIndicator;
|
|
8442
8500
|
|
|
8443
8501
|
const ScrollToFieldError = () => {
|
|
8444
8502
|
const formik$1 = formik.useFormikContext();
|
|
@@ -8474,8 +8532,9 @@ const ScrollToFieldError = () => {
|
|
|
8474
8532
|
}, [dataLocale, isValid, submitCount]);
|
|
8475
8533
|
return null;
|
|
8476
8534
|
};
|
|
8535
|
+
var ScrollToFieldError$1 = ScrollToFieldError;
|
|
8477
8536
|
|
|
8478
|
-
var messages$
|
|
8537
|
+
var messages$v = reactIntl.defineMessages({
|
|
8479
8538
|
buttonLabel: {
|
|
8480
8539
|
id: 'SearchInput.buttonLabel',
|
|
8481
8540
|
description: 'Label for "Search" button.',
|
|
@@ -8529,14 +8588,15 @@ const SelectableFieldSearchInput = props => {
|
|
|
8529
8588
|
});
|
|
8530
8589
|
},
|
|
8531
8590
|
onReset: props.onReset,
|
|
8532
|
-
placeholder: props.placeholder ?? intl.formatMessage(messages$
|
|
8591
|
+
placeholder: props.placeholder ?? intl.formatMessage(messages$v.placeholder),
|
|
8533
8592
|
isDisabled: props.disabled
|
|
8534
8593
|
})
|
|
8535
8594
|
});
|
|
8536
8595
|
};
|
|
8537
8596
|
SelectableFieldSearchInput.displayName = 'SelectableFieldSearchInput';
|
|
8597
|
+
var SelectableFieldSearchInput$1 = SelectableFieldSearchInput;
|
|
8538
8598
|
|
|
8539
|
-
var messages$
|
|
8599
|
+
var messages$u = reactIntl.defineMessages({
|
|
8540
8600
|
basicSelectInputPlaceholder: {
|
|
8541
8601
|
id: 'Shared.StoreSelectInput.basicSelectInputPlaceholder',
|
|
8542
8602
|
description: 'The placeholder shown for basic select input',
|
|
@@ -8639,7 +8699,7 @@ const getValueFromOptions$1 = _ref => {
|
|
|
8639
8699
|
return _findInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, store => currentlySelectedStores === store.value);
|
|
8640
8700
|
};
|
|
8641
8701
|
const emptyStoreOption = intl => [{
|
|
8642
|
-
label: intl.formatMessage(messages$
|
|
8702
|
+
label: intl.formatMessage(messages$u.asyncSelectDropdownTypeAheadPrompt),
|
|
8643
8703
|
value: undefined,
|
|
8644
8704
|
isDisabled: true
|
|
8645
8705
|
}];
|
|
@@ -8652,7 +8712,7 @@ const StoresAsyncSelectInput = props => {
|
|
|
8652
8712
|
dataLocale = _useApplicationContex.dataLocale,
|
|
8653
8713
|
projectLanguages = _useApplicationContex.projectLanguages;
|
|
8654
8714
|
const keysOfStores = props.allAccessibleStoreKeysThroughDataFencePermissions;
|
|
8655
|
-
const storesListFetcher = useStoresListFetcher({
|
|
8715
|
+
const storesListFetcher = useStoresListFetcher$1({
|
|
8656
8716
|
limit: 500,
|
|
8657
8717
|
offset: 0,
|
|
8658
8718
|
sort: 'createdAt asc',
|
|
@@ -8694,12 +8754,12 @@ const StoresAsyncSelectInput = props => {
|
|
|
8694
8754
|
options: emptyStoreOption(intl)
|
|
8695
8755
|
}];
|
|
8696
8756
|
};
|
|
8697
|
-
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8757
|
+
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8698
8758
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8699
8759
|
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$E(_objectSpread$E(_objectSpread$E({
|
|
8700
8760
|
id: props.id,
|
|
8701
8761
|
name: props.name,
|
|
8702
|
-
placeholder: intl.formatMessage(messages$
|
|
8762
|
+
placeholder: intl.formatMessage(messages$u.basicSelectInputPlaceholder),
|
|
8703
8763
|
horizontalConstraint: props.horizontalConstraint,
|
|
8704
8764
|
loadOptions: handleLoadOptions,
|
|
8705
8765
|
defaultOptions: true,
|
|
@@ -8741,6 +8801,7 @@ StoresAsyncSelectInput.displayName = 'StoresAsyncSelectInput';
|
|
|
8741
8801
|
StoresAsyncSelectInput.defaultProps = {
|
|
8742
8802
|
shouldFetchProductSelections: false
|
|
8743
8803
|
};
|
|
8804
|
+
var StoresAsyncSelectInput$1 = StoresAsyncSelectInput;
|
|
8744
8805
|
|
|
8745
8806
|
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; }
|
|
8746
8807
|
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; }
|
|
@@ -8757,7 +8818,7 @@ const StoresBasicSelectInput = props => {
|
|
|
8757
8818
|
dataLocale = _useApplicationContex.dataLocale,
|
|
8758
8819
|
projectLanguages = _useApplicationContex.projectLanguages;
|
|
8759
8820
|
const keysOfStores = props.allAccessibleStoreKeysThroughDataFencePermissions;
|
|
8760
|
-
const storesListFetcher = useStoresListFetcher({
|
|
8821
|
+
const storesListFetcher = useStoresListFetcher$1({
|
|
8761
8822
|
limit: 60,
|
|
8762
8823
|
offset: 0,
|
|
8763
8824
|
sort: 'createdAt asc',
|
|
@@ -8797,12 +8858,12 @@ const StoresBasicSelectInput = props => {
|
|
|
8797
8858
|
});
|
|
8798
8859
|
}
|
|
8799
8860
|
};
|
|
8800
|
-
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
8861
|
+
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8801
8862
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8802
8863
|
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$D(_objectSpread$D(_objectSpread$D({
|
|
8803
8864
|
id: props.id,
|
|
8804
8865
|
name: props.name,
|
|
8805
|
-
placeholder: props.placeholder || intl.formatMessage(messages$
|
|
8866
|
+
placeholder: props.placeholder || intl.formatMessage(messages$u.basicSelectInputPlaceholder),
|
|
8806
8867
|
horizontalConstraint: props.horizontalConstraint,
|
|
8807
8868
|
options: mappedStoresListOptions,
|
|
8808
8869
|
isMulti: props.isMulti,
|
|
@@ -8838,6 +8899,7 @@ StoresBasicSelectInput.displayName = 'StoresBasicSelectInput';
|
|
|
8838
8899
|
StoresBasicSelectInput.defaultProps = {
|
|
8839
8900
|
shouldFetchProductSelections: false
|
|
8840
8901
|
};
|
|
8902
|
+
var StoresBasicSelectInput$1 = StoresBasicSelectInput;
|
|
8841
8903
|
|
|
8842
8904
|
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 } } } };
|
|
8843
8905
|
const useTotalNumberOfStoresFetcher = projectKey => {
|
|
@@ -8853,6 +8915,7 @@ const useTotalNumberOfStoresFetcher = projectKey => {
|
|
|
8853
8915
|
isLoading: totalNumberOfStoresQuery.loading
|
|
8854
8916
|
};
|
|
8855
8917
|
};
|
|
8918
|
+
var useTotalNumberOfStoresFetcher$1 = useTotalNumberOfStoresFetcher;
|
|
8856
8919
|
|
|
8857
8920
|
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 } } } };
|
|
8858
8921
|
const createQueryVariables$2 = (stores, predicateField, shouldFetchProductSelections) => ({
|
|
@@ -8880,6 +8943,7 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
8880
8943
|
isLoading: storesQuery.loading
|
|
8881
8944
|
};
|
|
8882
8945
|
};
|
|
8946
|
+
var useStoresByFieldFetcher$1 = useStoresByFieldFetcher;
|
|
8883
8947
|
|
|
8884
8948
|
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; }
|
|
8885
8949
|
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; }
|
|
@@ -8918,7 +8982,7 @@ const createQueryVariables$1 = _ref => {
|
|
|
8918
8982
|
excludeProductSelections: !shouldFetchProductSelections
|
|
8919
8983
|
};
|
|
8920
8984
|
}
|
|
8921
|
-
const idQuery = isUUID(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
|
|
8985
|
+
const idQuery = isUUID$1(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
|
|
8922
8986
|
const nameQuery = `name(${dataLocale} = "${sanitizedSearchText}")`;
|
|
8923
8987
|
const searchTextQuery = _filterInstanceProperty__default["default"](_context2 = [idQuery, nameQuery, keyQuery]).call(_context2, Boolean).join(' or ');
|
|
8924
8988
|
return {
|
|
@@ -8961,7 +9025,7 @@ const StoresSearchSelectInput = props => {
|
|
|
8961
9025
|
projectLanguages = _useApplicationContex.projectLanguages;
|
|
8962
9026
|
const intl = reactIntl.useIntl();
|
|
8963
9027
|
const client$1 = client.useApolloClient();
|
|
8964
|
-
const storesByFieldFetcher = useStoresByFieldFetcher(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, props.shouldFetchProductSelections);
|
|
9028
|
+
const storesByFieldFetcher = useStoresByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, props.shouldFetchProductSelections);
|
|
8965
9029
|
const hasError = uiKit.AsyncSelectInput.isTouched(props.touched) && hasErrors(props.errors) || props.hasError;
|
|
8966
9030
|
const handleLoadOptions = searchText => {
|
|
8967
9031
|
const extractMatchedStores = client$1.query({
|
|
@@ -9003,16 +9067,16 @@ const StoresSearchSelectInput = props => {
|
|
|
9003
9067
|
className: styles$9.customLabel,
|
|
9004
9068
|
children: props?.renderLabel && props?.renderLabel
|
|
9005
9069
|
}), jsxRuntime.jsx("div", {
|
|
9006
|
-
children: intl.formatMessage(inputValue ? messages$
|
|
9070
|
+
children: intl.formatMessage(inputValue ? messages$u.searchSelectInputNoOptionsFoundMessage : messages$u.searchSelectInputNoValueMessage)
|
|
9007
9071
|
})]
|
|
9008
9072
|
});
|
|
9009
9073
|
};
|
|
9010
|
-
if (storesByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
9074
|
+
if (storesByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
9011
9075
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9012
9076
|
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$C(_objectSpread$C({
|
|
9013
9077
|
id: props.id,
|
|
9014
9078
|
name: props.name,
|
|
9015
|
-
placeholder: intl.formatMessage(messages$
|
|
9079
|
+
placeholder: intl.formatMessage(messages$u.searchSelectInputPlaceholder),
|
|
9016
9080
|
horizontalConstraint: props.horizontalConstraint,
|
|
9017
9081
|
loadOptions: loadOptionsDebounced,
|
|
9018
9082
|
defaultOptions: false,
|
|
@@ -9027,7 +9091,7 @@ const StoresSearchSelectInput = props => {
|
|
|
9027
9091
|
}),
|
|
9028
9092
|
onChange: props.onChange,
|
|
9029
9093
|
onBlur: props.onBlur,
|
|
9030
|
-
loadingMessage: intl.formatMessage(messages$
|
|
9094
|
+
loadingMessage: intl.formatMessage(messages$u.searchSelectInputLoadingMessage),
|
|
9031
9095
|
noOptionsMessage: renderNoOptions,
|
|
9032
9096
|
isDisabled: props.isDisabled || storesByFieldFetcher.isLoading,
|
|
9033
9097
|
isReadOnly: props.isReadOnly,
|
|
@@ -9056,6 +9120,7 @@ StoresSearchSelectInput.displayName = 'StoresSearchSelectInput';
|
|
|
9056
9120
|
StoresSearchSelectInput.defaultProps = {
|
|
9057
9121
|
shouldFetchProductSelections: false
|
|
9058
9122
|
};
|
|
9123
|
+
var StoresSearchSelectInput$1 = StoresSearchSelectInput;
|
|
9059
9124
|
|
|
9060
9125
|
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; }
|
|
9061
9126
|
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; }
|
|
@@ -9063,7 +9128,7 @@ var styles$8 = {
|
|
|
9063
9128
|
"customOption": "store-select-input-module__customOption___2SC00"
|
|
9064
9129
|
};
|
|
9065
9130
|
const StoreSelectInput = props => {
|
|
9066
|
-
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher(props.projectKey);
|
|
9131
|
+
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1(props.projectKey);
|
|
9067
9132
|
const components = React.useMemo(() => {
|
|
9068
9133
|
return {
|
|
9069
9134
|
// eslint-disable-next-line react/display-name
|
|
@@ -9082,8 +9147,8 @@ const StoreSelectInput = props => {
|
|
|
9082
9147
|
}
|
|
9083
9148
|
};
|
|
9084
9149
|
}, [props.optionType, totalNumberOfStoresFetcher.total, props.upperStoresLimit]);
|
|
9085
|
-
if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner, {});
|
|
9086
|
-
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput : StoresSearchSelectInput;
|
|
9150
|
+
if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
9151
|
+
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput$1 : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput$1 : StoresSearchSelectInput$1;
|
|
9087
9152
|
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$B(_objectSpread$B({
|
|
9088
9153
|
menuIsOpen: props.menuIsOpen,
|
|
9089
9154
|
placeholder: props.placeholder,
|
|
@@ -9128,6 +9193,7 @@ StoreSelectInput.defaultProps = {
|
|
|
9128
9193
|
optionType: 'double-property',
|
|
9129
9194
|
shouldFetchProductSelections: false
|
|
9130
9195
|
};
|
|
9196
|
+
var StoreSelectInput$1 = StoreSelectInput;
|
|
9131
9197
|
|
|
9132
9198
|
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; }
|
|
9133
9199
|
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; }
|
|
@@ -9144,7 +9210,7 @@ const StoreSelectField = props => {
|
|
|
9144
9210
|
htmlFor: props.id,
|
|
9145
9211
|
hasRequiredIndicator: props.isRequired,
|
|
9146
9212
|
isBold: true
|
|
9147
|
-
}), jsxRuntime.jsx(StoreSelectInput, _objectSpread$A(_objectSpread$A({
|
|
9213
|
+
}), jsxRuntime.jsx(StoreSelectInput$1, _objectSpread$A(_objectSpread$A({
|
|
9148
9214
|
projectKey: props.projectKey,
|
|
9149
9215
|
id: props.id,
|
|
9150
9216
|
name: props.name,
|
|
@@ -9182,6 +9248,7 @@ StoreSelectField.defaultProps = {
|
|
|
9182
9248
|
upperStoresLimit: UPPER_STORES_LIMIT,
|
|
9183
9249
|
mappedValueField: 'id'
|
|
9184
9250
|
};
|
|
9251
|
+
var StoreSelectField$1 = StoreSelectField;
|
|
9185
9252
|
|
|
9186
9253
|
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; }
|
|
9187
9254
|
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; }
|
|
@@ -9201,7 +9268,7 @@ const validateRequired = value => {
|
|
|
9201
9268
|
};
|
|
9202
9269
|
const VALIDATOR_REQUIRED = {
|
|
9203
9270
|
name: 'required',
|
|
9204
|
-
message:
|
|
9271
|
+
message: validationMessages.required,
|
|
9205
9272
|
permanent: true,
|
|
9206
9273
|
validators: {
|
|
9207
9274
|
change(value) {
|
|
@@ -9215,7 +9282,7 @@ const VALIDATOR_REQUIRED = {
|
|
|
9215
9282
|
};
|
|
9216
9283
|
const VALIDATOR_NUMERIC = {
|
|
9217
9284
|
name: 'numeric',
|
|
9218
|
-
message:
|
|
9285
|
+
message: validationMessages.numeric,
|
|
9219
9286
|
permanent: false,
|
|
9220
9287
|
validators: {
|
|
9221
9288
|
change: v => {
|
|
@@ -9230,7 +9297,7 @@ const VALIDATOR_NUMERIC = {
|
|
|
9230
9297
|
};
|
|
9231
9298
|
const VALIDATOR_INTEGER = {
|
|
9232
9299
|
name: 'integer',
|
|
9233
|
-
message:
|
|
9300
|
+
message: validationMessages.integer,
|
|
9234
9301
|
permanent: false,
|
|
9235
9302
|
validators: {
|
|
9236
9303
|
change: v => {
|
|
@@ -9245,7 +9312,7 @@ const VALIDATOR_INTEGER = {
|
|
|
9245
9312
|
};
|
|
9246
9313
|
({
|
|
9247
9314
|
name: 'email',
|
|
9248
|
-
message:
|
|
9315
|
+
message: validationMessages.email,
|
|
9249
9316
|
permanent: false,
|
|
9250
9317
|
validators: {
|
|
9251
9318
|
// Note: it's a bit weird to validate it on every change,
|
|
@@ -9682,7 +9749,7 @@ const CustomFields = props => {
|
|
|
9682
9749
|
css: /*#__PURE__*/react$1.css("min-width:", props.isWidthExpanded ? '100%' : uiKit.customProperties.constraint11, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:CustomFields;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS1maWVsZHMuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWVjIiwiZmlsZSI6ImN1c3RvbS1maWVsZHMuanN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFByb3BUeXBlcyBmcm9tICdwcm9wLXR5cGVzJztcbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCB7IHVzZUZvcm1pa0NvbnRleHQgfSBmcm9tICdmb3JtaWsnO1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcywgU3BhY2luZ3MgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC91aS1raXQnO1xuaW1wb3J0IEN1c3RvbUZpZWxkc0ludGVybmFsIGZyb20gJy4vY3VzdG9tLWZpZWxkcy1pbnRlcm5hbCc7XG5cbmNvbnN0IG5vcENvbnZlcnRlciA9IChmaWVsZE5hbWUsIGZpZWxkVmFsdWUpID0+IGZpZWxkVmFsdWU7XG5cbmNvbnN0IEN1c3RvbUZpZWxkcyA9IChwcm9wcykgPT4ge1xuICBjb25zdCB7IHNldEZpZWxkVmFsdWUgfSA9IHVzZUZvcm1pa0NvbnRleHQoKTtcblxuICAvLyBFbnN1cmUgeW91IHBhc3MgaXNXaWR0aEV4cGFuZGVkPXRydWUgd2hlbiBhZGRpbmcgdGhlIG5ldyBsYXlvdXQgY29tcG9uZW50IHNvIHRoZSBjdXN0b20gZmllbGRzXG4gIC8vIGNhbiBleHBhbmQgdG8gZmlsbCB0aGUgd2lkdGggb2YgdGhlIGxheW91dC5cbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICBjc3M9e2Nzc2BcbiAgICAgICAgbWluLXdpZHRoOiAke3Byb3BzLmlzV2lkdGhFeHBhbmRlZFxuICAgICAgICAgID8gJzEwMCUnXG4gICAgICAgICAgOiBjdXN0b21Qcm9wZXJ0aWVzLmNvbnN0cmFpbnQxMX07XG4gICAgICBgfVxuICAgID5cbiAgICAgIDxTcGFjaW5ncy5TdGFjayBzY2FsZT1cInhsXCI+XG4gICAgICAgIDxDdXN0b21GaWVsZHNJbnRlcm5hbFxuICAgICAgICAgIG5hbWU9e3Byb3BzLm5hbWV9XG4gICAgICAgICAgaXNSZWFkT25seT17cHJvcHMuaXNSZWFkT25seX1cbiAgICAgICAgICBpc0Rpc2FibGVkPXtwcm9wcy5pc0Rpc2FibGVkfVxuICAgICAgICAgIGZpZWxkRGVmaW5pdGlvbnM9e3Byb3BzLmZpZWxkRGVmaW5pdGlvbnN9XG4gICAgICAgICAgc2V0RmllbGRWYWx1ZT17c2V0RmllbGRWYWx1ZX1cbiAgICAgICAgICBpbnB1dFZhbHVlc0NvbnZlcnRlcj17bm9wQ29udmVydGVyfVxuICAgICAgICAgIFdyYXBwZXJDb21wb25lbnQ9e3Byb3BzLldyYXBwZXJDb21wb25lbnR9XG4gICAgICAgIC8+XG4gICAgICA8L1NwYWNpbmdzLlN0YWNrPlxuICAgIDwvZGl2PlxuICApO1xufTtcbkN1c3RvbUZpZWxkcy5kaXNwbGF5TmFtZSA9ICdDdXN0b21GaWVsZHMnO1xuQ3VzdG9tRmllbGRzLnByb3BUeXBlcyA9IHtcbiAgaXNXaWR0aEV4cGFuZGVkOiBQcm9wVHlwZXMuYm9vbCxcbiAgaXNSZWFkT25seTogUHJvcFR5cGVzLmJvb2wsXG4gIGlzRGlzYWJsZWQ6IFByb3BUeXBlcy5ib29sLFxuICBuYW1lOiBQcm9wVHlwZXMuc3RyaW5nLFxuICBmaWVsZERlZmluaXRpb25zOiBQcm9wVHlwZXMuYXJyYXlPZihcbiAgICBQcm9wVHlwZXMuc2hhcGUoe1xuICAgICAgbmFtZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICAgIHJlcXVpcmVkOiBQcm9wVHlwZXMuYm9vbCxcblxuICAgICAgaW5wdXRIaW50OiBQcm9wVHlwZXMuc3RyaW5nLFxuICAgICAgaW5wdXRUaXA6IFByb3BUeXBlcy5vYmplY3QsXG4gICAgICBsYWJlbDogUHJvcFR5cGVzLm9iamVjdE9mKFByb3BUeXBlcy5zdHJpbmcpLFxuXG4gICAgICB0eXBlOiBQcm9wVHlwZXMub25lT2ZUeXBlKFtcbiAgICAgICAgUHJvcFR5cGVzLnNoYXBlKHtcbiAgICAgICAgICB0eXBlOiBQcm9wVHlwZXMuc2hhcGUoe1xuICAgICAgICAgICAgbmFtZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICAgICAgICB9KSxcbiAgICAgICAgfSksXG4gICAgICAgIC8vIFNldFxuICAgICAgICBQcm9wVHlwZXMuc2hhcGUoe1xuICAgICAgICAgIGVsZW1lbnRUeXBlOiBQcm9wVHlwZXMuc2hhcGUoe1xuICAgICAgICAgICAgdHlwZTogUHJvcFR5cGVzLnNoYXBlKHtcbiAgICAgICAgICAgICAgbmFtZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgIH0pLFxuICAgICAgICB9KSxcbiAgICAgIF0pLFxuICAgIH0pXG4gICksXG4gIFdyYXBwZXJDb21wb25lbnQ6IFByb3BUeXBlcy5lbGVtZW50VHlwZSxcbn07XG5cbmV4cG9ydCBkZWZhdWx0IEN1c3RvbUZpZWxkcztcbiJdfQ== */"),
|
|
9683
9750
|
children: jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
9684
9751
|
scale: "xl",
|
|
9685
|
-
children: jsxRuntime.jsx(CustomFieldsInternal, {
|
|
9752
|
+
children: jsxRuntime.jsx(CustomFieldsInternal$1, {
|
|
9686
9753
|
name: props.name,
|
|
9687
9754
|
isReadOnly: props.isReadOnly,
|
|
9688
9755
|
isDisabled: props.isDisabled,
|
|
@@ -9695,6 +9762,7 @@ const CustomFields = props => {
|
|
|
9695
9762
|
});
|
|
9696
9763
|
};
|
|
9697
9764
|
CustomFields.displayName = 'CustomFields';
|
|
9765
|
+
var CustomFields$1 = CustomFields;
|
|
9698
9766
|
|
|
9699
9767
|
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; }
|
|
9700
9768
|
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; }
|
|
@@ -9767,12 +9835,12 @@ function validations (formValues, language, languages) {
|
|
|
9767
9835
|
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$w(_objectSpread$w({}, acc), {}, {
|
|
9768
9836
|
[fieldDefinition.name]: _objectSpread$w(_objectSpread$w({}, setMissingIfRequired(formValues, fieldDefinition)), setDuplicatedIfSet(formValues, fieldDefinition, language, languages))
|
|
9769
9837
|
}), {});
|
|
9770
|
-
return withoutEmptyErrorsByField(errors);
|
|
9838
|
+
return withoutEmptyErrorsByField$1(errors);
|
|
9771
9839
|
}
|
|
9772
9840
|
|
|
9773
|
-
CustomFields.DndProvider = DndProvider;
|
|
9841
|
+
CustomFields$1.DndProvider = DndProvider;
|
|
9774
9842
|
|
|
9775
|
-
var messages$
|
|
9843
|
+
var messages$t = reactIntl.defineMessages({
|
|
9776
9844
|
customFieldsError: {
|
|
9777
9845
|
id: 'CustomFieldsError.Error',
|
|
9778
9846
|
description: 'The message when there are errors adding custom fields',
|
|
@@ -9787,7 +9855,7 @@ const CustomFieldsErrorTextNotification = props => {
|
|
|
9787
9855
|
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
9788
9856
|
scale: "s",
|
|
9789
9857
|
children: [jsxRuntime.jsx(uiKit.Text.Wrap, {
|
|
9790
|
-
intlMessage: _objectSpread$v({}, messages$
|
|
9858
|
+
intlMessage: _objectSpread$v({}, messages$t.customFieldsError)
|
|
9791
9859
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
9792
9860
|
scale: "xs",
|
|
9793
9861
|
children: _mapInstanceProperty__default["default"](_context = props.formErrors).call(_context, formError => jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -9798,8 +9866,9 @@ const CustomFieldsErrorTextNotification = props => {
|
|
|
9798
9866
|
});
|
|
9799
9867
|
};
|
|
9800
9868
|
CustomFieldsErrorTextNotification.displayName = 'CustomFieldsErrorTextNotification';
|
|
9869
|
+
var CustomFieldsErrorTextNotification$1 = CustomFieldsErrorTextNotification;
|
|
9801
9870
|
|
|
9802
|
-
var messages$
|
|
9871
|
+
var messages$s = reactIntl.defineMessages({
|
|
9803
9872
|
noCustomFields: {
|
|
9804
9873
|
id: 'CustomTypesSubform.noCustomFields',
|
|
9805
9874
|
description: 'The label when there are no custom fields defined',
|
|
@@ -9886,7 +9955,7 @@ const createFormStateFromResource = resource => {
|
|
|
9886
9955
|
// If there are no custom fields on the resource, don't create a form state
|
|
9887
9956
|
if (!resource[FIELD_NAME]) {
|
|
9888
9957
|
return {
|
|
9889
|
-
[FIELD_NAME]:
|
|
9958
|
+
[FIELD_NAME]: null
|
|
9890
9959
|
};
|
|
9891
9960
|
}
|
|
9892
9961
|
return {
|
|
@@ -9953,20 +10022,20 @@ const CustomFieldsInputWrapper = _ref2 => {
|
|
|
9953
10022
|
formValues = _valuesInstanceProperty__default["default"](_useFormikContext);
|
|
9954
10023
|
const rootFieldName = createRootFieldName(rootFormStateFieldName);
|
|
9955
10024
|
if (!typeDefinitionsExist(typeDefinitions)) {
|
|
9956
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$
|
|
10025
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$s.noTypes));
|
|
9957
10026
|
}
|
|
9958
10027
|
if (!typeDefinitionSelected(formValues, rootFieldName)) {
|
|
9959
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$
|
|
10028
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$s.noCustomType));
|
|
9960
10029
|
}
|
|
9961
10030
|
if (!typeDefinitionContainsFieldDefinitions(formValues, rootFieldName)) {
|
|
9962
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$
|
|
10031
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$s.noCustomFields));
|
|
9963
10032
|
}
|
|
9964
10033
|
if (fieldDefinitionsWithValues(formValues, rootFieldName).length === 0 && isReadOnly && hideEmptyFields) {
|
|
9965
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$
|
|
10034
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$s.noInputValues));
|
|
9966
10035
|
}
|
|
9967
10036
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
9968
10037
|
max: "scale",
|
|
9969
|
-
children: jsxRuntime.jsx(CustomFields, {
|
|
10038
|
+
children: jsxRuntime.jsx(CustomFields$1, {
|
|
9970
10039
|
isReadOnly: isReadOnly,
|
|
9971
10040
|
name: `${rootFieldName}.fields`,
|
|
9972
10041
|
fieldDefinitions: isReadOnly && hideEmptyFields ? fieldDefinitionsWithValues(formValues, rootFieldName) : formik.getIn(formValues, rootFieldName).type.obj.fieldDefinitions
|
|
@@ -9974,6 +10043,7 @@ const CustomFieldsInputWrapper = _ref2 => {
|
|
|
9974
10043
|
});
|
|
9975
10044
|
};
|
|
9976
10045
|
CustomFieldsInputWrapper.displayName = 'CustomFieldsInputWrapper';
|
|
10046
|
+
var CustomFieldsInputWrapper$1 = CustomFieldsInputWrapper;
|
|
9977
10047
|
|
|
9978
10048
|
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; }
|
|
9979
10049
|
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; }
|
|
@@ -10028,7 +10098,7 @@ const CustomTypeSubform = _ref => {
|
|
|
10028
10098
|
const handleTypeDefinitionSelect = React.useCallback(event => {
|
|
10029
10099
|
const selectedTypeDefinition = _findInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => typeDefinition.type.key === event.target.value);
|
|
10030
10100
|
if (selectedTypeDefinition) {
|
|
10031
|
-
const initialValueCustomType = initialValues
|
|
10101
|
+
const initialValueCustomType = formik.getIn(initialValues, rootFieldName);
|
|
10032
10102
|
const selectedCustomTypeKey = selectedTypeDefinition?.type.key;
|
|
10033
10103
|
let newFieldValue;
|
|
10034
10104
|
|
|
@@ -10063,10 +10133,10 @@ const CustomTypeSubform = _ref => {
|
|
|
10063
10133
|
return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
10064
10134
|
header: jsxRuntime.jsx(uiKit.CollapsiblePanel.Header, {
|
|
10065
10135
|
isCondensed: isCondensed,
|
|
10066
|
-
children: panelTitle || jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$s({}, messages$
|
|
10136
|
+
children: panelTitle || jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$s({}, messages$s.title))
|
|
10067
10137
|
}),
|
|
10068
10138
|
headerControls: typeDefinitions.length > 0 && jsxRuntime.jsx("div", {
|
|
10069
|
-
css: /*#__PURE__*/react$1.css("min-width:", uiKit.designTokens.constraint11, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:CustomTypeSubform;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS10eXBlLXN1YmZvcm0uanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBJb0IiLCJmaWxlIjoiY3VzdG9tLXR5cGUtc3ViZm9ybS5qc3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyB1c2VDYWxsYmFjayB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyB1c2VGb3JtaWtDb250ZXh0LCBnZXRJbiB9IGZyb20gJ2Zvcm1payc7XG5pbXBvcnQgeyBGb3JtYXR0ZWRNZXNzYWdlLCB1c2VJbnRsIH0gZnJvbSAncmVhY3QtaW50bCc7XG5pbXBvcnQgeyB1c2VBcHBsaWNhdGlvbkNvbnRleHQgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9hcHBsaWNhdGlvbi1zaGVsbC1jb25uZWN0b3JzJztcbmltcG9ydCB7IGZvcm1hdExvY2FsaXplZFN0cmluZyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL2wxMG4nO1xuaW1wb3J0IHtcbiAgQ29sbGFwc2libGVQYW5lbCxcbiAgU2VsZWN0SW5wdXQsXG4gIGRlc2lnblRva2Vucyxcbn0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvdWkta2l0JztcbmltcG9ydCBDdXN0b21GaWVsZHNJbnB1dFdyYXBwZXIgZnJvbSAnLi9jdXN0b20tZmllbGRzLWlucHV0LXdyYXBwZXInO1xuaW1wb3J0IG1lc3NhZ2VzIGZyb20gJy4vbWVzc2FnZXMnO1xuaW1wb3J0IHsgY3JlYXRlUm9vdEZpZWxkTmFtZSB9IGZyb20gJy4vdXRpbHMnO1xuXG4vKipcbiAqIE1hcHMgdGhlIHR5cGUgZGVmaW5pdGlvbnMgdG8gb3B0aW9ucyBmb3IgdGhlIGRyb3Bkb3duIHNlbGVjdG9yLlxuICovXG5leHBvcnQgY29uc3QgbWFwVHlwZURlZmluaXRpb25zVG9PcHRpb25zID0gKFxuICB0eXBlRGVmaW5pdGlvbnMsXG4gIGxhbmd1YWdlLFxuICBsYW5ndWFnZXMsXG4gIHNlbGVjdGVkVHlwZURlZmluaXRpb25JZFxuKSA9PiB7XG4gIHJldHVybiB0eXBlRGVmaW5pdGlvbnMubWFwKCh0eXBlRGVmaW5pdGlvbikgPT4gKHtcbiAgICBpc0Rpc2FibGVkOlxuICAgICAgc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbklkICYmXG4gICAgICBzZWxlY3RlZFR5cGVEZWZpbml0aW9uSWQgPT09IHR5cGVEZWZpbml0aW9uLnR5cGUuaWQsXG4gICAgdmFsdWU6IHR5cGVEZWZpbml0aW9uLnR5cGUua2V5LFxuICAgIGxhYmVsOiBmb3JtYXRMb2NhbGl6ZWRTdHJpbmcodHlwZURlZmluaXRpb24udHlwZSwge1xuICAgICAga2V5OiAnbmFtZScsXG4gICAgICBsb2NhbGU6IGxhbmd1YWdlLFxuICAgICAgZmFsbGJhY2tPcmRlcjogbGFuZ3VhZ2VzLFxuICAgIH0pLFxuICB9KSk7XG59O1xuXG4vKipcbiAqIENyZWF0ZXMgYSBuZXcgZm9ybSBzdGF0ZSBiYXNlZCBvbiB0aGUgc2VsZWN0ZWQgdHlwZSBkZWZpbml0aW9uIGZyb20gdGhlIGRyb3Bkb3duLlxuICovXG5jb25zdCBjcmVhdGVGb3JtU3RhdGVGcm9tVHlwZURlZmluaXRpb24gPSAoc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbikgPT4ge1xuICByZXR1cm4ge1xuICAgIHR5cGU6IHtcbiAgICAgIGlkOiBzZWxlY3RlZFR5cGVEZWZpbml0aW9uLnR5cGUuaWQsXG4gICAgICBvYmo6IHtcbiAgICAgICAgZmllbGREZWZpbml0aW9uczogc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbi50eXBlLmZpZWxkRGVmaW5pdGlvbnMsXG4gICAgICAgIGtleTogc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbi50eXBlLmtleSxcbiAgICAgIH0sXG4gICAgfSxcbiAgICBmaWVsZHM6IHt9LFxuICB9O1xufTtcblxuY29uc3QgQ3VzdG9tVHlwZVN1YmZvcm0gPSAoe1xuICB0eXBlRGVmaW5pdGlvbnMsXG4gIGlzUmVhZE9ubHksXG4gIGlzQ29uZGVuc2VkLFxuICBoaWRlRW1wdHlGaWVsZHMsXG4gIHJvb3RGb3JtU3RhdGVGaWVsZE5hbWUsXG4gIHBhbmVsVGl0bGUsXG59KSA9PiB7XG4gIGNvbnN0IHtcbiAgICB2YWx1ZXM6IGZvcm1WYWx1ZXMsXG4gICAgc2V0RmllbGRWYWx1ZSxcbiAgICB2YWxpZGF0ZUZvcm0sXG4gICAgaW5pdGlhbFZhbHVlcyxcbiAgfSA9IHVzZUZvcm1pa0NvbnRleHQoKTtcbiAgY29uc3QgeyBmb3JtYXRNZXNzYWdlIH0gPSB1c2VJbnRsKCk7XG4gIGNvbnN0IHsgbGFuZ3VhZ2UsIGxhbmd1YWdlcyB9ID0gdXNlQXBwbGljYXRpb25Db250ZXh0KFxuICAgIChhcHBsaWNhdGlvbkNvbnRleHQpID0+ICh7XG4gICAgICBsYW5ndWFnZTogYXBwbGljYXRpb25Db250ZXh0LmRhdGFMb2NhbGUsXG4gICAgICBsYW5ndWFnZXM6IGFwcGxpY2F0aW9uQ29udGV4dC5wcm9qZWN0Lmxhbmd1YWdlcyxcbiAgICB9KVxuICApO1xuICBjb25zdCByb290RmllbGROYW1lID0gY3JlYXRlUm9vdEZpZWxkTmFtZShyb290Rm9ybVN0YXRlRmllbGROYW1lKTtcblxuICBjb25zdCBoYW5kbGVUeXBlRGVmaW5pdGlvblNlbGVjdCA9IHVzZUNhbGxiYWNrKFxuICAgIChldmVudCkgPT4ge1xuICAgICAgY29uc3Qgc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbiA9IHR5cGVEZWZpbml0aW9ucy5maW5kKFxuICAgICAgICAodHlwZURlZmluaXRpb24pID0+
|
|
10139
|
+
css: /*#__PURE__*/react$1.css("min-width:", uiKit.designTokens.constraint11, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:CustomTypeSubform;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS10eXBlLXN1YmZvcm0uanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQTBJb0IiLCJmaWxlIjoiY3VzdG9tLXR5cGUtc3ViZm9ybS5qc3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyB1c2VDYWxsYmFjayB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyB1c2VGb3JtaWtDb250ZXh0LCBnZXRJbiB9IGZyb20gJ2Zvcm1payc7XG5pbXBvcnQgeyBGb3JtYXR0ZWRNZXNzYWdlLCB1c2VJbnRsIH0gZnJvbSAncmVhY3QtaW50bCc7XG5pbXBvcnQgeyB1c2VBcHBsaWNhdGlvbkNvbnRleHQgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9hcHBsaWNhdGlvbi1zaGVsbC1jb25uZWN0b3JzJztcbmltcG9ydCB7IGZvcm1hdExvY2FsaXplZFN0cmluZyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL2wxMG4nO1xuaW1wb3J0IHtcbiAgQ29sbGFwc2libGVQYW5lbCxcbiAgU2VsZWN0SW5wdXQsXG4gIGRlc2lnblRva2Vucyxcbn0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvdWkta2l0JztcbmltcG9ydCBDdXN0b21GaWVsZHNJbnB1dFdyYXBwZXIgZnJvbSAnLi9jdXN0b20tZmllbGRzLWlucHV0LXdyYXBwZXInO1xuaW1wb3J0IG1lc3NhZ2VzIGZyb20gJy4vbWVzc2FnZXMnO1xuaW1wb3J0IHsgY3JlYXRlUm9vdEZpZWxkTmFtZSB9IGZyb20gJy4vdXRpbHMnO1xuXG4vKipcbiAqIE1hcHMgdGhlIHR5cGUgZGVmaW5pdGlvbnMgdG8gb3B0aW9ucyBmb3IgdGhlIGRyb3Bkb3duIHNlbGVjdG9yLlxuICovXG5leHBvcnQgY29uc3QgbWFwVHlwZURlZmluaXRpb25zVG9PcHRpb25zID0gKFxuICB0eXBlRGVmaW5pdGlvbnMsXG4gIGxhbmd1YWdlLFxuICBsYW5ndWFnZXMsXG4gIHNlbGVjdGVkVHlwZURlZmluaXRpb25JZFxuKSA9PiB7XG4gIHJldHVybiB0eXBlRGVmaW5pdGlvbnMubWFwKCh0eXBlRGVmaW5pdGlvbikgPT4gKHtcbiAgICBpc0Rpc2FibGVkOlxuICAgICAgc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbklkICYmXG4gICAgICBzZWxlY3RlZFR5cGVEZWZpbml0aW9uSWQgPT09IHR5cGVEZWZpbml0aW9uLnR5cGUuaWQsXG4gICAgdmFsdWU6IHR5cGVEZWZpbml0aW9uLnR5cGUua2V5LFxuICAgIGxhYmVsOiBmb3JtYXRMb2NhbGl6ZWRTdHJpbmcodHlwZURlZmluaXRpb24udHlwZSwge1xuICAgICAga2V5OiAnbmFtZScsXG4gICAgICBsb2NhbGU6IGxhbmd1YWdlLFxuICAgICAgZmFsbGJhY2tPcmRlcjogbGFuZ3VhZ2VzLFxuICAgIH0pLFxuICB9KSk7XG59O1xuXG4vKipcbiAqIENyZWF0ZXMgYSBuZXcgZm9ybSBzdGF0ZSBiYXNlZCBvbiB0aGUgc2VsZWN0ZWQgdHlwZSBkZWZpbml0aW9uIGZyb20gdGhlIGRyb3Bkb3duLlxuICovXG5jb25zdCBjcmVhdGVGb3JtU3RhdGVGcm9tVHlwZURlZmluaXRpb24gPSAoc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbikgPT4ge1xuICByZXR1cm4ge1xuICAgIHR5cGU6IHtcbiAgICAgIGlkOiBzZWxlY3RlZFR5cGVEZWZpbml0aW9uLnR5cGUuaWQsXG4gICAgICBvYmo6IHtcbiAgICAgICAgZmllbGREZWZpbml0aW9uczogc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbi50eXBlLmZpZWxkRGVmaW5pdGlvbnMsXG4gICAgICAgIGtleTogc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbi50eXBlLmtleSxcbiAgICAgIH0sXG4gICAgfSxcbiAgICBmaWVsZHM6IHt9LFxuICB9O1xufTtcblxuY29uc3QgQ3VzdG9tVHlwZVN1YmZvcm0gPSAoe1xuICB0eXBlRGVmaW5pdGlvbnMsXG4gIGlzUmVhZE9ubHksXG4gIGlzQ29uZGVuc2VkLFxuICBoaWRlRW1wdHlGaWVsZHMsXG4gIHJvb3RGb3JtU3RhdGVGaWVsZE5hbWUsXG4gIHBhbmVsVGl0bGUsXG59KSA9PiB7XG4gIGNvbnN0IHtcbiAgICB2YWx1ZXM6IGZvcm1WYWx1ZXMsXG4gICAgc2V0RmllbGRWYWx1ZSxcbiAgICB2YWxpZGF0ZUZvcm0sXG4gICAgaW5pdGlhbFZhbHVlcyxcbiAgfSA9IHVzZUZvcm1pa0NvbnRleHQoKTtcbiAgY29uc3QgeyBmb3JtYXRNZXNzYWdlIH0gPSB1c2VJbnRsKCk7XG4gIGNvbnN0IHsgbGFuZ3VhZ2UsIGxhbmd1YWdlcyB9ID0gdXNlQXBwbGljYXRpb25Db250ZXh0KFxuICAgIChhcHBsaWNhdGlvbkNvbnRleHQpID0+ICh7XG4gICAgICBsYW5ndWFnZTogYXBwbGljYXRpb25Db250ZXh0LmRhdGFMb2NhbGUsXG4gICAgICBsYW5ndWFnZXM6IGFwcGxpY2F0aW9uQ29udGV4dC5wcm9qZWN0Lmxhbmd1YWdlcyxcbiAgICB9KVxuICApO1xuICBjb25zdCByb290RmllbGROYW1lID0gY3JlYXRlUm9vdEZpZWxkTmFtZShyb290Rm9ybVN0YXRlRmllbGROYW1lKTtcblxuICBjb25zdCBoYW5kbGVUeXBlRGVmaW5pdGlvblNlbGVjdCA9IHVzZUNhbGxiYWNrKFxuICAgIChldmVudCkgPT4ge1xuICAgICAgY29uc3Qgc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbiA9IHR5cGVEZWZpbml0aW9ucy5maW5kKFxuICAgICAgICAodHlwZURlZmluaXRpb24pID0+IHR5cGVEZWZpbml0aW9uLnR5cGUua2V5ID09PSBldmVudC50YXJnZXQudmFsdWVcbiAgICAgICk7XG5cbiAgICAgIGlmIChzZWxlY3RlZFR5cGVEZWZpbml0aW9uKSB7XG4gICAgICAgIGNvbnN0IGluaXRpYWxWYWx1ZUN1c3RvbVR5cGUgPSBnZXRJbihpbml0aWFsVmFsdWVzLCByb290RmllbGROYW1lKTtcbiAgICAgICAgY29uc3Qgc2VsZWN0ZWRDdXN0b21UeXBlS2V5ID0gc2VsZWN0ZWRUeXBlRGVmaW5pdGlvbj8udHlwZS5rZXk7XG5cbiAgICAgICAgbGV0IG5ld0ZpZWxkVmFsdWU7XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIElmIHRoZSB1c2VyIHNlbGVjdHMgdGhlIHNhbWUgY3VzdG9tIHR5cGUgdGhhdCB3YXMgYWxyZWFkeSBzZWxlY3RlZCwgd2UgbmVlZCB0byByZXNldCB0aGUgYGN1c3RvbWAgZmllbGRcbiAgICAgICAgICogYmFjayB0byBpdHMgaW5pdGlhbCB2YWx1ZSB0byBlbnN1cmUgdGhhdCB0aGUgZm9ybSBzdGF0ZSBpcyBjb25zaXN0ZW50IHdpdGggdGhlIGluaXRpYWwgdmFsdWVzLlxuICAgICAgICAgKi9cbiAgICAgICAgaWYgKGluaXRpYWxWYWx1ZUN1c3RvbVR5cGU/LnR5cGU/Lm9iaj8ua2V5ID09PSBzZWxlY3RlZEN1c3RvbVR5cGVLZXkpIHtcbiAgICAgICAgICBuZXdGaWVsZFZhbHVlID0gaW5pdGlhbFZhbHVlQ3VzdG9tVHlwZTtcbiAgICAgICAgICAvKipcbiAgICAgICAgICAgKiBPdGhlcndpc2UsIHNldCB0aGUgYGN1c3RvbWAgZmllbGQgdG8gdGhlIG5ldyBjdXN0b20gdHlwZSBkZWZpbml0aW9uLlxuICAgICAgICAgICAqL1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIG5ld0ZpZWxkVmFsdWUgPSBjcmVhdGVGb3JtU3RhdGVGcm9tVHlwZURlZmluaXRpb24oXG4gICAgICAgICAgICBzZWxlY3RlZFR5cGVEZWZpbml0aW9uXG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHNldEZpZWxkVmFsdWUocm9vdEZpZWxkTmFtZSwgbmV3RmllbGRWYWx1ZSkudGhlbigoKSA9PiB7XG4gICAgICAgICAgdmFsaWRhdGVGb3JtKCk7XG4gICAgICAgIH0pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gaWYgdGhlIGRyb3Bkb3duIHNlbGVjdG9yIGlzIGNsZWFyZWQsIHJlbW92ZSB0aGUgYGN1c3RvbWAgZmllbGQgZnJvbSB0aGUgZm9ybSBzdGF0ZSBlbnRpcmVseVxuICAgICAgICBzZXRGaWVsZFZhbHVlKHJvb3RGaWVsZE5hbWUsIHVuZGVmaW5lZCkudGhlbigoKSA9PiB7XG4gICAgICAgICAgdmFsaWRhdGVGb3JtKCk7XG4gICAgICAgIH0pO1xuICAgICAgfVxuICAgIH0sXG4gICAgW3R5cGVEZWZpbml0aW9ucywgc2V0RmllbGRWYWx1ZSwgdmFsaWRhdGVGb3JtLCByb290RmllbGROYW1lXVxuICApO1xuXG4gIGNvbnN0IHR5cGVEZWZpbml0aW9uU2VsZWN0ZWQgPSAoZm9ybVZhbHVlcykgPT4ge1xuICAgIHJldHVybiAoXG4gICAgICBnZXRJbihmb3JtVmFsdWVzLCByb290RmllbGROYW1lKT8udHlwZSAmJlxuICAgICAgZ2V0SW4oZm9ybVZhbHVlcywgcm9vdEZpZWxkTmFtZSk/LnR5cGU/Lm9ialxuICAgICk7XG4gIH07XG5cbiAgLy8gaWYgdGhlIHVzZXIgaGFzIHJlYWQtb25seSBwZXJtaXNzaW9ucywgZW1wdHkgZmllbGRzIGFyZSBoaWRkZW4sIGFuZCBubyB0eXBlIGRlZmluaXRpb24gaXMgc2VsZWN0ZWQsIGhpZGUgdGhlIGNvbXBvbmVudFxuICBpZiAoaXNSZWFkT25seSAmJiBoaWRlRW1wdHlGaWVsZHMgJiYgIXR5cGVEZWZpbml0aW9uU2VsZWN0ZWQoZm9ybVZhbHVlcykpXG4gICAgcmV0dXJuIG51bGw7XG5cbiAgcmV0dXJuIChcbiAgICA8Q29sbGFwc2libGVQYW5lbFxuICAgICAgaGVhZGVyPXtcbiAgICAgICAgPENvbGxhcHNpYmxlUGFuZWwuSGVhZGVyIGlzQ29uZGVuc2VkPXtpc0NvbmRlbnNlZH0+XG4gICAgICAgICAge3BhbmVsVGl0bGUgfHwgPEZvcm1hdHRlZE1lc3NhZ2Ugey4uLm1lc3NhZ2VzLnRpdGxlfSAvPn1cbiAgICAgICAgPC9Db2xsYXBzaWJsZVBhbmVsLkhlYWRlcj5cbiAgICAgIH1cbiAgICAgIGhlYWRlckNvbnRyb2xzPXtcbiAgICAgICAgdHlwZURlZmluaXRpb25zLmxlbmd0aCA+IDAgJiYgKFxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgICAgICBtaW4td2lkdGg6ICR7ZGVzaWduVG9rZW5zLmNvbnN0cmFpbnQxMX07XG4gICAgICAgICAgICBgfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxTZWxlY3RJbnB1dFxuICAgICAgICAgICAgICBpc0NsZWFyYWJsZVxuICAgICAgICAgICAgICBkYXRhLXRlc3RpZD1cImN1c3RvbS10eXBlLXNlbGVjdFwiXG4gICAgICAgICAgICAgIG5hbWU9e2Ake3Jvb3RGaWVsZE5hbWV9LnR5cGUub2JqLmtleWB9XG4gICAgICAgICAgICAgIG9wdGlvbnM9e21hcFR5cGVEZWZpbml0aW9uc1RvT3B0aW9ucyhcbiAgICAgICAgICAgICAgICB0eXBlRGVmaW5pdGlvbnMsXG4gICAgICAgICAgICAgICAgbGFuZ3VhZ2UsXG4gICAgICAgICAgICAgICAgbGFuZ3VhZ2VzLFxuXG4gICAgICAgICAgICAgICAgZ2V0SW4oZm9ybVZhbHVlcywgcm9vdEZpZWxkTmFtZSk/LnR5cGU/LmlkXG4gICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgIHZhbHVlPXtnZXRJbihmb3JtVmFsdWVzLCByb290RmllbGROYW1lKT8udHlwZT8ub2JqPy5rZXl9XG4gICAgICAgICAgICAgIG9uQ2hhbmdlPXtoYW5kbGVUeXBlRGVmaW5pdGlvblNlbGVjdH1cbiAgICAgICAgICAgICAgcGxhY2Vob2xkZXI9e2Zvcm1hdE1lc3NhZ2UobWVzc2FnZXMudHlwZXNQbGFjZWhvbGRlcil9XG4gICAgICAgICAgICAgIGlzUmVhZE9ubHk9e2lzUmVhZE9ubHl9XG4gICAgICAgICAgICAvPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICApXG4gICAgICB9XG4gICAgICBoZWFkZXJDb250cm9sc0FsaWdubWVudD1cInJpZ2h0XCJcbiAgICA+XG4gICAgICA8Q3VzdG9tRmllbGRzSW5wdXRXcmFwcGVyXG4gICAgICAgIHR5cGVEZWZpbml0aW9ucz17dHlwZURlZmluaXRpb25zfVxuICAgICAgICBpc1JlYWRPbmx5PXtpc1JlYWRPbmx5fVxuICAgICAgICBoaWRlRW1wdHlGaWVsZHM9e2hpZGVFbXB0eUZpZWxkc31cbiAgICAgICAgcm9vdEZvcm1TdGF0ZUZpZWxkTmFtZT17cm9vdEZvcm1TdGF0ZUZpZWxkTmFtZX1cbiAgICAgIC8+XG4gICAgPC9Db2xsYXBzaWJsZVBhbmVsPlxuICApO1xufTtcblxuQ3VzdG9tVHlwZVN1YmZvcm0uZGlzcGxheU5hbWUgPSAnQ3VzdG9tVHlwZVN1YmZvcm0nO1xuQ3VzdG9tVHlwZVN1YmZvcm0ucHJvcFR5cGVzID0ge1xuICB0eXBlRGVmaW5pdGlvbnM6IFByb3BUeXBlcy5hcnJheS5pc1JlcXVpcmVkLFxuICBpc1JlYWRPbmx5OiBQcm9wVHlwZXMuYm9vbCxcbiAgaXNDb25kZW5zZWQ6IFByb3BUeXBlcy5ib29sLFxuICBoaWRlRW1wdHlGaWVsZHM6IFByb3BUeXBlcy5ib29sLFxuICByb290Rm9ybVN0YXRlRmllbGROYW1lOiBQcm9wVHlwZXMuc3RyaW5nLFxuICBwYW5lbFRpdGxlOiBQcm9wVHlwZXMubm9kZSxcbn07XG5cbmV4cG9ydCBkZWZhdWx0IEN1c3RvbVR5cGVTdWJmb3JtO1xuIl19 */"),
|
|
10070
10140
|
children: jsxRuntime.jsx(uiKit.SelectInput, {
|
|
10071
10141
|
isClearable: true,
|
|
10072
10142
|
"data-testid": "custom-type-select",
|
|
@@ -10074,12 +10144,12 @@ const CustomTypeSubform = _ref => {
|
|
|
10074
10144
|
options: mapTypeDefinitionsToOptions(typeDefinitions, language, languages, formik.getIn(formValues, rootFieldName)?.type?.id),
|
|
10075
10145
|
value: formik.getIn(formValues, rootFieldName)?.type?.obj?.key,
|
|
10076
10146
|
onChange: handleTypeDefinitionSelect,
|
|
10077
|
-
placeholder: formatMessage(messages$
|
|
10147
|
+
placeholder: formatMessage(messages$s.typesPlaceholder),
|
|
10078
10148
|
isReadOnly: isReadOnly
|
|
10079
10149
|
})
|
|
10080
10150
|
}),
|
|
10081
10151
|
headerControlsAlignment: "right",
|
|
10082
|
-
children: jsxRuntime.jsx(CustomFieldsInputWrapper, {
|
|
10152
|
+
children: jsxRuntime.jsx(CustomFieldsInputWrapper$1, {
|
|
10083
10153
|
typeDefinitions: typeDefinitions,
|
|
10084
10154
|
isReadOnly: isReadOnly,
|
|
10085
10155
|
hideEmptyFields: hideEmptyFields,
|
|
@@ -10088,6 +10158,7 @@ const CustomTypeSubform = _ref => {
|
|
|
10088
10158
|
});
|
|
10089
10159
|
};
|
|
10090
10160
|
CustomTypeSubform.displayName = 'CustomTypeSubform';
|
|
10161
|
+
var CustomTypeSubform$1 = CustomTypeSubform;
|
|
10091
10162
|
|
|
10092
10163
|
const CustomFieldsFormField = _ref => {
|
|
10093
10164
|
let resources = _ref.resources,
|
|
@@ -10109,7 +10180,7 @@ const CustomFieldsFormField = _ref => {
|
|
|
10109
10180
|
return jsxRuntime.jsx(uiKit.LoadingSpinner, {});
|
|
10110
10181
|
}
|
|
10111
10182
|
const typeDefinitions = _mapInstanceProperty__default["default"](_context = customFieldTypeDefinitions.results).call(_context, CustomFieldTypeDefinitionsConnector$1.graphQlDocToForm);
|
|
10112
|
-
return jsxRuntime.jsx(CustomTypeSubform, {
|
|
10183
|
+
return jsxRuntime.jsx(CustomTypeSubform$1, {
|
|
10113
10184
|
typeDefinitions: typeDefinitions,
|
|
10114
10185
|
isReadOnly: isReadOnly,
|
|
10115
10186
|
isCondensed: isCondensed,
|
|
@@ -10122,6 +10193,7 @@ const CustomFieldsFormField = _ref => {
|
|
|
10122
10193
|
};
|
|
10123
10194
|
CustomFieldsFormField.createFormStateFromResource = createFormStateFromResource;
|
|
10124
10195
|
CustomFieldsFormField.createGraphQlDocFromFormState = createGraphQlDocFromFormState;
|
|
10196
|
+
var CustomFieldsFormField$1 = CustomFieldsFormField;
|
|
10125
10197
|
|
|
10126
10198
|
/**
|
|
10127
10199
|
* @typedef {object} TPimIndexer
|
|
@@ -10147,6 +10219,7 @@ const defaultValue = {
|
|
|
10147
10219
|
* @type {import('react').Context<TPimIndexer>}
|
|
10148
10220
|
*/
|
|
10149
10221
|
const PimIndexerContext = /*#__PURE__*/React.createContext(defaultValue);
|
|
10222
|
+
var PimIndexerContext$1 = PimIndexerContext;
|
|
10150
10223
|
|
|
10151
10224
|
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 } } } };
|
|
10152
10225
|
var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
|
|
@@ -10189,7 +10262,7 @@ var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
|
|
|
10189
10262
|
}
|
|
10190
10263
|
};
|
|
10191
10264
|
|
|
10192
|
-
var messages$
|
|
10265
|
+
var messages$r = reactIntl.defineMessages({
|
|
10193
10266
|
indexingSucceed: {
|
|
10194
10267
|
id: 'Products.PimIndexer.Notifications.indexingSucceed',
|
|
10195
10268
|
description: 'Message to be shown to user when PIM successfully finishes initial project indexing.',
|
|
@@ -10295,7 +10368,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10295
10368
|
_this.props.notifications.showNotification({
|
|
10296
10369
|
kind: 'error',
|
|
10297
10370
|
domain: constants.DOMAINS.SIDE,
|
|
10298
|
-
text: _this.props.intl.formatMessage(messages$
|
|
10371
|
+
text: _this.props.intl.formatMessage(messages$r.indexingFailed)
|
|
10299
10372
|
});
|
|
10300
10373
|
};
|
|
10301
10374
|
_this.getIndexingProgress = async () => {
|
|
@@ -10336,7 +10409,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10336
10409
|
_this.props.notifications.showNotification({
|
|
10337
10410
|
kind: 'success',
|
|
10338
10411
|
domain: constants.DOMAINS.SIDE,
|
|
10339
|
-
text: _this.props.intl.formatMessage(messages$
|
|
10412
|
+
text: _this.props.intl.formatMessage(messages$r.indexingSucceed)
|
|
10340
10413
|
},
|
|
10341
10414
|
// because the indexing may take so long, the success notification
|
|
10342
10415
|
// may be dismissed without being seen by the user. Set `dismissAfter`
|
|
@@ -10410,7 +10483,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10410
10483
|
}, {
|
|
10411
10484
|
key: "render",
|
|
10412
10485
|
value: function render() {
|
|
10413
|
-
return jsxRuntime.jsx(PimIndexerContext.Provider, {
|
|
10486
|
+
return jsxRuntime.jsx(PimIndexerContext$1.Provider, {
|
|
10414
10487
|
value: _objectSpread$r(_objectSpread$r({}, this.state), {}, {
|
|
10415
10488
|
attemptToRefreshProducts: this.attemptToRefreshProducts,
|
|
10416
10489
|
indexProject: this.indexProject
|
|
@@ -10429,7 +10502,7 @@ var pimIndexerProvider = flowRight__default["default"](applicationShellConnector
|
|
|
10429
10502
|
name: 'refreshProductIndicesByIds'
|
|
10430
10503
|
}), hoc.graphql(IndexProject, {
|
|
10431
10504
|
name: 'indexProject'
|
|
10432
|
-
}), hoc.withApollo, reactIntl.injectIntl, injectNotifications())(PimIndexerProvider);
|
|
10505
|
+
}), hoc.withApollo, reactIntl.injectIntl, injectNotifications$1())(PimIndexerProvider);
|
|
10433
10506
|
|
|
10434
10507
|
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)); }
|
|
10435
10508
|
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function () { return !!t; })(); }
|
|
@@ -10442,31 +10515,32 @@ let WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
|
10442
10515
|
return _createClass(WithPimIndexer, [{
|
|
10443
10516
|
key: "render",
|
|
10444
10517
|
value: function render() {
|
|
10445
|
-
return jsxRuntime.jsx(PimIndexerContext.Consumer, {
|
|
10518
|
+
return jsxRuntime.jsx(PimIndexerContext$1.Consumer, {
|
|
10446
10519
|
children: pimIndexerProps => this.props.children(pimIndexerProps)
|
|
10447
10520
|
});
|
|
10448
10521
|
}
|
|
10449
10522
|
}]);
|
|
10450
10523
|
}(React.PureComponent);
|
|
10451
10524
|
WithPimIndexer.displayName = 'WithPimIndexer';
|
|
10525
|
+
var WithPimIndexer$1 = WithPimIndexer;
|
|
10452
10526
|
|
|
10453
10527
|
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; }
|
|
10454
10528
|
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; }
|
|
10455
10529
|
var injectPimIndexer = (function () {
|
|
10456
10530
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pimIndexer';
|
|
10457
10531
|
return Component => {
|
|
10458
|
-
const WrappedComponent = props => jsxRuntime.jsx(WithPimIndexer, {
|
|
10532
|
+
const WrappedComponent = props => jsxRuntime.jsx(WithPimIndexer$1, {
|
|
10459
10533
|
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$q(_objectSpread$q({}, props), {}, {
|
|
10460
10534
|
[propName]: pimIndexerProps
|
|
10461
10535
|
}))
|
|
10462
10536
|
});
|
|
10463
|
-
WrappedComponent.displayName = wrapDisplayName(Component, 'InjectPimIndexer');
|
|
10537
|
+
WrappedComponent.displayName = wrapDisplayName$1(Component, 'InjectPimIndexer');
|
|
10464
10538
|
return WrappedComponent;
|
|
10465
10539
|
};
|
|
10466
10540
|
});
|
|
10467
10541
|
|
|
10468
10542
|
function usePimIndexer() {
|
|
10469
|
-
return React.useContext(PimIndexerContext);
|
|
10543
|
+
return React.useContext(PimIndexerContext$1);
|
|
10470
10544
|
}
|
|
10471
10545
|
|
|
10472
10546
|
// eslint-disable-next-line import/prefer-default-export
|
|
@@ -10490,11 +10564,12 @@ const resourcesWithPlatformLimits = _Object$keys__default["default"](RESOURCES_W
|
|
|
10490
10564
|
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$p({
|
|
10491
10565
|
[camelCase__default["default"](`should include ${nextNameOfLimit}`)]: platformLimit ? nextNameOfLimit === platformLimit : true
|
|
10492
10566
|
}, previousIncludedLimits), {});
|
|
10567
|
+
var createPlatformLimitsQueryVariables = createQueryVariables;
|
|
10493
10568
|
|
|
10494
10569
|
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 } } } };
|
|
10495
10570
|
const usePlatformLimitsFetcher = platformLimit => {
|
|
10496
10571
|
const _useQuery = react.useQuery(PlatformLimitsFetcherQuery, {
|
|
10497
|
-
variables:
|
|
10572
|
+
variables: createPlatformLimitsQueryVariables(platformLimit),
|
|
10498
10573
|
context: {
|
|
10499
10574
|
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
10500
10575
|
},
|
|
@@ -10512,6 +10587,7 @@ const usePlatformLimitsFetcher = platformLimit => {
|
|
|
10512
10587
|
refetch
|
|
10513
10588
|
};
|
|
10514
10589
|
};
|
|
10590
|
+
var usePlatformLimitsFetcher$1 = usePlatformLimitsFetcher;
|
|
10515
10591
|
|
|
10516
10592
|
const useLimitsModalState = function () {
|
|
10517
10593
|
let isInitiallyOpen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
@@ -10527,6 +10603,7 @@ const useLimitsModalState = function () {
|
|
|
10527
10603
|
openModal
|
|
10528
10604
|
};
|
|
10529
10605
|
};
|
|
10606
|
+
var useLimitsModalState$1 = useLimitsModalState;
|
|
10530
10607
|
|
|
10531
10608
|
const useInterceptNavigation = hasReachedErrorLimit => {
|
|
10532
10609
|
const _useState = React.useState(false),
|
|
@@ -10548,8 +10625,9 @@ const useInterceptNavigation = hasReachedErrorLimit => {
|
|
|
10548
10625
|
setPlatformLimitToBeNotExceeded
|
|
10549
10626
|
};
|
|
10550
10627
|
};
|
|
10628
|
+
var useInterceptNavigation$1 = useInterceptNavigation;
|
|
10551
10629
|
|
|
10552
|
-
var messages$
|
|
10630
|
+
var messages$q = reactIntl.defineMessages({
|
|
10553
10631
|
shippingMethods: {
|
|
10554
10632
|
id: 'PlatformLimits.Notifications.shippingMethodsError',
|
|
10555
10633
|
description: 'error message about platform limit exceeded',
|
|
@@ -10589,7 +10667,7 @@ const PlatformLimitErrorNotification = _ref => {
|
|
|
10589
10667
|
limit = _ref.limit;
|
|
10590
10668
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
10591
10669
|
type: "error",
|
|
10592
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$o(_objectSpread$o({}, messages$
|
|
10670
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$o(_objectSpread$o({}, messages$q[resource]), {}, {
|
|
10593
10671
|
values: {
|
|
10594
10672
|
limit,
|
|
10595
10673
|
customersupport: getCustomerSupportLink$1
|
|
@@ -10601,8 +10679,9 @@ const PlatformLimitErrorNotification = _ref => {
|
|
|
10601
10679
|
});
|
|
10602
10680
|
};
|
|
10603
10681
|
PlatformLimitErrorNotification.displayName = 'PlatformLimitErrorNotification';
|
|
10682
|
+
var Error$1 = PlatformLimitErrorNotification;
|
|
10604
10683
|
|
|
10605
|
-
var messages$
|
|
10684
|
+
var messages$p = reactIntl.defineMessages({
|
|
10606
10685
|
shippingMethods: {
|
|
10607
10686
|
id: 'PlatformLimits.Notifications.shippingMethodsWarning',
|
|
10608
10687
|
description: 'warning message about platform limit exceeded',
|
|
@@ -10642,7 +10721,7 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
10642
10721
|
limit = _ref.limit;
|
|
10643
10722
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
10644
10723
|
type: "warning",
|
|
10645
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$n(_objectSpread$n({}, messages$
|
|
10724
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$n(_objectSpread$n({}, messages$p[resource]), {}, {
|
|
10646
10725
|
values: {
|
|
10647
10726
|
limit,
|
|
10648
10727
|
customersupport: getCustomerSupportLink
|
|
@@ -10654,11 +10733,13 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
10654
10733
|
});
|
|
10655
10734
|
};
|
|
10656
10735
|
PlatformLimitWarningNotification.displayName = 'PlatformLimitWarningNotification';
|
|
10736
|
+
var Warning = PlatformLimitWarningNotification;
|
|
10657
10737
|
|
|
10658
10738
|
const Notifications = {
|
|
10659
|
-
Warning
|
|
10660
|
-
Error:
|
|
10739
|
+
Warning,
|
|
10740
|
+
Error: Error$1
|
|
10661
10741
|
};
|
|
10742
|
+
var Notifications$1 = Notifications;
|
|
10662
10743
|
|
|
10663
10744
|
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; }
|
|
10664
10745
|
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; }
|
|
@@ -10678,6 +10759,7 @@ const PlatformLimitsStatusText = _ref => {
|
|
|
10678
10759
|
});
|
|
10679
10760
|
};
|
|
10680
10761
|
PlatformLimitsStatusText.displayName = 'PlatformLimitsStatusText';
|
|
10762
|
+
var StatusText = PlatformLimitsStatusText;
|
|
10681
10763
|
|
|
10682
10764
|
const getHasExceededWarningThreshold = _ref => {
|
|
10683
10765
|
let limit = _ref.limit,
|
|
@@ -10704,7 +10786,7 @@ const getPlatformLimitsStatus = _ref3 => {
|
|
|
10704
10786
|
};
|
|
10705
10787
|
|
|
10706
10788
|
const useShippingMethodsPlatformLimitsFetcher = () => {
|
|
10707
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.shippingMethods),
|
|
10789
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.shippingMethods),
|
|
10708
10790
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
10709
10791
|
error = _usePlatformLimitsFet.error,
|
|
10710
10792
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -10716,9 +10798,10 @@ const useShippingMethodsPlatformLimitsFetcher = () => {
|
|
|
10716
10798
|
refetch
|
|
10717
10799
|
};
|
|
10718
10800
|
};
|
|
10801
|
+
var useShippingMethodsPlatformLimitsFetcher$1 = useShippingMethodsPlatformLimitsFetcher;
|
|
10719
10802
|
|
|
10720
|
-
const useShippingMethodsPlatformLimits = () => {
|
|
10721
|
-
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
10803
|
+
const useShippingMethodsPlatformLimits$1 = () => {
|
|
10804
|
+
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
|
|
10722
10805
|
platformLimits = _useShippingMethodsPl.platformLimits;
|
|
10723
10806
|
if (!platformLimits?.shippingMethods?.total) {
|
|
10724
10807
|
return {
|
|
@@ -10742,24 +10825,25 @@ const useShippingMethodsPlatformLimits = () => {
|
|
|
10742
10825
|
hasReachedShippingMethodsErrorLimit
|
|
10743
10826
|
};
|
|
10744
10827
|
};
|
|
10828
|
+
var useShippingMethodsPlatformLimitsStatus = useShippingMethodsPlatformLimits$1;
|
|
10745
10829
|
|
|
10746
10830
|
const PlatformLimitsShippingMethodsNotifications = () => {
|
|
10747
|
-
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
10831
|
+
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
|
|
10748
10832
|
platformLimits = _useShippingMethodsPl.platformLimits;
|
|
10749
|
-
const _useShippingMethodsPl2 =
|
|
10833
|
+
const _useShippingMethodsPl2 = useShippingMethodsPlatformLimitsStatus(),
|
|
10750
10834
|
hasReachedShippingMethodsWarningLimit = _useShippingMethodsPl2.hasReachedShippingMethodsWarningLimit,
|
|
10751
10835
|
hasReachedShippingMethodsErrorLimit = _useShippingMethodsPl2.hasReachedShippingMethodsErrorLimit;
|
|
10752
10836
|
if (!platformLimits?.shippingMethods?.total) {
|
|
10753
10837
|
return null;
|
|
10754
10838
|
}
|
|
10755
10839
|
if (hasReachedShippingMethodsErrorLimit) {
|
|
10756
|
-
return jsxRuntime.jsx(Notifications.Error, {
|
|
10840
|
+
return jsxRuntime.jsx(Notifications$1.Error, {
|
|
10757
10841
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.shippingMethods,
|
|
10758
10842
|
limit: platformLimits.shippingMethods.total.limit
|
|
10759
10843
|
});
|
|
10760
10844
|
}
|
|
10761
10845
|
if (hasReachedShippingMethodsWarningLimit) {
|
|
10762
|
-
return jsxRuntime.jsx(Notifications.Warning, {
|
|
10846
|
+
return jsxRuntime.jsx(Notifications$1.Warning, {
|
|
10763
10847
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.shippingMethods,
|
|
10764
10848
|
limit: platformLimits.shippingMethods.total.limit
|
|
10765
10849
|
});
|
|
@@ -10767,8 +10851,9 @@ const PlatformLimitsShippingMethodsNotifications = () => {
|
|
|
10767
10851
|
return null;
|
|
10768
10852
|
};
|
|
10769
10853
|
PlatformLimitsShippingMethodsNotifications.displayName = 'PlatformLimitsShippingMethodsNotifications';
|
|
10854
|
+
var ShippingMethodsNotification = PlatformLimitsShippingMethodsNotifications;
|
|
10770
10855
|
|
|
10771
|
-
var messages$
|
|
10856
|
+
var messages$o = reactIntl.defineMessages({
|
|
10772
10857
|
shippingMethodsPlatformLimitReached: {
|
|
10773
10858
|
id: 'PlatformLimits.Tooltip.shippingMethodsLimitReached',
|
|
10774
10859
|
description: 'The message for shipping methods platform limit being reached',
|
|
@@ -10781,12 +10866,13 @@ function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
10781
10866
|
const PlatformLimitsShippingMethodsTooltip = props => {
|
|
10782
10867
|
const intl = reactIntl.useIntl();
|
|
10783
10868
|
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
10784
|
-
title: intl.formatMessage(messages$
|
|
10869
|
+
title: intl.formatMessage(messages$o.shippingMethodsPlatformLimitReached)
|
|
10785
10870
|
}));
|
|
10786
10871
|
};
|
|
10787
10872
|
PlatformLimitsShippingMethodsTooltip.displayName = 'PlatformLimitsShippingMethodsTooltip';
|
|
10873
|
+
var ShippingMethodsTooltip = PlatformLimitsShippingMethodsTooltip;
|
|
10788
10874
|
|
|
10789
|
-
var messages$
|
|
10875
|
+
var messages$n = reactIntl.defineMessages({
|
|
10790
10876
|
shippingMethodsStatus: {
|
|
10791
10877
|
id: 'PlatformLimits.Status.shippingMethods',
|
|
10792
10878
|
description: 'The message for shipping methods platform limit values',
|
|
@@ -10797,12 +10883,12 @@ var messages$j = reactIntl.defineMessages({
|
|
|
10797
10883
|
const PlatformLimitsShippingMethodsStatus = _ref => {
|
|
10798
10884
|
let total = _ref.total;
|
|
10799
10885
|
const intl = reactIntl.useIntl();
|
|
10800
|
-
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
10886
|
+
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
|
|
10801
10887
|
platformLimits = _useShippingMethodsPl.platformLimits;
|
|
10802
10888
|
const current = platformLimits?.shippingMethods?.total?.current;
|
|
10803
10889
|
const limit = platformLimits?.shippingMethods?.total?.limit;
|
|
10804
|
-
return jsxRuntime.jsx(
|
|
10805
|
-
intlMessage: messages$
|
|
10890
|
+
return jsxRuntime.jsx(StatusText, {
|
|
10891
|
+
intlMessage: messages$n.shippingMethodsStatus,
|
|
10806
10892
|
children: getPlatformLimitsStatus({
|
|
10807
10893
|
limit,
|
|
10808
10894
|
current,
|
|
@@ -10812,18 +10898,19 @@ const PlatformLimitsShippingMethodsStatus = _ref => {
|
|
|
10812
10898
|
});
|
|
10813
10899
|
};
|
|
10814
10900
|
PlatformLimitsShippingMethodsStatus.displayName = 'PlatformLimitsShippingMethodsStatus';
|
|
10901
|
+
var ShippingMethodsStatus = PlatformLimitsShippingMethodsStatus;
|
|
10815
10902
|
|
|
10816
10903
|
const useShippingMethodsLimits = () => {
|
|
10817
|
-
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher(),
|
|
10904
|
+
const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
|
|
10818
10905
|
refetch = _useShippingMethodsPl.refetch;
|
|
10819
|
-
const _useShippingMethodsPl2 =
|
|
10906
|
+
const _useShippingMethodsPl2 = useShippingMethodsPlatformLimitsStatus(),
|
|
10820
10907
|
hasReachedShippingMethodsWarningLimit = _useShippingMethodsPl2.hasReachedShippingMethodsWarningLimit,
|
|
10821
10908
|
hasReachedShippingMethodsErrorLimit = _useShippingMethodsPl2.hasReachedShippingMethodsErrorLimit;
|
|
10822
10909
|
return {
|
|
10823
10910
|
ShippingMethodsLimits: {
|
|
10824
|
-
Notifications:
|
|
10825
|
-
Status:
|
|
10826
|
-
Tooltip:
|
|
10911
|
+
Notifications: ShippingMethodsNotification,
|
|
10912
|
+
Status: ShippingMethodsStatus,
|
|
10913
|
+
Tooltip: ShippingMethodsTooltip
|
|
10827
10914
|
},
|
|
10828
10915
|
refetchShippingMethodsPlatformLimits: refetch,
|
|
10829
10916
|
status: {
|
|
@@ -10832,23 +10919,25 @@ const useShippingMethodsLimits = () => {
|
|
|
10832
10919
|
}
|
|
10833
10920
|
};
|
|
10834
10921
|
};
|
|
10922
|
+
var useShippingMethodsPlatformLimits = useShippingMethodsLimits;
|
|
10835
10923
|
|
|
10836
10924
|
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; }
|
|
10837
10925
|
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; }
|
|
10838
10926
|
const injectShippingMethodsPlatformLimits = () => WrappedComponent => {
|
|
10839
10927
|
const WithShippingMethodsPlatformLimits = props => {
|
|
10840
|
-
const shippingMethodsPlatformLimits =
|
|
10928
|
+
const shippingMethodsPlatformLimits = useShippingMethodsPlatformLimits();
|
|
10841
10929
|
const shippingMethodsProps = {
|
|
10842
10930
|
platformLimits: shippingMethodsPlatformLimits
|
|
10843
10931
|
};
|
|
10844
10932
|
return jsxRuntime.jsx(WrappedComponent, _objectSpread$k(_objectSpread$k({}, props), shippingMethodsProps));
|
|
10845
10933
|
};
|
|
10846
|
-
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
10934
|
+
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
10847
10935
|
return WithShippingMethodsPlatformLimits;
|
|
10848
10936
|
};
|
|
10937
|
+
var injectShippingMethodsPlatformLimits$1 = injectShippingMethodsPlatformLimits;
|
|
10849
10938
|
|
|
10850
10939
|
const useTaxCategoriesPlatformLimitsFetcher = () => {
|
|
10851
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.taxCategories),
|
|
10940
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.taxCategories),
|
|
10852
10941
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
10853
10942
|
error = _usePlatformLimitsFet.error,
|
|
10854
10943
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -10860,9 +10949,10 @@ const useTaxCategoriesPlatformLimitsFetcher = () => {
|
|
|
10860
10949
|
refetch
|
|
10861
10950
|
};
|
|
10862
10951
|
};
|
|
10952
|
+
var useTaxCategoriesPlatformLimitsFetcher$1 = useTaxCategoriesPlatformLimitsFetcher;
|
|
10863
10953
|
|
|
10864
|
-
const useTaxCategoriesPlatformLimits = () => {
|
|
10865
|
-
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
10954
|
+
const useTaxCategoriesPlatformLimits$1 = () => {
|
|
10955
|
+
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
|
|
10866
10956
|
platformLimits = _useTaxCategoriesPlat.platformLimits;
|
|
10867
10957
|
if (!platformLimits?.taxCategories?.total) {
|
|
10868
10958
|
return {
|
|
@@ -10886,24 +10976,25 @@ const useTaxCategoriesPlatformLimits = () => {
|
|
|
10886
10976
|
hasReachedTaxCategoriesErrorLimit
|
|
10887
10977
|
};
|
|
10888
10978
|
};
|
|
10979
|
+
var useTaxCategoriesPlatformLimitsStatus = useTaxCategoriesPlatformLimits$1;
|
|
10889
10980
|
|
|
10890
10981
|
const PlatformLimitsTaxCategoriesNotifications = () => {
|
|
10891
|
-
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
10982
|
+
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
|
|
10892
10983
|
platformLimits = _useTaxCategoriesPlat.platformLimits;
|
|
10893
|
-
const _useTaxCategoriesPlat2 =
|
|
10984
|
+
const _useTaxCategoriesPlat2 = useTaxCategoriesPlatformLimitsStatus(),
|
|
10894
10985
|
hasReachedTaxCategoriesWarningLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesWarningLimit,
|
|
10895
10986
|
hasReachedTaxCategoriesErrorLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesErrorLimit;
|
|
10896
10987
|
if (!platformLimits?.taxCategories?.total) {
|
|
10897
10988
|
return null;
|
|
10898
10989
|
}
|
|
10899
10990
|
if (hasReachedTaxCategoriesErrorLimit) {
|
|
10900
|
-
return jsxRuntime.jsx(Notifications.Error, {
|
|
10991
|
+
return jsxRuntime.jsx(Notifications$1.Error, {
|
|
10901
10992
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.taxCategories,
|
|
10902
10993
|
limit: platformLimits.taxCategories.total.limit
|
|
10903
10994
|
});
|
|
10904
10995
|
}
|
|
10905
10996
|
if (hasReachedTaxCategoriesWarningLimit) {
|
|
10906
|
-
return jsxRuntime.jsx(Notifications.Warning, {
|
|
10997
|
+
return jsxRuntime.jsx(Notifications$1.Warning, {
|
|
10907
10998
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.taxCategories,
|
|
10908
10999
|
limit: platformLimits.taxCategories.total.limit
|
|
10909
11000
|
});
|
|
@@ -10911,8 +11002,9 @@ const PlatformLimitsTaxCategoriesNotifications = () => {
|
|
|
10911
11002
|
return null;
|
|
10912
11003
|
};
|
|
10913
11004
|
PlatformLimitsTaxCategoriesNotifications.displayName = 'PlatformLimitsTaxCategoriesNotifications';
|
|
11005
|
+
var TaxCategoriesNotification = PlatformLimitsTaxCategoriesNotifications;
|
|
10914
11006
|
|
|
10915
|
-
var messages$
|
|
11007
|
+
var messages$m = reactIntl.defineMessages({
|
|
10916
11008
|
taxCategoriesPlatformLimitReached: {
|
|
10917
11009
|
id: 'PlatformLimits.Tooltip.taxCategoriesLimitReached',
|
|
10918
11010
|
description: 'The message for tax categories platform limit being reached',
|
|
@@ -10925,12 +11017,13 @@ function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
10925
11017
|
const PlatformLimitsTaxCategoriesTooltip = props => {
|
|
10926
11018
|
const intl = reactIntl.useIntl();
|
|
10927
11019
|
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$j(_objectSpread$j({}, props), {}, {
|
|
10928
|
-
title: intl.formatMessage(messages$
|
|
11020
|
+
title: intl.formatMessage(messages$m.taxCategoriesPlatformLimitReached)
|
|
10929
11021
|
}));
|
|
10930
11022
|
};
|
|
10931
11023
|
PlatformLimitsTaxCategoriesTooltip.displayName = 'PlatformLimitsTaxCategoriesTooltip';
|
|
11024
|
+
var TaxCategoriesTooltip = PlatformLimitsTaxCategoriesTooltip;
|
|
10932
11025
|
|
|
10933
|
-
var messages$
|
|
11026
|
+
var messages$l = reactIntl.defineMessages({
|
|
10934
11027
|
taxCategoriesStatus: {
|
|
10935
11028
|
id: 'PlatformLimits.Status.taxCategories',
|
|
10936
11029
|
description: 'The message for tax categories platform limit values',
|
|
@@ -10941,12 +11034,12 @@ var messages$h = reactIntl.defineMessages({
|
|
|
10941
11034
|
const PlatformLimitsTaxCategoriesStatus = _ref => {
|
|
10942
11035
|
let total = _ref.total;
|
|
10943
11036
|
const intl = reactIntl.useIntl();
|
|
10944
|
-
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
11037
|
+
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
|
|
10945
11038
|
platformLimits = _useTaxCategoriesPlat.platformLimits;
|
|
10946
11039
|
const current = platformLimits?.taxCategories?.total?.current;
|
|
10947
11040
|
const limit = platformLimits?.taxCategories?.total?.limit;
|
|
10948
|
-
return jsxRuntime.jsx(
|
|
10949
|
-
intlMessage: messages$
|
|
11041
|
+
return jsxRuntime.jsx(StatusText, {
|
|
11042
|
+
intlMessage: messages$l.taxCategoriesStatus,
|
|
10950
11043
|
children: getPlatformLimitsStatus({
|
|
10951
11044
|
limit,
|
|
10952
11045
|
current,
|
|
@@ -10956,18 +11049,19 @@ const PlatformLimitsTaxCategoriesStatus = _ref => {
|
|
|
10956
11049
|
});
|
|
10957
11050
|
};
|
|
10958
11051
|
PlatformLimitsTaxCategoriesStatus.displayName = 'PlatformLimitsTaxCategoriesStatus';
|
|
11052
|
+
var TaxCategoriesStatus = PlatformLimitsTaxCategoriesStatus;
|
|
10959
11053
|
|
|
10960
11054
|
const useTaxCategoriesLimits = () => {
|
|
10961
|
-
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher(),
|
|
11055
|
+
const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
|
|
10962
11056
|
refetch = _useTaxCategoriesPlat.refetch;
|
|
10963
|
-
const _useTaxCategoriesPlat2 =
|
|
11057
|
+
const _useTaxCategoriesPlat2 = useTaxCategoriesPlatformLimitsStatus(),
|
|
10964
11058
|
hasReachedTaxCategoriesWarningLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesWarningLimit,
|
|
10965
11059
|
hasReachedTaxCategoriesErrorLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesErrorLimit;
|
|
10966
11060
|
return {
|
|
10967
11061
|
TaxCategoriesLimits: {
|
|
10968
|
-
Notifications:
|
|
10969
|
-
Status:
|
|
10970
|
-
Tooltip:
|
|
11062
|
+
Notifications: TaxCategoriesNotification,
|
|
11063
|
+
Status: TaxCategoriesStatus,
|
|
11064
|
+
Tooltip: TaxCategoriesTooltip
|
|
10971
11065
|
},
|
|
10972
11066
|
refetchTaxCategoriesPlatformLimits: refetch,
|
|
10973
11067
|
status: {
|
|
@@ -10976,23 +11070,25 @@ const useTaxCategoriesLimits = () => {
|
|
|
10976
11070
|
}
|
|
10977
11071
|
};
|
|
10978
11072
|
};
|
|
11073
|
+
var useTaxCategoriesPlatformLimits = useTaxCategoriesLimits;
|
|
10979
11074
|
|
|
10980
11075
|
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; }
|
|
10981
11076
|
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; }
|
|
10982
11077
|
const injectTaxCategoriesPlatformLimits = WrappedComponent => {
|
|
10983
11078
|
const WithTaxCategoriesPlatformLimits = props => {
|
|
10984
|
-
const taxCategoriesPlatformLimits =
|
|
11079
|
+
const taxCategoriesPlatformLimits = useTaxCategoriesPlatformLimits();
|
|
10985
11080
|
const taxCategoriesProps = {
|
|
10986
11081
|
platformLimits: taxCategoriesPlatformLimits
|
|
10987
11082
|
};
|
|
10988
11083
|
return jsxRuntime.jsx(WrappedComponent, _objectSpread$i(_objectSpread$i({}, props), taxCategoriesProps));
|
|
10989
11084
|
};
|
|
10990
|
-
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
11085
|
+
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
10991
11086
|
return WithTaxCategoriesPlatformLimits;
|
|
10992
11087
|
};
|
|
11088
|
+
var injectTaxCategoriesPlatformLimits$1 = injectTaxCategoriesPlatformLimits;
|
|
10993
11089
|
|
|
10994
11090
|
const useZonesPlatformLimitsFetcher = () => {
|
|
10995
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.zones),
|
|
11091
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.zones),
|
|
10996
11092
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
10997
11093
|
error = _usePlatformLimitsFet.error,
|
|
10998
11094
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -11004,9 +11100,10 @@ const useZonesPlatformLimitsFetcher = () => {
|
|
|
11004
11100
|
refetch
|
|
11005
11101
|
};
|
|
11006
11102
|
};
|
|
11103
|
+
var useZonesPlatformLimitsFetcher$1 = useZonesPlatformLimitsFetcher;
|
|
11007
11104
|
|
|
11008
|
-
const useZonesPlatformLimits = () => {
|
|
11009
|
-
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
11105
|
+
const useZonesPlatformLimits$1 = () => {
|
|
11106
|
+
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
|
|
11010
11107
|
platformLimits = _useZonesPlatformLimi.platformLimits;
|
|
11011
11108
|
if (!platformLimits?.zones?.total) {
|
|
11012
11109
|
return {
|
|
@@ -11030,24 +11127,25 @@ const useZonesPlatformLimits = () => {
|
|
|
11030
11127
|
hasReachedZonesErrorLimit
|
|
11031
11128
|
};
|
|
11032
11129
|
};
|
|
11130
|
+
var useZonesPlatformLimitsStatus = useZonesPlatformLimits$1;
|
|
11033
11131
|
|
|
11034
11132
|
const PlatformLimitsZonesNotifications = () => {
|
|
11035
|
-
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
11133
|
+
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
|
|
11036
11134
|
platformLimits = _useZonesPlatformLimi.platformLimits;
|
|
11037
|
-
const _useZonesPlatformLimi2 =
|
|
11135
|
+
const _useZonesPlatformLimi2 = useZonesPlatformLimitsStatus(),
|
|
11038
11136
|
hasReachedZonesWarningLimit = _useZonesPlatformLimi2.hasReachedZonesWarningLimit,
|
|
11039
11137
|
hasReachedZonesErrorLimit = _useZonesPlatformLimi2.hasReachedZonesErrorLimit;
|
|
11040
11138
|
if (!platformLimits?.zones?.total) {
|
|
11041
11139
|
return null;
|
|
11042
11140
|
}
|
|
11043
11141
|
if (hasReachedZonesErrorLimit) {
|
|
11044
|
-
return jsxRuntime.jsx(Notifications.Error, {
|
|
11142
|
+
return jsxRuntime.jsx(Notifications$1.Error, {
|
|
11045
11143
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.zones,
|
|
11046
11144
|
limit: platformLimits.zones.total.limit
|
|
11047
11145
|
});
|
|
11048
11146
|
}
|
|
11049
11147
|
if (hasReachedZonesWarningLimit) {
|
|
11050
|
-
return jsxRuntime.jsx(Notifications.Warning, {
|
|
11148
|
+
return jsxRuntime.jsx(Notifications$1.Warning, {
|
|
11051
11149
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.zones,
|
|
11052
11150
|
limit: platformLimits.zones.total.limit
|
|
11053
11151
|
});
|
|
@@ -11055,8 +11153,9 @@ const PlatformLimitsZonesNotifications = () => {
|
|
|
11055
11153
|
return null;
|
|
11056
11154
|
};
|
|
11057
11155
|
PlatformLimitsZonesNotifications.displayName = 'PlatformLimitsZonesNotifications';
|
|
11156
|
+
var ZonesNotification = PlatformLimitsZonesNotifications;
|
|
11058
11157
|
|
|
11059
|
-
var messages$
|
|
11158
|
+
var messages$k = reactIntl.defineMessages({
|
|
11060
11159
|
zonesPlatformLimitReached: {
|
|
11061
11160
|
id: 'PlatformLimits.Tooltip.zonesLimitReached',
|
|
11062
11161
|
description: 'The message for zones platform limit being reached',
|
|
@@ -11069,12 +11168,13 @@ function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
11069
11168
|
const PlatformLimitsZonesTooltip = props => {
|
|
11070
11169
|
const intl = reactIntl.useIntl();
|
|
11071
11170
|
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$h(_objectSpread$h({}, props), {}, {
|
|
11072
|
-
title: intl.formatMessage(messages$
|
|
11171
|
+
title: intl.formatMessage(messages$k.zonesPlatformLimitReached)
|
|
11073
11172
|
}));
|
|
11074
11173
|
};
|
|
11075
11174
|
PlatformLimitsZonesTooltip.displayName = 'PlatformLimitsZonesTooltip';
|
|
11175
|
+
var ZonesTooltip = PlatformLimitsZonesTooltip;
|
|
11076
11176
|
|
|
11077
|
-
var messages$
|
|
11177
|
+
var messages$j = reactIntl.defineMessages({
|
|
11078
11178
|
zonesStatus: {
|
|
11079
11179
|
id: 'PlatformLimits.Status.zones',
|
|
11080
11180
|
description: 'The message for zones platform limit values',
|
|
@@ -11085,12 +11185,12 @@ var messages$f = reactIntl.defineMessages({
|
|
|
11085
11185
|
const PlatformLimitsZonesStatus = _ref => {
|
|
11086
11186
|
let total = _ref.total;
|
|
11087
11187
|
const intl = reactIntl.useIntl();
|
|
11088
|
-
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
11188
|
+
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
|
|
11089
11189
|
platformLimits = _useZonesPlatformLimi.platformLimits;
|
|
11090
11190
|
const current = platformLimits?.zones?.total?.current;
|
|
11091
11191
|
const limit = platformLimits?.zones?.total?.limit;
|
|
11092
|
-
return jsxRuntime.jsx(
|
|
11093
|
-
intlMessage: messages$
|
|
11192
|
+
return jsxRuntime.jsx(StatusText, {
|
|
11193
|
+
intlMessage: messages$j.zonesStatus,
|
|
11094
11194
|
children: getPlatformLimitsStatus({
|
|
11095
11195
|
limit,
|
|
11096
11196
|
current,
|
|
@@ -11100,18 +11200,19 @@ const PlatformLimitsZonesStatus = _ref => {
|
|
|
11100
11200
|
});
|
|
11101
11201
|
};
|
|
11102
11202
|
PlatformLimitsZonesStatus.displayName = 'PlatformLimitsZonesStatus';
|
|
11203
|
+
var ZonesStatus = PlatformLimitsZonesStatus;
|
|
11103
11204
|
|
|
11104
11205
|
const useZonesLimits = () => {
|
|
11105
|
-
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher(),
|
|
11206
|
+
const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
|
|
11106
11207
|
refetch = _useZonesPlatformLimi.refetch;
|
|
11107
|
-
const _useZonesPlatformLimi2 =
|
|
11208
|
+
const _useZonesPlatformLimi2 = useZonesPlatformLimitsStatus(),
|
|
11108
11209
|
hasReachedZonesWarningLimit = _useZonesPlatformLimi2.hasReachedZonesWarningLimit,
|
|
11109
11210
|
hasReachedZonesErrorLimit = _useZonesPlatformLimi2.hasReachedZonesErrorLimit;
|
|
11110
11211
|
return {
|
|
11111
11212
|
ZonesLimits: {
|
|
11112
|
-
Notifications:
|
|
11113
|
-
Status:
|
|
11114
|
-
Tooltip:
|
|
11213
|
+
Notifications: ZonesNotification,
|
|
11214
|
+
Status: ZonesStatus,
|
|
11215
|
+
Tooltip: ZonesTooltip
|
|
11115
11216
|
},
|
|
11116
11217
|
refetchZonesPlatformLimits: refetch,
|
|
11117
11218
|
status: {
|
|
@@ -11120,23 +11221,25 @@ const useZonesLimits = () => {
|
|
|
11120
11221
|
}
|
|
11121
11222
|
};
|
|
11122
11223
|
};
|
|
11224
|
+
var useZonesPlatformLimits = useZonesLimits;
|
|
11123
11225
|
|
|
11124
11226
|
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; }
|
|
11125
11227
|
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; }
|
|
11126
11228
|
const injectZonesPlatformLimits = () => WrappedComponent => {
|
|
11127
11229
|
const WithZonesPlatformLimits = props => {
|
|
11128
|
-
const zonesPlatformLimits =
|
|
11230
|
+
const zonesPlatformLimits = useZonesPlatformLimits();
|
|
11129
11231
|
const zonesProps = {
|
|
11130
11232
|
platformLimits: zonesPlatformLimits
|
|
11131
11233
|
};
|
|
11132
11234
|
return jsxRuntime.jsx(WrappedComponent, _objectSpread$g(_objectSpread$g({}, props), zonesProps));
|
|
11133
11235
|
};
|
|
11134
|
-
WithZonesPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithZonesPlatformLimits');
|
|
11236
|
+
WithZonesPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithZonesPlatformLimits');
|
|
11135
11237
|
return WithZonesPlatformLimits;
|
|
11136
11238
|
};
|
|
11239
|
+
var injectZonesPlatformLimits$1 = injectZonesPlatformLimits;
|
|
11137
11240
|
|
|
11138
11241
|
const useCustomersPlatformLimitsFetcher = () => {
|
|
11139
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.customers),
|
|
11242
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.customers),
|
|
11140
11243
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
11141
11244
|
error = _usePlatformLimitsFet.error,
|
|
11142
11245
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -11148,9 +11251,10 @@ const useCustomersPlatformLimitsFetcher = () => {
|
|
|
11148
11251
|
refetch
|
|
11149
11252
|
};
|
|
11150
11253
|
};
|
|
11254
|
+
var useCustomersPlatformLimitsFetcher$1 = useCustomersPlatformLimitsFetcher;
|
|
11151
11255
|
|
|
11152
|
-
const useCustomersPlatformLimits$
|
|
11153
|
-
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher(),
|
|
11256
|
+
const useCustomersPlatformLimits$2 = () => {
|
|
11257
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
11154
11258
|
platformLimits = _useCustomersPlatform.platformLimits;
|
|
11155
11259
|
if (!platformLimits?.customers?.total) {
|
|
11156
11260
|
return {
|
|
@@ -11174,10 +11278,11 @@ const useCustomersPlatformLimits$1 = () => {
|
|
|
11174
11278
|
hasReachedCustomersErrorLimit
|
|
11175
11279
|
};
|
|
11176
11280
|
};
|
|
11281
|
+
var useCustomersPlatformLimitsStatus = useCustomersPlatformLimits$2;
|
|
11177
11282
|
|
|
11178
11283
|
const useCustomersPlatormLimitsModalState = () => {
|
|
11179
|
-
const customersPlatformLimitsStatus =
|
|
11180
|
-
const limitsModalState = useLimitsModalState(false);
|
|
11284
|
+
const customersPlatformLimitsStatus = useCustomersPlatformLimitsStatus();
|
|
11285
|
+
const limitsModalState = useLimitsModalState$1(false);
|
|
11181
11286
|
React.useEffect(() => {
|
|
11182
11287
|
if (customersPlatformLimitsStatus.hasReachedCustomersErrorLimit) {
|
|
11183
11288
|
limitsModalState.openModal();
|
|
@@ -11187,24 +11292,25 @@ const useCustomersPlatormLimitsModalState = () => {
|
|
|
11187
11292
|
isModalOpen: limitsModalState.isModalOpen
|
|
11188
11293
|
};
|
|
11189
11294
|
};
|
|
11295
|
+
var useCustomersPlatormLimitsModalState$1 = useCustomersPlatormLimitsModalState;
|
|
11190
11296
|
|
|
11191
11297
|
const PlatformLimitsCustomersNotifications = () => {
|
|
11192
|
-
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher(),
|
|
11298
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
11193
11299
|
platformLimits = _useCustomersPlatform.platformLimits;
|
|
11194
|
-
const _useCustomersPlatform2 =
|
|
11300
|
+
const _useCustomersPlatform2 = useCustomersPlatformLimitsStatus(),
|
|
11195
11301
|
hasReachedCustomersWarningLimit = _useCustomersPlatform2.hasReachedCustomersWarningLimit,
|
|
11196
11302
|
hasReachedCustomersErrorLimit = _useCustomersPlatform2.hasReachedCustomersErrorLimit;
|
|
11197
11303
|
if (!platformLimits?.customers?.total) {
|
|
11198
11304
|
return jsxRuntime.jsx("div", {});
|
|
11199
11305
|
}
|
|
11200
11306
|
if (hasReachedCustomersErrorLimit) {
|
|
11201
|
-
return jsxRuntime.jsx(Notifications.Error, {
|
|
11307
|
+
return jsxRuntime.jsx(Notifications$1.Error, {
|
|
11202
11308
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.customers,
|
|
11203
11309
|
limit: platformLimits.customers.total.limit
|
|
11204
11310
|
});
|
|
11205
11311
|
}
|
|
11206
11312
|
if (hasReachedCustomersWarningLimit) {
|
|
11207
|
-
return jsxRuntime.jsx(Notifications.Warning, {
|
|
11313
|
+
return jsxRuntime.jsx(Notifications$1.Warning, {
|
|
11208
11314
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.customers,
|
|
11209
11315
|
limit: platformLimits.customers.total.limit
|
|
11210
11316
|
});
|
|
@@ -11212,8 +11318,9 @@ const PlatformLimitsCustomersNotifications = () => {
|
|
|
11212
11318
|
return jsxRuntime.jsx("div", {});
|
|
11213
11319
|
};
|
|
11214
11320
|
PlatformLimitsCustomersNotifications.displayName = 'PlatformLimitsCustomersNotifications';
|
|
11321
|
+
var CustomersNotification = PlatformLimitsCustomersNotifications;
|
|
11215
11322
|
|
|
11216
|
-
var messages$
|
|
11323
|
+
var messages$i = reactIntl.defineMessages({
|
|
11217
11324
|
customersPlatformLimitReached: {
|
|
11218
11325
|
id: 'PlatformLimits.Tooltip.customersLimitReached',
|
|
11219
11326
|
description: 'The message for customers platform limit being reached',
|
|
@@ -11226,12 +11333,13 @@ function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
11226
11333
|
const PlatformLimitsCustomersTooltip = props => {
|
|
11227
11334
|
const intl = reactIntl.useIntl();
|
|
11228
11335
|
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$f(_objectSpread$f({}, props), {}, {
|
|
11229
|
-
title: intl.formatMessage(messages$
|
|
11336
|
+
title: intl.formatMessage(messages$i.customersPlatformLimitReached)
|
|
11230
11337
|
}));
|
|
11231
11338
|
};
|
|
11232
11339
|
PlatformLimitsCustomersTooltip.displayName = 'PlatformLimitsCustomersTooltip';
|
|
11340
|
+
var CustomersTooltip = PlatformLimitsCustomersTooltip;
|
|
11233
11341
|
|
|
11234
|
-
var messages$
|
|
11342
|
+
var messages$h = reactIntl.defineMessages({
|
|
11235
11343
|
customersStatus: {
|
|
11236
11344
|
id: 'PlatformLimits.Status.customers',
|
|
11237
11345
|
description: 'The message for customers platform limit values',
|
|
@@ -11246,7 +11354,7 @@ var styles$6 = {
|
|
|
11246
11354
|
};
|
|
11247
11355
|
const PlatformLimitsCustomersStatus = () => {
|
|
11248
11356
|
const intl = reactIntl.useIntl();
|
|
11249
|
-
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher(),
|
|
11357
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
11250
11358
|
platformLimits = _useCustomersPlatform.platformLimits;
|
|
11251
11359
|
if (!platformLimits?.customers?.total) {
|
|
11252
11360
|
return null;
|
|
@@ -11259,7 +11367,7 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
11259
11367
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
11260
11368
|
tone: "secondary",
|
|
11261
11369
|
isInline: true,
|
|
11262
|
-
intlMessage: _objectSpread$e(_objectSpread$e({}, messages$
|
|
11370
|
+
intlMessage: _objectSpread$e(_objectSpread$e({}, messages$h.customersStatus), {}, {
|
|
11263
11371
|
values: {
|
|
11264
11372
|
current: intl.formatNumber(current),
|
|
11265
11373
|
limit: intl.formatNumber(limit)
|
|
@@ -11269,8 +11377,9 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
11269
11377
|
});
|
|
11270
11378
|
};
|
|
11271
11379
|
PlatformLimitsCustomersStatus.displayName = 'PlatformLimitsCustomersStatus';
|
|
11380
|
+
var CustomersStatus = PlatformLimitsCustomersStatus;
|
|
11272
11381
|
|
|
11273
|
-
var messages$
|
|
11382
|
+
var messages$g = reactIntl.defineMessages({
|
|
11274
11383
|
title: {
|
|
11275
11384
|
id: 'PlatformLimits.Customers.modalTitle',
|
|
11276
11385
|
description: 'The modal title for the customer platform limits error',
|
|
@@ -11390,20 +11499,20 @@ LimitsReachedErrorGraphic$1.defaultProps = {
|
|
|
11390
11499
|
const PlatformLimitsCustomersErrorModal = _ref => {
|
|
11391
11500
|
let onClose = _ref.onClose;
|
|
11392
11501
|
const intl = reactIntl.useIntl();
|
|
11393
|
-
const customersPlatformLimitsModalState = useCustomersPlatormLimitsModalState();
|
|
11502
|
+
const customersPlatformLimitsModalState = useCustomersPlatormLimitsModalState$1();
|
|
11394
11503
|
return jsxRuntime.jsx(applicationComponents.InfoDialog, {
|
|
11395
11504
|
isOpen: customersPlatformLimitsModalState.isModalOpen,
|
|
11396
11505
|
onClose: onClose,
|
|
11397
|
-
title: intl.formatMessage(messages$
|
|
11506
|
+
title: intl.formatMessage(messages$g.title),
|
|
11398
11507
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
11399
11508
|
scale: "m",
|
|
11400
11509
|
alignItems: "center",
|
|
11401
11510
|
children: [jsxRuntime.jsx(LimitsReachedErrorGraphic$1, {}), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
11402
11511
|
scale: "l",
|
|
11403
11512
|
alignItems: "center",
|
|
11404
|
-
children: [jsxRuntime.jsx(
|
|
11513
|
+
children: [jsxRuntime.jsx(CustomersNotification, {}), jsxRuntime.jsx(uiKit.FlatButton, {
|
|
11405
11514
|
onClick: onClose,
|
|
11406
|
-
label: intl.formatMessage(messages$
|
|
11515
|
+
label: intl.formatMessage(messages$g.backToList),
|
|
11407
11516
|
icon: jsxRuntime.jsx(uiKit.ListIcon, {
|
|
11408
11517
|
size: "medium",
|
|
11409
11518
|
color: "primary"
|
|
@@ -11414,13 +11523,14 @@ const PlatformLimitsCustomersErrorModal = _ref => {
|
|
|
11414
11523
|
});
|
|
11415
11524
|
};
|
|
11416
11525
|
PlatformLimitsCustomersErrorModal.displayName = 'PlatformLimitsCustomersErrorModal';
|
|
11526
|
+
var CustomersErrorModal = PlatformLimitsCustomersErrorModal;
|
|
11417
11527
|
|
|
11418
11528
|
var styles$5 = {
|
|
11419
11529
|
"combined": "platform-limits-customers-combined-module__combined___OszDd"
|
|
11420
11530
|
};
|
|
11421
11531
|
const PlatformLimitsCustomersCombined = () => {
|
|
11422
11532
|
// on the customer create only show the warning message
|
|
11423
|
-
const _useCustomersPlatform =
|
|
11533
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsStatus(),
|
|
11424
11534
|
hasReachedCustomersErrorLimit = _useCustomersPlatform.hasReachedCustomersErrorLimit,
|
|
11425
11535
|
hasReachedCustomersWarningLimit = _useCustomersPlatform.hasReachedCustomersWarningLimit;
|
|
11426
11536
|
return jsxRuntime.jsx("div", {
|
|
@@ -11428,26 +11538,27 @@ const PlatformLimitsCustomersCombined = () => {
|
|
|
11428
11538
|
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
11429
11539
|
scale: "xl",
|
|
11430
11540
|
justifyContent: "space-between",
|
|
11431
|
-
children: [hasReachedCustomersWarningLimit && !hasReachedCustomersErrorLimit ? jsxRuntime.jsx(
|
|
11541
|
+
children: [hasReachedCustomersWarningLimit && !hasReachedCustomersErrorLimit ? jsxRuntime.jsx(CustomersNotification, {}) : null, jsxRuntime.jsx(CustomersStatus, {})]
|
|
11432
11542
|
})
|
|
11433
11543
|
});
|
|
11434
11544
|
};
|
|
11435
11545
|
PlatformLimitsCustomersCombined.displayName = 'PlatformLimitsCustomersCombined';
|
|
11546
|
+
var CustomersCombined = PlatformLimitsCustomersCombined;
|
|
11436
11547
|
|
|
11437
11548
|
const useCustomersPlatformLimits = () => {
|
|
11438
|
-
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher(),
|
|
11549
|
+
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
11439
11550
|
refetch = _useCustomersPlatform.refetch;
|
|
11440
|
-
const _useCustomersPlatform2 =
|
|
11551
|
+
const _useCustomersPlatform2 = useCustomersPlatformLimitsStatus(),
|
|
11441
11552
|
hasReachedCustomersWarningLimit = _useCustomersPlatform2.hasReachedCustomersWarningLimit,
|
|
11442
11553
|
hasReachedCustomersErrorLimit = _useCustomersPlatform2.hasReachedCustomersErrorLimit;
|
|
11443
|
-
const interceptNavigation = useInterceptNavigation(hasReachedCustomersErrorLimit);
|
|
11554
|
+
const interceptNavigation = useInterceptNavigation$1(hasReachedCustomersErrorLimit);
|
|
11444
11555
|
return {
|
|
11445
11556
|
CustomersLimits: {
|
|
11446
|
-
Notifications:
|
|
11447
|
-
Status:
|
|
11448
|
-
Combined:
|
|
11449
|
-
Tooltip:
|
|
11450
|
-
ErrorModal:
|
|
11557
|
+
Notifications: CustomersNotification,
|
|
11558
|
+
Status: CustomersStatus,
|
|
11559
|
+
Combined: CustomersCombined,
|
|
11560
|
+
Tooltip: CustomersTooltip,
|
|
11561
|
+
ErrorModal: CustomersErrorModal
|
|
11451
11562
|
},
|
|
11452
11563
|
refetchCustomersPlatformLimits: refetch,
|
|
11453
11564
|
interceptNavigation,
|
|
@@ -11457,23 +11568,25 @@ const useCustomersPlatformLimits = () => {
|
|
|
11457
11568
|
}
|
|
11458
11569
|
};
|
|
11459
11570
|
};
|
|
11571
|
+
var useCustomersPlatformLimits$1 = useCustomersPlatformLimits;
|
|
11460
11572
|
|
|
11461
11573
|
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; }
|
|
11462
11574
|
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; }
|
|
11463
11575
|
const injectCustomersPlatformLimits = () => WrappedComponent => {
|
|
11464
11576
|
const WithCustomersPlatformLimits = props => {
|
|
11465
|
-
const CustomersPlatformLimits = useCustomersPlatformLimits();
|
|
11577
|
+
const CustomersPlatformLimits = useCustomersPlatformLimits$1();
|
|
11466
11578
|
const customersProps = {
|
|
11467
11579
|
platformLimits: CustomersPlatformLimits
|
|
11468
11580
|
};
|
|
11469
11581
|
return jsxRuntime.jsx(WrappedComponent, _objectSpread$c(_objectSpread$c({}, props), customersProps));
|
|
11470
11582
|
};
|
|
11471
|
-
WithCustomersPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
11583
|
+
WithCustomersPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
11472
11584
|
return WithCustomersPlatformLimits;
|
|
11473
11585
|
};
|
|
11586
|
+
var injectCustomersPlatformLimits$1 = injectCustomersPlatformLimits;
|
|
11474
11587
|
|
|
11475
11588
|
const useCustomerGroupsPlatformLimitsFetcher = () => {
|
|
11476
|
-
const _usePlatformLimitsFet = usePlatformLimitsFetcher(RESOURCES_WITH_PLATFORM_LIMITS.customerGroups),
|
|
11589
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.customerGroups),
|
|
11477
11590
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
11478
11591
|
error = _usePlatformLimitsFet.error,
|
|
11479
11592
|
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
@@ -11485,9 +11598,10 @@ const useCustomerGroupsPlatformLimitsFetcher = () => {
|
|
|
11485
11598
|
refetch
|
|
11486
11599
|
};
|
|
11487
11600
|
};
|
|
11601
|
+
var useCustomerGroupsPlatformLimitsFetcher$1 = useCustomerGroupsPlatformLimitsFetcher;
|
|
11488
11602
|
|
|
11489
11603
|
const useCustomerGroupsPlatformLimitsStatus = () => {
|
|
11490
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher(),
|
|
11604
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
|
|
11491
11605
|
platformLimits = _useCustomerGroupsPla.platformLimits;
|
|
11492
11606
|
if (!platformLimits?.customerGroups?.total) {
|
|
11493
11607
|
return {
|
|
@@ -11511,10 +11625,11 @@ const useCustomerGroupsPlatformLimitsStatus = () => {
|
|
|
11511
11625
|
hasReachedCustomerGroupsErrorLimit
|
|
11512
11626
|
};
|
|
11513
11627
|
};
|
|
11628
|
+
var useCustomerGroupsPlatformLimitsStatus$1 = useCustomerGroupsPlatformLimitsStatus;
|
|
11514
11629
|
|
|
11515
11630
|
const useCustomerGroupsPlatormLimitsModalState = () => {
|
|
11516
|
-
const customerGroupsPlatformLimitsStatus = useCustomerGroupsPlatformLimitsStatus();
|
|
11517
|
-
const limitsModalState = useLimitsModalState(false);
|
|
11631
|
+
const customerGroupsPlatformLimitsStatus = useCustomerGroupsPlatformLimitsStatus$1();
|
|
11632
|
+
const limitsModalState = useLimitsModalState$1(false);
|
|
11518
11633
|
React.useEffect(() => {
|
|
11519
11634
|
if (customerGroupsPlatformLimitsStatus.hasReachedCustomerGroupsErrorLimit) {
|
|
11520
11635
|
limitsModalState.openModal();
|
|
@@ -11524,24 +11639,25 @@ const useCustomerGroupsPlatormLimitsModalState = () => {
|
|
|
11524
11639
|
isModalOpen: limitsModalState.isModalOpen
|
|
11525
11640
|
};
|
|
11526
11641
|
};
|
|
11642
|
+
var useCustomerGroupsPlatormLimitsModalState$1 = useCustomerGroupsPlatormLimitsModalState;
|
|
11527
11643
|
|
|
11528
11644
|
const PlatformLimitsCustomerGroupsNotifications = () => {
|
|
11529
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher(),
|
|
11645
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
|
|
11530
11646
|
platformLimits = _useCustomerGroupsPla.platformLimits;
|
|
11531
|
-
const _useCustomerGroupsPla2 = useCustomerGroupsPlatformLimitsStatus(),
|
|
11647
|
+
const _useCustomerGroupsPla2 = useCustomerGroupsPlatformLimitsStatus$1(),
|
|
11532
11648
|
hasReachedCustomerGroupsWarningLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsWarningLimit,
|
|
11533
11649
|
hasReachedCustomerGroupsErrorLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsErrorLimit;
|
|
11534
11650
|
if (!platformLimits?.customerGroups?.total) {
|
|
11535
11651
|
return jsxRuntime.jsx("div", {});
|
|
11536
11652
|
}
|
|
11537
11653
|
if (hasReachedCustomerGroupsErrorLimit) {
|
|
11538
|
-
return jsxRuntime.jsx(Notifications.Error, {
|
|
11654
|
+
return jsxRuntime.jsx(Notifications$1.Error, {
|
|
11539
11655
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.customerGroups,
|
|
11540
11656
|
limit: platformLimits.customerGroups.total.limit
|
|
11541
11657
|
});
|
|
11542
11658
|
}
|
|
11543
11659
|
if (hasReachedCustomerGroupsWarningLimit) {
|
|
11544
|
-
return jsxRuntime.jsx(Notifications.Warning, {
|
|
11660
|
+
return jsxRuntime.jsx(Notifications$1.Warning, {
|
|
11545
11661
|
resource: RESOURCES_WITH_PLATFORM_LIMITS.customerGroups,
|
|
11546
11662
|
limit: platformLimits.customerGroups.total.limit
|
|
11547
11663
|
});
|
|
@@ -11549,8 +11665,9 @@ const PlatformLimitsCustomerGroupsNotifications = () => {
|
|
|
11549
11665
|
return jsxRuntime.jsx("div", {});
|
|
11550
11666
|
};
|
|
11551
11667
|
PlatformLimitsCustomerGroupsNotifications.displayName = 'PlatformLimitsCustomerGroupsNotifications';
|
|
11668
|
+
var CustomerGroupsNotification = PlatformLimitsCustomerGroupsNotifications;
|
|
11552
11669
|
|
|
11553
|
-
var messages$
|
|
11670
|
+
var messages$f = reactIntl.defineMessages({
|
|
11554
11671
|
customerGroupsPlatformLimitReached: {
|
|
11555
11672
|
id: 'PlatformLimits.Tooltip.customerGroupsLimitReached',
|
|
11556
11673
|
description: 'The message for custome groups platform limit being reached',
|
|
@@ -11563,12 +11680,13 @@ function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
11563
11680
|
const PlatformLimitsCustomerGroupsTooltip = props => {
|
|
11564
11681
|
const intl = reactIntl.useIntl();
|
|
11565
11682
|
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$b(_objectSpread$b({}, props), {}, {
|
|
11566
|
-
title: intl.formatMessage(messages$
|
|
11683
|
+
title: intl.formatMessage(messages$f.customerGroupsPlatformLimitReached)
|
|
11567
11684
|
}));
|
|
11568
11685
|
};
|
|
11569
11686
|
PlatformLimitsCustomerGroupsTooltip.displayName = 'PlatformLimitsCustomerGroupsTooltip';
|
|
11687
|
+
var CustomerGroupsTooltip = PlatformLimitsCustomerGroupsTooltip;
|
|
11570
11688
|
|
|
11571
|
-
var messages$
|
|
11689
|
+
var messages$e = reactIntl.defineMessages({
|
|
11572
11690
|
customerGroupsStatus: {
|
|
11573
11691
|
id: 'PlatformLimits.Status.customerGroups',
|
|
11574
11692
|
description: 'The message for customer groups platform limit values',
|
|
@@ -11583,7 +11701,7 @@ var styles$4 = {
|
|
|
11583
11701
|
};
|
|
11584
11702
|
const PlatformLimitsCustomerGroupsStatus = () => {
|
|
11585
11703
|
const intl = reactIntl.useIntl();
|
|
11586
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher(),
|
|
11704
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
|
|
11587
11705
|
platformLimits = _useCustomerGroupsPla.platformLimits;
|
|
11588
11706
|
if (!platformLimits?.customerGroups?.total) {
|
|
11589
11707
|
return null;
|
|
@@ -11596,7 +11714,7 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
11596
11714
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
11597
11715
|
tone: "secondary",
|
|
11598
11716
|
isInline: true,
|
|
11599
|
-
intlMessage: _objectSpread$a(_objectSpread$a({}, messages$
|
|
11717
|
+
intlMessage: _objectSpread$a(_objectSpread$a({}, messages$e.customerGroupsStatus), {}, {
|
|
11600
11718
|
values: {
|
|
11601
11719
|
current: intl.formatNumber(current),
|
|
11602
11720
|
limit: intl.formatNumber(limit)
|
|
@@ -11606,8 +11724,9 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
11606
11724
|
});
|
|
11607
11725
|
};
|
|
11608
11726
|
PlatformLimitsCustomerGroupsStatus.displayName = 'PlatformLimitsCustomerGroupsStatus';
|
|
11727
|
+
var CustomerGroupsStatus = PlatformLimitsCustomerGroupsStatus;
|
|
11609
11728
|
|
|
11610
|
-
var messages$
|
|
11729
|
+
var messages$d = reactIntl.defineMessages({
|
|
11611
11730
|
title: {
|
|
11612
11731
|
id: 'PlatformLimits.CustomerGroups.modalTitle',
|
|
11613
11732
|
description: 'The modal title for the customer groups platform limits error',
|
|
@@ -11727,20 +11846,20 @@ LimitsReachedErrorGraphic.defaultProps = {
|
|
|
11727
11846
|
const PlatformLimitsCustomerGroupsErrorModal = _ref => {
|
|
11728
11847
|
let onClose = _ref.onClose;
|
|
11729
11848
|
const intl = reactIntl.useIntl();
|
|
11730
|
-
const customerGroupsPlatformLimitsModalState = useCustomerGroupsPlatormLimitsModalState();
|
|
11849
|
+
const customerGroupsPlatformLimitsModalState = useCustomerGroupsPlatormLimitsModalState$1();
|
|
11731
11850
|
return jsxRuntime.jsx(applicationComponents.InfoDialog, {
|
|
11732
11851
|
isOpen: customerGroupsPlatformLimitsModalState.isModalOpen,
|
|
11733
11852
|
onClose: onClose,
|
|
11734
|
-
title: intl.formatMessage(messages$
|
|
11853
|
+
title: intl.formatMessage(messages$d.title),
|
|
11735
11854
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
11736
11855
|
scale: "m",
|
|
11737
11856
|
alignItems: "center",
|
|
11738
11857
|
children: [jsxRuntime.jsx(LimitsReachedErrorGraphic, {}), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
11739
11858
|
scale: "l",
|
|
11740
11859
|
alignItems: "center",
|
|
11741
|
-
children: [jsxRuntime.jsx(
|
|
11860
|
+
children: [jsxRuntime.jsx(CustomerGroupsNotification, {}), jsxRuntime.jsx(uiKit.FlatButton, {
|
|
11742
11861
|
onClick: onClose,
|
|
11743
|
-
label: intl.formatMessage(messages$
|
|
11862
|
+
label: intl.formatMessage(messages$d.backToList),
|
|
11744
11863
|
icon: jsxRuntime.jsx(uiKit.ListIcon, {
|
|
11745
11864
|
size: "medium",
|
|
11746
11865
|
color: "primary"
|
|
@@ -11751,13 +11870,14 @@ const PlatformLimitsCustomerGroupsErrorModal = _ref => {
|
|
|
11751
11870
|
});
|
|
11752
11871
|
};
|
|
11753
11872
|
PlatformLimitsCustomerGroupsErrorModal.displayName = 'PlatformLimitsCustomerGroupsErrorModal';
|
|
11873
|
+
var CustomerGroupsErrorModal = PlatformLimitsCustomerGroupsErrorModal;
|
|
11754
11874
|
|
|
11755
11875
|
var styles$3 = {
|
|
11756
11876
|
"combined": "platform-limits-customer-groups-combined-module__combined___WjRoI"
|
|
11757
11877
|
};
|
|
11758
11878
|
const PlatformLimitsCustomerGroupsCombined = () => {
|
|
11759
11879
|
// on the customer create only show the warning message
|
|
11760
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsStatus(),
|
|
11880
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsStatus$1(),
|
|
11761
11881
|
hasReachedCustomerGroupsErrorLimit = _useCustomerGroupsPla.hasReachedCustomerGroupsErrorLimit,
|
|
11762
11882
|
hasReachedCustomerGroupsWarningLimit = _useCustomerGroupsPla.hasReachedCustomerGroupsWarningLimit;
|
|
11763
11883
|
return jsxRuntime.jsx("div", {
|
|
@@ -11765,26 +11885,27 @@ const PlatformLimitsCustomerGroupsCombined = () => {
|
|
|
11765
11885
|
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
11766
11886
|
scale: "xl",
|
|
11767
11887
|
justifyContent: "space-between",
|
|
11768
|
-
children: [hasReachedCustomerGroupsWarningLimit && !hasReachedCustomerGroupsErrorLimit ? jsxRuntime.jsx(
|
|
11888
|
+
children: [hasReachedCustomerGroupsWarningLimit && !hasReachedCustomerGroupsErrorLimit ? jsxRuntime.jsx(CustomerGroupsNotification, {}) : null, jsxRuntime.jsx(CustomerGroupsStatus, {})]
|
|
11769
11889
|
})
|
|
11770
11890
|
});
|
|
11771
11891
|
};
|
|
11772
11892
|
PlatformLimitsCustomerGroupsCombined.displayName = 'PlatformLimitsCustomerGroupsCombined';
|
|
11893
|
+
var CustomerGroupsCombined = PlatformLimitsCustomerGroupsCombined;
|
|
11773
11894
|
|
|
11774
11895
|
const useCustomerGroupsPlatformLimits = () => {
|
|
11775
|
-
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher(),
|
|
11896
|
+
const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
|
|
11776
11897
|
refetch = _useCustomerGroupsPla.refetch;
|
|
11777
|
-
const _useCustomerGroupsPla2 = useCustomerGroupsPlatformLimitsStatus(),
|
|
11898
|
+
const _useCustomerGroupsPla2 = useCustomerGroupsPlatformLimitsStatus$1(),
|
|
11778
11899
|
hasReachedCustomerGroupsWarningLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsWarningLimit,
|
|
11779
11900
|
hasReachedCustomerGroupsErrorLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsErrorLimit;
|
|
11780
|
-
const interceptNavigation = useInterceptNavigation(hasReachedCustomerGroupsErrorLimit);
|
|
11901
|
+
const interceptNavigation = useInterceptNavigation$1(hasReachedCustomerGroupsErrorLimit);
|
|
11781
11902
|
return {
|
|
11782
11903
|
CustomerGroupsLimits: {
|
|
11783
|
-
Notifications:
|
|
11784
|
-
Status:
|
|
11785
|
-
Combined:
|
|
11786
|
-
Tooltip:
|
|
11787
|
-
ErrorModal:
|
|
11904
|
+
Notifications: CustomerGroupsNotification,
|
|
11905
|
+
Status: CustomerGroupsStatus,
|
|
11906
|
+
Combined: CustomerGroupsCombined,
|
|
11907
|
+
Tooltip: CustomerGroupsTooltip,
|
|
11908
|
+
ErrorModal: CustomerGroupsErrorModal
|
|
11788
11909
|
},
|
|
11789
11910
|
refetchCustomerGroupsPlatformLimits: refetch,
|
|
11790
11911
|
interceptNavigation,
|
|
@@ -11794,22 +11915,24 @@ const useCustomerGroupsPlatformLimits = () => {
|
|
|
11794
11915
|
}
|
|
11795
11916
|
};
|
|
11796
11917
|
};
|
|
11918
|
+
var useCustomerGroupsPlatformLimits$1 = useCustomerGroupsPlatformLimits;
|
|
11797
11919
|
|
|
11798
11920
|
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; }
|
|
11799
11921
|
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; }
|
|
11800
11922
|
const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
|
|
11801
11923
|
const WithCustomerGroupsPlatformLimits = props => {
|
|
11802
|
-
const CustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits();
|
|
11924
|
+
const CustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits$1();
|
|
11803
11925
|
const customersProps = {
|
|
11804
11926
|
platformLimits: CustomerGroupsPlatformLimits
|
|
11805
11927
|
};
|
|
11806
11928
|
return jsxRuntime.jsx(WrappedComponent, _objectSpread$8(_objectSpread$8({}, props), customersProps));
|
|
11807
11929
|
};
|
|
11808
|
-
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
11930
|
+
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
11809
11931
|
return WithCustomerGroupsPlatformLimits;
|
|
11810
11932
|
};
|
|
11933
|
+
var injectCustomerGroupsPlatformLimits$1 = injectCustomerGroupsPlatformLimits;
|
|
11811
11934
|
|
|
11812
|
-
var messages$
|
|
11935
|
+
var messages$c = reactIntl.defineMessages({
|
|
11813
11936
|
yes: {
|
|
11814
11937
|
id: 'BooleanField.yes',
|
|
11815
11938
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -11830,8 +11953,8 @@ const valueMapping = {
|
|
|
11830
11953
|
const BooleanField = props => {
|
|
11831
11954
|
let selectedValue;
|
|
11832
11955
|
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]);
|
|
11833
|
-
const yesLabel = props.intl.formatMessage(messages$
|
|
11834
|
-
const noLabel = props.intl.formatMessage(messages$
|
|
11956
|
+
const yesLabel = props.intl.formatMessage(messages$c.yes);
|
|
11957
|
+
const noLabel = props.intl.formatMessage(messages$c.no);
|
|
11835
11958
|
const options = [{
|
|
11836
11959
|
value: 'yes',
|
|
11837
11960
|
label: yesLabel
|
|
@@ -11869,7 +11992,7 @@ function getBooleanValue(value) {
|
|
|
11869
11992
|
return value === false ? 'no' : 'yes';
|
|
11870
11993
|
}
|
|
11871
11994
|
|
|
11872
|
-
const messages$
|
|
11995
|
+
const messages$a = reactIntl.defineMessages({
|
|
11873
11996
|
from: {
|
|
11874
11997
|
id: 'LabelRange.from',
|
|
11875
11998
|
description: 'The label for "from" range',
|
|
@@ -11881,6 +12004,7 @@ const messages$7 = reactIntl.defineMessages({
|
|
|
11881
12004
|
defaultMessage: 'To'
|
|
11882
12005
|
}
|
|
11883
12006
|
});
|
|
12007
|
+
var messages$b = messages$a;
|
|
11884
12008
|
|
|
11885
12009
|
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; }
|
|
11886
12010
|
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; }
|
|
@@ -11891,12 +12015,13 @@ const LabelRange = _ref => {
|
|
|
11891
12015
|
let type = _ref.type;
|
|
11892
12016
|
return jsxRuntime.jsx("label", {
|
|
11893
12017
|
className: styles$2.label,
|
|
11894
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$7({}, messages$
|
|
12018
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$7({}, messages$b[type]))
|
|
11895
12019
|
});
|
|
11896
12020
|
};
|
|
11897
12021
|
LabelRange.displayName = 'LabelRange';
|
|
12022
|
+
var LabelRange$1 = LabelRange;
|
|
11898
12023
|
|
|
11899
|
-
var messages$
|
|
12024
|
+
var messages$9 = reactIntl.defineMessages({
|
|
11900
12025
|
label: {
|
|
11901
12026
|
id: 'MissingValueField.label',
|
|
11902
12027
|
description: 'The label text for the missing values option',
|
|
@@ -11910,13 +12035,14 @@ const MissingValueField = props => jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
|
11910
12035
|
name: "missing-value",
|
|
11911
12036
|
isChecked: props.isChecked,
|
|
11912
12037
|
onChange: props.onChange,
|
|
11913
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$6({}, messages$
|
|
12038
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$6({}, messages$9.label))
|
|
11914
12039
|
});
|
|
11915
12040
|
MissingValueField.defaultProps = {
|
|
11916
12041
|
isChecked: false
|
|
11917
12042
|
};
|
|
12043
|
+
var MissingValueField$1 = MissingValueField;
|
|
11918
12044
|
|
|
11919
|
-
var messages$
|
|
12045
|
+
var messages$8 = reactIntl.defineMessages({
|
|
11920
12046
|
filterWholeInput: {
|
|
11921
12047
|
id: 'MultiValueSearchInput.buttonLabel',
|
|
11922
12048
|
description: 'Label for "MultiValueSearchInput" filter whole input.',
|
|
@@ -11954,7 +12080,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11954
12080
|
}),
|
|
11955
12081
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11956
12082
|
truncate: true,
|
|
11957
|
-
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$
|
|
12083
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$8.filterWholeInput), {}, {
|
|
11958
12084
|
values: {
|
|
11959
12085
|
values: `"${props.value}"`
|
|
11960
12086
|
}
|
|
@@ -11967,7 +12093,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
11967
12093
|
}),
|
|
11968
12094
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
11969
12095
|
truncate: true,
|
|
11970
|
-
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$
|
|
12096
|
+
intlMessage: _objectSpread$5(_objectSpread$5({}, messages$8.filterSeparateValues), {}, {
|
|
11971
12097
|
values: {
|
|
11972
12098
|
values: `"${props.multiValue.join('", "')}"` || props.value
|
|
11973
12099
|
}
|
|
@@ -12077,6 +12203,7 @@ const MultiValueSearchInput = props => {
|
|
|
12077
12203
|
});
|
|
12078
12204
|
};
|
|
12079
12205
|
MultiValueSearchInput.displayName = 'MultiValueSearchInput';
|
|
12206
|
+
var MultiValueSearchInput$1 = MultiValueSearchInput;
|
|
12080
12207
|
|
|
12081
12208
|
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; }
|
|
12082
12209
|
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; }
|
|
@@ -12216,7 +12343,7 @@ const withPropsForMoney = ownProps => ownProps.numberFormatType === 'money' ? {
|
|
|
12216
12343
|
},
|
|
12217
12344
|
numeralDecimalScale: 2
|
|
12218
12345
|
} : {};
|
|
12219
|
-
var numericFormatInput = withProps(withPropsForMoney)(NumericFormatInput);
|
|
12346
|
+
var numericFormatInput = withProps$1(withPropsForMoney)(NumericFormatInput);
|
|
12220
12347
|
|
|
12221
12348
|
/**
|
|
12222
12349
|
* @param mixed value
|
|
@@ -12273,6 +12400,7 @@ const buildSearchQuery = (searchQuery, searchMode, fragments) => {
|
|
|
12273
12400
|
}
|
|
12274
12401
|
return fragments[searchMode].getQuery(trimmedSearchQuery);
|
|
12275
12402
|
};
|
|
12403
|
+
var buildSearchQuery$1 = buildSearchQuery;
|
|
12276
12404
|
|
|
12277
12405
|
const getBulkNotification = _ref => {
|
|
12278
12406
|
let counts = _ref.counts,
|
|
@@ -12316,10 +12444,12 @@ const businessRoleConstants = {
|
|
|
12316
12444
|
SalesAndECommerceManager: 'SalesAndECommerceManager',
|
|
12317
12445
|
Other: 'Other'
|
|
12318
12446
|
};
|
|
12447
|
+
var businessRoleConstants$1 = businessRoleConstants;
|
|
12319
12448
|
|
|
12320
|
-
const businessRoleKeys = _Object$values__default["default"](businessRoleConstants);
|
|
12449
|
+
const businessRoleKeys = _Object$values__default["default"](businessRoleConstants$1);
|
|
12450
|
+
var businessRoleKeys$1 = businessRoleKeys;
|
|
12321
12451
|
|
|
12322
|
-
var messages$
|
|
12452
|
+
var messages$7 = reactIntl.defineMessages({
|
|
12323
12453
|
ExecutiveManagement: {
|
|
12324
12454
|
id: 'Shared.businessRoles.executiveManagement',
|
|
12325
12455
|
description: 'The label for one of the selectable business roles',
|
|
@@ -12494,6 +12624,7 @@ const createNextSortDefinition = _ref => {
|
|
|
12494
12624
|
};
|
|
12495
12625
|
}
|
|
12496
12626
|
};
|
|
12627
|
+
var createNextSortDefinition$1 = createNextSortDefinition;
|
|
12497
12628
|
|
|
12498
12629
|
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; }
|
|
12499
12630
|
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; }
|
|
@@ -12913,7 +13044,7 @@ function isEmptyFilter(_ref) {
|
|
|
12913
13044
|
});
|
|
12914
13045
|
}
|
|
12915
13046
|
|
|
12916
|
-
const messages$
|
|
13047
|
+
const messages$5 = reactIntl.defineMessages({
|
|
12917
13048
|
inputFieldError: {
|
|
12918
13049
|
id: 'Search.Filters.validation.customField.inputFieldError',
|
|
12919
13050
|
description: 'Error message for empty input field ',
|
|
@@ -12925,6 +13056,7 @@ const messages$3 = reactIntl.defineMessages({
|
|
|
12925
13056
|
defaultMessage: 'Please select an option.'
|
|
12926
13057
|
}
|
|
12927
13058
|
});
|
|
13059
|
+
var messages$6 = messages$5;
|
|
12928
13060
|
|
|
12929
13061
|
const hasOptionDropdown = type => {
|
|
12930
13062
|
var _context;
|
|
@@ -12934,14 +13066,14 @@ const validateValue = (value, type, intl) => {
|
|
|
12934
13066
|
if (validateSingleFilter({
|
|
12935
13067
|
value
|
|
12936
13068
|
})) {
|
|
12937
|
-
return intl.formatMessage(messages$
|
|
13069
|
+
return intl.formatMessage(messages$6.inputFieldError);
|
|
12938
13070
|
}
|
|
12939
13071
|
if (type === FIELD_TYPES.Money && (validateSingleFilter({
|
|
12940
13072
|
value: value.currencyCode
|
|
12941
13073
|
}) || validateSingleFilter({
|
|
12942
13074
|
value: value.amount
|
|
12943
13075
|
}))) {
|
|
12944
|
-
return intl.formatMessage(messages$
|
|
13076
|
+
return intl.formatMessage(messages$6.inputFieldError);
|
|
12945
13077
|
}
|
|
12946
13078
|
return null;
|
|
12947
13079
|
};
|
|
@@ -12949,7 +13081,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
12949
13081
|
let value = _ref.value;
|
|
12950
13082
|
if (!value || !value.type) {
|
|
12951
13083
|
return {
|
|
12952
|
-
type: intl.formatMessage(messages$
|
|
13084
|
+
type: intl.formatMessage(messages$6.optionFieldError)
|
|
12953
13085
|
};
|
|
12954
13086
|
}
|
|
12955
13087
|
const typeName = value.type.name;
|
|
@@ -12957,7 +13089,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
12957
13089
|
const filterValue = value.value;
|
|
12958
13090
|
if (hasOption && !value.option) {
|
|
12959
13091
|
return {
|
|
12960
|
-
option: intl.formatMessage(messages$
|
|
13092
|
+
option: intl.formatMessage(messages$6.optionFieldError)
|
|
12961
13093
|
};
|
|
12962
13094
|
}
|
|
12963
13095
|
if (value.option === FILTER_TYPES.range) {
|
|
@@ -12976,7 +13108,7 @@ function validateFilter$2(_ref, intl) {
|
|
|
12976
13108
|
} : null;
|
|
12977
13109
|
}
|
|
12978
13110
|
|
|
12979
|
-
const messages$
|
|
13111
|
+
const messages$3 = reactIntl.defineMessages({
|
|
12980
13112
|
rangeMissingValue: {
|
|
12981
13113
|
id: 'Search.Filters.validation.date.rangeMissingValue',
|
|
12982
13114
|
description: 'error message if missing a value in a range',
|
|
@@ -12993,6 +13125,7 @@ const messages$2 = reactIntl.defineMessages({
|
|
|
12993
13125
|
defaultMessage: 'Please enter a value for this field.'
|
|
12994
13126
|
}
|
|
12995
13127
|
});
|
|
13128
|
+
var messages$4 = messages$3;
|
|
12996
13129
|
|
|
12997
13130
|
function validateFilter$1(_ref, intl) {
|
|
12998
13131
|
let value = _ref.value,
|
|
@@ -13001,30 +13134,30 @@ function validateFilter$1(_ref, intl) {
|
|
|
13001
13134
|
if (validateSingleFilter({
|
|
13002
13135
|
value: value?.from
|
|
13003
13136
|
})) return {
|
|
13004
|
-
from: intl.formatMessage(messages$
|
|
13137
|
+
from: intl.formatMessage(messages$4.rangeMissingValue)
|
|
13005
13138
|
};
|
|
13006
13139
|
if (validateSingleFilter({
|
|
13007
13140
|
value: value?.to
|
|
13008
13141
|
})) return {
|
|
13009
|
-
to: intl.formatMessage(messages$
|
|
13142
|
+
to: intl.formatMessage(messages$4.rangeMissingValue)
|
|
13010
13143
|
};
|
|
13011
13144
|
if (moment__default["default"](value?.to).isBefore(value?.from)) return {
|
|
13012
|
-
from: intl.formatMessage(messages$
|
|
13145
|
+
from: intl.formatMessage(messages$4.rangeToSmallerThanFrom)
|
|
13013
13146
|
};
|
|
13014
13147
|
} else if (type === 'equalTo' || type === 'lessThan' || type === 'moreThan') {
|
|
13015
13148
|
if (validateSingleFilter({
|
|
13016
13149
|
value
|
|
13017
|
-
})) return intl.formatMessage(messages$
|
|
13150
|
+
})) return intl.formatMessage(messages$4.missingValue);
|
|
13018
13151
|
}
|
|
13019
13152
|
return null;
|
|
13020
13153
|
}
|
|
13021
13154
|
|
|
13022
13155
|
const validateSingleOptionEnum = (selectedOption, intl) => {
|
|
13023
|
-
if (validateSingleFilter(selectedOption)) return intl.formatMessage(
|
|
13156
|
+
if (validateSingleFilter(selectedOption)) return intl.formatMessage(validationMessages.required);
|
|
13024
13157
|
return null;
|
|
13025
13158
|
};
|
|
13026
13159
|
const validateMultiOptionEnum = (selectedOption, intl) => {
|
|
13027
|
-
if (validateSingleFilter(selectedOption) || selectedOption.value.length === 0) return intl.formatMessage(
|
|
13160
|
+
if (validateSingleFilter(selectedOption) || selectedOption.value.length === 0) return intl.formatMessage(validationMessages.required);
|
|
13028
13161
|
return null;
|
|
13029
13162
|
};
|
|
13030
13163
|
|
|
@@ -13040,6 +13173,7 @@ const messages$1 = reactIntl.defineMessages({
|
|
|
13040
13173
|
defaultMessage: 'Please enter the smaller number first.'
|
|
13041
13174
|
}
|
|
13042
13175
|
});
|
|
13176
|
+
var messages$2 = messages$1;
|
|
13043
13177
|
|
|
13044
13178
|
function validateFilter(_ref, intl) {
|
|
13045
13179
|
let value = _ref.value,
|
|
@@ -13047,30 +13181,30 @@ function validateFilter(_ref, intl) {
|
|
|
13047
13181
|
_ref$allowFloat = _ref.allowFloat,
|
|
13048
13182
|
allowFloat = _ref$allowFloat === void 0 ? true : _ref$allowFloat;
|
|
13049
13183
|
if (type !== 'range') {
|
|
13050
|
-
if (!allowFloat && !isInteger(value)) return intl.formatMessage(
|
|
13184
|
+
if (!allowFloat && !isInteger(value)) return intl.formatMessage(validationMessages.integer);
|
|
13051
13185
|
return null;
|
|
13052
13186
|
}
|
|
13053
13187
|
|
|
13054
13188
|
// only range types from here
|
|
13055
13189
|
|
|
13056
13190
|
if (!allowFloat && !isInteger(value.from)) return {
|
|
13057
|
-
from: intl.formatMessage(
|
|
13191
|
+
from: intl.formatMessage(validationMessages.integer)
|
|
13058
13192
|
};
|
|
13059
13193
|
if (!allowFloat && !isInteger(value.to)) return {
|
|
13060
|
-
to: intl.formatMessage(
|
|
13194
|
+
to: intl.formatMessage(validationMessages.integer)
|
|
13061
13195
|
};
|
|
13062
13196
|
if (validateSingleFilter({
|
|
13063
13197
|
value: value.from
|
|
13064
13198
|
})) return {
|
|
13065
|
-
from: intl.formatMessage(messages$
|
|
13199
|
+
from: intl.formatMessage(messages$2.rangeMissingValue)
|
|
13066
13200
|
};
|
|
13067
13201
|
if (validateSingleFilter({
|
|
13068
13202
|
value: value.to
|
|
13069
13203
|
})) return {
|
|
13070
|
-
to: intl.formatMessage(messages$
|
|
13204
|
+
to: intl.formatMessage(messages$2.rangeMissingValue)
|
|
13071
13205
|
};
|
|
13072
13206
|
if (_parseFloat__default["default"](value.to) < _parseFloat__default["default"](value.from)) return {
|
|
13073
|
-
from: intl.formatMessage(messages$
|
|
13207
|
+
from: intl.formatMessage(messages$2.rangeToSmallerThanFrom)
|
|
13074
13208
|
};
|
|
13075
13209
|
return null;
|
|
13076
13210
|
}
|
|
@@ -13078,8 +13212,8 @@ function validateFilter(_ref, intl) {
|
|
|
13078
13212
|
// eslint-disable-next-line import/prefer-default-export
|
|
13079
13213
|
const validateText = function (text, intl) {
|
|
13080
13214
|
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
13081
|
-
if (validateSingleFilter(text)) return intl.formatMessage(
|
|
13082
|
-
if (type === 'id' && !isUUID(text.value)) return intl.formatMessage(
|
|
13215
|
+
if (validateSingleFilter(text)) return intl.formatMessage(validationMessages.required);
|
|
13216
|
+
if (type === 'id' && !isUUID$1(text.value)) return intl.formatMessage(validationMessages.uuid);
|
|
13083
13217
|
return null;
|
|
13084
13218
|
};
|
|
13085
13219
|
|
|
@@ -13108,10 +13242,13 @@ function convertRatioToPercentage(ratio) {
|
|
|
13108
13242
|
const hasErrorCode = (unmappedApiErrors, errorCode) => {
|
|
13109
13243
|
return _Array$isArray__default["default"](unmappedApiErrors) && _someInstanceProperty__default["default"](unmappedApiErrors).call(unmappedApiErrors, error => error.extensions?.code === errorCode);
|
|
13110
13244
|
};
|
|
13245
|
+
var hasErrorCode$1 = hasErrorCode;
|
|
13111
13246
|
|
|
13112
|
-
const hasInvalidInputError = errors => hasErrorCode(errors, ERROR_CODES.invalidInput);
|
|
13247
|
+
const hasInvalidInputError = errors => hasErrorCode$1(errors, ERROR_CODES.invalidInput);
|
|
13248
|
+
var hasInvalidInputError$1 = hasInvalidInputError;
|
|
13113
13249
|
|
|
13114
|
-
const hasSemanticError = errors => hasErrorCode(errors, ERROR_CODES.semanticError);
|
|
13250
|
+
const hasSemanticError = errors => hasErrorCode$1(errors, ERROR_CODES.semanticError);
|
|
13251
|
+
var hasSemanticError$1 = hasSemanticError;
|
|
13115
13252
|
|
|
13116
13253
|
function minusify(value) {
|
|
13117
13254
|
const minus = '-';
|
|
@@ -13428,6 +13565,7 @@ let RequestCache = /*#__PURE__*/function () {
|
|
|
13428
13565
|
}
|
|
13429
13566
|
}]);
|
|
13430
13567
|
}();
|
|
13568
|
+
var RequestCache$1 = RequestCache;
|
|
13431
13569
|
|
|
13432
13570
|
// copied from
|
|
13433
13571
|
// https://github.com/reactjs/react-redux/blob/master/src/utils/shallowEqual.js
|
|
@@ -13540,7 +13678,7 @@ function withPendingRequests() {
|
|
|
13540
13678
|
};
|
|
13541
13679
|
return jsxRuntime.jsx(Component, _objectSpread(_objectSpread({}, props), pendingProp));
|
|
13542
13680
|
};
|
|
13543
|
-
WrappedComponent.displayName = wrapDisplayName(Component, 'withPendingRequests');
|
|
13681
|
+
WrappedComponent.displayName = wrapDisplayName$1(Component, 'withPendingRequests');
|
|
13544
13682
|
return WrappedComponent;
|
|
13545
13683
|
};
|
|
13546
13684
|
}
|
|
@@ -13548,58 +13686,58 @@ function withPendingRequests() {
|
|
|
13548
13686
|
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 } } } };
|
|
13549
13687
|
|
|
13550
13688
|
exports.BooleanField = booleanField;
|
|
13551
|
-
exports.Button = Button;
|
|
13689
|
+
exports.Button = Button$1;
|
|
13552
13690
|
exports.CartDiscountReferenceSearch = CartDiscountReferenceSearch;
|
|
13553
13691
|
exports.CategoryReferenceSearch = CategoryReferenceSearch;
|
|
13554
13692
|
exports.CategorySearchPickerOptionFragment = CategorySearchPickerOptionFragment;
|
|
13555
|
-
exports.CenteredLoadingSpinner = CenteredLoadingSpinner;
|
|
13556
|
-
exports.ChannelPickerInput = ChannelPickerInput;
|
|
13693
|
+
exports.CenteredLoadingSpinner = CenteredLoadingSpinner$1;
|
|
13694
|
+
exports.ChannelPickerInput = ChannelPickerInput$1;
|
|
13557
13695
|
exports.CountriesPicker = CountriesPicker;
|
|
13558
13696
|
exports.CustomFieldDefinitionsConnector = customFieldDefinitionsConnector;
|
|
13559
|
-
exports.CustomFieldTooltip = CustomFieldTooltip;
|
|
13697
|
+
exports.CustomFieldTooltip = CustomFieldTooltip$1;
|
|
13560
13698
|
exports.CustomFieldTypeDefinitionsConnector = CustomFieldTypeDefinitionsConnector$1;
|
|
13561
|
-
exports.CustomFields = CustomFields;
|
|
13562
|
-
exports.CustomFieldsErrorTextNotification = CustomFieldsErrorTextNotification;
|
|
13563
|
-
exports.CustomFieldsFormField = CustomFieldsFormField;
|
|
13564
|
-
exports.CustomerGroupPickerInput = CustomerGroupPickerInput;
|
|
13699
|
+
exports.CustomFields = CustomFields$1;
|
|
13700
|
+
exports.CustomFieldsErrorTextNotification = CustomFieldsErrorTextNotification$1;
|
|
13701
|
+
exports.CustomFieldsFormField = CustomFieldsFormField$1;
|
|
13702
|
+
exports.CustomerGroupPickerInput = CustomerGroupPickerInput$1;
|
|
13565
13703
|
exports.DefaultPageSizes = DefaultPageSizes;
|
|
13566
13704
|
exports.Divider = Divider;
|
|
13567
13705
|
exports.EMAIL_REGEX = EMAIL_REGEX;
|
|
13568
|
-
exports.FileInput = FileInput;
|
|
13706
|
+
exports.FileInput = FileInput$1;
|
|
13569
13707
|
exports.FormattedDateTime = FormattedDateTime$1;
|
|
13570
|
-
exports.LabelRange = LabelRange;
|
|
13708
|
+
exports.LabelRange = LabelRange$1;
|
|
13571
13709
|
exports.MC_RESOURCES_WITH_KEYS = MC_RESOURCES_WITH_KEYS;
|
|
13572
|
-
exports.MissingValueField = MissingValueField;
|
|
13573
|
-
exports.MultiValueSearchInput = MultiValueSearchInput;
|
|
13710
|
+
exports.MissingValueField = MissingValueField$1;
|
|
13711
|
+
exports.MultiValueSearchInput = MultiValueSearchInput$1;
|
|
13574
13712
|
exports.NumericFormatInput = numericFormatInput;
|
|
13575
13713
|
exports.Option = Option$2;
|
|
13576
13714
|
exports.PRECISION_TYPES = PRECISION_TYPES;
|
|
13577
13715
|
exports.PimIndexerProvider = pimIndexerProvider;
|
|
13578
13716
|
exports.ProductAttributeInput = ProductAttributeInput;
|
|
13579
13717
|
exports.ProductAttributes = ProductAttributes;
|
|
13580
|
-
exports.ProductPickerInput = ProductPickerInput;
|
|
13718
|
+
exports.ProductPickerInput = ProductPickerInput$1;
|
|
13581
13719
|
exports.ProductSelectionPicker = ProductSelectionsPicker;
|
|
13582
|
-
exports.RequestCache = RequestCache;
|
|
13583
|
-
exports.RequiredIndicator = RequiredIndicator;
|
|
13584
|
-
exports.ScrollToFieldError = ScrollToFieldError;
|
|
13720
|
+
exports.RequestCache = RequestCache$1;
|
|
13721
|
+
exports.RequiredIndicator = RequiredIndicator$1;
|
|
13722
|
+
exports.ScrollToFieldError = ScrollToFieldError$1;
|
|
13585
13723
|
exports.SearchInput = searchInput;
|
|
13586
|
-
exports.SelectableFieldSearchInput = SelectableFieldSearchInput;
|
|
13587
|
-
exports.StoreSelectField = StoreSelectField;
|
|
13588
|
-
exports.StoreSelectInput = StoreSelectInput;
|
|
13589
|
-
exports.ThrottledField = ThrottledField;
|
|
13724
|
+
exports.SelectableFieldSearchInput = SelectableFieldSearchInput$1;
|
|
13725
|
+
exports.StoreSelectField = StoreSelectField$1;
|
|
13726
|
+
exports.StoreSelectInput = StoreSelectInput$1;
|
|
13727
|
+
exports.ThrottledField = ThrottledField$1;
|
|
13590
13728
|
exports.VALIDATOR_INTEGER = VALIDATOR_INTEGER;
|
|
13591
13729
|
exports.VALIDATOR_NUMERIC = VALIDATOR_NUMERIC;
|
|
13592
13730
|
exports.VALIDATOR_REQUIRED = VALIDATOR_REQUIRED;
|
|
13593
|
-
exports.WithPimIndexer = WithPimIndexer;
|
|
13731
|
+
exports.WithPimIndexer = WithPimIndexer$1;
|
|
13594
13732
|
exports.allowedProperties = allowedProperties;
|
|
13595
13733
|
exports.and = and;
|
|
13596
13734
|
exports.attributesMapToNameValuePairs = attributesMapToNameValuePairs;
|
|
13597
13735
|
exports.base64ToString = base64ToString;
|
|
13598
|
-
exports.booleanMessages = messages$
|
|
13599
|
-
exports.buildSearchQuery = buildSearchQuery;
|
|
13600
|
-
exports.businessRoleConstants = businessRoleConstants;
|
|
13601
|
-
exports.businessRoleMessages = messages$
|
|
13602
|
-
exports.businessRoles = businessRoleKeys;
|
|
13736
|
+
exports.booleanMessages = messages$c;
|
|
13737
|
+
exports.buildSearchQuery = buildSearchQuery$1;
|
|
13738
|
+
exports.businessRoleConstants = businessRoleConstants$1;
|
|
13739
|
+
exports.businessRoleMessages = messages$7;
|
|
13740
|
+
exports.businessRoles = businessRoleKeys$1;
|
|
13603
13741
|
exports.capitalizeFirst = capitalizeFirst;
|
|
13604
13742
|
exports.clone = clone;
|
|
13605
13743
|
exports.coerceToInteger = coerceToInteger;
|
|
@@ -13609,7 +13747,7 @@ exports.convertApolloQueryDataToConnectorData = convertApolloQueryDataToConnecto
|
|
|
13609
13747
|
exports.convertProductSelectionFromGraphQl = convertProductSelectionFromGraphQl;
|
|
13610
13748
|
exports.convertRatioToPercentage = convertRatioToPercentage;
|
|
13611
13749
|
exports.createGraphQlUpdateActions = createGraphQlUpdateActions;
|
|
13612
|
-
exports.createNextSortDefinition = createNextSortDefinition;
|
|
13750
|
+
exports.createNextSortDefinition = createNextSortDefinition$1;
|
|
13613
13751
|
exports.createReducer = createReducer;
|
|
13614
13752
|
exports.createResourceReducer = createResourceReducer;
|
|
13615
13753
|
exports.customFieldsTransformer = customFields;
|
|
@@ -13639,13 +13777,13 @@ exports.getBulkNotification = getBulkNotification;
|
|
|
13639
13777
|
exports.getCategoryLevel = getCategoryLevel;
|
|
13640
13778
|
exports.getCountsFromBulkSummary = getCountsFromBulkSummary;
|
|
13641
13779
|
exports.getDiscountValue = getDiscountValue;
|
|
13642
|
-
exports.getDisplayName = getDisplayName;
|
|
13780
|
+
exports.getDisplayName = getDisplayName$1;
|
|
13643
13781
|
exports.getFractionedAmount = getFractionedAmount;
|
|
13644
13782
|
exports.getIndexesOfInvalidValues = getIndexesOfInvalidValues;
|
|
13645
13783
|
exports.getMinimumPricesByCurrencyCode = getMinimumPricesByCurrencyCode;
|
|
13646
13784
|
exports.getNetUnitPrice = getNetUnitPrice;
|
|
13647
13785
|
exports.getPathName = getPathName;
|
|
13648
|
-
exports.getPrefixSearchBounds = getPrefixSearchBounds;
|
|
13786
|
+
exports.getPrefixSearchBounds = getPrefixSearchBounds$1;
|
|
13649
13787
|
exports.getPriceChannelName = getPriceChannelName;
|
|
13650
13788
|
exports.getReferenceTypeId = getReferenceTypeId;
|
|
13651
13789
|
exports.getSelectedPrice = getSelectedPrice;
|
|
@@ -13660,30 +13798,30 @@ exports.graphqlNumberTransformer = numberTransformer;
|
|
|
13660
13798
|
exports.graphqlQueryBuilder = graphqlQueryBuilder;
|
|
13661
13799
|
exports.graphqlReferenceTransformer = referenceTransformer;
|
|
13662
13800
|
exports.graphqlTextTransformer = textTransformer;
|
|
13663
|
-
exports.hasInvalidInputError = hasInvalidInputError;
|
|
13664
|
-
exports.hasSemanticError = hasSemanticError;
|
|
13665
|
-
exports.injectCustomerGroupsPlatformLimits = injectCustomerGroupsPlatformLimits;
|
|
13666
|
-
exports.injectCustomersPlatformLimits = injectCustomersPlatformLimits;
|
|
13667
|
-
exports.injectDataTablePaginationState = injectDataTablePaginationState;
|
|
13668
|
-
exports.injectModalState = injectModalState$
|
|
13669
|
-
exports.injectNotifications = injectNotifications;
|
|
13801
|
+
exports.hasInvalidInputError = hasInvalidInputError$1;
|
|
13802
|
+
exports.hasSemanticError = hasSemanticError$1;
|
|
13803
|
+
exports.injectCustomerGroupsPlatformLimits = injectCustomerGroupsPlatformLimits$1;
|
|
13804
|
+
exports.injectCustomersPlatformLimits = injectCustomersPlatformLimits$1;
|
|
13805
|
+
exports.injectDataTablePaginationState = injectDataTablePaginationState$1;
|
|
13806
|
+
exports.injectModalState = injectModalState$3;
|
|
13807
|
+
exports.injectNotifications = injectNotifications$1;
|
|
13670
13808
|
exports.injectPimIndexer = injectPimIndexer;
|
|
13671
|
-
exports.injectShippingMethodsPlatformLimits = injectShippingMethodsPlatformLimits;
|
|
13672
|
-
exports.injectStorage = injectStorage;
|
|
13673
|
-
exports.injectTaxCategoriesPlatformLimits = injectTaxCategoriesPlatformLimits;
|
|
13674
|
-
exports.injectToggleState = injectModalState;
|
|
13675
|
-
exports.injectZonesPlatformLimits = injectZonesPlatformLimits;
|
|
13809
|
+
exports.injectShippingMethodsPlatformLimits = injectShippingMethodsPlatformLimits$1;
|
|
13810
|
+
exports.injectStorage = injectStorage$1;
|
|
13811
|
+
exports.injectTaxCategoriesPlatformLimits = injectTaxCategoriesPlatformLimits$1;
|
|
13812
|
+
exports.injectToggleState = injectModalState$1;
|
|
13813
|
+
exports.injectZonesPlatformLimits = injectZonesPlatformLimits$1;
|
|
13676
13814
|
exports.isEmpty = isEmptyFilter;
|
|
13677
13815
|
exports.isEmptyValue = isEmptyValue;
|
|
13678
|
-
exports.isUUID = isUUID;
|
|
13816
|
+
exports.isUUID = isUUID$1;
|
|
13679
13817
|
exports.isValidISODate = isValidISODate;
|
|
13680
13818
|
exports.isValidISODateTime = isValidISODateTime;
|
|
13681
13819
|
exports.isValidISOTime = isValidISOTime;
|
|
13682
|
-
exports.keepDisplayName = keepDisplayName;
|
|
13820
|
+
exports.keepDisplayName = keepDisplayName$1;
|
|
13683
13821
|
exports.mapStoresToOptions = mapStoresToOptions;
|
|
13684
13822
|
exports.mapTimeZonesToOptions = mapTimeZonesToOptions;
|
|
13685
13823
|
exports.minusify = minusify;
|
|
13686
|
-
exports.missingValueMessages = messages$
|
|
13824
|
+
exports.missingValueMessages = messages$9;
|
|
13687
13825
|
exports.nameValuePairsToMap = nameValuePairsToMap;
|
|
13688
13826
|
exports.normalizeProductSettings = normalizeProductSettings;
|
|
13689
13827
|
exports.not = not;
|
|
@@ -13697,8 +13835,8 @@ exports.resolveStatusType = resolveStatusType;
|
|
|
13697
13835
|
exports.safelyAddFallback = safelyAddFallback;
|
|
13698
13836
|
exports.sanitize = sanitize;
|
|
13699
13837
|
exports.searchCategories = searchCategories;
|
|
13700
|
-
exports.searchInputMessages = messages$
|
|
13701
|
-
exports.setDisplayName = setDisplayName;
|
|
13838
|
+
exports.searchInputMessages = messages$M;
|
|
13839
|
+
exports.setDisplayName = setDisplayName$1;
|
|
13702
13840
|
exports.setToArray = setToArray;
|
|
13703
13841
|
exports.shallowEqual = shallowEqual;
|
|
13704
13842
|
exports.shouldUpdateAttributeInput = shouldUpdateAttributeInput;
|
|
@@ -13717,26 +13855,26 @@ exports.uniqueObjects = uniqueObjects;
|
|
|
13717
13855
|
exports.useCachedCategoryOptions = useCachedCategoryOptions;
|
|
13718
13856
|
exports.useCurrentOption = useCurrentOption;
|
|
13719
13857
|
exports.useCustomFieldsDnDContext = useDnDContext;
|
|
13720
|
-
exports.useCustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits;
|
|
13721
|
-
exports.useCustomersPlatformLimits = useCustomersPlatformLimits;
|
|
13722
|
-
exports.useDebouncedPromiseCallback = useDebouncedPromiseCallback;
|
|
13858
|
+
exports.useCustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits$1;
|
|
13859
|
+
exports.useCustomersPlatformLimits = useCustomersPlatformLimits$1;
|
|
13860
|
+
exports.useDebouncedPromiseCallback = useDebouncedPromiseCallback$1;
|
|
13723
13861
|
exports.useFormatLocalizedFieldToString = useFormatLocalizedFieldToString;
|
|
13724
|
-
exports.useIsFieldDuplicated = useIsFieldDuplicated;
|
|
13725
|
-
exports.useLoadOptions = useLoadOptions;
|
|
13726
|
-
exports.useLocalizedKeyFallback = useLocalizedKeyFallback;
|
|
13862
|
+
exports.useIsFieldDuplicated = useIsFieldDuplicated$1;
|
|
13863
|
+
exports.useLoadOptions = useLoadOptions$1;
|
|
13864
|
+
exports.useLocalizedKeyFallback = useLocalizedKeyFallback$1;
|
|
13727
13865
|
exports.usePendingRequests = usePendingRequests;
|
|
13728
|
-
exports.usePersistedTableConfiguration = usePersistedTableConfiguration;
|
|
13866
|
+
exports.usePersistedTableConfiguration = usePersistedTableConfiguration$1;
|
|
13729
13867
|
exports.usePimIndexer = usePimIndexer;
|
|
13730
|
-
exports.usePrevious = usePrevious;
|
|
13731
|
-
exports.useProductSelectionsFetcher = useProductSelectionsFetcher;
|
|
13732
|
-
exports.useProductSelectionsTotalFetcher = useProductSelectionsTotalFetcher;
|
|
13733
|
-
exports.useRoleNotificationEffect = useRoleNotificationEffect;
|
|
13734
|
-
exports.useShippingMethodsPlatformLimits =
|
|
13735
|
-
exports.useStorage = useStorage;
|
|
13736
|
-
exports.useStoreKeysInDataFences = useStoreKeysInDataFences;
|
|
13737
|
-
exports.useStoresListFetcher = useStoresListFetcher;
|
|
13738
|
-
exports.useTaxCategoriesPlatformLimits =
|
|
13739
|
-
exports.useTotalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher;
|
|
13868
|
+
exports.usePrevious = usePrevious$1;
|
|
13869
|
+
exports.useProductSelectionsFetcher = useProductSelectionsFetcher$1;
|
|
13870
|
+
exports.useProductSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1;
|
|
13871
|
+
exports.useRoleNotificationEffect = useRoleNotificationEffect$1;
|
|
13872
|
+
exports.useShippingMethodsPlatformLimits = useShippingMethodsPlatformLimits;
|
|
13873
|
+
exports.useStorage = useStorage$1;
|
|
13874
|
+
exports.useStoreKeysInDataFences = useStoreKeysInDataFences$1;
|
|
13875
|
+
exports.useStoresListFetcher = useStoresListFetcher$1;
|
|
13876
|
+
exports.useTaxCategoriesPlatformLimits = useTaxCategoriesPlatformLimits;
|
|
13877
|
+
exports.useTotalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1;
|
|
13740
13878
|
exports.validateCustomField = validateFilter$2;
|
|
13741
13879
|
exports.validateCustomFields = validations;
|
|
13742
13880
|
exports.validateDate = validateFilter$1;
|
|
@@ -13745,9 +13883,9 @@ exports.validateNumber = validateFilter;
|
|
|
13745
13883
|
exports.validateSingleOptionEnum = validateSingleOptionEnum;
|
|
13746
13884
|
exports.validateText = validateText;
|
|
13747
13885
|
exports.validatedInput = validatedInput;
|
|
13748
|
-
exports.validationMessages =
|
|
13886
|
+
exports.validationMessages = validationMessages;
|
|
13749
13887
|
exports.withPendingRequests = withPendingRequests;
|
|
13750
|
-
exports.withProps = withProps;
|
|
13751
|
-
exports.withRedirectTo = withRedirectTo;
|
|
13752
|
-
exports.withoutEmptyErrorsByField = withoutEmptyErrorsByField;
|
|
13753
|
-
exports.wrapDisplayName = wrapDisplayName;
|
|
13888
|
+
exports.withProps = withProps$1;
|
|
13889
|
+
exports.withRedirectTo = withRedirectTo$1;
|
|
13890
|
+
exports.withoutEmptyErrorsByField = withoutEmptyErrorsByField$1;
|
|
13891
|
+
exports.wrapDisplayName = wrapDisplayName$1;
|