@commercetools-frontend/experimental-components 8.0.2 → 8.0.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 +594 -861
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +558 -807
- package/dist/commercetools-frontend-experimental-components.esm.js +615 -880
- package/dist/declarations/src/custom-fields/custom-fields-form-field/custom-fields-form-field.d.ts +3 -1
- package/dist/declarations/src/index.d.ts +2 -5
- package/dist/declarations/src/utils/constants.d.ts +38 -39
- package/package.json +18 -19
- package/dist/declarations/src/components/buttons/button/button.d.ts +0 -19
- package/dist/declarations/src/fields/search-input/messages.d.ts +0 -16
- package/dist/declarations/src/fields/search-input/search-input.d.ts +0 -54
|
@@ -40,8 +40,6 @@ var react$1 = require('@emotion/react');
|
|
|
40
40
|
var fastEquals = require('fast-equals');
|
|
41
41
|
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
42
42
|
var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
|
|
43
|
-
var classnames = require('classnames');
|
|
44
|
-
var camelCase = require('lodash/camelCase');
|
|
45
43
|
var designSystem = require('@commercetools-uikit/design-system');
|
|
46
44
|
var _Reflect$construct = require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
47
45
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
@@ -84,6 +82,7 @@ var utils = require('@commercetools-uikit/utils');
|
|
|
84
82
|
require('react-required-if');
|
|
85
83
|
var _Object$values = require('@babel/runtime-corejs3/core-js-stable/object/values');
|
|
86
84
|
var _sortInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/sort');
|
|
85
|
+
var classnames = require('classnames');
|
|
87
86
|
var commonTags = require('common-tags');
|
|
88
87
|
var has = require('lodash/has');
|
|
89
88
|
require('tiny-warning');
|
|
@@ -93,7 +92,7 @@ var _Number$isNaN = require('@babel/runtime-corejs3/core-js-stable/number/is-nan
|
|
|
93
92
|
var Cleave = require('cleave.js/react');
|
|
94
93
|
var isFinite = require('lodash/isFinite');
|
|
95
94
|
var isUndefined = require('lodash/isUndefined');
|
|
96
|
-
var
|
|
95
|
+
var camelCase = require('lodash/camelCase');
|
|
97
96
|
var Textarea = require('react-textarea-autosize');
|
|
98
97
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
99
98
|
var _findIndexInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find-index');
|
|
@@ -113,6 +112,7 @@ var reactSnapCarousel = require('react-snap-carousel');
|
|
|
113
112
|
var applicationShell = require('@commercetools-frontend/application-shell');
|
|
114
113
|
var hoc = require('@apollo/client/react/hoc');
|
|
115
114
|
var flatten = require('lodash/flatten');
|
|
115
|
+
var flowRight = require('lodash/flowRight');
|
|
116
116
|
var uniqBy = require('lodash/uniqBy');
|
|
117
117
|
var invariant = require('tiny-invariant');
|
|
118
118
|
var hoistNonReactStatics = require('hoist-non-react-statics');
|
|
@@ -165,8 +165,6 @@ var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
|
|
|
165
165
|
var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
|
|
166
166
|
var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
|
|
167
167
|
var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);
|
|
168
|
-
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
169
|
-
var camelCase__default = /*#__PURE__*/_interopDefault(camelCase);
|
|
170
168
|
var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
|
|
171
169
|
var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanceProperty);
|
|
172
170
|
var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
|
|
@@ -190,6 +188,7 @@ var ReactDOM__default = /*#__PURE__*/_interopDefault(ReactDOM);
|
|
|
190
188
|
var _indexOfInstanceProperty__default = /*#__PURE__*/_interopDefault(_indexOfInstanceProperty);
|
|
191
189
|
var _Object$values__default = /*#__PURE__*/_interopDefault(_Object$values);
|
|
192
190
|
var _sortInstanceProperty__default = /*#__PURE__*/_interopDefault(_sortInstanceProperty);
|
|
191
|
+
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
193
192
|
var has__default = /*#__PURE__*/_interopDefault(has);
|
|
194
193
|
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
195
194
|
var _Math$trunc__default = /*#__PURE__*/_interopDefault(_Math$trunc);
|
|
@@ -197,7 +196,7 @@ var _Number$isNaN__default = /*#__PURE__*/_interopDefault(_Number$isNaN);
|
|
|
197
196
|
var Cleave__default = /*#__PURE__*/_interopDefault(Cleave);
|
|
198
197
|
var isFinite__default = /*#__PURE__*/_interopDefault(isFinite);
|
|
199
198
|
var isUndefined__default = /*#__PURE__*/_interopDefault(isUndefined);
|
|
200
|
-
var
|
|
199
|
+
var camelCase__default = /*#__PURE__*/_interopDefault(camelCase);
|
|
201
200
|
var Textarea__default = /*#__PURE__*/_interopDefault(Textarea);
|
|
202
201
|
var _Object$assign__default = /*#__PURE__*/_interopDefault(_Object$assign);
|
|
203
202
|
var _findIndexInstanceProperty__default = /*#__PURE__*/_interopDefault(_findIndexInstanceProperty);
|
|
@@ -213,17 +212,18 @@ var memoize__default = /*#__PURE__*/_interopDefault(memoize);
|
|
|
213
212
|
var omitEmpty__default = /*#__PURE__*/_interopDefault(omitEmpty);
|
|
214
213
|
var shuffle__default = /*#__PURE__*/_interopDefault(shuffle);
|
|
215
214
|
var flatten__default = /*#__PURE__*/_interopDefault(flatten);
|
|
215
|
+
var flowRight__default = /*#__PURE__*/_interopDefault(flowRight);
|
|
216
216
|
var uniqBy__default = /*#__PURE__*/_interopDefault(uniqBy);
|
|
217
217
|
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
218
218
|
var hoistNonReactStatics__default = /*#__PURE__*/_interopDefault(hoistNonReactStatics);
|
|
219
219
|
var get__default = /*#__PURE__*/_interopDefault(get);
|
|
220
220
|
|
|
221
|
-
var _ref$
|
|
221
|
+
var _ref$f = {
|
|
222
222
|
name: "1tmmbhs",
|
|
223
223
|
styles: "height:100%;display:flex;flex-grow:1;align-items:center;justify-content:center"
|
|
224
224
|
} ;
|
|
225
225
|
const CenteredLoadingSpinner = () => jsxRuntime.jsx("div", {
|
|
226
|
-
css: _ref$
|
|
226
|
+
css: _ref$f,
|
|
227
227
|
"data-testid": "centered-loading-spinner",
|
|
228
228
|
children: jsxRuntime.jsx(uiKit.LoadingSpinner, {})
|
|
229
229
|
});
|
|
@@ -298,7 +298,7 @@ var commonPickerMessages = reactIntl.defineMessages({
|
|
|
298
298
|
}
|
|
299
299
|
});
|
|
300
300
|
|
|
301
|
-
var messages$
|
|
301
|
+
var messages$S = reactIntl.defineMessages({
|
|
302
302
|
noChannelsFound: {
|
|
303
303
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
304
304
|
description: 'The message to display when no channels were found',
|
|
@@ -311,8 +311,8 @@ var messages$T = reactIntl.defineMessages({
|
|
|
311
311
|
}
|
|
312
312
|
});
|
|
313
313
|
|
|
314
|
-
function ownKeys$
|
|
315
|
-
function _objectSpread$
|
|
314
|
+
function ownKeys$1u(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; }
|
|
315
|
+
function _objectSpread$1u(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$1u(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$1u(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
316
316
|
var GetChannelsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channels" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "ListValue", values: [{ kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, { kind: "StringValue", value: "key", block: false }] } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "60" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
317
317
|
var GetChannelQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channel" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
318
318
|
var PickerInputChannel = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -341,7 +341,7 @@ const ChannelPickerInput = _ref => {
|
|
|
341
341
|
const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
|
|
342
342
|
const variables = React.useMemo(() => {
|
|
343
343
|
const rolesClause = getRolesClause(roles);
|
|
344
|
-
return _objectSpread$
|
|
344
|
+
return _objectSpread$1u({
|
|
345
345
|
sortByNamePath: `name.${dataLocale}`
|
|
346
346
|
}, rolesClause && {
|
|
347
347
|
extraWhere: rolesClause
|
|
@@ -417,7 +417,7 @@ const ChannelPickerInput = _ref => {
|
|
|
417
417
|
if (isCurrentOptionLoadingFailed && onError) onError(currentOptions.error);
|
|
418
418
|
}, [isCurrentOptionLoadingFailed, onError, currentOptions]);
|
|
419
419
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
420
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
420
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$S.noChannelsFound), [loadingError, formatMessage]);
|
|
421
421
|
const tooltipTitle = !isMulti ? currentSingleOption?.data?.label ?? '' : '';
|
|
422
422
|
const selectedValue = currentOptions.data ?? (isMulti ? [] : null);
|
|
423
423
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
@@ -429,7 +429,7 @@ const ChannelPickerInput = _ref => {
|
|
|
429
429
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
430
430
|
id: name,
|
|
431
431
|
name: name,
|
|
432
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
432
|
+
placeholder: placeholder ?? formatMessage(messages$S.placeholder),
|
|
433
433
|
loadOptions: loadOptionsDebounced,
|
|
434
434
|
defaultOptions: true,
|
|
435
435
|
showOptionGroupDivider: true,
|
|
@@ -459,12 +459,12 @@ const ChannelPickerInput = _ref => {
|
|
|
459
459
|
};
|
|
460
460
|
var ChannelPickerInput$1 = ChannelPickerInput;
|
|
461
461
|
|
|
462
|
-
function _callSuper$
|
|
463
|
-
function _isNativeReflectConstruct$
|
|
462
|
+
function _callSuper$7(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$7() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
463
|
+
function _isNativeReflectConstruct$7() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$7 = function () { return !!t; })(); }
|
|
464
464
|
let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
465
465
|
function FormattedDateTime() {
|
|
466
466
|
_classCallCheck(this, FormattedDateTime);
|
|
467
|
-
return _callSuper$
|
|
467
|
+
return _callSuper$7(this, FormattedDateTime, arguments);
|
|
468
468
|
}
|
|
469
469
|
_inherits(FormattedDateTime, _PureComponent);
|
|
470
470
|
return _createClass(FormattedDateTime, [{
|
|
@@ -485,7 +485,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
485
485
|
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
486
486
|
var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
487
487
|
|
|
488
|
-
var messages$
|
|
488
|
+
var messages$R = reactIntl.defineMessages({
|
|
489
489
|
noProductTypesFound: {
|
|
490
490
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
491
491
|
description: 'The message to display when no product types were found',
|
|
@@ -574,7 +574,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
574
574
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
575
575
|
id: name,
|
|
576
576
|
name: name,
|
|
577
|
-
placeholder: formatMessage(messages$
|
|
577
|
+
placeholder: formatMessage(messages$R.placeholder),
|
|
578
578
|
loadOptions: loadOptionsDebounced,
|
|
579
579
|
defaultOptions: [],
|
|
580
580
|
isClearable: isClearable,
|
|
@@ -587,7 +587,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
587
587
|
onInputChange: handleInputChange,
|
|
588
588
|
onBlur: onBlur,
|
|
589
589
|
value: currentOption.data,
|
|
590
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
590
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$R.noProductTypesFound),
|
|
591
591
|
hasError: hasError || isLoadingFailed,
|
|
592
592
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
593
593
|
menuPortalTarget: document.body,
|
|
@@ -603,7 +603,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
603
603
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
604
604
|
var ProductTypePickerInput$1 = ProductTypePickerInput;
|
|
605
605
|
|
|
606
|
-
var messages$
|
|
606
|
+
var messages$Q = reactIntl.defineMessages({
|
|
607
607
|
noStatesFound: {
|
|
608
608
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
609
609
|
description: 'The message to display when no states were found',
|
|
@@ -687,7 +687,7 @@ const StatePickerInput = _ref => {
|
|
|
687
687
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
688
688
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
689
689
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
690
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
690
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$Q.noStatesFound), [loadingError, formatMessage]);
|
|
691
691
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
692
692
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
693
693
|
max: "scale",
|
|
@@ -699,7 +699,7 @@ const StatePickerInput = _ref => {
|
|
|
699
699
|
id: name,
|
|
700
700
|
name: name,
|
|
701
701
|
horizontalConstraint: "scale",
|
|
702
|
-
placeholder: formatMessage(messages$
|
|
702
|
+
placeholder: formatMessage(messages$Q.placeholder),
|
|
703
703
|
loadOptions: loadOptionsDebounced,
|
|
704
704
|
defaultOptions: true,
|
|
705
705
|
showOptionGroupDivider: true,
|
|
@@ -729,9 +729,9 @@ const StatePickerInput = _ref => {
|
|
|
729
729
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
730
730
|
var StatePickerInput$1 = StatePickerInput;
|
|
731
731
|
|
|
732
|
-
function ownKeys$
|
|
733
|
-
function _objectSpread$
|
|
734
|
-
const TooltipWrapper = /*#__PURE__*/React__namespace["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$
|
|
732
|
+
function ownKeys$1t(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; }
|
|
733
|
+
function _objectSpread$1t(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$1t(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$1t(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
734
|
+
const TooltipWrapper = /*#__PURE__*/React__namespace["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$1t({
|
|
735
735
|
ref: ref,
|
|
736
736
|
style: {
|
|
737
737
|
display: 'block',
|
|
@@ -756,7 +756,7 @@ const CustomFieldTooltip = _ref => {
|
|
|
756
756
|
};
|
|
757
757
|
var CustomFieldTooltip$1 = CustomFieldTooltip;
|
|
758
758
|
|
|
759
|
-
var messages$
|
|
759
|
+
var messages$P = reactIntl.defineMessages({
|
|
760
760
|
bottomOption: {
|
|
761
761
|
id: 'Products.Pickers.bottomOption',
|
|
762
762
|
description: 'The message to display at the end of the options menu',
|
|
@@ -764,11 +764,11 @@ var messages$Q = reactIntl.defineMessages({
|
|
|
764
764
|
}
|
|
765
765
|
});
|
|
766
766
|
|
|
767
|
-
function ownKeys$
|
|
768
|
-
function _objectSpread$
|
|
767
|
+
function ownKeys$1s(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; }
|
|
768
|
+
function _objectSpread$1s(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$1s(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$1s(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
769
769
|
const getBottomOption = formatMessage => ({
|
|
770
770
|
options: [{
|
|
771
|
-
label: formatMessage ? formatMessage(messages$
|
|
771
|
+
label: formatMessage ? formatMessage(messages$P.bottomOption) : messages$P.bottomOption,
|
|
772
772
|
isBottomOption: true,
|
|
773
773
|
isDisabled: true
|
|
774
774
|
}]
|
|
@@ -776,7 +776,7 @@ const getBottomOption = formatMessage => ({
|
|
|
776
776
|
const Option$2 = props => {
|
|
777
777
|
const _useIntl = reactIntl.useIntl(),
|
|
778
778
|
formatMessage = _useIntl.formatMessage;
|
|
779
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
779
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$1s(_objectSpread$1s({}, props), {}, {
|
|
780
780
|
children: props.data.isBottomOption ? jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
781
781
|
tone: "secondary",
|
|
782
782
|
children: formatMessage(props.data.label)
|
|
@@ -793,8 +793,8 @@ const Option$2 = props => {
|
|
|
793
793
|
};
|
|
794
794
|
Option$2.displayName = 'Option';
|
|
795
795
|
|
|
796
|
-
function ownKeys$
|
|
797
|
-
function _objectSpread$
|
|
796
|
+
function ownKeys$1r(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; }
|
|
797
|
+
function _objectSpread$1r(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$1r(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$1r(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
798
798
|
const useHandlers = onChange => {
|
|
799
799
|
const _useState = React.useState(),
|
|
800
800
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -805,8 +805,8 @@ const useHandlers = onChange => {
|
|
|
805
805
|
}, []);
|
|
806
806
|
const handleChange = useEventCallback$1(event => {
|
|
807
807
|
var _context;
|
|
808
|
-
const eventWithExtractedValue = _objectSpread$
|
|
809
|
-
target: _objectSpread$
|
|
808
|
+
const eventWithExtractedValue = _objectSpread$1r(_objectSpread$1r({}, event), {}, {
|
|
809
|
+
target: _objectSpread$1r(_objectSpread$1r({}, event.target), {}, {
|
|
810
810
|
value: _Array$isArray__default["default"](event.target.value) ? _mapInstanceProperty__default["default"](_context = event.target.value).call(_context, item => item?.value) : event.target.value?.value
|
|
811
811
|
})
|
|
812
812
|
});
|
|
@@ -816,9 +816,9 @@ const useHandlers = onChange => {
|
|
|
816
816
|
};
|
|
817
817
|
var useHandlers$1 = useHandlers;
|
|
818
818
|
|
|
819
|
-
const _excluded$
|
|
820
|
-
function ownKeys$
|
|
821
|
-
function _objectSpread$
|
|
819
|
+
const _excluded$f = ["extraWhere"];
|
|
820
|
+
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; }
|
|
821
|
+
function _objectSpread$1q(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$1q(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$1q(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
822
822
|
const constructPrefixSearchPredicate$1 = function () {
|
|
823
823
|
let prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
824
824
|
let lowerBound = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -859,13 +859,13 @@ const useLoadOptions = _ref => {
|
|
|
859
859
|
}
|
|
860
860
|
const _ref2 = variables ?? {},
|
|
861
861
|
extraWhere = _ref2.extraWhere,
|
|
862
|
-
restVariables = _objectWithoutProperties(_ref2, _excluded$
|
|
862
|
+
restVariables = _objectWithoutProperties(_ref2, _excluded$f);
|
|
863
863
|
if (typeof extraWhere === 'string') {
|
|
864
864
|
where = where ? `(${where}) and ${variables.extraWhere}` : variables.extraWhere;
|
|
865
865
|
}
|
|
866
866
|
return client$1.query({
|
|
867
867
|
query,
|
|
868
|
-
variables: _objectSpread$
|
|
868
|
+
variables: _objectSpread$1q({
|
|
869
869
|
where
|
|
870
870
|
}, restVariables),
|
|
871
871
|
context: {
|
|
@@ -1164,376 +1164,11 @@ const setDisplayName = nextDisplayName => Component => {
|
|
|
1164
1164
|
};
|
|
1165
1165
|
var setDisplayName$1 = setDisplayName;
|
|
1166
1166
|
|
|
1167
|
-
const keepDisplayName = component => setDisplayName$1(getDisplayName$1(component));
|
|
1168
|
-
var keepDisplayName$1 = keepDisplayName;
|
|
1169
|
-
|
|
1170
1167
|
const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName$1(BaseComponent)})`;
|
|
1171
1168
|
var wrapDisplayName$1 = wrapDisplayName;
|
|
1172
1169
|
|
|
1173
|
-
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; }
|
|
1174
|
-
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; }
|
|
1175
|
-
function _callSuper$8(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$8() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1176
|
-
function _isNativeReflectConstruct$8() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$8 = function () { return !!t; })(); }
|
|
1177
|
-
const withMouseOverState = BaseComponent => {
|
|
1178
|
-
let WithMouseOverState = /*#__PURE__*/function (_Component) {
|
|
1179
|
-
function WithMouseOverState() {
|
|
1180
|
-
var _this;
|
|
1181
|
-
_classCallCheck(this, WithMouseOverState);
|
|
1182
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1183
|
-
args[_key] = arguments[_key];
|
|
1184
|
-
}
|
|
1185
|
-
_this = _callSuper$8(this, WithMouseOverState, [...args]);
|
|
1186
|
-
_this.state = {
|
|
1187
|
-
isMouseOver: false
|
|
1188
|
-
};
|
|
1189
|
-
_this.setMouseOver = nextMouseOver => _this.setState({
|
|
1190
|
-
isMouseOver: nextMouseOver
|
|
1191
|
-
});
|
|
1192
|
-
_this.handleMouseOver = () => _this.setMouseOver(true);
|
|
1193
|
-
_this.handleMouseOut = () => _this.setMouseOver(false);
|
|
1194
|
-
return _this;
|
|
1195
|
-
}
|
|
1196
|
-
_inherits(WithMouseOverState, _Component);
|
|
1197
|
-
return _createClass(WithMouseOverState, [{
|
|
1198
|
-
key: "render",
|
|
1199
|
-
value: function render() {
|
|
1200
|
-
const injectedProps = {
|
|
1201
|
-
isMouseOver: this.state.isMouseOver,
|
|
1202
|
-
handleMouseOver: this.handleMouseOver,
|
|
1203
|
-
handleMouseOut: this.handleMouseOut
|
|
1204
|
-
};
|
|
1205
|
-
return jsxRuntime.jsx(BaseComponent, _objectSpread$1q({}, _objectSpread$1q(_objectSpread$1q({}, this.props), injectedProps)));
|
|
1206
|
-
}
|
|
1207
|
-
}]);
|
|
1208
|
-
}(React.Component);
|
|
1209
|
-
WithMouseOverState.displayName = wrapDisplayName$1(BaseComponent, 'withMouseOverState');
|
|
1210
|
-
return WithMouseOverState;
|
|
1211
|
-
};
|
|
1212
|
-
var withMouseOverState$1 = withMouseOverState;
|
|
1213
|
-
|
|
1214
|
-
const getTextareaStyles = props => /*#__PURE__*/react$1.css("transition:0.2s ease;border-radius:", designSystem.designTokens.borderRadiusForInput, ";border-style:solid;border-width:1px;color:", designSystem.designTokens.colorSolid, ";font-weight:", designSystem.designTokens.fontWeight500, ";font-size:", designSystem.designTokens.fontSize10, ";font-family:", designSystem.designTokens.fontFamily, ";padding:", designSystem.designTokens.spacingS, " ", designSystem.designTokens.spacingM, ";outline:none;box-shadow:none;appearance:none;width:100%;min-height:", designSystem.designTokens.heightForInput, ";resize:vertical;", props.style === 'primary' && /*#__PURE__*/react$1.css("border-color:", designSystem.designTokens.colorNeutral, ";background-color:", designSystem.designTokens.colorSurface, ";" + ("" ), "" ), " ", props.style === 'secondary' && /*#__PURE__*/react$1.css("background-color:", designSystem.designTokens.colorNeutral95, ";border-color:", designSystem.designTokens.colorSurface, ";" + ("" ), "" ), " ", props.disabled && /*#__PURE__*/react$1.css("cursor:not-allowed;background-color:", designSystem.designTokens.colorAccent98, ";color:", designSystem.designTokens.colorSolid, ";opacity:1;" + ("" ), "" ), " ", !props.isValid && /*#__PURE__*/react$1.css("border-color:", designSystem.designTokens.colorError, ";border:1px solid;" + ("" ), "" ), ";" + ("" ), "" );
|
|
1215
|
-
var _ref$g = {
|
|
1216
|
-
name: "7g7czh",
|
|
1217
|
-
styles: "border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0"
|
|
1218
|
-
} ;
|
|
1219
|
-
const getInputStyles = props => /*#__PURE__*/react$1.css("transition:0.2s ease;border-radius:", designSystem.designTokens.borderRadiusForInput, ";border-style:solid;border-width:1px;color:", designSystem.designTokens.colorSolid, ";font-weight:", designSystem.designTokens.fontWeight500, ";font-size:", designSystem.designTokens.fontSize10, ";font-family:", designSystem.designTokens.fontFamily, ";padding:", designSystem.designTokens.spacingS, " ", designSystem.designTokens.spacingM, ";outline:none;box-shadow:none;appearance:none;width:100%;min-height:", designSystem.designTokens.heightForInput, ";", props.style === 'primary' && /*#__PURE__*/react$1.css("border-color:", designSystem.designTokens.colorNeutral, ";background-color:", designSystem.designTokens.colorSurface, ";" + ("" ), "" ), " ", props.style === 'secondary' && /*#__PURE__*/react$1.css("background-color:", designSystem.designTokens.colorNeutral95, ";border-color:", designSystem.designTokens.colorSurface, ";" + ("" ), "" ), " ", props.disabled && /*#__PURE__*/react$1.css("cursor:not-allowed;background-color:", designSystem.designTokens.colorAccent98, ";color:", designSystem.designTokens.colorSolid, ";opacity:1;" + ("" ), "" ), " ", !props.isValid && /*#__PURE__*/react$1.css("border-color:", designSystem.designTokens.colorError, "!important;border:1px solid;" + ("" ), "" ), " ", props.isGranular && _ref$g, ";" + ("" ), "" );
|
|
1220
|
-
|
|
1221
1170
|
function ownKeys$1p(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; }
|
|
1222
1171
|
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; }
|
|
1223
|
-
function _callSuper$7(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$7() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1224
|
-
function _isNativeReflectConstruct$7() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$7 = function () { return !!t; })(); }
|
|
1225
|
-
let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
1226
|
-
function ThrottledField() {
|
|
1227
|
-
var _this;
|
|
1228
|
-
_classCallCheck(this, ThrottledField);
|
|
1229
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1230
|
-
args[_key] = arguments[_key];
|
|
1231
|
-
}
|
|
1232
|
-
_this = _callSuper$7(this, ThrottledField, [...args]);
|
|
1233
|
-
_this.state = {
|
|
1234
|
-
draftValue: '',
|
|
1235
|
-
prevValue: ''
|
|
1236
|
-
};
|
|
1237
|
-
_this.clearPendingUpdates = () => {
|
|
1238
|
-
clearTimeout(_this.changeTimeout);
|
|
1239
|
-
clearTimeout(_this.blurTimeout);
|
|
1240
|
-
_this.changeTimeout = null;
|
|
1241
|
-
_this.blurTimeout = null;
|
|
1242
|
-
};
|
|
1243
|
-
_this.handleChange = event => {
|
|
1244
|
-
// The `SyntheticEvent` is pooled by default for perf reasons.
|
|
1245
|
-
// See https://facebook.github.io/react/docs/events.html#event-pooling
|
|
1246
|
-
// To access the event in an async way we need to persist it.
|
|
1247
|
-
event.persist();
|
|
1248
|
-
_this.setState({
|
|
1249
|
-
draftValue: event.target.value
|
|
1250
|
-
});
|
|
1251
|
-
_this.doDelayedUpdate(_this.props.onChange, event, 'change');
|
|
1252
|
-
};
|
|
1253
|
-
_this.handleEnter = event => {
|
|
1254
|
-
if (event.keyCode !== 13) return;
|
|
1255
|
-
if (_this.changeTimeout) {
|
|
1256
|
-
// Since there are still are some pending updates that are not sent to the
|
|
1257
|
-
// parent yet we need to call the update here explicitly and clear the
|
|
1258
|
-
// pending updates
|
|
1259
|
-
_this.props.onChange({
|
|
1260
|
-
target: {
|
|
1261
|
-
value: _this.state.draftValue
|
|
1262
|
-
}
|
|
1263
|
-
});
|
|
1264
|
-
// we can savely clear the timeout and thus abort all pending changes
|
|
1265
|
-
// because we just update the parent with the current state
|
|
1266
|
-
clearTimeout(_this.changeTimeout);
|
|
1267
|
-
_this.changeTimeout = null;
|
|
1268
|
-
}
|
|
1269
|
-
_this.props.onEnter(_this.state.draftValue);
|
|
1270
|
-
};
|
|
1271
|
-
_this.handleBlur = event => {
|
|
1272
|
-
// The `SyntheticEvent` is pooled by default for perf reasons.
|
|
1273
|
-
// See https://facebook.github.io/react/docs/events.html#event-pooling
|
|
1274
|
-
// To access the event in an async way we need to persist it.
|
|
1275
|
-
if (_this.props.onBlurValue) {
|
|
1276
|
-
event.persist();
|
|
1277
|
-
_this.doDelayedUpdate(e => _this.props.onBlurValue(e.target.value), event, 'blur');
|
|
1278
|
-
}
|
|
1279
|
-
};
|
|
1280
|
-
_this.doDelayedUpdate = (updateFunction, event, eventType) => {
|
|
1281
|
-
const self = _this;
|
|
1282
|
-
const timeoutKey = `${eventType}Timeout`;
|
|
1283
|
-
// TODO: can't we just use one variable?
|
|
1284
|
-
clearTimeout(_this[timeoutKey]);
|
|
1285
|
-
_this[timeoutKey] = _setTimeout__default["default"](() => {
|
|
1286
|
-
updateFunction.call(self, event);
|
|
1287
|
-
_this[timeoutKey] = null;
|
|
1288
|
-
}, _this.props.throttleMS);
|
|
1289
|
-
};
|
|
1290
|
-
return _this;
|
|
1291
|
-
}
|
|
1292
|
-
_inherits(ThrottledField, _PureComponent);
|
|
1293
|
-
return _createClass(ThrottledField, [{
|
|
1294
|
-
key: "componentWillUnmount",
|
|
1295
|
-
value: function componentWillUnmount() {
|
|
1296
|
-
this.clearPendingUpdates();
|
|
1297
|
-
}
|
|
1298
|
-
}, {
|
|
1299
|
-
key: "render",
|
|
1300
|
-
value: function render() {
|
|
1301
|
-
const commonProps = _objectSpread$1p(_objectSpread$1p({
|
|
1302
|
-
value: this.state.draftValue,
|
|
1303
|
-
autoComplete: this.props.autoComplete,
|
|
1304
|
-
onChange: this.handleChange,
|
|
1305
|
-
onBlur: this.handleBlur,
|
|
1306
|
-
disabled: this.props.disabled,
|
|
1307
|
-
name: this.props.name,
|
|
1308
|
-
placeholder: this.props.placeholder,
|
|
1309
|
-
autoFocus: this.props.autoFocus
|
|
1310
|
-
}, this.props.onEnter ? {
|
|
1311
|
-
onKeyDown: this.handleEnter
|
|
1312
|
-
} : {}), filterDataAttributes(this.props));
|
|
1313
|
-
const inputId = `throttled-field-${this.props.name}`;
|
|
1314
|
-
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1315
|
-
children: [jsxRuntime.jsx(uiKit.AccessibleHidden, {
|
|
1316
|
-
children: jsxRuntime.jsx("label", {
|
|
1317
|
-
htmlFor: inputId,
|
|
1318
|
-
children: this.props.label
|
|
1319
|
-
})
|
|
1320
|
-
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$1p(_objectSpread$1p({}, commonProps), {}, {
|
|
1321
|
-
id: inputId,
|
|
1322
|
-
css: getTextareaStyles(this.props),
|
|
1323
|
-
rows: 1,
|
|
1324
|
-
maxRows: this.props.autoSize ? undefined : 1,
|
|
1325
|
-
cacheMeasurements: true
|
|
1326
|
-
})) : jsxRuntime.jsx("input", _objectSpread$1p(_objectSpread$1p({}, commonProps), {}, {
|
|
1327
|
-
id: inputId,
|
|
1328
|
-
ref: this.props.inputRef,
|
|
1329
|
-
type: this.props.as,
|
|
1330
|
-
css: getInputStyles(this.props)
|
|
1331
|
-
}))]
|
|
1332
|
-
});
|
|
1333
|
-
}
|
|
1334
|
-
}], [{
|
|
1335
|
-
key: "getDerivedStateFromProps",
|
|
1336
|
-
value: function getDerivedStateFromProps(nextProps, prevState) {
|
|
1337
|
-
if (nextProps.value !== prevState.prevValue) {
|
|
1338
|
-
return {
|
|
1339
|
-
draftValue: nextProps.value || nextProps.value === 0 ? nextProps.value : '',
|
|
1340
|
-
prevValue: nextProps.value
|
|
1341
|
-
};
|
|
1342
|
-
}
|
|
1343
|
-
return null;
|
|
1344
|
-
}
|
|
1345
|
-
}]);
|
|
1346
|
-
}(React.PureComponent);
|
|
1347
|
-
ThrottledField.displayName = 'ThrottledField';
|
|
1348
|
-
ThrottledField.defaultProps = {
|
|
1349
|
-
as: 'text',
|
|
1350
|
-
style: 'secondary',
|
|
1351
|
-
throttleMS: 300,
|
|
1352
|
-
isValid: true,
|
|
1353
|
-
disabled: false,
|
|
1354
|
-
autoSize: true,
|
|
1355
|
-
autoFocus: false,
|
|
1356
|
-
label: 'Throttled field'
|
|
1357
|
-
};
|
|
1358
|
-
var ThrottledField$1 = ThrottledField;
|
|
1359
|
-
|
|
1360
|
-
var messages$P = reactIntl.defineMessages({
|
|
1361
|
-
buttonLabel: {
|
|
1362
|
-
id: 'SearchInput.buttonLabel',
|
|
1363
|
-
description: 'Label for "Search" button.',
|
|
1364
|
-
defaultMessage: 'Search'
|
|
1365
|
-
},
|
|
1366
|
-
placeholder: {
|
|
1367
|
-
id: 'SearchInput.placeholder',
|
|
1368
|
-
description: 'Placeholder for "Search" input field',
|
|
1369
|
-
defaultMessage: 'Search'
|
|
1370
|
-
}
|
|
1371
|
-
});
|
|
1372
|
-
|
|
1373
|
-
const getInputContainerStyles = props => /*#__PURE__*/react$1.css("border-color:", props.isGranular ? designSystem.designTokens.colorPrimary : designSystem.designTokens.borderColorForInput, ";height:", designSystem.designTokens.heightForInput, ";position:relative;&>input{padding-right:", designSystem.designTokens.spacing70, ";padding-left:", designSystem.designTokens.spacing55, ";font-size:", designSystem.designTokens.fontSize30, ";}&>input::placeholder{font-weight:", designSystem.designTokens.fontWeight400, ";font-size:", designSystem.designTokens.fontSize30, ";font-family:", designSystem.designTokens.fontFamily, ";color:", designSystem.designTokens.colorNeutral60, ";}", !props.disabled && `
|
|
1374
|
-
& > input:hover {
|
|
1375
|
-
border: 1px solid ${designSystem.designTokens.borderColorForInput};
|
|
1376
|
-
background-color: ${designSystem.designTokens.backgroundColorForInputWhenHovered};
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
|
-
& > input:focus {
|
|
1380
|
-
box-shadow: inset 0 0 0 1px ${designSystem.designTokens.colorPrimary};
|
|
1381
|
-
border-color: ${designSystem.designTokens.borderColorForInputWhenFocused};
|
|
1382
|
-
}
|
|
1383
|
-
`, " ", props.disabled && props.enableDisabledStyle && `
|
|
1384
|
-
& > input {
|
|
1385
|
-
border-color: ${designSystem.designTokens.colorNeutral};
|
|
1386
|
-
}
|
|
1387
|
-
`, " ", props.isGranular && `
|
|
1388
|
-
right: 3px;
|
|
1389
|
-
`, ";" + ("" ), "" );
|
|
1390
|
-
const getSecondaryIconButtonStyles = props => /*#__PURE__*/react$1.css("background-color:transparent;border-color:transparent;position:absolute;right:20px;top:50%;transform:translateY(-50%);z-index:2;&:hover svg{fill:", designSystem.designTokens.colorError, "!important;}", props.isGranular && `
|
|
1391
|
-
right: 41px;
|
|
1392
|
-
`, ";" + ("" ), "" );
|
|
1393
|
-
const getSearchButtonStyles = props => /*#__PURE__*/react$1.css("background-color:transparent;border-color:transparent;position:absolute;left:10px;top:50%;transform:translateY(-50%);z-index:2;display:inline-flex;align-items:center;justify-content:center;", props.isGranular && `
|
|
1394
|
-
right: 15px;
|
|
1395
|
-
`, " ", !props.disabled && `
|
|
1396
|
-
cursor: pointer;
|
|
1397
|
-
`, ";" + ("" ), "" );
|
|
1398
|
-
|
|
1399
|
-
function _callSuper$6(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$6() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1400
|
-
function _isNativeReflectConstruct$6() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$6 = function () { return !!t; })(); }
|
|
1401
|
-
var _ref$f = {
|
|
1402
|
-
name: "kbieq5",
|
|
1403
|
-
styles: "position:relative;flex-grow:1"
|
|
1404
|
-
} ;
|
|
1405
|
-
var _ref2$1 = {
|
|
1406
|
-
name: "n2lgmn",
|
|
1407
|
-
styles: "display:inline-flex;flex-direction:row;align-items:flex-start;width:100%;max-width:800px"
|
|
1408
|
-
} ;
|
|
1409
|
-
let SearchInput = /*#__PURE__*/function (_Component) {
|
|
1410
|
-
function SearchInput() {
|
|
1411
|
-
var _this;
|
|
1412
|
-
_classCallCheck(this, SearchInput);
|
|
1413
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1414
|
-
args[_key] = arguments[_key];
|
|
1415
|
-
}
|
|
1416
|
-
_this = _callSuper$6(this, SearchInput, [...args]);
|
|
1417
|
-
_this.state = {
|
|
1418
|
-
initialValue: _this.props.initialValue,
|
|
1419
|
-
text: _this.props.initialValue || ''
|
|
1420
|
-
};
|
|
1421
|
-
_this.handleInputChange = event => {
|
|
1422
|
-
const value = event.target.value;
|
|
1423
|
-
_this.setState({
|
|
1424
|
-
text: value
|
|
1425
|
-
}, () => {
|
|
1426
|
-
if (_this.props.shouldSubmitOnInputChange) _this.props.onSubmit(value, _this.props.searchMode);
|
|
1427
|
-
if (_this.props.onChange) _this.props.onChange(value);
|
|
1428
|
-
});
|
|
1429
|
-
};
|
|
1430
|
-
_this.handleEnter = value => {
|
|
1431
|
-
_this.setState({
|
|
1432
|
-
text: _this.props.shouldClearOnSubmit ? '' : value
|
|
1433
|
-
});
|
|
1434
|
-
_this.props.onSubmit(value, _this.props.searchMode);
|
|
1435
|
-
};
|
|
1436
|
-
_this.handleSubmit = () => {
|
|
1437
|
-
_this.props.onSubmit(_this.state.text, _this.props.searchMode);
|
|
1438
|
-
_this.props.shouldClearOnSubmit && _this.setState({
|
|
1439
|
-
text: ''
|
|
1440
|
-
});
|
|
1441
|
-
};
|
|
1442
|
-
_this.handleClear = () => {
|
|
1443
|
-
_this.inputRef?.focus();
|
|
1444
|
-
_this.props.onChange(null);
|
|
1445
|
-
_this.props.onReset();
|
|
1446
|
-
_this.setState({
|
|
1447
|
-
text: ''
|
|
1448
|
-
});
|
|
1449
|
-
};
|
|
1450
|
-
_this.setInputRef = inputRef => {
|
|
1451
|
-
_this.inputRef = inputRef;
|
|
1452
|
-
};
|
|
1453
|
-
return _this;
|
|
1454
|
-
}
|
|
1455
|
-
_inherits(SearchInput, _Component);
|
|
1456
|
-
return _createClass(SearchInput, [{
|
|
1457
|
-
key: "shouldComponentUpdate",
|
|
1458
|
-
value: function shouldComponentUpdate(nextProps, nextState) {
|
|
1459
|
-
// ignore state, since it is only use to keep track of the text in the child
|
|
1460
|
-
// component, in order to have it ready when the submit button is pressed
|
|
1461
|
-
return !fastEquals.deepEqual(this.props, nextProps, {
|
|
1462
|
-
strict: true
|
|
1463
|
-
}) || nextState.text !== this.state.text;
|
|
1464
|
-
}
|
|
1465
|
-
}, {
|
|
1466
|
-
key: "render",
|
|
1467
|
-
value: function render() {
|
|
1468
|
-
return jsxRuntime.jsx("div", {
|
|
1469
|
-
className: classnames__default["default"](this.props.blockClassName),
|
|
1470
|
-
css: _ref2$1,
|
|
1471
|
-
children: jsxRuntime.jsxs("div", {
|
|
1472
|
-
className: classnames__default["default"](this.props.containerClassName),
|
|
1473
|
-
css: _ref$f,
|
|
1474
|
-
children: [jsxRuntime.jsx("div", {
|
|
1475
|
-
"data-testid": "search-button",
|
|
1476
|
-
css: getSearchButtonStyles(this.props),
|
|
1477
|
-
onClick: this.props.disabled ? null : this.handleSubmit,
|
|
1478
|
-
label: "search-button",
|
|
1479
|
-
onMouseOver: this.props.handleMouseOver,
|
|
1480
|
-
onMouseOut: this.props.handleMouseOut,
|
|
1481
|
-
children: jsxRuntime.jsx(uiKit.SearchIcon, {
|
|
1482
|
-
color: this.props.iconColor || this.props.isMouseOver && !this.props.disabled ? 'primary' : 'neutral60',
|
|
1483
|
-
size: "big"
|
|
1484
|
-
})
|
|
1485
|
-
}), jsxRuntime.jsx("div", {
|
|
1486
|
-
css: getInputContainerStyles(this.props),
|
|
1487
|
-
children: jsxRuntime.jsx(ThrottledField$1, {
|
|
1488
|
-
style: "primary",
|
|
1489
|
-
name: "search-text",
|
|
1490
|
-
"data-testid": this.props.testId || 'search-input',
|
|
1491
|
-
value: this.state.text,
|
|
1492
|
-
label: this.props.label,
|
|
1493
|
-
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$P.placeholder),
|
|
1494
|
-
inputRef: this.props.inputRef || this.setInputRef,
|
|
1495
|
-
onChange: this.handleInputChange,
|
|
1496
|
-
onEnter: this.handleEnter,
|
|
1497
|
-
onBlurValue: this.props.onBlur,
|
|
1498
|
-
throttleMS: this.props.throttleMS,
|
|
1499
|
-
disabled: this.props.disabled,
|
|
1500
|
-
isGranular: this.props.isGranular
|
|
1501
|
-
})
|
|
1502
|
-
}), this.state.text && jsxRuntime.jsx(uiKit.SecondaryIconButton, {
|
|
1503
|
-
css: getSecondaryIconButtonStyles(this.props),
|
|
1504
|
-
icon: jsxRuntime.jsx(uiKit.CloseIcon, {}),
|
|
1505
|
-
size: "20",
|
|
1506
|
-
label: "clear-button",
|
|
1507
|
-
color: "solid",
|
|
1508
|
-
onClick: this.handleClear
|
|
1509
|
-
})]
|
|
1510
|
-
})
|
|
1511
|
-
});
|
|
1512
|
-
}
|
|
1513
|
-
}], [{
|
|
1514
|
-
key: "getDerivedStateFromProps",
|
|
1515
|
-
value: function getDerivedStateFromProps(nextProps, prevState) {
|
|
1516
|
-
if (prevState.initialValue !== nextProps.initialValue) {
|
|
1517
|
-
return {
|
|
1518
|
-
initialValue: nextProps.initialValue,
|
|
1519
|
-
text: nextProps.initialValue || ''
|
|
1520
|
-
};
|
|
1521
|
-
}
|
|
1522
|
-
return null;
|
|
1523
|
-
}
|
|
1524
|
-
}]);
|
|
1525
|
-
}(React.Component);
|
|
1526
|
-
SearchInput.displayName = 'SearchInput';
|
|
1527
|
-
SearchInput.defaultProps = {
|
|
1528
|
-
throttleMS: 300,
|
|
1529
|
-
onReset: () => null,
|
|
1530
|
-
label: 'Search input',
|
|
1531
|
-
onChange: () => null
|
|
1532
|
-
};
|
|
1533
|
-
var searchInput = flowRight__default["default"](keepDisplayName$1(SearchInput), withMouseOverState$1, reactIntl.injectIntl)(SearchInput);
|
|
1534
|
-
|
|
1535
|
-
function ownKeys$1o(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; }
|
|
1536
|
-
function _objectSpread$1o(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$1o(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$1o(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1537
1172
|
const injectDataTablePaginationState = initialValues => Component => {
|
|
1538
1173
|
const WithDataTablePaginationState = props => {
|
|
1539
1174
|
const _usePaginationState = uiKit.usePaginationState({
|
|
@@ -1546,7 +1181,7 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1546
1181
|
key: initialValues?.tableSorting?.key,
|
|
1547
1182
|
order: initialValues?.tableSorting?.order
|
|
1548
1183
|
});
|
|
1549
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1184
|
+
return jsxRuntime.jsx(Component, _objectSpread$1p(_objectSpread$1p({}, props), {}, {
|
|
1550
1185
|
dataTablePaginationState: {
|
|
1551
1186
|
page,
|
|
1552
1187
|
perPage,
|
|
@@ -1559,8 +1194,8 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1559
1194
|
};
|
|
1560
1195
|
var injectDataTablePaginationState$1 = injectDataTablePaginationState;
|
|
1561
1196
|
|
|
1562
|
-
function ownKeys$
|
|
1563
|
-
function _objectSpread$
|
|
1197
|
+
function ownKeys$1o(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; }
|
|
1198
|
+
function _objectSpread$1o(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$1o(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$1o(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1564
1199
|
const injectNotifications = function () {
|
|
1565
1200
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
1566
1201
|
return Component => {
|
|
@@ -1575,7 +1210,7 @@ const injectNotifications = function () {
|
|
|
1575
1210
|
onActionError,
|
|
1576
1211
|
hideAllPageNotifications
|
|
1577
1212
|
};
|
|
1578
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1213
|
+
return jsxRuntime.jsx(Component, _objectSpread$1o(_objectSpread$1o({}, props), {}, {
|
|
1579
1214
|
[propName]: notifications
|
|
1580
1215
|
}));
|
|
1581
1216
|
};
|
|
@@ -1585,23 +1220,23 @@ const injectNotifications = function () {
|
|
|
1585
1220
|
};
|
|
1586
1221
|
var injectNotifications$1 = injectNotifications;
|
|
1587
1222
|
|
|
1588
|
-
function ownKeys$
|
|
1589
|
-
function _objectSpread$
|
|
1223
|
+
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; }
|
|
1224
|
+
function _objectSpread$1n(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$1n(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$1n(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1590
1225
|
function isPropsMapper(mapProps) {
|
|
1591
1226
|
return typeof mapProps === 'function';
|
|
1592
1227
|
}
|
|
1593
1228
|
const withProps = mapProps => Component => {
|
|
1594
1229
|
const EnhancedWithProps = ownProps => {
|
|
1595
|
-
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
1596
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1230
|
+
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1n(_objectSpread$1n({}, ownProps), mapProps(ownProps)) : _objectSpread$1n(_objectSpread$1n({}, ownProps), mapProps);
|
|
1231
|
+
return jsxRuntime.jsx(Component, _objectSpread$1n({}, enhancedProps));
|
|
1597
1232
|
};
|
|
1598
1233
|
EnhancedWithProps.displayName = wrapDisplayName$1(Component, 'withProps');
|
|
1599
1234
|
return EnhancedWithProps;
|
|
1600
1235
|
};
|
|
1601
1236
|
var withProps$1 = withProps;
|
|
1602
1237
|
|
|
1603
|
-
function ownKeys$
|
|
1604
|
-
function _objectSpread$
|
|
1238
|
+
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; }
|
|
1239
|
+
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; }
|
|
1605
1240
|
const useRedirectEffect = _ref => {
|
|
1606
1241
|
let goTo = _ref.goTo;
|
|
1607
1242
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -1621,31 +1256,31 @@ const defaultOptions$5 = {
|
|
|
1621
1256
|
skip: () => false
|
|
1622
1257
|
};
|
|
1623
1258
|
const withRedirectTo = options => Component => {
|
|
1624
|
-
const mergedOptions = _objectSpread$
|
|
1259
|
+
const mergedOptions = _objectSpread$1m(_objectSpread$1m({}, defaultOptions$5), options);
|
|
1625
1260
|
const WithRedirectTo = props => {
|
|
1626
1261
|
if (!mergedOptions.skip(props)) {
|
|
1627
1262
|
return jsxRuntime.jsx(RedirectTo, {
|
|
1628
1263
|
goTo: options.selectGoTo(props)
|
|
1629
1264
|
});
|
|
1630
1265
|
}
|
|
1631
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1266
|
+
return jsxRuntime.jsx(Component, _objectSpread$1m({}, props));
|
|
1632
1267
|
};
|
|
1633
1268
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
1634
1269
|
return WithRedirectTo;
|
|
1635
1270
|
};
|
|
1636
1271
|
var withRedirectTo$1 = withRedirectTo;
|
|
1637
1272
|
|
|
1638
|
-
function ownKeys$
|
|
1639
|
-
function _objectSpread$
|
|
1273
|
+
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; }
|
|
1274
|
+
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; }
|
|
1640
1275
|
const defaultOptions$4 = {
|
|
1641
1276
|
propName: 'modalState',
|
|
1642
1277
|
isInitiallyOpen: false
|
|
1643
1278
|
};
|
|
1644
1279
|
const injectModalState$2 = options => Component => {
|
|
1645
|
-
const mergedOptions = _objectSpread$
|
|
1280
|
+
const mergedOptions = _objectSpread$1l(_objectSpread$1l({}, defaultOptions$4), options);
|
|
1646
1281
|
const WithModalState = props => {
|
|
1647
1282
|
const modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
1648
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1283
|
+
return jsxRuntime.jsx(Component, _objectSpread$1l(_objectSpread$1l({}, props), {}, {
|
|
1649
1284
|
[mergedOptions.propName]: modalState
|
|
1650
1285
|
}));
|
|
1651
1286
|
};
|
|
@@ -1654,17 +1289,17 @@ const injectModalState$2 = options => Component => {
|
|
|
1654
1289
|
};
|
|
1655
1290
|
var injectModalState$3 = injectModalState$2;
|
|
1656
1291
|
|
|
1657
|
-
function ownKeys$
|
|
1658
|
-
function _objectSpread$
|
|
1292
|
+
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; }
|
|
1293
|
+
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; }
|
|
1659
1294
|
const defaultOptions$3 = {
|
|
1660
1295
|
propName: 'toggleState',
|
|
1661
1296
|
isInitiallyOpen: false
|
|
1662
1297
|
};
|
|
1663
1298
|
const injectModalState = options => Component => {
|
|
1664
|
-
const mergedOptions = _objectSpread$
|
|
1299
|
+
const mergedOptions = _objectSpread$1k(_objectSpread$1k({}, defaultOptions$3), options);
|
|
1665
1300
|
const WithToggleState = props => {
|
|
1666
1301
|
const toggleState = uiKit.useToggleState(mergedOptions.isInitiallyOpen);
|
|
1667
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1302
|
+
return jsxRuntime.jsx(Component, _objectSpread$1k(_objectSpread$1k({}, props), {}, {
|
|
1668
1303
|
[mergedOptions.propName]: toggleState
|
|
1669
1304
|
}));
|
|
1670
1305
|
};
|
|
@@ -1673,8 +1308,8 @@ const injectModalState = options => Component => {
|
|
|
1673
1308
|
};
|
|
1674
1309
|
var injectModalState$1 = injectModalState;
|
|
1675
1310
|
|
|
1676
|
-
function ownKeys$
|
|
1677
|
-
function _objectSpread$
|
|
1311
|
+
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; }
|
|
1312
|
+
function _objectSpread$1j(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$1j(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$1j(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1678
1313
|
const defaultOptions$2 = {
|
|
1679
1314
|
storageType: 'local',
|
|
1680
1315
|
segregateByUser: true
|
|
@@ -1692,7 +1327,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
|
|
|
1692
1327
|
const isNil = value => typeof value === 'undefined' || value === null;
|
|
1693
1328
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
1694
1329
|
var _context;
|
|
1695
|
-
const mergedOptions = _objectSpread$
|
|
1330
|
+
const mergedOptions = _objectSpread$1j(_objectSpread$1j({}, defaultOptions$2), options);
|
|
1696
1331
|
const userId = applicationShellConnectors.useApplicationContext(context => context.user?.id);
|
|
1697
1332
|
const scopedStorageKey = _filterInstanceProperty__default["default"](_context = [mergedOptions.segregateByUser && userId, storageKey]).call(_context, Boolean).join('/');
|
|
1698
1333
|
const readFromStorage = React.useCallback(() => {
|
|
@@ -1737,8 +1372,8 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
1737
1372
|
};
|
|
1738
1373
|
var useStorage$1 = useStorage;
|
|
1739
1374
|
|
|
1740
|
-
function ownKeys$
|
|
1741
|
-
function _objectSpread$
|
|
1375
|
+
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; }
|
|
1376
|
+
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; }
|
|
1742
1377
|
const defaultOptions$1 = {
|
|
1743
1378
|
propName: 'storage',
|
|
1744
1379
|
storageKey: '',
|
|
@@ -1751,7 +1386,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1751
1386
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
1752
1387
|
* argument position does not allow passing specification of option(s).
|
|
1753
1388
|
*/
|
|
1754
|
-
const mergedOptions = _objectSpread$
|
|
1389
|
+
const mergedOptions = _objectSpread$1i(_objectSpread$1i({}, defaultOptions$1), options);
|
|
1755
1390
|
const WithStorage = props => {
|
|
1756
1391
|
const _useStorage = useStorage$1(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
1757
1392
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -1765,7 +1400,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1765
1400
|
readFromStorage
|
|
1766
1401
|
}
|
|
1767
1402
|
};
|
|
1768
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
1403
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1i(_objectSpread$1i({}, props), storageProp));
|
|
1769
1404
|
};
|
|
1770
1405
|
WithStorage.displayName = wrapDisplayName$1(WrappedComponent, 'WithStorage');
|
|
1771
1406
|
return WithStorage;
|
|
@@ -1810,8 +1445,8 @@ function useFormatLocalizedFieldToString() {
|
|
|
1810
1445
|
return formatLocalizedFieldToString;
|
|
1811
1446
|
}
|
|
1812
1447
|
|
|
1813
|
-
function ownKeys$
|
|
1814
|
-
function _objectSpread$
|
|
1448
|
+
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; }
|
|
1449
|
+
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; }
|
|
1815
1450
|
var FetchResourceTypeDuplicatedField = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchResourceTypeDuplicatedField" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipAssociateRoles" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipAttributeGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipChannels" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipDiscountCodes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipInventoryEntries" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipOrders" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipPayments" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "associateRoles" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipAssociateRoles" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "attributeGroups" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipAttributeGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "categories" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "channels" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipChannels" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "discountCodes" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipDiscountCodes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventoryEntries" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipInventoryEntries" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "orders" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipOrders" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "payments" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipPayments" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "products" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 2328, source: { body: "query FetchResourceTypeDuplicatedField(\n $where: String\n $skipAssociateRoles: Boolean!\n $skipAttributeGroups: Boolean!\n $skipBusinessUnits: Boolean!\n $skipCarts: Boolean!\n $skipCartDiscounts: Boolean!\n $skipCategories: Boolean!\n $skipChannels: Boolean!\n $skipCustomers: Boolean!\n $skipCustomerGroups: Boolean!\n $skipDiscountCodes: Boolean!\n $skipInventoryEntries: Boolean!\n $skipOrders: Boolean!\n $skipPayments: Boolean!\n $skipProducts: Boolean!\n $skipProductDiscounts: Boolean!\n $skipProductSelections: Boolean!\n $skipProductTypes: Boolean!\n $skipShippingMethods: Boolean!\n $skipShoppingLists: Boolean!\n $skipStores: Boolean!\n $skipTaxCategories: Boolean!\n $skipZones: Boolean!\n) {\n associateRoles(where: $where) @skip(if: $skipAssociateRoles) {\n total\n }\n attributeGroups(where: $where) @skip(if: $skipAttributeGroups) {\n total\n }\n businessUnits(where: $where) @skip(if: $skipBusinessUnits) {\n total\n }\n carts(where: $where) @skip(if: $skipCarts) {\n total\n }\n cartDiscounts(where: $where) @skip(if: $skipCartDiscounts) {\n total\n }\n categories(where: $where) @skip(if: $skipCategories) {\n total\n }\n channels(where: $where) @skip(if: $skipChannels) {\n total\n }\n customers(where: $where) @skip(if: $skipCustomers) {\n total\n }\n customerGroups(where: $where) @skip(if: $skipCustomerGroups) {\n total\n }\n discountCodes(where: $where) @skip(if: $skipDiscountCodes) {\n total\n }\n inventoryEntries(where: $where) @skip(if: $skipInventoryEntries) {\n total\n }\n orders(where: $where) @skip(if: $skipOrders) {\n total\n }\n payments(where: $where) @skip(if: $skipPayments) {\n total\n }\n products(where: $where) @skip(if: $skipProducts) {\n total\n }\n productDiscounts(where: $where) @skip(if: $skipProductDiscounts) {\n total\n }\n productSelections(where: $where) @skip(if: $skipProductSelections) {\n total\n }\n productTypes(where: $where) @skip(if: $skipProductTypes) {\n total\n }\n shippingMethods(where: $where) @skip(if: $skipShippingMethods) {\n total\n }\n shoppingLists(where: $where) @skip(if: $skipShoppingLists) {\n total\n }\n stores(where: $where) @skip(if: $skipStores) {\n total\n }\n taxCategories(where: $where) @skip(if: $skipTaxCategories) {\n total\n }\n zones(where: $where) @skip(if: $skipZones) {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
1816
1451
|
const MC_RESOURCES_WITH_KEYS = {
|
|
1817
1452
|
ASSOCIATE_ROLE: 'ASSOCIATE_ROLE',
|
|
@@ -1886,7 +1521,7 @@ const DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES = {
|
|
|
1886
1521
|
[BASE_SKIP_RESOURCE_TYPES_VARIABLES.ZONE]: true
|
|
1887
1522
|
};
|
|
1888
1523
|
const getSkipVariables = resourceType => {
|
|
1889
|
-
return _objectSpread$
|
|
1524
|
+
return _objectSpread$1h(_objectSpread$1h({}, DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES), {}, {
|
|
1890
1525
|
[BASE_SKIP_RESOURCE_TYPES_VARIABLES[resourceType]]: false
|
|
1891
1526
|
});
|
|
1892
1527
|
};
|
|
@@ -1911,7 +1546,7 @@ const getQueryVariables = _ref2 => {
|
|
|
1911
1546
|
fieldValue,
|
|
1912
1547
|
id
|
|
1913
1548
|
});
|
|
1914
|
-
return _objectSpread$
|
|
1549
|
+
return _objectSpread$1h({
|
|
1915
1550
|
where
|
|
1916
1551
|
}, skipVariables);
|
|
1917
1552
|
};
|
|
@@ -1945,8 +1580,8 @@ const usePrevious = value => {
|
|
|
1945
1580
|
};
|
|
1946
1581
|
var usePrevious$1 = usePrevious;
|
|
1947
1582
|
|
|
1948
|
-
function ownKeys$
|
|
1949
|
-
function _objectSpread$
|
|
1583
|
+
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; }
|
|
1584
|
+
function _objectSpread$1g(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$1g(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$1g(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1950
1585
|
var FetchStoresQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sort" } }, type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "Variable", name: { kind: "Name", value: "sort" } } }, { kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "count" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "offset" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "StoreBasicInfo" }, directives: [] }, { kind: "Field", name: { kind: "Name", value: "countries" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "languages" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }] }, { kind: "Field", name: { kind: "Name", value: "distributionChannelsRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "distributionChannels" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "supplyChannels" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelection" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "StoreBasicInfo" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Store" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastModifiedAt" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 1089, source: { body: "#import '../../utils/graphql/fragments/store-basic-info.ctp.graphql'\n\nquery FetchStoresQuery(\n $limit: Int\n $offset: Int\n $sort: [String!]\n $where: String\n $excludeExtendedStoresList: Boolean!\n $excludeProductSelections: Boolean!\n) {\n stores(limit: $limit, offset: $offset, sort: $sort, where: $where) {\n total\n count\n offset\n results {\n ...StoreBasicInfo\n countries {\n code\n }\n languages @skip(if: $excludeExtendedStoresList)\n distributionChannelsRef {\n id\n }\n distributionChannels @skip(if: $excludeExtendedStoresList) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n supplyChannels @skip(if: $excludeExtendedStoresList) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n productSelections @skip(if: $excludeProductSelections) {\n active\n productSelection {\n id\n mode\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
1951
1586
|
const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
1952
1587
|
var _context, _context2;
|
|
@@ -1957,7 +1592,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
1957
1592
|
offset: storesQueryResult.offset,
|
|
1958
1593
|
results: ((_context = storesQueryResult.results) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(store => {
|
|
1959
1594
|
var _context3, _context4;
|
|
1960
|
-
return _objectSpread$
|
|
1595
|
+
return _objectSpread$1g(_objectSpread$1g({}, store), {}, {
|
|
1961
1596
|
productSelections: ((_context3 = store.productSelections) == null ? void 0 : _bindInstanceProperty__default["default"](_context4 = Function.call).call(_context4, _filterInstanceProperty__default["default"](_context3), _context3))?.(productSelectionRef => Boolean(productSelectionRef.productSelection))
|
|
1962
1597
|
});
|
|
1963
1598
|
})
|
|
@@ -1965,7 +1600,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
1965
1600
|
};
|
|
1966
1601
|
const createQueryVariables$6 = ownProps => {
|
|
1967
1602
|
var _context5, _context6;
|
|
1968
|
-
return _objectSpread$
|
|
1603
|
+
return _objectSpread$1g(_objectSpread$1g(_objectSpread$1g({
|
|
1969
1604
|
limit: ownProps.limit,
|
|
1970
1605
|
offset: ownProps.offset,
|
|
1971
1606
|
sort: _sortInstanceProperty__default["default"](ownProps)
|
|
@@ -2018,8 +1653,8 @@ const useStoresListFetcher = props => {
|
|
|
2018
1653
|
};
|
|
2019
1654
|
var useStoresListFetcher$1 = useStoresListFetcher;
|
|
2020
1655
|
|
|
2021
|
-
function ownKeys$
|
|
2022
|
-
function _objectSpread$
|
|
1656
|
+
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; }
|
|
1657
|
+
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; }
|
|
2023
1658
|
const createSearchQuery = (searchBy, searchTerm, language) => {
|
|
2024
1659
|
if (searchBy === 'key/name') {
|
|
2025
1660
|
return {
|
|
@@ -2038,7 +1673,7 @@ const createSearchQuery = (searchBy, searchTerm, language) => {
|
|
|
2038
1673
|
};
|
|
2039
1674
|
} else {
|
|
2040
1675
|
return {
|
|
2041
|
-
fullTextPrefix: _objectSpread$
|
|
1676
|
+
fullTextPrefix: _objectSpread$1f(_objectSpread$1f({
|
|
2042
1677
|
field: searchBy
|
|
2043
1678
|
}, searchBy === 'name' ? {
|
|
2044
1679
|
language: language
|
|
@@ -2114,7 +1749,7 @@ const useStoresSearchFetcher = () => {
|
|
|
2114
1749
|
});
|
|
2115
1750
|
setIsLoading(false);
|
|
2116
1751
|
} catch (error) {
|
|
2117
|
-
setStoreSearchResults(prev => _objectSpread$
|
|
1752
|
+
setStoreSearchResults(prev => _objectSpread$1f(_objectSpread$1f({}, prev), {}, {
|
|
2118
1753
|
hits: [],
|
|
2119
1754
|
total: 0
|
|
2120
1755
|
}));
|
|
@@ -2125,7 +1760,7 @@ const useStoresSearchFetcher = () => {
|
|
|
2125
1760
|
fetchStoreSearchResults,
|
|
2126
1761
|
storeSearchResults,
|
|
2127
1762
|
isLoading,
|
|
2128
|
-
resetStoreSearchResults: () => setStoreSearchResults(prev => _objectSpread$
|
|
1763
|
+
resetStoreSearchResults: () => setStoreSearchResults(prev => _objectSpread$1f(_objectSpread$1f({}, prev), {}, {
|
|
2129
1764
|
hits: [],
|
|
2130
1765
|
total: 0
|
|
2131
1766
|
}))
|
|
@@ -2216,8 +1851,8 @@ const useStoreKeysInDataFences = _ref => {
|
|
|
2216
1851
|
};
|
|
2217
1852
|
var useStoreKeysInDataFences$1 = useStoreKeysInDataFences;
|
|
2218
1853
|
|
|
2219
|
-
function ownKeys$
|
|
2220
|
-
function _objectSpread$
|
|
1854
|
+
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; }
|
|
1855
|
+
function _objectSpread$1e(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$1e(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$1e(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2221
1856
|
const TEN_MINUTES_IN_MS = 600000;
|
|
2222
1857
|
const defaultOptions = {
|
|
2223
1858
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -2245,7 +1880,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
2245
1880
|
};
|
|
2246
1881
|
const usePersistedReminder = function () {
|
|
2247
1882
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2248
|
-
const mergedOptions = _objectSpread$
|
|
1883
|
+
const mergedOptions = _objectSpread$1e(_objectSpread$1e({}, defaultOptions), options);
|
|
2249
1884
|
const _useStorage = useStorage$1(mergedOptions.storageKey, null),
|
|
2250
1885
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
2251
1886
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -2310,8 +1945,8 @@ var messages$O = reactIntl.defineMessages({
|
|
|
2310
1945
|
}
|
|
2311
1946
|
});
|
|
2312
1947
|
|
|
2313
|
-
function ownKeys$
|
|
2314
|
-
function _objectSpread$
|
|
1948
|
+
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; }
|
|
1949
|
+
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; }
|
|
2315
1950
|
const LinkToProfile = props => {
|
|
2316
1951
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
2317
1952
|
to: "/account/profile",
|
|
@@ -2331,7 +1966,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2331
1966
|
isBold: true,
|
|
2332
1967
|
intlMessage: messages$O.profileUpdated
|
|
2333
1968
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2334
|
-
intlMessage: _objectSpread$
|
|
1969
|
+
intlMessage: _objectSpread$1d(_objectSpread$1d({}, messages$O.addMoreInformation), {}, {
|
|
2335
1970
|
values: {
|
|
2336
1971
|
newline: getNewLine
|
|
2337
1972
|
}
|
|
@@ -2340,7 +1975,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2340
1975
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2341
1976
|
scale: "xs",
|
|
2342
1977
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2343
|
-
intlMessage: _objectSpread$
|
|
1978
|
+
intlMessage: _objectSpread$1d(_objectSpread$1d({}, messages$O.informationAndProfileLink), {}, {
|
|
2344
1979
|
values: {
|
|
2345
1980
|
newline: getNewLine,
|
|
2346
1981
|
link: getLinkToProfile
|
|
@@ -2506,8 +2141,8 @@ const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
|
2506
2141
|
React.useCallback(debounce__default["default"](promiseCallback, wait), [promiseCallback]);
|
|
2507
2142
|
var useDebouncedPromiseCallback$1 = useDebouncedPromiseCallback;
|
|
2508
2143
|
|
|
2509
|
-
function ownKeys$
|
|
2510
|
-
function _objectSpread$
|
|
2144
|
+
function ownKeys$1c(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2145
|
+
function _objectSpread$1c(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1c(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1c(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2511
2146
|
const prepareMutableColumnProps = (columnConfig, mutableColumnProps) => {
|
|
2512
2147
|
const updatedColumnProps = {};
|
|
2513
2148
|
_forEachInstanceProperty__default["default"](mutableColumnProps).call(mutableColumnProps, columnProp => {
|
|
@@ -2527,14 +2162,14 @@ const retrieveColumnsWithCachedConfiguration = _ref => {
|
|
|
2527
2162
|
mutableColumnProps = _ref.mutableColumnProps;
|
|
2528
2163
|
return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](cachedVisibleTableConfiguration).call(cachedVisibleTableConfiguration, cachedColumn => _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedColumn.key))).call(_context, cachedConfig => {
|
|
2529
2164
|
const initialColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedConfig.key);
|
|
2530
|
-
return _objectSpread$
|
|
2165
|
+
return _objectSpread$1c(_objectSpread$1c({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2531
2166
|
});
|
|
2532
2167
|
};
|
|
2533
2168
|
const handleCacheUpdate = _ref2 => {
|
|
2534
2169
|
let update = _ref2.update,
|
|
2535
2170
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2536
2171
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2537
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2172
|
+
return updateCachedTableConfiguration(_objectSpread$1c(_objectSpread$1c({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2538
2173
|
};
|
|
2539
2174
|
|
|
2540
2175
|
// Signature:
|
|
@@ -2563,7 +2198,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2563
2198
|
return {
|
|
2564
2199
|
columnsConfig: _mapInstanceProperty__default["default"](initialVisibleColumnKeys).call(initialVisibleColumnKeys, visibleColumnKey => {
|
|
2565
2200
|
const visibleColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, columnConfig => columnConfig.key === visibleColumnKey);
|
|
2566
|
-
return _objectSpread$
|
|
2201
|
+
return _objectSpread$1c({
|
|
2567
2202
|
key: visibleColumnKey
|
|
2568
2203
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2569
2204
|
}),
|
|
@@ -2626,14 +2261,14 @@ const useProductSelectionsTotalFetcher = props => {
|
|
|
2626
2261
|
};
|
|
2627
2262
|
var useProductSelectionsTotalFetcher$1 = useProductSelectionsTotalFetcher;
|
|
2628
2263
|
|
|
2629
|
-
function ownKeys$
|
|
2630
|
-
function _objectSpread$
|
|
2264
|
+
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; }
|
|
2265
|
+
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; }
|
|
2631
2266
|
|
|
2632
2267
|
// eslint-disable-next-line import/prefer-default-export
|
|
2633
2268
|
const convertProductSelectionsFromGraphQl = productSelections => {
|
|
2634
2269
|
var _context;
|
|
2635
|
-
return productSelections?.results && _objectSpread$
|
|
2636
|
-
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$
|
|
2270
|
+
return productSelections?.results && _objectSpread$1b(_objectSpread$1b({}, productSelections), {}, {
|
|
2271
|
+
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$1b({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
2637
2272
|
from: 'nameAllLocales',
|
|
2638
2273
|
to: 'name'
|
|
2639
2274
|
}])))
|
|
@@ -4173,8 +3808,8 @@ const getData = (code, field) => {
|
|
|
4173
3808
|
};
|
|
4174
3809
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
4175
3810
|
|
|
4176
|
-
function ownKeys$
|
|
4177
|
-
function _objectSpread$
|
|
3811
|
+
function ownKeys$1a(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3812
|
+
function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1a(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4178
3813
|
function formatMoneyRangeValue(value, intl) {
|
|
4179
3814
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
4180
3815
|
if (value.from && value.to) return `${formatMoneyValue(value.from, value.currency, intl)} -
|
|
@@ -4184,7 +3819,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
4184
3819
|
return '';
|
|
4185
3820
|
}
|
|
4186
3821
|
function formatMoneyValue(amount, currency, intl) {
|
|
4187
|
-
return formatMoney$2(_objectSpread$
|
|
3822
|
+
return formatMoney$2(_objectSpread$1a({
|
|
4188
3823
|
centAmount: amount,
|
|
4189
3824
|
fractionDigits: getFractionDigit(currency)
|
|
4190
3825
|
}, currency ? {
|
|
@@ -4200,7 +3835,7 @@ function getFractionedAmount(moneyValue) {
|
|
|
4200
3835
|
return amount / 10 ** fractionDigits;
|
|
4201
3836
|
}
|
|
4202
3837
|
function formatMoney$2(moneyValue, intl, options) {
|
|
4203
|
-
return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$
|
|
3838
|
+
return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$1a({
|
|
4204
3839
|
style: 'currency',
|
|
4205
3840
|
currency: moneyValue.currencyCode,
|
|
4206
3841
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
@@ -4473,9 +4108,9 @@ const getPrefixSearchBounds = input => {
|
|
|
4473
4108
|
};
|
|
4474
4109
|
var getPrefixSearchBounds$1 = getPrefixSearchBounds;
|
|
4475
4110
|
|
|
4476
|
-
const _excluded$
|
|
4477
|
-
function ownKeys$
|
|
4478
|
-
function _objectSpread$
|
|
4111
|
+
const _excluded$e = ["action"];
|
|
4112
|
+
function ownKeys$19(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4113
|
+
function _objectSpread$19(e) { for (var r = 1; r < arguments.length; r++) { var _context0, _context1; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context0 = ownKeys$19(Object(t), !0)).call(_context0, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context1 = ownKeys$19(Object(t))).call(_context1, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4479
4114
|
|
|
4480
4115
|
/**
|
|
4481
4116
|
* Checks if a value is a LocalizedString
|
|
@@ -4497,7 +4132,7 @@ const getIsLocalizedString = maybeLocalizedString => {
|
|
|
4497
4132
|
*/
|
|
4498
4133
|
const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
|
|
4499
4134
|
if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
|
|
4500
|
-
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$
|
|
4135
|
+
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$19(_objectSpread$19({}, customFields), {}, {
|
|
4501
4136
|
[customField.name]: customField.value
|
|
4502
4137
|
}), {});
|
|
4503
4138
|
};
|
|
@@ -4521,7 +4156,7 @@ function transformLocalizedFieldsForCategory(category) {
|
|
|
4521
4156
|
const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
|
|
4522
4157
|
const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
|
|
4523
4158
|
const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
|
|
4524
|
-
return _objectSpread$
|
|
4159
|
+
return _objectSpread$19(_objectSpread$19(_objectSpread$19({}, transformedData), parent ? {
|
|
4525
4160
|
parent
|
|
4526
4161
|
} : {}), ancestors ? {
|
|
4527
4162
|
ancestors
|
|
@@ -4614,7 +4249,7 @@ const formatMoney = valueType => money => {
|
|
|
4614
4249
|
case 'fixed':
|
|
4615
4250
|
case 'fixedCart':
|
|
4616
4251
|
return {
|
|
4617
|
-
[money.type]: _objectSpread$
|
|
4252
|
+
[money.type]: _objectSpread$19({
|
|
4618
4253
|
centAmount: money.centAmount,
|
|
4619
4254
|
currencyCode: money.currencyCode
|
|
4620
4255
|
}, money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4796,7 +4431,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4796
4431
|
case 'addAttributeDefinition':
|
|
4797
4432
|
return {
|
|
4798
4433
|
[actionName]: {
|
|
4799
|
-
attributeDefinition: _objectSpread$
|
|
4434
|
+
attributeDefinition: _objectSpread$19(_objectSpread$19({}, actionPayload.attribute), {}, {
|
|
4800
4435
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
|
|
4801
4436
|
inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
|
|
4802
4437
|
type: createAttributeTypeValue(actionPayload.attribute)
|
|
@@ -4892,7 +4527,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4892
4527
|
return {
|
|
4893
4528
|
[actionName]: {
|
|
4894
4529
|
attributeName: actionPayload.attributeName,
|
|
4895
|
-
value: _objectSpread$
|
|
4530
|
+
value: _objectSpread$19(_objectSpread$19({}, actionPayload.value), {}, {
|
|
4896
4531
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
|
|
4897
4532
|
})
|
|
4898
4533
|
}
|
|
@@ -4901,7 +4536,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4901
4536
|
return {
|
|
4902
4537
|
[actionName]: {
|
|
4903
4538
|
attributeName: actionPayload.attributeName,
|
|
4904
|
-
newValue: _objectSpread$
|
|
4539
|
+
newValue: _objectSpread$19(_objectSpread$19({}, actionPayload.newValue), {}, {
|
|
4905
4540
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
|
|
4906
4541
|
})
|
|
4907
4542
|
}
|
|
@@ -4928,7 +4563,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4928
4563
|
name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
|
|
4929
4564
|
taxCategory: actionPayload.taxCategory,
|
|
4930
4565
|
money: {
|
|
4931
|
-
[actionPayload.money.type]: _objectSpread$
|
|
4566
|
+
[actionPayload.money.type]: _objectSpread$19({
|
|
4932
4567
|
centAmount: actionPayload.money.centAmount,
|
|
4933
4568
|
currencyCode: actionPayload.money.currencyCode
|
|
4934
4569
|
}, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4956,7 +4591,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4956
4591
|
return {
|
|
4957
4592
|
[actionName]: {
|
|
4958
4593
|
target: {
|
|
4959
|
-
[actionPayload.target.type]: _objectSpread$
|
|
4594
|
+
[actionPayload.target.type]: _objectSpread$19(_objectSpread$19(_objectSpread$19({}, omit__default["default"](actionPayload.target, ['type', '__typename'])), actionPayload.target.triggerPattern && {
|
|
4960
4595
|
triggerPattern: _mapInstanceProperty__default["default"](_context6 = actionPayload.target.triggerPattern).call(_context6, pattern => ({
|
|
4961
4596
|
[pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
|
|
4962
4597
|
}))
|
|
@@ -4991,8 +4626,8 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4991
4626
|
fields: customFields
|
|
4992
4627
|
} : null;
|
|
4993
4628
|
return {
|
|
4994
|
-
[actionName]: _objectSpread$
|
|
4995
|
-
address: _objectSpread$
|
|
4629
|
+
[actionName]: _objectSpread$19(_objectSpread$19({}, actionPayload), {}, {
|
|
4630
|
+
address: _objectSpread$19(_objectSpread$19({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
|
|
4996
4631
|
custom
|
|
4997
4632
|
})
|
|
4998
4633
|
})
|
|
@@ -5034,7 +4669,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
5034
4669
|
};
|
|
5035
4670
|
const createGraphQlUpdateActions = actions => _reduceInstanceProperty__default["default"](actions).call(actions, (previousActions, _ref9) => {
|
|
5036
4671
|
let actionName = _ref9.action,
|
|
5037
|
-
actionPayload = _objectWithoutProperties(_ref9, _excluded$
|
|
4672
|
+
actionPayload = _objectWithoutProperties(_ref9, _excluded$e);
|
|
5038
4673
|
return [...previousActions, convertAction(actionName, actionPayload)];
|
|
5039
4674
|
}, []);
|
|
5040
4675
|
const extractErrorFromGraphQlResponse = graphQlResponse => {
|
|
@@ -5100,8 +4735,8 @@ function omitDeep(obj, fieldsToOmit) {
|
|
|
5100
4735
|
return originalOmitDeep__default["default"](obj, fieldsToOmit);
|
|
5101
4736
|
}
|
|
5102
4737
|
|
|
5103
|
-
function ownKeys$
|
|
5104
|
-
function _objectSpread$
|
|
4738
|
+
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; }
|
|
4739
|
+
function _objectSpread$18(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$18(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$18(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5105
4740
|
function getPriceChannelName(price) {
|
|
5106
4741
|
return price.channel?.name ?? price.channel?.key ?? null;
|
|
5107
4742
|
}
|
|
@@ -5113,11 +4748,11 @@ function getDiscountValue(price) {
|
|
|
5113
4748
|
} else if (price.value?.type === PRECISION_TYPES.highPrecision && price.discounted?.value?.type === PRECISION_TYPES.centPrecision) {
|
|
5114
4749
|
fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
|
|
5115
4750
|
}
|
|
5116
|
-
return price.discounted ? _objectSpread$
|
|
4751
|
+
return price.discounted ? _objectSpread$18(_objectSpread$18({}, price.value), {}, {
|
|
5117
4752
|
fractionedAmount,
|
|
5118
4753
|
centAmount: price.value.centAmount - price.discounted.value.centAmount,
|
|
5119
4754
|
preciseAmount
|
|
5120
|
-
}) : _objectSpread$
|
|
4755
|
+
}) : _objectSpread$18(_objectSpread$18({}, price.value), {}, {
|
|
5121
4756
|
centAmount: 0
|
|
5122
4757
|
});
|
|
5123
4758
|
}
|
|
@@ -5148,7 +4783,7 @@ function getNetUnitPrice(_ref) {
|
|
|
5148
4783
|
}
|
|
5149
4784
|
let preciseAmount;
|
|
5150
4785
|
if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + taxRate.amount);
|
|
5151
|
-
return _objectSpread$
|
|
4786
|
+
return _objectSpread$18(_objectSpread$18({}, price.value), {}, {
|
|
5152
4787
|
centAmount,
|
|
5153
4788
|
preciseAmount
|
|
5154
4789
|
});
|
|
@@ -5164,7 +4799,7 @@ function getNetUnitPrice(_ref) {
|
|
|
5164
4799
|
}
|
|
5165
4800
|
let preciseAmount;
|
|
5166
4801
|
if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + lineItem.taxRate.amount);
|
|
5167
|
-
return _objectSpread$
|
|
4802
|
+
return _objectSpread$18(_objectSpread$18({}, price.value), {}, {
|
|
5168
4803
|
centAmount,
|
|
5169
4804
|
preciseAmount
|
|
5170
4805
|
});
|
|
@@ -5176,7 +4811,7 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
5176
4811
|
const currencyCode = price.value.currencyCode;
|
|
5177
4812
|
const fractionedAmount = getFractionedAmount(price.value);
|
|
5178
4813
|
if (currencyCode && !isNil__default["default"](fractionedAmount)) {
|
|
5179
|
-
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$
|
|
4814
|
+
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$18(_objectSpread$18({}, minPrices), {}, {
|
|
5180
4815
|
[currencyCode]: price.value
|
|
5181
4816
|
});
|
|
5182
4817
|
}
|
|
@@ -5185,8 +4820,8 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
5185
4820
|
return _Object$values__default["default"](minPricesByCurrency);
|
|
5186
4821
|
}
|
|
5187
4822
|
|
|
5188
|
-
function ownKeys$
|
|
5189
|
-
function _objectSpread$
|
|
4823
|
+
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; }
|
|
4824
|
+
function _objectSpread$17(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$17(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$17(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5190
4825
|
const transformCustomFieldFromGraphQLResponse = resource => {
|
|
5191
4826
|
var _context, _context4;
|
|
5192
4827
|
return {
|
|
@@ -5201,14 +4836,14 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
5201
4836
|
return {
|
|
5202
4837
|
name: fieldDefinition.name,
|
|
5203
4838
|
required: fieldDefinition.required,
|
|
5204
|
-
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$
|
|
5205
|
-
elementType: _objectSpread$
|
|
4839
|
+
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$17(_objectSpread$17({}, fieldDefinition.type), {}, {
|
|
4840
|
+
elementType: _objectSpread$17(_objectSpread$17({}, fieldDefinition.type.elementType), {}, {
|
|
5206
4841
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
5207
4842
|
key: value.key,
|
|
5208
4843
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
5209
4844
|
}))
|
|
5210
4845
|
})
|
|
5211
|
-
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$
|
|
4846
|
+
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$17(_objectSpread$17({}, fieldDefinition.type), {}, {
|
|
5212
4847
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
5213
4848
|
key: value.key,
|
|
5214
4849
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -5219,7 +4854,7 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
5219
4854
|
})
|
|
5220
4855
|
}
|
|
5221
4856
|
},
|
|
5222
|
-
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$
|
|
4857
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$17(_objectSpread$17({}, fields), {}, {
|
|
5223
4858
|
[customField.name]: customField.value
|
|
5224
4859
|
}), {})
|
|
5225
4860
|
};
|
|
@@ -5231,7 +4866,7 @@ const convertProductSelectionFromGraphQl = productSelection => {
|
|
|
5231
4866
|
// Incase the product selection is not missing or if the current project dose not yet have access to the feature,
|
|
5232
4867
|
// in either case we return null
|
|
5233
4868
|
if (!productSelection) return null;
|
|
5234
|
-
return _objectSpread$
|
|
4869
|
+
return _objectSpread$17(_objectSpread$17({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
5235
4870
|
from: 'nameAllLocales',
|
|
5236
4871
|
to: 'name'
|
|
5237
4872
|
}])), {}, {
|
|
@@ -5254,8 +4889,8 @@ const transformAllToProperNounCase = text => {
|
|
|
5254
4889
|
return _mapInstanceProperty__default["default"](_context = text.split(' ')).call(_context, term => transformToProperNounCase(term)).join(' ');
|
|
5255
4890
|
};
|
|
5256
4891
|
|
|
5257
|
-
function ownKeys$
|
|
5258
|
-
function _objectSpread$
|
|
4892
|
+
function ownKeys$16(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4893
|
+
function _objectSpread$16(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$16(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$16(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5259
4894
|
const REGEX_ISO8601 = /(\d{4}-\d{2}-\d{2}[T]\d{2}:\d{2}:\d{2}(\.\d{3}[Z]?))/;
|
|
5260
4895
|
const REGEX_TIME = /\d{2}:\d{2}/;
|
|
5261
4896
|
const REGEX_DATE = /\d{4}-\d{2}-\d{2}/;
|
|
@@ -5272,7 +4907,7 @@ function filterCustomTypeUpdateActionValues() {
|
|
|
5272
4907
|
if (updateAction.action === 'setCustomField' && _Array$isArray__default["default"](updateAction.value)) {
|
|
5273
4908
|
const definition = _findInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, field => field.name === updateAction.name);
|
|
5274
4909
|
const definitionName = definition.type.elementType.name;
|
|
5275
|
-
return _objectSpread$
|
|
4910
|
+
return _objectSpread$16(_objectSpread$16({}, updateAction), {}, {
|
|
5276
4911
|
value: filterNotDefinedValues(updateAction.value, definitionName)
|
|
5277
4912
|
});
|
|
5278
4913
|
}
|
|
@@ -5776,8 +5411,8 @@ const messages$I = reactIntl.defineMessages({
|
|
|
5776
5411
|
});
|
|
5777
5412
|
var messages$J = messages$I;
|
|
5778
5413
|
|
|
5779
|
-
function ownKeys$
|
|
5780
|
-
function _objectSpread$
|
|
5414
|
+
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; }
|
|
5415
|
+
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$15(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$15(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5781
5416
|
function Option$1(props) {
|
|
5782
5417
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
5783
5418
|
language: applicationContext.dataLocale,
|
|
@@ -5788,7 +5423,7 @@ function Option$1(props) {
|
|
|
5788
5423
|
const _useIntl = reactIntl.useIntl(),
|
|
5789
5424
|
formatMessage = _useIntl.formatMessage;
|
|
5790
5425
|
const cartDiscount = props.data;
|
|
5791
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
5426
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$15(_objectSpread$15({}, props), {}, {
|
|
5792
5427
|
children: jsxRuntime.jsxs("div", {
|
|
5793
5428
|
"data-testid": "cart-discount-option",
|
|
5794
5429
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -5805,8 +5440,8 @@ function Option$1(props) {
|
|
|
5805
5440
|
}));
|
|
5806
5441
|
}
|
|
5807
5442
|
|
|
5808
|
-
function ownKeys$
|
|
5809
|
-
function _objectSpread$
|
|
5443
|
+
function ownKeys$14(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5444
|
+
function _objectSpread$14(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$14(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$14(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5810
5445
|
var CartDiscountsCount$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "CartDiscountsCount" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 425, source: { body: "query SearchCartDiscount($where: String) {\n cartDiscounts(limit: 500, where: $where) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n\nquery FetchCartDiscountById($cartDiscountId: String!) {\n cartDiscount(id: $cartDiscountId) {\n id\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
5811
5446
|
const returnNullIfEmpty = value => value && value.id === '' ? null : value;
|
|
5812
5447
|
const filterOption$1 = (option, text) => {
|
|
@@ -5832,7 +5467,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5832
5467
|
})),
|
|
5833
5468
|
language = _useApplicationContex.language,
|
|
5834
5469
|
languages = _useApplicationContex.languages;
|
|
5835
|
-
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$
|
|
5470
|
+
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$14(_objectSpread$14({}, cartDiscount), {}, {
|
|
5836
5471
|
value: cartDiscount.id,
|
|
5837
5472
|
key: cartDiscount.key,
|
|
5838
5473
|
label: l10n.formatLocalizedString(cartDiscount, {
|
|
@@ -5922,8 +5557,8 @@ const messages$G = reactIntl.defineMessages({
|
|
|
5922
5557
|
});
|
|
5923
5558
|
var messages$H = messages$G;
|
|
5924
5559
|
|
|
5925
|
-
function ownKeys$
|
|
5926
|
-
function _objectSpread$
|
|
5560
|
+
function ownKeys$13(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5561
|
+
function _objectSpread$13(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$13(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$13(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5927
5562
|
function Option(props) {
|
|
5928
5563
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
5929
5564
|
language: applicationContext.dataLocale,
|
|
@@ -5934,7 +5569,7 @@ function Option(props) {
|
|
|
5934
5569
|
const _useIntl = reactIntl.useIntl(),
|
|
5935
5570
|
formatMessage = _useIntl.formatMessage;
|
|
5936
5571
|
const category = props.data;
|
|
5937
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
5572
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$13(_objectSpread$13({}, props), {}, {
|
|
5938
5573
|
children: jsxRuntime.jsxs("div", {
|
|
5939
5574
|
"data-testid": "category-option",
|
|
5940
5575
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -5963,8 +5598,8 @@ function Option(props) {
|
|
|
5963
5598
|
}));
|
|
5964
5599
|
}
|
|
5965
5600
|
|
|
5966
|
-
function ownKeys$
|
|
5967
|
-
function _objectSpread$
|
|
5601
|
+
function ownKeys$12(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5602
|
+
function _objectSpread$12(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$12(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$12(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5968
5603
|
const filterOption = () => true;
|
|
5969
5604
|
function CategoryReferenceSearch(props) {
|
|
5970
5605
|
const _useIntl = reactIntl.useIntl(),
|
|
@@ -5976,7 +5611,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5976
5611
|
})),
|
|
5977
5612
|
language = _useApplicationContex.language,
|
|
5978
5613
|
languages = _useApplicationContex.languages;
|
|
5979
|
-
const mapItemToOption = React.useCallback(category => _objectSpread$
|
|
5614
|
+
const mapItemToOption = React.useCallback(category => _objectSpread$12(_objectSpread$12({}, category), {}, {
|
|
5980
5615
|
value: category.id,
|
|
5981
5616
|
label: l10n.formatLocalizedString(category, {
|
|
5982
5617
|
key: 'name',
|
|
@@ -5994,7 +5629,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5994
5629
|
}), [apolloClient]);
|
|
5995
5630
|
return jsxRuntime.jsx(ReferenceSearch, {
|
|
5996
5631
|
id: props.id,
|
|
5997
|
-
components: _objectSpread$
|
|
5632
|
+
components: _objectSpread$12({
|
|
5998
5633
|
Option
|
|
5999
5634
|
}, props.components),
|
|
6000
5635
|
isClearable: props.isClearable,
|
|
@@ -6033,45 +5668,6 @@ function useCachedCategoryOptions(ids) {
|
|
|
6033
5668
|
}]));
|
|
6034
5669
|
}
|
|
6035
5670
|
|
|
6036
|
-
var _ref$d = {
|
|
6037
|
-
name: "1d3w5wq",
|
|
6038
|
-
styles: "width:100%"
|
|
6039
|
-
} ;
|
|
6040
|
-
var _ref2 = {
|
|
6041
|
-
name: "164dmm0",
|
|
6042
|
-
styles: "pointer-events:none;opacity:0.5"
|
|
6043
|
-
} ;
|
|
6044
|
-
const getButtonStyles = props => /*#__PURE__*/react$1.css("transition:background-color 0.08s linear;border:none;border-radius:", designSystem.designTokens.borderRadiusForInput, ";color:", designSystem.designTokens.colorSolid, ";cursor:pointer;display:inline-block;font-family:", designSystem.designTokens.fontFamily, ";font-size:", designSystem.designTokens.fontSize10, ";padding:", designSystem.designTokens.spacingS, " ", designSystem.designTokens.spacingM, ";vertical-align:middle;min-height:", designSystem.designTokens.heightForInput, ";", props.variant === 'cancel' && /*#__PURE__*/react$1.css("background:", designSystem.designTokens.colorSurface, ";border:1px solid ", designSystem.designTokens.colorNeutral, ";&:hover{border-color:", designSystem.designTokens.colorPrimary, ";color:", designSystem.designTokens.colorPrimary, ";}" + ("" ), "" ), " ", props.variant === 'confirm' && /*#__PURE__*/react$1.css("background:", designSystem.designTokens.colorPrimary, ";color:", designSystem.designTokens.colorSurface, ";&:hover{background:", designSystem.designTokens.colorPrimary25, ";}" + ("" ), "" ), " ", props.variant === 'save' && /*#__PURE__*/react$1.css("background:", designSystem.designTokens.colorPrimary, ";color:", designSystem.designTokens.colorSurface, "!important;&:hover{background:", designSystem.designTokens.colorPrimary25, ";}" + ("" ), "" ), " ", props.variant === 'add' && /*#__PURE__*/react$1.css("background:", designSystem.designTokens.colorSurface, ";border:1px solid ", designSystem.designTokens.colorNeutral, ";color:", designSystem.designTokens.colorSolid, ";padding:5.5px 15px 5.5px 10px;&:hover{background:", designSystem.designTokens.colorPrimary, ";border-color:", designSystem.designTokens.colorPrimary, ";color:", designSystem.designTokens.colorSurface, ";}" + ("" ), "" ), " ", props.isDisabled && _ref2, " ", props.fullWidth && _ref$d, " ", props.isAlt && /*#__PURE__*/react$1.css("color:", designSystem.designTokens.colorSurface, ";border-radius:20px;border:2px ", designSystem.designTokens.colorSurface, " solid;padding-left:30px;padding-right:30px;" + ("" ), "" ), ";" + ("" ), "" );
|
|
6045
|
-
var getButtonStyles$1 = getButtonStyles;
|
|
6046
|
-
|
|
6047
|
-
const _excluded$e = ["type"];
|
|
6048
|
-
function ownKeys$10(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6049
|
-
function _objectSpread$10(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$10(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$10(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6050
|
-
const Button = _ref => {
|
|
6051
|
-
let _ref$type = _ref.type,
|
|
6052
|
-
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
6053
|
-
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
6054
|
-
const className = props.className,
|
|
6055
|
-
onClick = props.onClick,
|
|
6056
|
-
isDisabled = props.isDisabled,
|
|
6057
|
-
children = props.children;
|
|
6058
|
-
|
|
6059
|
-
// Pass only `data-*` props
|
|
6060
|
-
const dataProps = filterDataAttributes(props);
|
|
6061
|
-
return jsxRuntime.jsx("button", _objectSpread$10(_objectSpread$10({
|
|
6062
|
-
onClick: isDisabled ? null : onClick,
|
|
6063
|
-
type: type,
|
|
6064
|
-
className: classnames__default["default"](className),
|
|
6065
|
-
css: getButtonStyles$1(props),
|
|
6066
|
-
disabled: isDisabled,
|
|
6067
|
-
"aria-label": props['aria-label']
|
|
6068
|
-
}, dataProps), {}, {
|
|
6069
|
-
children: children
|
|
6070
|
-
}));
|
|
6071
|
-
};
|
|
6072
|
-
Button.displayName = 'Button';
|
|
6073
|
-
var Button$1 = Button;
|
|
6074
|
-
|
|
6075
5671
|
const getFileInputStyles = () => /*#__PURE__*/react$1.css("display:inline-flex;background-color:", designSystem.designTokens.colorSurface, ";border:1px solid ", designSystem.designTokens.colorNeutral, ";box-shadow:none;border-radius:", designSystem.designTokens.borderRadius4, ";color:", designSystem.designTokens.colorSolid, ";height:", designSystem.designTokens.heightForButtonAsBig, ";font-size:", designSystem.designTokens.fontSize20, ";font-weight:", designSystem.designTokens.fontWeight500, ";align-items:center;transition:background-color ", designSystem.designTokens.transitionLinear80Ms, ";padding:0 ", designSystem.designTokens.spacingM, ";&:hover,&:focus{cursor:pointer;background-color:", designSystem.designTokens.backgroundColorForButtonWhenHovered, ";box-shadow:none;}&:active{box-shadow:", designSystem.designTokens.shadow9, ";background-color:", designSystem.designTokens.colorSurface, ";}" + ("" ), "" );
|
|
6076
5672
|
|
|
6077
5673
|
var messages$F = reactIntl.defineMessages({
|
|
@@ -6083,15 +5679,15 @@ var messages$F = reactIntl.defineMessages({
|
|
|
6083
5679
|
});
|
|
6084
5680
|
|
|
6085
5681
|
const _excluded$d = ["children", "allowMultiple", "acceptTypes"];
|
|
6086
|
-
function ownKeys
|
|
6087
|
-
function _objectSpread
|
|
6088
|
-
var _ref$
|
|
5682
|
+
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; }
|
|
5683
|
+
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; }
|
|
5684
|
+
var _ref$d = {
|
|
6089
5685
|
name: "1wq0eh7",
|
|
6090
5686
|
styles: "visibility:hidden;width:1px;height:1px"
|
|
6091
5687
|
} ;
|
|
6092
5688
|
const FileInput = _ref2 => {
|
|
6093
5689
|
let _ref2$children = _ref2.children,
|
|
6094
|
-
children = _ref2$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread
|
|
5690
|
+
children = _ref2$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$11({}, messages$F.chooseFile)) : _ref2$children,
|
|
6095
5691
|
_ref2$allowMultiple = _ref2.allowMultiple,
|
|
6096
5692
|
allowMultiple = _ref2$allowMultiple === void 0 ? false : _ref2$allowMultiple,
|
|
6097
5693
|
_ref2$acceptTypes = _ref2.acceptTypes,
|
|
@@ -6101,7 +5697,7 @@ const FileInput = _ref2 => {
|
|
|
6101
5697
|
children: jsxRuntime.jsxs("span", {
|
|
6102
5698
|
css: getFileInputStyles(),
|
|
6103
5699
|
children: [jsxRuntime.jsx("input", {
|
|
6104
|
-
css: _ref$
|
|
5700
|
+
css: _ref$d,
|
|
6105
5701
|
type: "file",
|
|
6106
5702
|
accept: acceptTypes,
|
|
6107
5703
|
name: props.name,
|
|
@@ -6121,15 +5717,15 @@ const baseButtonStyles = {
|
|
|
6121
5717
|
} ;
|
|
6122
5718
|
|
|
6123
5719
|
const _excluded$c = ["animationOrientation", "children", "onClick"];
|
|
6124
|
-
function ownKeys$
|
|
6125
|
-
function _objectSpread$
|
|
5720
|
+
function ownKeys$10(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5721
|
+
function _objectSpread$10(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$10(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$10(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6126
5722
|
const ICON_COLOR$1 = '#6359ff';
|
|
6127
5723
|
const PaginationIconButton = _ref => {
|
|
6128
5724
|
let animationOrientation = _ref.animationOrientation,
|
|
6129
5725
|
children = _ref.children,
|
|
6130
5726
|
onClick = _ref.onClick,
|
|
6131
5727
|
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
6132
|
-
return jsxRuntime.jsx("button", _objectSpread$
|
|
5728
|
+
return jsxRuntime.jsx("button", _objectSpread$10(_objectSpread$10({
|
|
6133
5729
|
css: [baseButtonStyles, /*#__PURE__*/react$1.css("svg{fill:", ICON_COLOR$1, ";}transition:transform ", uiKit.designTokens.transitionStandard, ";:hover{transform:translateX(\n ", animationOrientation === 'left' ? `calc(0px - var(--spacing-10))` : `var(--spacing-10)`, "\n );}padding-left:1px;padding-right:1px;:focus{border:1px solid ", ICON_COLOR$1, ";border-radius:", uiKit.designTokens.borderRadius1, ";padding-left:0px;padding-right:0px;}" + ("" ), "" ), "" , "" ],
|
|
6134
5730
|
onClick: onClick
|
|
6135
5731
|
}, rest), {}, {
|
|
@@ -6139,8 +5735,8 @@ const PaginationIconButton = _ref => {
|
|
|
6139
5735
|
var PaginationIconButton$1 = PaginationIconButton;
|
|
6140
5736
|
|
|
6141
5737
|
const _excluded$b = ["isFilled", "onClick"];
|
|
6142
|
-
function ownKeys
|
|
6143
|
-
function _objectSpread
|
|
5738
|
+
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; }
|
|
5739
|
+
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; }
|
|
6144
5740
|
const ICON_HEIGHT = '10px';
|
|
6145
5741
|
const ICON_WIDTH = ICON_HEIGHT;
|
|
6146
5742
|
// TODO: Integrate design tokens when redesign is complete
|
|
@@ -6151,7 +5747,7 @@ const PaginationSelectionButton = _ref => {
|
|
|
6151
5747
|
isFilled = _ref$isFilled === void 0 ? false : _ref$isFilled,
|
|
6152
5748
|
onClick = _ref.onClick,
|
|
6153
5749
|
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
6154
|
-
return jsxRuntime.jsx("button", _objectSpread
|
|
5750
|
+
return jsxRuntime.jsx("button", _objectSpread$$({
|
|
6155
5751
|
css: [baseButtonStyles, /*#__PURE__*/react$1.css("height:", ICON_HEIGHT, ";width:", ICON_WIDTH, ";border-radius:", uiKit.designTokens.borderRadius6, ";border:", isFilled ? 'none' : `${uiKit.designTokens.borderWidth1} solid ${uiKit.designTokens.colorNeutral}`, ";background:", isFilled ? ICON_COLOR : 'none', ";transition:", uiKit.designTokens.transitionStandard, ";:hover{background:", isFilled ? undefined : ICON_HOVER_COLOR, ";}:focus{border:", uiKit.designTokens.borderWidth1, " solid ", ICON_COLOR, ";}" + ("" ), "" ), "" , "" ],
|
|
6156
5752
|
onClick: onClick
|
|
6157
5753
|
}, rest));
|
|
@@ -6281,7 +5877,7 @@ const BaseCarousel = _ref2 => {
|
|
|
6281
5877
|
})]
|
|
6282
5878
|
});
|
|
6283
5879
|
};
|
|
6284
|
-
var _ref$
|
|
5880
|
+
var _ref$c = {
|
|
6285
5881
|
name: "97rk2e",
|
|
6286
5882
|
styles: "width:100%;height:100%;flex-shrink:0;scroll-snap-align:start"
|
|
6287
5883
|
} ;
|
|
@@ -6304,7 +5900,7 @@ const CarouselContent = _ref3 => {
|
|
|
6304
5900
|
role: "group",
|
|
6305
5901
|
"aria-roledescription": "slide",
|
|
6306
5902
|
"aria-label": `slide-${idx + 1}`,
|
|
6307
|
-
css: _ref$
|
|
5903
|
+
css: _ref$c,
|
|
6308
5904
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
6309
5905
|
children: [item.imgSrc && item.imgAlt && jsxRuntime.jsx("img", {
|
|
6310
5906
|
css: /*#__PURE__*/react$1.css("width:100%;height:", IMAGE_AREA_HEIGHT, "px;" + ("" ), "" ),
|
|
@@ -6370,8 +5966,8 @@ var messages$E = reactIntl.defineMessages({
|
|
|
6370
5966
|
}
|
|
6371
5967
|
});
|
|
6372
5968
|
|
|
6373
|
-
function ownKeys$
|
|
6374
|
-
function _objectSpread$
|
|
5969
|
+
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; }
|
|
5970
|
+
function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$_(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$_(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6375
5971
|
const emptyCountryOption = intl => [{
|
|
6376
5972
|
label: intl.formatMessage(messages$E.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
6377
5973
|
value: undefined,
|
|
@@ -6398,7 +5994,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
6398
5994
|
const onOptionChange = event => {
|
|
6399
5995
|
const countries = event.target.value;
|
|
6400
5996
|
props.onChange({
|
|
6401
|
-
target: _objectSpread$
|
|
5997
|
+
target: _objectSpread$_(_objectSpread$_({}, event.target), {}, {
|
|
6402
5998
|
value: _mapInstanceProperty__default["default"](countries).call(countries, country => country?.value ?? country)
|
|
6403
5999
|
})
|
|
6404
6000
|
});
|
|
@@ -6449,8 +6045,8 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
6449
6045
|
const COUNTRIES_ASYNC_LOADING_LIMIT = 60;
|
|
6450
6046
|
|
|
6451
6047
|
const _excluded$a = ["countriesAsyncLoadingLimit", "isMulti", "isRequired", "hasWarning"];
|
|
6452
|
-
function ownKeys$
|
|
6453
|
-
function _objectSpread$
|
|
6048
|
+
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; }
|
|
6049
|
+
function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Z(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6454
6050
|
function CountriesPicker(_ref) {
|
|
6455
6051
|
let _ref$countriesAsyncLo = _ref.countriesAsyncLoadingLimit,
|
|
6456
6052
|
countriesAsyncLoadingLimit = _ref$countriesAsyncLo === void 0 ? COUNTRIES_ASYNC_LOADING_LIMIT : _ref$countriesAsyncLo,
|
|
@@ -6463,7 +6059,7 @@ function CountriesPicker(_ref) {
|
|
|
6463
6059
|
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
6464
6060
|
const CustomCountriesPicker = props.options?.length <= countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
|
|
6465
6061
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
6466
|
-
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$
|
|
6062
|
+
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$Z({
|
|
6467
6063
|
countriesAsyncLoadingLimit: countriesAsyncLoadingLimit,
|
|
6468
6064
|
isMulti: isMulti,
|
|
6469
6065
|
isRequired: isRequired,
|
|
@@ -6632,6 +6228,9 @@ const FormattedLocalizedString = /*#__PURE__*/React__namespace.memo(_ref => {
|
|
|
6632
6228
|
});
|
|
6633
6229
|
FormattedLocalizedString.displayName = 'FormattedLocalizedString';
|
|
6634
6230
|
|
|
6231
|
+
const keepDisplayName = component => setDisplayName$1(getDisplayName$1(component));
|
|
6232
|
+
var keepDisplayName$1 = keepDisplayName;
|
|
6233
|
+
|
|
6635
6234
|
// eslint-disable-next-line import/prefer-default-export
|
|
6636
6235
|
const CUSTOM_FIELD_TYPES = {
|
|
6637
6236
|
text: 'text',
|
|
@@ -6669,9 +6268,9 @@ const REFERENCED_TYPES = {
|
|
|
6669
6268
|
const ATTRIBUTE_TYPES = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time'];
|
|
6670
6269
|
const SET_ATTRIBUTE_TYPES = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
6671
6270
|
|
|
6672
|
-
function ownKeys$
|
|
6673
|
-
function _objectSpread$
|
|
6674
|
-
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$
|
|
6271
|
+
function ownKeys$Y(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6272
|
+
function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Y(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Y(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6273
|
+
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$Y(_objectSpread$Y({}, result), itemErrors), {});
|
|
6675
6274
|
|
|
6676
6275
|
// TODO(pa3): worth splitting in two components: one of set errors and one for
|
|
6677
6276
|
// all the other types of fields. So that there will be no isArray check.
|
|
@@ -6796,7 +6395,7 @@ const ExpandButton = props => props.totalValues > 1 ? jsxRuntime.jsxs(uiKit.Spac
|
|
|
6796
6395
|
ExpandButton.displayName = 'ExpandButton';
|
|
6797
6396
|
var ExpandButton$1 = ExpandButton;
|
|
6798
6397
|
|
|
6799
|
-
var _ref$
|
|
6398
|
+
var _ref$b = {
|
|
6800
6399
|
name: "1yjx7km",
|
|
6801
6400
|
styles: "padding:20px"
|
|
6802
6401
|
} ;
|
|
@@ -6816,7 +6415,7 @@ const SetButtons = props => {
|
|
|
6816
6415
|
size: "big",
|
|
6817
6416
|
icon: jsxRuntime.jsx(uiKit.PlusBoldIcon, {})
|
|
6818
6417
|
}) : jsxRuntime.jsx("div", {
|
|
6819
|
-
css: _ref$
|
|
6418
|
+
css: _ref$b
|
|
6820
6419
|
})]
|
|
6821
6420
|
})
|
|
6822
6421
|
});
|
|
@@ -6824,8 +6423,8 @@ const SetButtons = props => {
|
|
|
6824
6423
|
SetButtons.displayName = 'SetButtons';
|
|
6825
6424
|
var SetButtons$1 = SetButtons;
|
|
6826
6425
|
|
|
6827
|
-
function ownKeys$
|
|
6828
|
-
function _objectSpread$
|
|
6426
|
+
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; }
|
|
6427
|
+
function _objectSpread$X(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$X(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$X(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6829
6428
|
const getDuplicateErrors = setValues => {
|
|
6830
6429
|
/* eslint-disable no-plusplus */
|
|
6831
6430
|
const result = [];
|
|
@@ -6878,7 +6477,7 @@ function CustomInputSet(props) {
|
|
|
6878
6477
|
touched = _useFormikContext.touched,
|
|
6879
6478
|
isSubmitting = _useFormikContext.isSubmitting,
|
|
6880
6479
|
dirty = _useFormikContext.dirty;
|
|
6881
|
-
const itemFieldDefinition = _objectSpread$
|
|
6480
|
+
const itemFieldDefinition = _objectSpread$X(_objectSpread$X({}, props.fieldDefinition), {}, {
|
|
6882
6481
|
type: props.fieldDefinition.type.elementType
|
|
6883
6482
|
});
|
|
6884
6483
|
const value = React.useMemo(() => props.value || [undefined], [props.value]);
|
|
@@ -7134,8 +6733,8 @@ function CustomLocalizedEnumInput(props) {
|
|
|
7134
6733
|
}
|
|
7135
6734
|
CustomLocalizedEnumInput.displayName = 'CustomLocalizedEnumInput';
|
|
7136
6735
|
|
|
7137
|
-
function ownKeys$
|
|
7138
|
-
function _objectSpread$
|
|
6736
|
+
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; }
|
|
6737
|
+
function _objectSpread$W(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$W(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$W(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7139
6738
|
const getSubfieldLanguage = subfieldName => {
|
|
7140
6739
|
const lastDotIndex = _lastIndexOfInstanceProperty__default["default"](subfieldName).call(subfieldName, '.');
|
|
7141
6740
|
return subfieldName.substring(lastDotIndex + 1);
|
|
@@ -7158,7 +6757,7 @@ function CustomLocalizedTextInput(props) {
|
|
|
7158
6757
|
// as a whole.
|
|
7159
6758
|
|
|
7160
6759
|
const fieldLanguage = getSubfieldLanguage(subfieldName);
|
|
7161
|
-
const newValue = _objectSpread$
|
|
6760
|
+
const newValue = _objectSpread$W(_objectSpread$W({}, props.value), {}, {
|
|
7162
6761
|
[fieldLanguage]: rawValue
|
|
7163
6762
|
});
|
|
7164
6763
|
const nullifiedIfNeeded = uiKit.LocalizedTextInput.isEmpty(newValue) ? undefined : newValue;
|
|
@@ -7186,18 +6785,18 @@ function CustomLocalizedTextInput(props) {
|
|
|
7186
6785
|
}
|
|
7187
6786
|
CustomLocalizedTextInput.displayName = 'CustomLocalizedTextInput';
|
|
7188
6787
|
|
|
7189
|
-
function ownKeys$
|
|
7190
|
-
function _objectSpread$
|
|
6788
|
+
function ownKeys$V(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6789
|
+
function _objectSpread$V(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$V(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$V(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7191
6790
|
const fixCurrencyCode = (value, currencies) => {
|
|
7192
6791
|
if (value.currencyCode) return value;
|
|
7193
6792
|
const firstCurrency = currencies[0];
|
|
7194
|
-
return _objectSpread$
|
|
6793
|
+
return _objectSpread$V(_objectSpread$V({}, value), {}, {
|
|
7195
6794
|
currencyCode: firstCurrency
|
|
7196
6795
|
});
|
|
7197
6796
|
};
|
|
7198
6797
|
const fixAmount = value => {
|
|
7199
6798
|
if (!value.amount) {
|
|
7200
|
-
return _objectSpread$
|
|
6799
|
+
return _objectSpread$V(_objectSpread$V({}, value), {}, {
|
|
7201
6800
|
amount: '0'
|
|
7202
6801
|
});
|
|
7203
6802
|
}
|
|
@@ -7218,7 +6817,7 @@ const fixEnteredValue = (newValue, initialValue, currencies) => {
|
|
|
7218
6817
|
}
|
|
7219
6818
|
return withFixedCurrency;
|
|
7220
6819
|
};
|
|
7221
|
-
var _ref$
|
|
6820
|
+
var _ref$a = {
|
|
7222
6821
|
name: "1d3w5wq",
|
|
7223
6822
|
styles: "width:100%"
|
|
7224
6823
|
} ;
|
|
@@ -7243,7 +6842,7 @@ function CustomMoneyInput(props) {
|
|
|
7243
6842
|
}
|
|
7244
6843
|
const handleChange = makeChangeHandler((rawValue, subfieldName) => {
|
|
7245
6844
|
const isAmount = _endsWithInstanceProperty__default["default"](subfieldName).call(subfieldName, 'amount');
|
|
7246
|
-
const newValue = _objectSpread$
|
|
6845
|
+
const newValue = _objectSpread$V({}, internalValue.current);
|
|
7247
6846
|
if (isAmount) newValue.amount = rawValue;else newValue.currencyCode = rawValue;
|
|
7248
6847
|
const fixedValue = fixEnteredValue(newValue, internalValue.current, currencies);
|
|
7249
6848
|
internalValue.current = fixedValue;
|
|
@@ -7254,7 +6853,7 @@ function CustomMoneyInput(props) {
|
|
|
7254
6853
|
|
|
7255
6854
|
// TODO(pa3): fix setting proper id in UIKit
|
|
7256
6855
|
return jsxRuntime.jsxs("div", {
|
|
7257
|
-
css: _ref$
|
|
6856
|
+
css: _ref$a,
|
|
7258
6857
|
"aria-labelledby": props.name,
|
|
7259
6858
|
children: [jsxRuntime.jsx(uiKit.AccessibleHidden, {
|
|
7260
6859
|
children: jsxRuntime.jsx("label", {
|
|
@@ -7280,23 +6879,23 @@ function CustomMoneyInput(props) {
|
|
|
7280
6879
|
}
|
|
7281
6880
|
CustomMoneyInput.displayName = 'CustomMoneyInput';
|
|
7282
6881
|
|
|
7283
|
-
function ownKeys$
|
|
7284
|
-
function _objectSpread$
|
|
6882
|
+
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; }
|
|
6883
|
+
function _objectSpread$U(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$U(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$U(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7285
6884
|
var FetchProductTypeQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductTypeQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productType" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "attributeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "100" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "isRequired" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputTipAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "NestedAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizableEnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "NestedAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizableEnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1905, source: { body: "query FetchProductTypeQuery($id: String!) {\n productType(id: $id) {\n name\n attributeDefinitions(limit: 100) {\n results {\n name\n isRequired\n inputHint\n inputTipAllLocales {\n value\n locale\n }\n labelAllLocales {\n value\n locale\n }\n type {\n name\n ... on SetAttributeDefinitionType {\n elementType {\n name\n ... on NestedAttributeDefinitionType {\n typeRef {\n id\n }\n }\n ... on EnumAttributeDefinitionType {\n values {\n results {\n key\n label\n }\n }\n }\n ... on LocalizableEnumAttributeDefinitionType {\n values {\n results {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n ... on ReferenceAttributeDefinitionType {\n referenceTypeId\n }\n }\n }\n ... on ReferenceAttributeDefinitionType {\n referenceTypeId\n }\n ... on NestedAttributeDefinitionType {\n typeRef {\n id\n }\n }\n ... on EnumAttributeDefinitionType {\n values {\n results {\n key\n label\n }\n }\n }\n ... on LocalizableEnumAttributeDefinitionType {\n values {\n results {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
7286
6885
|
const mapAttributeDefinition = definition => {
|
|
7287
6886
|
var _context, _context2, _context3, _context4;
|
|
7288
|
-
return _objectSpread$
|
|
6887
|
+
return _objectSpread$U(_objectSpread$U({}, definition), {}, {
|
|
7289
6888
|
required: definition.isRequired,
|
|
7290
6889
|
inputTip: l10n.transformLocalizedFieldToLocalizedString(definition.inputTipAllLocales),
|
|
7291
6890
|
label: l10n.transformLocalizedFieldToLocalizedString(definition.labelAllLocales),
|
|
7292
|
-
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, definition.type?.elementType?.name) ? _objectSpread$
|
|
7293
|
-
elementType: _objectSpread$
|
|
6891
|
+
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, definition.type?.elementType?.name) ? _objectSpread$U(_objectSpread$U({}, definition.type), {}, {
|
|
6892
|
+
elementType: _objectSpread$U(_objectSpread$U({}, definition.type.elementType), {}, {
|
|
7294
6893
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](definition.type.elementType).results).call(_context2, value => ({
|
|
7295
6894
|
key: value.key,
|
|
7296
6895
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
7297
6896
|
}))
|
|
7298
6897
|
})
|
|
7299
|
-
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, definition.type?.name) ? _objectSpread$
|
|
6898
|
+
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, definition.type?.name) ? _objectSpread$U(_objectSpread$U({}, definition.type), {}, {
|
|
7300
6899
|
values: _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](definition.type).results).call(_context4, value => ({
|
|
7301
6900
|
key: value.key,
|
|
7302
6901
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -7433,8 +7032,8 @@ var messages$A = reactIntl.defineMessages({
|
|
|
7433
7032
|
}
|
|
7434
7033
|
});
|
|
7435
7034
|
|
|
7436
|
-
function ownKeys$
|
|
7437
|
-
function _objectSpread$
|
|
7035
|
+
function ownKeys$T(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7036
|
+
function _objectSpread$T(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$T(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$T(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7438
7037
|
const EditButton = props => {
|
|
7439
7038
|
const _useIntl = reactIntl.useIntl(),
|
|
7440
7039
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -7582,13 +7181,13 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
7582
7181
|
const valuesAsMap = nameValuePairsToMap(value);
|
|
7583
7182
|
const initialValues = omitUnknownValues(valuesAsMap, attributeDefinitionsAsMap);
|
|
7584
7183
|
const openNestedAttributesForm = () => {
|
|
7585
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
7184
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$T(_objectSpread$T({}, parentFormik.status), {}, {
|
|
7586
7185
|
hideSaveToolbar: true
|
|
7587
7186
|
}));
|
|
7588
7187
|
attributesForm.openModal();
|
|
7589
7188
|
};
|
|
7590
7189
|
const closeNestedAttributesForm = () => {
|
|
7591
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
7190
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$T(_objectSpread$T({}, parentFormik.status), {}, {
|
|
7592
7191
|
hideSaveToolbar: false
|
|
7593
7192
|
}));
|
|
7594
7193
|
attributesForm.closeModal();
|
|
@@ -8127,8 +7726,8 @@ var messages$y = reactIntl.defineMessages({
|
|
|
8127
7726
|
}
|
|
8128
7727
|
});
|
|
8129
7728
|
|
|
8130
|
-
function ownKeys$
|
|
8131
|
-
function _objectSpread$
|
|
7729
|
+
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; }
|
|
7730
|
+
function _objectSpread$S(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$S(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$S(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8132
7731
|
var CartDiscountsCount = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "CartDiscountsCount" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 61, source: { body: "query CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8133
7732
|
const CustomFieldsLabelHint = _ref2 => {
|
|
8134
7733
|
let fieldDefinition = _ref2.fieldDefinition;
|
|
@@ -8157,7 +7756,7 @@ const CustomFieldsLabelHint = _ref2 => {
|
|
|
8157
7756
|
children: [jsxRuntime.jsx(uiKit.WarningIcon, {
|
|
8158
7757
|
size: "medium",
|
|
8159
7758
|
color: "warning"
|
|
8160
|
-
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
7759
|
+
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$S({}, messages$y.cartDiscountMoreThan500))]
|
|
8161
7760
|
});
|
|
8162
7761
|
}
|
|
8163
7762
|
return l10n.formatLocalizedString(fieldDefinition, {
|
|
@@ -8201,7 +7800,7 @@ function CustomFieldsLabelSubtitle(_ref3) {
|
|
|
8201
7800
|
}
|
|
8202
7801
|
}
|
|
8203
7802
|
const Portal = props => /*#__PURE__*/ReactDOM__default["default"].createPortal(props.children, document.body);
|
|
8204
|
-
var _ref$
|
|
7803
|
+
var _ref$9 = {
|
|
8205
7804
|
name: "ar8y70",
|
|
8206
7805
|
styles: "cursor:pointer;line-height:normal"
|
|
8207
7806
|
} ;
|
|
@@ -8220,7 +7819,7 @@ function CustomFieldsCountIndicator(_ref4) {
|
|
|
8220
7819
|
TooltipWrapperComponent: Portal
|
|
8221
7820
|
},
|
|
8222
7821
|
children: jsxRuntime.jsx("div", {
|
|
8223
|
-
css: _ref$
|
|
7822
|
+
css: _ref$9,
|
|
8224
7823
|
children: jsxRuntime.jsx(uiKit.SwitcherIcon, {
|
|
8225
7824
|
color: "info",
|
|
8226
7825
|
size: "medium"
|
|
@@ -8278,10 +7877,10 @@ var messages$x = reactIntl.defineMessages({
|
|
|
8278
7877
|
}
|
|
8279
7878
|
});
|
|
8280
7879
|
|
|
8281
|
-
function ownKeys$
|
|
8282
|
-
function _objectSpread$
|
|
7880
|
+
function ownKeys$R(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7881
|
+
function _objectSpread$R(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$R(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$R(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8283
7882
|
function ProductTypeReference(props) {
|
|
8284
|
-
const productTypeMessage = _objectSpread$
|
|
7883
|
+
const productTypeMessage = _objectSpread$R(_objectSpread$R({}, messages$x.referencedProductType), {}, {
|
|
8285
7884
|
values: {
|
|
8286
7885
|
productTypeName: props.productType.name
|
|
8287
7886
|
}
|
|
@@ -8330,10 +7929,10 @@ function CustomNestedFieldInput(props) {
|
|
|
8330
7929
|
}
|
|
8331
7930
|
CustomNestedFieldInput.displayName = 'CustomNestedFieldInput';
|
|
8332
7931
|
|
|
8333
|
-
function ownKeys$
|
|
8334
|
-
function _objectSpread$
|
|
7932
|
+
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; }
|
|
7933
|
+
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; }
|
|
8335
7934
|
function DragHandle(props) {
|
|
8336
|
-
return jsxRuntime.jsx("div", _objectSpread$
|
|
7935
|
+
return jsxRuntime.jsx("div", _objectSpread$Q(_objectSpread$Q({}, props), {}, {
|
|
8337
7936
|
children: jsxRuntime.jsx(uiKit.IconButton, {
|
|
8338
7937
|
icon: jsxRuntime.jsx(uiKit.DragIcon, {}),
|
|
8339
7938
|
size: "medium",
|
|
@@ -8343,9 +7942,9 @@ function DragHandle(props) {
|
|
|
8343
7942
|
}
|
|
8344
7943
|
DragHandle.displayName = 'DragHandle';
|
|
8345
7944
|
|
|
8346
|
-
function ownKeys$
|
|
8347
|
-
function _objectSpread$
|
|
8348
|
-
var _ref$
|
|
7945
|
+
function ownKeys$P(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7946
|
+
function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$P(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$P(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7947
|
+
var _ref$8 = {
|
|
8349
7948
|
name: "1onfs6j",
|
|
8350
7949
|
styles: "z-index:100000!important"
|
|
8351
7950
|
} ;
|
|
@@ -8374,10 +7973,10 @@ const DraggableWrapper = _ref2 => {
|
|
|
8374
7973
|
draggableId: draggableId,
|
|
8375
7974
|
index: index,
|
|
8376
7975
|
children: (provided, snapshot) => {
|
|
8377
|
-
const child = jsxRuntime.jsx("div", _objectSpread$
|
|
7976
|
+
const child = jsxRuntime.jsx("div", _objectSpread$P(_objectSpread$P({
|
|
8378
7977
|
ref: provided.innerRef
|
|
8379
7978
|
}, provided.draggableProps), {}, {
|
|
8380
|
-
css: _ref$
|
|
7979
|
+
css: _ref$8,
|
|
8381
7980
|
children: jsxRuntime.jsx(DraggingCard, {
|
|
8382
7981
|
isDragging: snapshot.isDragging,
|
|
8383
7982
|
children: jsxRuntime.jsxs(uiKit.Grid, {
|
|
@@ -8385,7 +7984,7 @@ const DraggableWrapper = _ref2 => {
|
|
|
8385
7984
|
gridTemplateRows: "auto 1fr auto",
|
|
8386
7985
|
gridGap: snapshot.isDragging ? uiKit.customProperties.spacingS : uiKit.customProperties.spacingM,
|
|
8387
7986
|
children: [jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
8388
|
-
children: jsxRuntime.jsx(DragHandle, _objectSpread$
|
|
7987
|
+
children: jsxRuntime.jsx(DragHandle, _objectSpread$P({}, provided.dragHandleProps))
|
|
8389
7988
|
}), jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
8390
7989
|
children: children
|
|
8391
7990
|
})]
|
|
@@ -8404,8 +8003,8 @@ const DraggableWrapper = _ref2 => {
|
|
|
8404
8003
|
}, draggableKey);
|
|
8405
8004
|
};
|
|
8406
8005
|
|
|
8407
|
-
function ownKeys$
|
|
8408
|
-
function _objectSpread$
|
|
8006
|
+
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; }
|
|
8007
|
+
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; }
|
|
8409
8008
|
const DroppableWrapper = _ref => {
|
|
8410
8009
|
let children = _ref.children,
|
|
8411
8010
|
onDragEnd = _ref.onDragEnd;
|
|
@@ -8413,7 +8012,7 @@ const DroppableWrapper = _ref => {
|
|
|
8413
8012
|
onDragEnd: onDragEnd,
|
|
8414
8013
|
children: jsxRuntime.jsx(dnd.Droppable, {
|
|
8415
8014
|
droppableId: "droppable",
|
|
8416
|
-
children: provided => jsxRuntime.jsxs("div", _objectSpread$
|
|
8015
|
+
children: provided => jsxRuntime.jsxs("div", _objectSpread$O(_objectSpread$O({
|
|
8417
8016
|
ref: provided.innerRef
|
|
8418
8017
|
}, provided.droppableProps), {}, {
|
|
8419
8018
|
children: [children, provided.placeholder]
|
|
@@ -8422,8 +8021,8 @@ const DroppableWrapper = _ref => {
|
|
|
8422
8021
|
});
|
|
8423
8022
|
};
|
|
8424
8023
|
|
|
8425
|
-
function ownKeys$
|
|
8426
|
-
function _objectSpread$
|
|
8024
|
+
function ownKeys$N(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8025
|
+
function _objectSpread$N(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$N(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$N(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8427
8026
|
const DefaultWrapper = _ref => {
|
|
8428
8027
|
let children = _ref.children;
|
|
8429
8028
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
@@ -8459,7 +8058,7 @@ const DndProvider = _ref2 => {
|
|
|
8459
8058
|
});
|
|
8460
8059
|
}
|
|
8461
8060
|
return jsxRuntime.jsx(DnDContext.Provider, {
|
|
8462
|
-
value: _objectSpread$
|
|
8061
|
+
value: _objectSpread$N(_objectSpread$N({}, dndContextDefaultValues), {}, {
|
|
8463
8062
|
isDnDMode,
|
|
8464
8063
|
setDnDMode
|
|
8465
8064
|
}),
|
|
@@ -8471,8 +8070,8 @@ const useDnDContext = () => {
|
|
|
8471
8070
|
};
|
|
8472
8071
|
|
|
8473
8072
|
const _excluded$9 = ["renderCustomWarnings", "WrapperComponent"];
|
|
8474
|
-
function ownKeys$
|
|
8475
|
-
function _objectSpread$
|
|
8073
|
+
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; }
|
|
8074
|
+
function _objectSpread$M(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$M(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$M(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8476
8075
|
const ENABLED_FALLBACK_ATTRIBUTE_TYPES = [CUSTOM_FIELD_TYPES.enum, CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.number, CUSTOM_FIELD_TYPES.text, CUSTOM_FIELD_TYPES.boolean, CUSTOM_FIELD_TYPES.money, CUSTOM_FIELD_TYPES.datetime, CUSTOM_FIELD_TYPES.date, CUSTOM_FIELD_TYPES.reference, CUSTOM_FIELD_TYPES.time, CUSTOM_FIELD_TYPES.set];
|
|
8477
8076
|
const getFieldName = (parentName, fieldName) => {
|
|
8478
8077
|
if (!parentName) return fieldName;
|
|
@@ -8554,7 +8153,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
8554
8153
|
renderWarnings: props.renderWarnings,
|
|
8555
8154
|
additionalInfo: shouldUseAdditionalInfoProp && props?.additionalInfoHandler ? props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) : undefined
|
|
8556
8155
|
};
|
|
8557
|
-
const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$
|
|
8156
|
+
const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$M({}, fieldProps));
|
|
8558
8157
|
// the several values inside the key are needed to make sure the field is re-rendered when those values change
|
|
8559
8158
|
return jsxRuntime.jsx(formik.FastField, {
|
|
8560
8159
|
name: fieldName,
|
|
@@ -8597,8 +8196,8 @@ const CustomFieldsInternal = _ref => {
|
|
|
8597
8196
|
CustomFieldsInternal.displayName = 'CustomFieldsInternal';
|
|
8598
8197
|
var CustomFieldsInternal$1 = CustomFieldsInternal;
|
|
8599
8198
|
|
|
8600
|
-
function ownKeys$
|
|
8601
|
-
function _objectSpread$
|
|
8199
|
+
function ownKeys$L(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8200
|
+
function _objectSpread$L(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$L(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$L(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8602
8201
|
const getTypeName = type => type.name.toLowerCase();
|
|
8603
8202
|
const findLabel = (enumType, key) => {
|
|
8604
8203
|
var _context;
|
|
@@ -8649,7 +8248,7 @@ const attributeDefinitionToFieldDefinition = attributeDefinition => ({
|
|
|
8649
8248
|
const nameValuePairsToMap = pairs => _reduceInstanceProperty__default["default"](pairs).call(pairs, (result, _ref2) => {
|
|
8650
8249
|
let name = _ref2.name,
|
|
8651
8250
|
value = _ref2.value;
|
|
8652
|
-
return _objectSpread$
|
|
8251
|
+
return _objectSpread$L(_objectSpread$L({}, result), {}, {
|
|
8653
8252
|
[name]: value
|
|
8654
8253
|
});
|
|
8655
8254
|
}, {});
|
|
@@ -8767,8 +8366,8 @@ var pickerMessages = reactIntl.defineMessages({
|
|
|
8767
8366
|
}
|
|
8768
8367
|
});
|
|
8769
8368
|
|
|
8770
|
-
function ownKeys$
|
|
8771
|
-
function _objectSpread$
|
|
8369
|
+
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; }
|
|
8370
|
+
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; }
|
|
8772
8371
|
const PRODUCT_SELECTION_MODES = {
|
|
8773
8372
|
INCLUSION: 'Individual',
|
|
8774
8373
|
EXCLUSION: 'IndividualExclusion'
|
|
@@ -8781,7 +8380,7 @@ const getMode = mode => mode === PRODUCT_SELECTION_MODES.INCLUSION || mode === P
|
|
|
8781
8380
|
const addModeToLabel = function (ps) {
|
|
8782
8381
|
let enableExcludingProducts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
8783
8382
|
if (!ps) return undefined;
|
|
8784
|
-
return _objectSpread$
|
|
8383
|
+
return _objectSpread$K(_objectSpread$K({}, ps), {}, {
|
|
8785
8384
|
label: `${ps?.label}${enableExcludingProducts ? ` (type: ${getMode(ps?.mode)})` : ''}`
|
|
8786
8385
|
});
|
|
8787
8386
|
};
|
|
@@ -9145,12 +8744,12 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
9145
8744
|
});
|
|
9146
8745
|
}
|
|
9147
8746
|
|
|
9148
|
-
function ownKeys$
|
|
9149
|
-
function _objectSpread$
|
|
8747
|
+
function ownKeys$J(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8748
|
+
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$J(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$J(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9150
8749
|
function ModeSelectInputOption(props) {
|
|
9151
8750
|
const data = props.data;
|
|
9152
8751
|
const noValueFallback = props.noValueFallback || constants.NO_VALUE_FALLBACK;
|
|
9153
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8752
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$J(_objectSpread$J({}, props), {}, {
|
|
9154
8753
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
9155
8754
|
scale: "xs",
|
|
9156
8755
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -9166,8 +8765,8 @@ function ModeSelectInputOption(props) {
|
|
|
9166
8765
|
}
|
|
9167
8766
|
|
|
9168
8767
|
const _excluded$7 = ["lowerProductSelectionsLimit", "upperProductSelectionsLimit", "renderSelectInputOptionValuesByField", "optionType", "isMulti", "isRequired", "hasWarning", "hasError", "isClearable", "isReadOnly", "isDisabled", "excludedProductSelectionIds", "title"];
|
|
9169
|
-
function ownKeys$
|
|
9170
|
-
function _objectSpread$
|
|
8768
|
+
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; }
|
|
8769
|
+
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; }
|
|
9171
8770
|
function ProductSelectionsPicker(_ref) {
|
|
9172
8771
|
let _ref$lowerProductSele = _ref.lowerProductSelectionsLimit,
|
|
9173
8772
|
lowerProductSelectionsLimit = _ref$lowerProductSele === void 0 ? LOWER_PRODUCT_SELECTIONS_LIMIT : _ref$lowerProductSele,
|
|
@@ -9201,10 +8800,10 @@ function ProductSelectionsPicker(_ref) {
|
|
|
9201
8800
|
return {
|
|
9202
8801
|
Option: optionInnerProps => {
|
|
9203
8802
|
if (optionInnerProps.isDisabled) {
|
|
9204
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8803
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$I({}, optionInnerProps));
|
|
9205
8804
|
}
|
|
9206
8805
|
if (optionType === TYPE_PROPERTY) {
|
|
9207
|
-
return jsxRuntime.jsx(ModeSelectInputOption, _objectSpread$
|
|
8806
|
+
return jsxRuntime.jsx(ModeSelectInputOption, _objectSpread$I({}, optionInnerProps));
|
|
9208
8807
|
}
|
|
9209
8808
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
9210
8809
|
optionType: optionType,
|
|
@@ -9217,7 +8816,7 @@ function ProductSelectionsPicker(_ref) {
|
|
|
9217
8816
|
let CustomProductSelectionsPicker;
|
|
9218
8817
|
if (productSelectionsTotalFetcher.total <= lowerProductSelectionsLimit) CustomProductSelectionsPicker = ProductSelectionBasicSelectDropdown;else if (productSelectionsTotalFetcher.total <= upperProductSelectionsLimit) CustomProductSelectionsPicker = ProductSelectionsAsyncSelectDropdown;else CustomProductSelectionsPicker = ProductSelectionsSearchSelectDropdown;
|
|
9219
8818
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
9220
|
-
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$
|
|
8819
|
+
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$I(_objectSpread$I({
|
|
9221
8820
|
lowerProductSelectionsLimit: lowerProductSelectionsLimit,
|
|
9222
8821
|
upperProductSelectionsLimit: upperProductSelectionsLimit,
|
|
9223
8822
|
renderSelectInputOptionValuesByField: renderSelectInputOptionValuesByField,
|
|
@@ -9260,7 +8859,9 @@ var messages$w = reactIntl.defineMessages({
|
|
|
9260
8859
|
}
|
|
9261
8860
|
});
|
|
9262
8861
|
|
|
9263
|
-
|
|
8862
|
+
function ownKeys$H(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8863
|
+
function _objectSpread$H(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$H(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$H(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8864
|
+
var FetchRecurrencePolicies = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchRecurrencePolicies" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Int" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "recurrencePolicies" }, 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: [] }] } }] } }] } }] } }], loc: { start: 0, end: 220, source: { body: "query FetchRecurrencePolicies($where: String, $limit: Int!) {\n recurrencePolicies(where: $where, limit: $limit) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
9264
8865
|
const useRecurrenceIntervals = _ref => {
|
|
9265
8866
|
let where = _ref.where,
|
|
9266
8867
|
_ref$skip = _ref.skip,
|
|
@@ -9270,9 +8871,11 @@ const useRecurrenceIntervals = _ref => {
|
|
|
9270
8871
|
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
9271
8872
|
},
|
|
9272
8873
|
fetchPolicy: 'cache-and-network',
|
|
9273
|
-
variables:
|
|
8874
|
+
variables: _objectSpread$H({
|
|
8875
|
+
limit: 500
|
|
8876
|
+
}, where && {
|
|
9274
8877
|
where
|
|
9275
|
-
}
|
|
8878
|
+
}),
|
|
9276
8879
|
skip
|
|
9277
8880
|
}),
|
|
9278
8881
|
data = _useQuery.data,
|
|
@@ -9550,8 +9153,8 @@ const getCustomGroupLabelOption = customLabel => [{
|
|
|
9550
9153
|
}];
|
|
9551
9154
|
|
|
9552
9155
|
const _excluded$6 = ["shouldFetchProductSelections"];
|
|
9553
|
-
function ownKeys$
|
|
9554
|
-
function _objectSpread$
|
|
9156
|
+
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; }
|
|
9157
|
+
function _objectSpread$G(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$G(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$G(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9555
9158
|
const hasErrors$2 = errors => {
|
|
9556
9159
|
var _context;
|
|
9557
9160
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -9639,7 +9242,7 @@ const StoresAsyncSelectInput = _ref2 => {
|
|
|
9639
9242
|
};
|
|
9640
9243
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
9641
9244
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9642
|
-
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$
|
|
9245
|
+
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$G(_objectSpread$G(_objectSpread$G({
|
|
9643
9246
|
id: props.id,
|
|
9644
9247
|
name: props.name,
|
|
9645
9248
|
placeholder: intl.formatMessage(messages$u.basicSelectInputPlaceholder),
|
|
@@ -9684,8 +9287,8 @@ StoresAsyncSelectInput.displayName = 'StoresAsyncSelectInput';
|
|
|
9684
9287
|
var StoresAsyncSelectInput$1 = StoresAsyncSelectInput;
|
|
9685
9288
|
|
|
9686
9289
|
const _excluded$5 = ["shouldFetchProductSelections"];
|
|
9687
|
-
function ownKeys$
|
|
9688
|
-
function _objectSpread$
|
|
9290
|
+
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; }
|
|
9291
|
+
function _objectSpread$F(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$F(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$F(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9689
9292
|
const hasErrors$1 = errors => {
|
|
9690
9293
|
var _context;
|
|
9691
9294
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -9744,7 +9347,7 @@ const StoresBasicSelectInput = _ref => {
|
|
|
9744
9347
|
};
|
|
9745
9348
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
9746
9349
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9747
|
-
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$
|
|
9350
|
+
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$F(_objectSpread$F(_objectSpread$F({
|
|
9748
9351
|
id: props.id,
|
|
9749
9352
|
name: props.name,
|
|
9750
9353
|
placeholder: props.placeholder || intl.formatMessage(messages$u.basicSelectInputPlaceholder),
|
|
@@ -9827,8 +9430,8 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
9827
9430
|
var useStoresByFieldFetcher$1 = useStoresByFieldFetcher;
|
|
9828
9431
|
|
|
9829
9432
|
const _excluded$4 = ["shouldFetchProductSelections"];
|
|
9830
|
-
function ownKeys$
|
|
9831
|
-
function _objectSpread$
|
|
9433
|
+
function ownKeys$E(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9434
|
+
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context0; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context9 = ownKeys$E(Object(t), !0)).call(_context9, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context0 = ownKeys$E(Object(t))).call(_context0, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9832
9435
|
var FetchStoresByWherePredicate = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresByWherePredicate" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "storesByWherePredicate" }, name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelection" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 525, source: { body: "query FetchStoresByWherePredicate(\n $where: String!\n $skipFetchingStores: Boolean!\n $excludeProductSelections: Boolean!\n) {\n storesByWherePredicate: stores(where: $where) @skip(if: $skipFetchingStores) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n productSelections @skip(if: $excludeProductSelections) {\n active\n productSelection {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } }; // check wether there are any errors
|
|
9833
9436
|
const hasErrors = errors => {
|
|
9834
9437
|
var _context;
|
|
@@ -9894,7 +9497,7 @@ const getValueFromOptions = _ref3 => {
|
|
|
9894
9497
|
return selectedOptions[0];
|
|
9895
9498
|
}
|
|
9896
9499
|
};
|
|
9897
|
-
var _ref$
|
|
9500
|
+
var _ref$7 = {
|
|
9898
9501
|
name: "axl87t",
|
|
9899
9502
|
styles: "display:flex;flex-direction:column;justify-content:space-between;&>div:nth-of-type(2){margin-top:25px;}&>div:nth-of-type(1){margin-top:-4px;}"
|
|
9900
9503
|
} ;
|
|
@@ -9946,7 +9549,7 @@ const StoresSearchSelectInput = _ref4 => {
|
|
|
9946
9549
|
return extractMatchedStores;
|
|
9947
9550
|
};
|
|
9948
9551
|
const loadOptionsDebounced = debounce__default["default"](handleLoadOptions, 500);
|
|
9949
|
-
const renderLabelContainerStyles = _ref$
|
|
9552
|
+
const renderLabelContainerStyles = _ref$7;
|
|
9950
9553
|
const customLabelStyles = /*#__PURE__*/react$1.css("&>div{border-bottom:1px solid ", uiKit.designTokens.colorNeutral90, "!important;padding-bottom:4px;}" + ("" ), "" );
|
|
9951
9554
|
const renderNoOptions = _ref6 => {
|
|
9952
9555
|
let inputValue = _ref6.inputValue;
|
|
@@ -9962,7 +9565,7 @@ const StoresSearchSelectInput = _ref4 => {
|
|
|
9962
9565
|
};
|
|
9963
9566
|
if (storesByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
9964
9567
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9965
|
-
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$
|
|
9568
|
+
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$E(_objectSpread$E({
|
|
9966
9569
|
id: props.id,
|
|
9967
9570
|
name: props.name,
|
|
9968
9571
|
placeholder: intl.formatMessage(messages$u.searchSelectInputPlaceholder),
|
|
@@ -10009,9 +9612,9 @@ StoresSearchSelectInput.displayName = 'StoresSearchSelectInput';
|
|
|
10009
9612
|
var StoresSearchSelectInput$1 = StoresSearchSelectInput;
|
|
10010
9613
|
|
|
10011
9614
|
const _excluded$3 = ["lowerStoresLimit", "upperStoresLimit", "renderSelectInputOptionValuesByField", "optionType", "shouldFetchProductSelections"];
|
|
10012
|
-
function ownKeys$
|
|
10013
|
-
function _objectSpread$
|
|
10014
|
-
var _ref$
|
|
9615
|
+
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; }
|
|
9616
|
+
function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$D(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$D(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9617
|
+
var _ref$6 = {
|
|
10015
9618
|
name: "1r0yqr6",
|
|
10016
9619
|
styles: "margin-top:10px"
|
|
10017
9620
|
} ;
|
|
@@ -10033,11 +9636,11 @@ const StoreSelectInput = _ref2 => {
|
|
|
10033
9636
|
// eslint-disable-next-line react/display-name
|
|
10034
9637
|
Option: optionInnerProps => {
|
|
10035
9638
|
if (optionInnerProps.isDisabled) {
|
|
10036
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
9639
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$D({}, optionInnerProps));
|
|
10037
9640
|
}
|
|
10038
9641
|
const isSearchSelectInput = totalNumberOfStoresFetcher.total > upperStoresLimit;
|
|
10039
9642
|
return jsxRuntime.jsx("div", {
|
|
10040
|
-
css: isSearchSelectInput ? _ref$
|
|
9643
|
+
css: isSearchSelectInput ? _ref$6 : '',
|
|
10041
9644
|
children: jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
10042
9645
|
optionType: optionType,
|
|
10043
9646
|
optionInnerProps: optionInnerProps
|
|
@@ -10064,7 +9667,7 @@ const StoreSelectInput = _ref2 => {
|
|
|
10064
9667
|
else {
|
|
10065
9668
|
CustomStoreSelectInput = StoresSearchSelectInput$1;
|
|
10066
9669
|
}
|
|
10067
|
-
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$
|
|
9670
|
+
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$D(_objectSpread$D({
|
|
10068
9671
|
menuIsOpen: props.menuIsOpen,
|
|
10069
9672
|
placeholder: props.placeholder,
|
|
10070
9673
|
iconLeft: props.iconLeft,
|
|
@@ -10104,8 +9707,8 @@ StoreSelectInput.displayName = 'StoreSelectInput';
|
|
|
10104
9707
|
var StoreSelectInput$1 = StoreSelectInput;
|
|
10105
9708
|
|
|
10106
9709
|
const _excluded$2 = ["lowerStoresLimit", "upperStoresLimit", "mappedValueField"];
|
|
10107
|
-
function ownKeys$
|
|
10108
|
-
function _objectSpread$
|
|
9710
|
+
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; }
|
|
9711
|
+
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; }
|
|
10109
9712
|
const StoreSelectField = _ref => {
|
|
10110
9713
|
let _ref$lowerStoresLimit = _ref.lowerStoresLimit,
|
|
10111
9714
|
lowerStoresLimit = _ref$lowerStoresLimit === void 0 ? LOWER_STORES_LIMIT : _ref$lowerStoresLimit,
|
|
@@ -10125,7 +9728,7 @@ const StoreSelectField = _ref => {
|
|
|
10125
9728
|
htmlFor: props.id,
|
|
10126
9729
|
hasRequiredIndicator: props.isRequired,
|
|
10127
9730
|
isBold: true
|
|
10128
|
-
}), jsxRuntime.jsx(StoreSelectInput$1, _objectSpread$
|
|
9731
|
+
}), jsxRuntime.jsx(StoreSelectInput$1, _objectSpread$C(_objectSpread$C({
|
|
10129
9732
|
projectKey: props.projectKey,
|
|
10130
9733
|
id: props.id,
|
|
10131
9734
|
name: props.name,
|
|
@@ -10160,10 +9763,10 @@ const StoreSelectField = _ref => {
|
|
|
10160
9763
|
StoreSelectField.displayName = 'StoreSelectField';
|
|
10161
9764
|
var StoreSelectField$1 = StoreSelectField;
|
|
10162
9765
|
|
|
10163
|
-
function ownKeys$
|
|
10164
|
-
function _objectSpread$
|
|
10165
|
-
function _callSuper$
|
|
10166
|
-
function _isNativeReflectConstruct$
|
|
9766
|
+
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; }
|
|
9767
|
+
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$B(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$B(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9768
|
+
function _callSuper$6(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$6() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9769
|
+
function _isNativeReflectConstruct$6() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$6 = function () { return !!t; })(); }
|
|
10167
9770
|
const EMAIL_REGEX = /^[-!#$%&'*+/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/i;
|
|
10168
9771
|
const getIsEvent = event => typeof event === 'object' && !isNil__default["default"](event.target);
|
|
10169
9772
|
const validateRequired = value => {
|
|
@@ -10245,7 +9848,7 @@ ToolTipWrapperComponent.displayName = 'ToolTipWrapperComponent';
|
|
|
10245
9848
|
ToolTipWrapperComponent.propTypes = {
|
|
10246
9849
|
children: PropTypes__default["default"].element
|
|
10247
9850
|
};
|
|
10248
|
-
var _ref$
|
|
9851
|
+
var _ref$5 = {
|
|
10249
9852
|
name: "1u4hpl4",
|
|
10250
9853
|
styles: "display:inline"
|
|
10251
9854
|
} ;
|
|
@@ -10273,7 +9876,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
10273
9876
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10274
9877
|
args[_key] = arguments[_key];
|
|
10275
9878
|
}
|
|
10276
|
-
_this = _callSuper$
|
|
9879
|
+
_this = _callSuper$6(this, ValidatedInput, [...args]);
|
|
10277
9880
|
_this.state = {
|
|
10278
9881
|
validStatus: _initialValidState
|
|
10279
9882
|
};
|
|
@@ -10305,7 +9908,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
10305
9908
|
* so it must be an invalid numeric value
|
|
10306
9909
|
*/
|
|
10307
9910
|
_this.handleInvalid = () => {
|
|
10308
|
-
const nextValidStatus = _objectSpread$
|
|
9911
|
+
const nextValidStatus = _objectSpread$B({}, _this.state.validStatus);
|
|
10309
9912
|
if (has__default["default"](nextValidStatus, 'numeric')) {
|
|
10310
9913
|
nextValidStatus.numeric = false;
|
|
10311
9914
|
_this.conditionalSetValidStatus(nextValidStatus);
|
|
@@ -10356,7 +9959,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
10356
9959
|
if (prev) return this.state.validStatus[v.name];
|
|
10357
9960
|
return prev;
|
|
10358
9961
|
}, true);
|
|
10359
|
-
const componentProps = _objectSpread$
|
|
9962
|
+
const componentProps = _objectSpread$B(_objectSpread$B({}, this.props), {}, {
|
|
10360
9963
|
[blurHandler || 'onBlurValue']: this.handleBlur,
|
|
10361
9964
|
[changeHandler || 'onChange']: this.handleChange,
|
|
10362
9965
|
onInvalidValue: this.handleInvalid,
|
|
@@ -10366,7 +9969,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
10366
9969
|
const firstFailedValidator = _findInstanceProperty__default["default"](_validators).call(_validators, v => !this.state.validStatus[v.name]);
|
|
10367
9970
|
return jsxRuntime.jsx("div", {
|
|
10368
9971
|
className: classnames__default["default"](containerClassName),
|
|
10369
|
-
css: _ref$
|
|
9972
|
+
css: _ref$5,
|
|
10370
9973
|
children: jsxRuntime.jsx(uiKit.Tooltip, {
|
|
10371
9974
|
placement: "top",
|
|
10372
9975
|
title: firstFailedValidator && this.props.intl.formatMessage(firstFailedValidator.message) || '',
|
|
@@ -10374,7 +9977,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
10374
9977
|
components: {
|
|
10375
9978
|
WrapperComponent: ToolTipWrapperComponent
|
|
10376
9979
|
},
|
|
10377
|
-
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$
|
|
9980
|
+
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$B({}, componentProps))
|
|
10378
9981
|
})
|
|
10379
9982
|
});
|
|
10380
9983
|
}
|
|
@@ -10396,7 +9999,7 @@ function simpleInput(type) {
|
|
|
10396
9999
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
10397
10000
|
args[_key2] = arguments[_key2];
|
|
10398
10001
|
}
|
|
10399
|
-
_this2 = _callSuper$
|
|
10002
|
+
_this2 = _callSuper$6(this, _Class, [...args]);
|
|
10400
10003
|
_this2.handleBlur = event => {
|
|
10401
10004
|
if (_this2.props.onBlurValue) _this2.props.onBlurValue(event.target.value);
|
|
10402
10005
|
};
|
|
@@ -10425,10 +10028,10 @@ function simpleInput(type) {
|
|
|
10425
10028
|
}, _Class;
|
|
10426
10029
|
}
|
|
10427
10030
|
|
|
10428
|
-
function ownKeys$
|
|
10429
|
-
function _objectSpread$
|
|
10430
|
-
function _callSuper$
|
|
10431
|
-
function _isNativeReflectConstruct$
|
|
10031
|
+
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; }
|
|
10032
|
+
function _objectSpread$A(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$A(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$A(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10033
|
+
function _callSuper$5(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$5() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10034
|
+
function _isNativeReflectConstruct$5() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$5 = function () { return !!t; })(); }
|
|
10432
10035
|
var FetchTypeDefinitionsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1172, source: { body: "query FetchTypeDefinitionsQuery($where: String, $limit: Int, $offset: Int) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n fieldDefinitions {\n type {\n name\n ... on SetType {\n elementType {\n name\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n ... on ReferenceType {\n referenceTypeId\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10433
10036
|
const customizableResources$1 = ['asset', 'category', 'channel', 'customer', 'order', 'discount-code', 'cart-discount', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'transaction',
|
|
10434
10037
|
// transactions on payment entity
|
|
@@ -10436,7 +10039,7 @@ const customizableResources$1 = ['asset', 'category', 'channel', 'customer', 'or
|
|
|
10436
10039
|
let CustomFieldDefinitionsConnector = /*#__PURE__*/function (_Component) {
|
|
10437
10040
|
function CustomFieldDefinitionsConnector() {
|
|
10438
10041
|
_classCallCheck(this, CustomFieldDefinitionsConnector);
|
|
10439
|
-
return _callSuper$
|
|
10042
|
+
return _callSuper$5(this, CustomFieldDefinitionsConnector, arguments);
|
|
10440
10043
|
}
|
|
10441
10044
|
_inherits(CustomFieldDefinitionsConnector, _Component);
|
|
10442
10045
|
return _createClass(CustomFieldDefinitionsConnector, [{
|
|
@@ -10486,7 +10089,7 @@ const mapDataToProps = _ref => {
|
|
|
10486
10089
|
return {
|
|
10487
10090
|
fetchTypeDefinitionsQuery: {
|
|
10488
10091
|
loading: fetchTypeDefinitionsQuery.loading,
|
|
10489
|
-
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$
|
|
10092
|
+
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$A({}, l10n.applyTransformedLocalizedFields(omitDeep(fieldDefinition, ['__typename'], {
|
|
10490
10093
|
isImmutable: true
|
|
10491
10094
|
}), [{
|
|
10492
10095
|
from: 'labelAllLocales',
|
|
@@ -10506,12 +10109,12 @@ var customFieldDefinitionsConnector = flowRight__default["default"](hoc.graphql(
|
|
|
10506
10109
|
props: mapDataToProps
|
|
10507
10110
|
}))(CustomFieldDefinitionsConnector);
|
|
10508
10111
|
|
|
10509
|
-
function ownKeys$
|
|
10510
|
-
function _objectSpread$
|
|
10112
|
+
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; }
|
|
10113
|
+
function _objectSpread$z(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$z(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$z(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10511
10114
|
const restDocToForm = customFieldsFromRestResponse => {
|
|
10512
10115
|
return {
|
|
10513
10116
|
fields: customFieldsFromRestResponse.fields,
|
|
10514
|
-
type: _objectSpread$
|
|
10117
|
+
type: _objectSpread$z({
|
|
10515
10118
|
id: customFieldsFromRestResponse.type.id
|
|
10516
10119
|
}, customFieldsFromRestResponse.type.obj)
|
|
10517
10120
|
};
|
|
@@ -10530,14 +10133,14 @@ const graphQlDocToForm = typeDefinition => {
|
|
|
10530
10133
|
name: fieldDefinition.name,
|
|
10531
10134
|
required: fieldDefinition.required,
|
|
10532
10135
|
inputHint: fieldDefinition.inputHint,
|
|
10533
|
-
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$
|
|
10534
|
-
elementType: _objectSpread$
|
|
10136
|
+
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$z(_objectSpread$z({}, fieldDefinition.type), {}, {
|
|
10137
|
+
elementType: _objectSpread$z(_objectSpread$z({}, fieldDefinition.type.elementType), {}, {
|
|
10535
10138
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
10536
10139
|
key: value.key,
|
|
10537
10140
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
10538
10141
|
}))
|
|
10539
10142
|
})
|
|
10540
|
-
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$
|
|
10143
|
+
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$z(_objectSpread$z({}, fieldDefinition.type), {}, {
|
|
10541
10144
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
10542
10145
|
key: value.key,
|
|
10543
10146
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -10553,7 +10156,7 @@ const formToRestDoc = formCustomFields => ({
|
|
|
10553
10156
|
type: {
|
|
10554
10157
|
id: formCustomFields.type.id,
|
|
10555
10158
|
typeId: 'type',
|
|
10556
|
-
obj: _objectSpread$
|
|
10159
|
+
obj: _objectSpread$z({}, formCustomFields.type)
|
|
10557
10160
|
},
|
|
10558
10161
|
fields: formCustomFields.fields
|
|
10559
10162
|
});
|
|
@@ -10561,7 +10164,7 @@ const formToGraphQlDoc = formCustomFields => ({
|
|
|
10561
10164
|
type: {
|
|
10562
10165
|
id: formCustomFields.type.id,
|
|
10563
10166
|
typeId: 'type',
|
|
10564
|
-
obj: _objectSpread$
|
|
10167
|
+
obj: _objectSpread$z({}, omit__default["default"](formCustomFields.type, ['id']))
|
|
10565
10168
|
},
|
|
10566
10169
|
fields: omitBy__default["default"](formCustomFields.fields || {}, isNil__default["default"])
|
|
10567
10170
|
});
|
|
@@ -10574,8 +10177,8 @@ const createEmptyCustomFields = typeDefinition => ({
|
|
|
10574
10177
|
}
|
|
10575
10178
|
});
|
|
10576
10179
|
|
|
10577
|
-
function _callSuper$
|
|
10578
|
-
function _isNativeReflectConstruct$
|
|
10180
|
+
function _callSuper$4(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$4() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10181
|
+
function _isNativeReflectConstruct$4() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$4 = function () { return !!t; })(); }
|
|
10579
10182
|
var FetchTypeDefinitionsWithNamesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsWithNamesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "required" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 1445, source: { body: "query FetchTypeDefinitionsWithNamesQuery(\n $where: String\n $limit: Int\n $offset: Int\n) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n id\n key\n nameAllLocales {\n value\n locale\n }\n fieldDefinitions {\n required\n type {\n name\n ... on ReferenceType {\n referenceTypeId\n }\n ... on SetType {\n elementType {\n name\n ... on ReferenceType {\n referenceTypeId\n name\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n inputHint\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10580
10183
|
const customizableResources = ['asset', 'address', 'associate-role', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'quote', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item', 'order-parcel', 'transaction', 'recurring-order'];
|
|
10581
10184
|
const emptyTypeDefinitions = {
|
|
@@ -10586,7 +10189,7 @@ const emptyTypeDefinitions = {
|
|
|
10586
10189
|
let CustomFieldTypeDefinitionsConnector = /*#__PURE__*/function (_Component) {
|
|
10587
10190
|
function CustomFieldTypeDefinitionsConnector() {
|
|
10588
10191
|
_classCallCheck(this, CustomFieldTypeDefinitionsConnector);
|
|
10589
|
-
return _callSuper$
|
|
10192
|
+
return _callSuper$4(this, CustomFieldTypeDefinitionsConnector, arguments);
|
|
10590
10193
|
}
|
|
10591
10194
|
_inherits(CustomFieldTypeDefinitionsConnector, _Component);
|
|
10592
10195
|
return _createClass(CustomFieldTypeDefinitionsConnector, [{
|
|
@@ -10664,8 +10267,8 @@ const CustomFields = props => {
|
|
|
10664
10267
|
CustomFields.displayName = 'CustomFields';
|
|
10665
10268
|
var CustomFields$1 = CustomFields;
|
|
10666
10269
|
|
|
10667
|
-
function ownKeys$
|
|
10668
|
-
function _objectSpread$
|
|
10270
|
+
function ownKeys$y(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10271
|
+
function _objectSpread$y(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$y(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$y(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10669
10272
|
const extractDuplicatedValues = (values, type, language, languages) => {
|
|
10670
10273
|
let validatedValues = [];
|
|
10671
10274
|
if (type.name.toLowerCase() === 'money') {
|
|
@@ -10732,8 +10335,8 @@ function validations (formValues, language, languages) {
|
|
|
10732
10335
|
var _context2;
|
|
10733
10336
|
// Collect all required and set type fields
|
|
10734
10337
|
const fieldDefinitionsToValidate = _filterInstanceProperty__default["default"](_context2 = formValues.custom.type.fieldDefinitions).call(_context2, fieldDefinition => fieldDefinition.required || fieldDefinition.type.name.toLowerCase() === 'set');
|
|
10735
|
-
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$
|
|
10736
|
-
[fieldDefinition.name]: _objectSpread$
|
|
10338
|
+
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$y(_objectSpread$y({}, acc), {}, {
|
|
10339
|
+
[fieldDefinition.name]: _objectSpread$y(_objectSpread$y({}, setMissingIfRequired(formValues, fieldDefinition)), setDuplicatedIfSet(formValues, fieldDefinition, language, languages))
|
|
10737
10340
|
}), {});
|
|
10738
10341
|
return withoutEmptyErrorsByField$1(errors);
|
|
10739
10342
|
}
|
|
@@ -10748,14 +10351,14 @@ var messages$t = reactIntl.defineMessages({
|
|
|
10748
10351
|
}
|
|
10749
10352
|
});
|
|
10750
10353
|
|
|
10751
|
-
function ownKeys$
|
|
10752
|
-
function _objectSpread$
|
|
10354
|
+
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; }
|
|
10355
|
+
function _objectSpread$x(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$x(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$x(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10753
10356
|
const CustomFieldsErrorTextNotification = props => {
|
|
10754
10357
|
var _context;
|
|
10755
10358
|
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
10756
10359
|
scale: "s",
|
|
10757
10360
|
children: [jsxRuntime.jsx(uiKit.Text.Wrap, {
|
|
10758
|
-
intlMessage: _objectSpread$
|
|
10361
|
+
intlMessage: _objectSpread$x({}, messages$t.customFieldsError)
|
|
10759
10362
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
10760
10363
|
scale: "xs",
|
|
10761
10364
|
children: _mapInstanceProperty__default["default"](_context = props.formErrors).call(_context, formError => jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -10808,13 +10411,13 @@ var messages$s = reactIntl.defineMessages({
|
|
|
10808
10411
|
|
|
10809
10412
|
const FIELD_NAME = 'custom';
|
|
10810
10413
|
|
|
10811
|
-
function ownKeys$
|
|
10812
|
-
function _objectSpread$
|
|
10414
|
+
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; }
|
|
10415
|
+
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$w(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$w(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10813
10416
|
const transformFieldType = fieldDefinition => {
|
|
10814
10417
|
if (fieldDefinition.type?.elementType?.name === 'LocalizedEnum') {
|
|
10815
10418
|
var _context;
|
|
10816
|
-
return _objectSpread$
|
|
10817
|
-
elementType: _objectSpread$
|
|
10419
|
+
return _objectSpread$w(_objectSpread$w({}, fieldDefinition.type), {}, {
|
|
10420
|
+
elementType: _objectSpread$w(_objectSpread$w({}, fieldDefinition.type.elementType), {}, {
|
|
10818
10421
|
values: _mapInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context, value => ({
|
|
10819
10422
|
key: value.key,
|
|
10820
10423
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -10823,7 +10426,7 @@ const transformFieldType = fieldDefinition => {
|
|
|
10823
10426
|
});
|
|
10824
10427
|
} else if (fieldDefinition.type?.name === 'LocalizedEnum') {
|
|
10825
10428
|
var _context2;
|
|
10826
|
-
return _objectSpread$
|
|
10429
|
+
return _objectSpread$w(_objectSpread$w({}, fieldDefinition.type), {}, {
|
|
10827
10430
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context2, value => ({
|
|
10828
10431
|
key: value.key,
|
|
10829
10432
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -10851,7 +10454,7 @@ const convertCustomField = resource => {
|
|
|
10851
10454
|
}))
|
|
10852
10455
|
}
|
|
10853
10456
|
},
|
|
10854
|
-
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$
|
|
10457
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$w(_objectSpread$w({}, fields), {}, {
|
|
10855
10458
|
[customField.name]: customField.value
|
|
10856
10459
|
}), {})
|
|
10857
10460
|
};
|
|
@@ -10899,8 +10502,8 @@ const createRootFieldName = rootFieldName => {
|
|
|
10899
10502
|
return rootFieldName ? `${rootFieldName}.${FIELD_NAME}` : FIELD_NAME;
|
|
10900
10503
|
};
|
|
10901
10504
|
|
|
10902
|
-
function ownKeys$
|
|
10903
|
-
function _objectSpread$
|
|
10505
|
+
function ownKeys$v(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10506
|
+
function _objectSpread$v(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$v(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$v(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10904
10507
|
const typeDefinitionsExist = typeDefinitions => {
|
|
10905
10508
|
return typeDefinitions.length > 0;
|
|
10906
10509
|
};
|
|
@@ -10927,19 +10530,19 @@ const CustomFieldsInputWrapper = _ref2 => {
|
|
|
10927
10530
|
formValues = _valuesInstanceProperty__default["default"](_useFormikContext);
|
|
10928
10531
|
const rootFieldName = createRootFieldName(rootFormStateFieldName);
|
|
10929
10532
|
if (!typeDefinitionsExist(typeDefinitions)) {
|
|
10930
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
10533
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$v({}, messages$s.noTypes));
|
|
10931
10534
|
}
|
|
10932
10535
|
if (!typeDefinitionSelected(formValues, rootFieldName) && isReadOnly) {
|
|
10933
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
10536
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$v({}, messages$s.noCustomTypeReadOnly));
|
|
10934
10537
|
}
|
|
10935
10538
|
if (!typeDefinitionSelected(formValues, rootFieldName)) {
|
|
10936
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
10539
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$v({}, messages$s.noCustomType));
|
|
10937
10540
|
}
|
|
10938
10541
|
if (!typeDefinitionContainsFieldDefinitions(formValues, rootFieldName)) {
|
|
10939
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
10542
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$v({}, messages$s.noCustomFields));
|
|
10940
10543
|
}
|
|
10941
10544
|
if (fieldDefinitionsWithValues(formValues, rootFieldName).length === 0 && isReadOnly && hideEmptyFields) {
|
|
10942
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
10545
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$v({}, messages$s.noInputValues));
|
|
10943
10546
|
}
|
|
10944
10547
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
10945
10548
|
max: "scale",
|
|
@@ -10953,8 +10556,8 @@ const CustomFieldsInputWrapper = _ref2 => {
|
|
|
10953
10556
|
CustomFieldsInputWrapper.displayName = 'CustomFieldsInputWrapper';
|
|
10954
10557
|
var CustomFieldsInputWrapper$1 = CustomFieldsInputWrapper;
|
|
10955
10558
|
|
|
10956
|
-
function ownKeys$
|
|
10957
|
-
function _objectSpread$
|
|
10559
|
+
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; }
|
|
10560
|
+
function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$u(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$u(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10958
10561
|
const mapTypeDefinitionsToOptions = (typeDefinitions, language, languages, selectedTypeDefinitionId) => {
|
|
10959
10562
|
return _mapInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => ({
|
|
10960
10563
|
isDisabled: selectedTypeDefinitionId && selectedTypeDefinitionId === typeDefinition.type.id,
|
|
@@ -10988,7 +10591,9 @@ const CustomTypeSubform = _ref => {
|
|
|
10988
10591
|
isCondensed = _ref.isCondensed,
|
|
10989
10592
|
hideEmptyFields = _ref.hideEmptyFields,
|
|
10990
10593
|
rootFormStateFieldName = _ref.rootFormStateFieldName,
|
|
10991
|
-
panelTitle = _ref.panelTitle
|
|
10594
|
+
panelTitle = _ref.panelTitle,
|
|
10595
|
+
_ref$leftAlignDropdow = _ref.leftAlignDropdown,
|
|
10596
|
+
leftAlignDropdown = _ref$leftAlignDropdow === void 0 ? false : _ref$leftAlignDropdow;
|
|
10992
10597
|
const _useFormikContext = formik.useFormikContext(),
|
|
10993
10598
|
formValues = _valuesInstanceProperty__default["default"](_useFormikContext),
|
|
10994
10599
|
setFieldValue = _useFormikContext.setFieldValue,
|
|
@@ -11041,7 +10646,7 @@ const CustomTypeSubform = _ref => {
|
|
|
11041
10646
|
return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
11042
10647
|
header: jsxRuntime.jsx(uiKit.CollapsiblePanel.Header, {
|
|
11043
10648
|
isCondensed: isCondensed,
|
|
11044
|
-
children: panelTitle || jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
10649
|
+
children: panelTitle || jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$u({}, messages$s.title))
|
|
11045
10650
|
}),
|
|
11046
10651
|
headerControls: typeDefinitions.length > 0 && jsxRuntime.jsx("div", {
|
|
11047
10652
|
css: /*#__PURE__*/react$1.css("min-width:", uiKit.designTokens.constraint11, ";" + ("" ), "" ),
|
|
@@ -11056,7 +10661,7 @@ const CustomTypeSubform = _ref => {
|
|
|
11056
10661
|
isReadOnly: isReadOnly
|
|
11057
10662
|
})
|
|
11058
10663
|
}),
|
|
11059
|
-
headerControlsAlignment:
|
|
10664
|
+
headerControlsAlignment: leftAlignDropdown ? 'left' : 'right',
|
|
11060
10665
|
children: jsxRuntime.jsx(CustomFieldsInputWrapper$1, {
|
|
11061
10666
|
typeDefinitions: typeDefinitions,
|
|
11062
10667
|
isReadOnly: isReadOnly,
|
|
@@ -11074,7 +10679,8 @@ const CustomFieldsFormField = _ref => {
|
|
|
11074
10679
|
isCondensed = _ref.isCondensed,
|
|
11075
10680
|
hideEmptyFields = _ref.hideEmptyFields,
|
|
11076
10681
|
rootFormStateFieldName = _ref.rootFormStateFieldName,
|
|
11077
|
-
panelTitle = _ref.panelTitle
|
|
10682
|
+
panelTitle = _ref.panelTitle,
|
|
10683
|
+
leftAlignDropdown = _ref.leftAlignDropdown;
|
|
11078
10684
|
const projectKey = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.project.key);
|
|
11079
10685
|
return jsxRuntime.jsx(CustomFieldTypeDefinitionsConnector$1, {
|
|
11080
10686
|
resources: resources,
|
|
@@ -11094,7 +10700,8 @@ const CustomFieldsFormField = _ref => {
|
|
|
11094
10700
|
isCondensed: isCondensed,
|
|
11095
10701
|
hideEmptyFields: hideEmptyFields,
|
|
11096
10702
|
rootFormStateFieldName: rootFormStateFieldName,
|
|
11097
|
-
panelTitle: panelTitle
|
|
10703
|
+
panelTitle: panelTitle,
|
|
10704
|
+
leftAlignDropdown: leftAlignDropdown
|
|
11098
10705
|
});
|
|
11099
10706
|
}
|
|
11100
10707
|
});
|
|
@@ -11189,10 +10796,10 @@ var messages$r = reactIntl.defineMessages({
|
|
|
11189
10796
|
}
|
|
11190
10797
|
});
|
|
11191
10798
|
|
|
11192
|
-
function ownKeys$
|
|
11193
|
-
function _objectSpread$
|
|
11194
|
-
function _callSuper$
|
|
11195
|
-
function _isNativeReflectConstruct$
|
|
10799
|
+
function ownKeys$t(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10800
|
+
function _objectSpread$t(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$t(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$t(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10801
|
+
function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10802
|
+
function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function () { return !!t; })(); }
|
|
11196
10803
|
var RefreshProductIndices = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "RefreshProductIndices" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "ids" } }, type: { kind: "NonNullType", type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "refreshProducts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "ids" }, value: { kind: "Variable", name: { kind: "Name", value: "ids" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updatedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "deletedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "notFoundDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "unchangedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "failedRefreshedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "reason" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 1549, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n $shouldIndexProductSelections: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n productSelections: reIndexAllProductSelections\n @include(if: $shouldIndexProductSelections) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $productSelectionsJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n $shouldIncludeProductSelections: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n\n productSelections: getReindexingStatus(id: $productSelectionsJobId)\n @include(if: $shouldIncludeProductSelections) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
11197
10804
|
var IndexProject = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "IndexProject" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "products" }, name: { kind: "Name", value: "reIndexAllProducts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indexingJobId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "existingIndexingJobId" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productTypes" }, name: { kind: "Name", value: "reIndexAllProductTypes" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indexingJobId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "existingIndexingJobId" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productSelections" }, name: { kind: "Name", value: "reIndexAllProductSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indexingJobId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "existingIndexingJobId" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 1549, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n $shouldIndexProductSelections: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n productSelections: reIndexAllProductSelections\n @include(if: $shouldIndexProductSelections) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $productSelectionsJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n $shouldIncludeProductSelections: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n\n productSelections: getReindexingStatus(id: $productSelectionsJobId)\n @include(if: $shouldIncludeProductSelections) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
11198
10805
|
var GetIndexingProgress = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetIndexingProgress" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productsJobId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productTypesJobId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productSelectionsJobId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "products" }, name: { kind: "Name", value: "getReindexingStatus" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "productsJobId" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "percentCompleted" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "completed" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productTypes" }, name: { kind: "Name", value: "getReindexingStatus" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "productTypesJobId" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "percentCompleted" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "completed" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productSelections" }, name: { kind: "Name", value: "getReindexingStatus" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "productSelectionsJobId" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "percentCompleted" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "completed" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 1549, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n $shouldIndexProductSelections: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n productSelections: reIndexAllProductSelections\n @include(if: $shouldIndexProductSelections) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $productSelectionsJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n $shouldIncludeProductSelections: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n\n productSelections: getReindexingStatus(id: $productSelectionsJobId)\n @include(if: $shouldIncludeProductSelections) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -11219,7 +10826,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11219
10826
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
11220
10827
|
args[_key] = arguments[_key];
|
|
11221
10828
|
}
|
|
11222
|
-
_this = _callSuper$
|
|
10829
|
+
_this = _callSuper$3(this, PimIndexerProvider, [...args]);
|
|
11223
10830
|
_this.state = {
|
|
11224
10831
|
isLoading: true,
|
|
11225
10832
|
isPimIndexerUnreachable: false,
|
|
@@ -11388,7 +10995,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11388
10995
|
shouldIndexProductSelections: isIndexingProductSelections
|
|
11389
10996
|
}
|
|
11390
10997
|
});
|
|
11391
|
-
_this.setState(_objectSpread$
|
|
10998
|
+
_this.setState(_objectSpread$t(_objectSpread$t({
|
|
11392
10999
|
isLoading: false,
|
|
11393
11000
|
isProjectBeingIndexedByPim: true
|
|
11394
11001
|
}, getIndexingJobIds(indexMutationResult)), {}, {
|
|
@@ -11415,7 +11022,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11415
11022
|
key: "render",
|
|
11416
11023
|
value: function render() {
|
|
11417
11024
|
return jsxRuntime.jsx(PimIndexerContext$1.Provider, {
|
|
11418
|
-
value: _objectSpread$
|
|
11025
|
+
value: _objectSpread$t(_objectSpread$t({}, this.state), {}, {
|
|
11419
11026
|
attemptToRefreshProducts: this.attemptToRefreshProducts,
|
|
11420
11027
|
indexProject: this.indexProject
|
|
11421
11028
|
}),
|
|
@@ -11435,12 +11042,12 @@ var pimIndexerProvider = flowRight__default["default"](applicationShellConnector
|
|
|
11435
11042
|
name: 'indexProject'
|
|
11436
11043
|
}), hoc.withApollo, reactIntl.injectIntl, injectNotifications$1())(PimIndexerProvider);
|
|
11437
11044
|
|
|
11438
|
-
function _callSuper$
|
|
11439
|
-
function _isNativeReflectConstruct$
|
|
11045
|
+
function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11046
|
+
function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function () { return !!t; })(); }
|
|
11440
11047
|
let WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
11441
11048
|
function WithPimIndexer() {
|
|
11442
11049
|
_classCallCheck(this, WithPimIndexer);
|
|
11443
|
-
return _callSuper$
|
|
11050
|
+
return _callSuper$2(this, WithPimIndexer, arguments);
|
|
11444
11051
|
}
|
|
11445
11052
|
_inherits(WithPimIndexer, _PureComponent);
|
|
11446
11053
|
return _createClass(WithPimIndexer, [{
|
|
@@ -11455,13 +11062,13 @@ let WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
|
11455
11062
|
WithPimIndexer.displayName = 'WithPimIndexer';
|
|
11456
11063
|
var WithPimIndexer$1 = WithPimIndexer;
|
|
11457
11064
|
|
|
11458
|
-
function ownKeys$
|
|
11459
|
-
function _objectSpread$
|
|
11065
|
+
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; }
|
|
11066
|
+
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; }
|
|
11460
11067
|
var injectPimIndexer = (function () {
|
|
11461
11068
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pimIndexer';
|
|
11462
11069
|
return Component => {
|
|
11463
11070
|
const WrappedComponent = props => jsxRuntime.jsx(WithPimIndexer$1, {
|
|
11464
|
-
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$
|
|
11071
|
+
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$s(_objectSpread$s({}, props), {}, {
|
|
11465
11072
|
[propName]: pimIndexerProps
|
|
11466
11073
|
}))
|
|
11467
11074
|
});
|
|
@@ -11489,10 +11096,10 @@ const RESOURCES_WITH_PLATFORM_LIMITS = {
|
|
|
11489
11096
|
carts: 'carts'
|
|
11490
11097
|
};
|
|
11491
11098
|
|
|
11492
|
-
function ownKeys$
|
|
11493
|
-
function _objectSpread$
|
|
11099
|
+
function ownKeys$r(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11100
|
+
function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$r(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$r(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11494
11101
|
const resourcesWithPlatformLimits = _Object$keys__default["default"](RESOURCES_WITH_PLATFORM_LIMITS);
|
|
11495
|
-
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$
|
|
11102
|
+
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$r({
|
|
11496
11103
|
[camelCase__default["default"](`should include ${nextNameOfLimit}`)]: platformLimit ? nextNameOfLimit === platformLimit : true
|
|
11497
11104
|
}, previousIncludedLimits), {});
|
|
11498
11105
|
var createPlatformLimitsQueryVariables = createQueryVariables;
|
|
@@ -11588,8 +11195,8 @@ var messages$q = reactIntl.defineMessages({
|
|
|
11588
11195
|
}
|
|
11589
11196
|
});
|
|
11590
11197
|
|
|
11591
|
-
function ownKeys$
|
|
11592
|
-
function _objectSpread$
|
|
11198
|
+
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; }
|
|
11199
|
+
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; }
|
|
11593
11200
|
const getCustomerSupportLink$1 = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
11594
11201
|
isExternal: true,
|
|
11595
11202
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -11600,7 +11207,7 @@ const PlatformLimitErrorNotification = _ref => {
|
|
|
11600
11207
|
limit = _ref.limit;
|
|
11601
11208
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
11602
11209
|
type: "error",
|
|
11603
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11210
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$q(_objectSpread$q({}, messages$q[resource]), {}, {
|
|
11604
11211
|
values: {
|
|
11605
11212
|
limit,
|
|
11606
11213
|
customersupport: getCustomerSupportLink$1
|
|
@@ -11642,8 +11249,8 @@ var messages$p = reactIntl.defineMessages({
|
|
|
11642
11249
|
}
|
|
11643
11250
|
});
|
|
11644
11251
|
|
|
11645
|
-
function ownKeys$
|
|
11646
|
-
function _objectSpread$
|
|
11252
|
+
function ownKeys$p(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11253
|
+
function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$p(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$p(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11647
11254
|
const getCustomerSupportLink = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
11648
11255
|
isExternal: true,
|
|
11649
11256
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -11654,7 +11261,7 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
11654
11261
|
limit = _ref.limit;
|
|
11655
11262
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
11656
11263
|
type: "warning",
|
|
11657
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11264
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$p(_objectSpread$p({}, messages$p[resource]), {}, {
|
|
11658
11265
|
values: {
|
|
11659
11266
|
limit,
|
|
11660
11267
|
customersupport: getCustomerSupportLink
|
|
@@ -11674,8 +11281,8 @@ const Notifications = {
|
|
|
11674
11281
|
};
|
|
11675
11282
|
var Notifications$1 = Notifications;
|
|
11676
11283
|
|
|
11677
|
-
function ownKeys$
|
|
11678
|
-
function _objectSpread$
|
|
11284
|
+
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; }
|
|
11285
|
+
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; }
|
|
11679
11286
|
const PlatformLimitsStatusText = _ref => {
|
|
11680
11287
|
let intlMessage = _ref.intlMessage,
|
|
11681
11288
|
children = _ref.children;
|
|
@@ -11684,7 +11291,7 @@ const PlatformLimitsStatusText = _ref => {
|
|
|
11684
11291
|
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
11685
11292
|
size: "xs",
|
|
11686
11293
|
children: [jsxRuntime.jsx("span", {
|
|
11687
|
-
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11294
|
+
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$o({}, intlMessage))
|
|
11688
11295
|
}), jsxRuntime.jsx("span", {
|
|
11689
11296
|
children: children
|
|
11690
11297
|
})]
|
|
@@ -11794,11 +11401,11 @@ var messages$o = reactIntl.defineMessages({
|
|
|
11794
11401
|
}
|
|
11795
11402
|
});
|
|
11796
11403
|
|
|
11797
|
-
function ownKeys$
|
|
11798
|
-
function _objectSpread$
|
|
11404
|
+
function ownKeys$n(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11405
|
+
function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$n(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$n(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11799
11406
|
const PlatformLimitsShippingMethodsTooltip = props => {
|
|
11800
11407
|
const intl = reactIntl.useIntl();
|
|
11801
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
11408
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$n(_objectSpread$n({}, props), {}, {
|
|
11802
11409
|
title: intl.formatMessage(messages$o.shippingMethodsPlatformLimitReached)
|
|
11803
11410
|
}));
|
|
11804
11411
|
};
|
|
@@ -11860,15 +11467,15 @@ const useShippingMethodsLimits = () => {
|
|
|
11860
11467
|
};
|
|
11861
11468
|
var useShippingMethodsPlatformLimits = useShippingMethodsLimits;
|
|
11862
11469
|
|
|
11863
|
-
function ownKeys$
|
|
11864
|
-
function _objectSpread$
|
|
11470
|
+
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; }
|
|
11471
|
+
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; }
|
|
11865
11472
|
const injectShippingMethodsPlatformLimits = () => WrappedComponent => {
|
|
11866
11473
|
const WithShippingMethodsPlatformLimits = props => {
|
|
11867
11474
|
const shippingMethodsPlatformLimits = useShippingMethodsPlatformLimits();
|
|
11868
11475
|
const shippingMethodsProps = {
|
|
11869
11476
|
platformLimits: shippingMethodsPlatformLimits
|
|
11870
11477
|
};
|
|
11871
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
11478
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$m(_objectSpread$m({}, props), shippingMethodsProps));
|
|
11872
11479
|
};
|
|
11873
11480
|
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
11874
11481
|
return WithShippingMethodsPlatformLimits;
|
|
@@ -11951,11 +11558,11 @@ var messages$m = reactIntl.defineMessages({
|
|
|
11951
11558
|
}
|
|
11952
11559
|
});
|
|
11953
11560
|
|
|
11954
|
-
function ownKeys$
|
|
11955
|
-
function _objectSpread$
|
|
11561
|
+
function ownKeys$l(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11562
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$l(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$l(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11956
11563
|
const PlatformLimitsTaxCategoriesTooltip = props => {
|
|
11957
11564
|
const intl = reactIntl.useIntl();
|
|
11958
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
11565
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$l(_objectSpread$l({}, props), {}, {
|
|
11959
11566
|
title: intl.formatMessage(messages$m.taxCategoriesPlatformLimitReached)
|
|
11960
11567
|
}));
|
|
11961
11568
|
};
|
|
@@ -12011,15 +11618,15 @@ const useTaxCategoriesLimits = () => {
|
|
|
12011
11618
|
};
|
|
12012
11619
|
var useTaxCategoriesPlatformLimits = useTaxCategoriesLimits;
|
|
12013
11620
|
|
|
12014
|
-
function ownKeys$
|
|
12015
|
-
function _objectSpread$
|
|
11621
|
+
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; }
|
|
11622
|
+
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; }
|
|
12016
11623
|
const injectTaxCategoriesPlatformLimits = WrappedComponent => {
|
|
12017
11624
|
const WithTaxCategoriesPlatformLimits = props => {
|
|
12018
11625
|
const taxCategoriesPlatformLimits = useTaxCategoriesPlatformLimits();
|
|
12019
11626
|
const taxCategoriesProps = {
|
|
12020
11627
|
platformLimits: taxCategoriesPlatformLimits
|
|
12021
11628
|
};
|
|
12022
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
11629
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$k(_objectSpread$k({}, props), taxCategoriesProps));
|
|
12023
11630
|
};
|
|
12024
11631
|
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
12025
11632
|
return WithTaxCategoriesPlatformLimits;
|
|
@@ -12102,11 +11709,11 @@ var messages$k = reactIntl.defineMessages({
|
|
|
12102
11709
|
}
|
|
12103
11710
|
});
|
|
12104
11711
|
|
|
12105
|
-
function ownKeys$
|
|
12106
|
-
function _objectSpread$
|
|
11712
|
+
function ownKeys$j(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11713
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$j(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$j(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12107
11714
|
const PlatformLimitsZonesTooltip = props => {
|
|
12108
11715
|
const intl = reactIntl.useIntl();
|
|
12109
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
11716
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$j(_objectSpread$j({}, props), {}, {
|
|
12110
11717
|
title: intl.formatMessage(messages$k.zonesPlatformLimitReached)
|
|
12111
11718
|
}));
|
|
12112
11719
|
};
|
|
@@ -12162,15 +11769,15 @@ const useZonesLimits = () => {
|
|
|
12162
11769
|
};
|
|
12163
11770
|
var useZonesPlatformLimits = useZonesLimits;
|
|
12164
11771
|
|
|
12165
|
-
function ownKeys$
|
|
12166
|
-
function _objectSpread$
|
|
11772
|
+
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; }
|
|
11773
|
+
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; }
|
|
12167
11774
|
const injectZonesPlatformLimits = () => WrappedComponent => {
|
|
12168
11775
|
const WithZonesPlatformLimits = props => {
|
|
12169
11776
|
const zonesPlatformLimits = useZonesPlatformLimits();
|
|
12170
11777
|
const zonesProps = {
|
|
12171
11778
|
platformLimits: zonesPlatformLimits
|
|
12172
11779
|
};
|
|
12173
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
11780
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$i(_objectSpread$i({}, props), zonesProps));
|
|
12174
11781
|
};
|
|
12175
11782
|
WithZonesPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithZonesPlatformLimits');
|
|
12176
11783
|
return WithZonesPlatformLimits;
|
|
@@ -12267,11 +11874,11 @@ var messages$i = reactIntl.defineMessages({
|
|
|
12267
11874
|
}
|
|
12268
11875
|
});
|
|
12269
11876
|
|
|
12270
|
-
function ownKeys$
|
|
12271
|
-
function _objectSpread$
|
|
11877
|
+
function ownKeys$h(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11878
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$h(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$h(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12272
11879
|
const PlatformLimitsCustomersTooltip = props => {
|
|
12273
11880
|
const intl = reactIntl.useIntl();
|
|
12274
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
11881
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$h(_objectSpread$h({}, props), {}, {
|
|
12275
11882
|
title: intl.formatMessage(messages$i.customersPlatformLimitReached)
|
|
12276
11883
|
}));
|
|
12277
11884
|
};
|
|
@@ -12286,9 +11893,9 @@ var messages$h = reactIntl.defineMessages({
|
|
|
12286
11893
|
}
|
|
12287
11894
|
});
|
|
12288
11895
|
|
|
12289
|
-
function ownKeys$
|
|
12290
|
-
function _objectSpread$
|
|
12291
|
-
var _ref$
|
|
11896
|
+
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; }
|
|
11897
|
+
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; }
|
|
11898
|
+
var _ref$4 = {
|
|
12292
11899
|
name: "1670krd",
|
|
12293
11900
|
styles: "min-width:max-content"
|
|
12294
11901
|
} ;
|
|
@@ -12303,11 +11910,11 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
12303
11910
|
current = _platformLimits$custo.current,
|
|
12304
11911
|
limit = _platformLimits$custo.limit;
|
|
12305
11912
|
return jsxRuntime.jsx("div", {
|
|
12306
|
-
css: _ref$
|
|
11913
|
+
css: _ref$4,
|
|
12307
11914
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
12308
11915
|
tone: "secondary",
|
|
12309
11916
|
isInline: true,
|
|
12310
|
-
intlMessage: _objectSpread$
|
|
11917
|
+
intlMessage: _objectSpread$g(_objectSpread$g({}, messages$h.customersStatus), {}, {
|
|
12311
11918
|
values: {
|
|
12312
11919
|
current: intl.formatNumber(current),
|
|
12313
11920
|
limit: intl.formatNumber(limit)
|
|
@@ -12332,10 +11939,10 @@ var messages$g = reactIntl.defineMessages({
|
|
|
12332
11939
|
}
|
|
12333
11940
|
});
|
|
12334
11941
|
|
|
12335
|
-
function ownKeys$
|
|
12336
|
-
function _objectSpread$
|
|
11942
|
+
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; }
|
|
11943
|
+
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; }
|
|
12337
11944
|
var LimitsReachedErrorGraphic$1 = function LimitsReachedErrorGraphic(props) {
|
|
12338
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
11945
|
+
return jsxRuntime.jsxs("svg", _objectSpread$f(_objectSpread$f({}, props), {}, {
|
|
12339
11946
|
children: [jsxRuntime.jsx("defs", {
|
|
12340
11947
|
children: jsxRuntime.jsx("path", {
|
|
12341
11948
|
id: "a",
|
|
@@ -12510,15 +12117,15 @@ const useCustomersPlatformLimits = () => {
|
|
|
12510
12117
|
};
|
|
12511
12118
|
var useCustomersPlatformLimits$1 = useCustomersPlatformLimits;
|
|
12512
12119
|
|
|
12513
|
-
function ownKeys$
|
|
12514
|
-
function _objectSpread$
|
|
12120
|
+
function ownKeys$e(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12121
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$e(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$e(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12515
12122
|
const injectCustomersPlatformLimits = () => WrappedComponent => {
|
|
12516
12123
|
const WithCustomersPlatformLimits = props => {
|
|
12517
12124
|
const CustomersPlatformLimits = useCustomersPlatformLimits$1();
|
|
12518
12125
|
const customersProps = {
|
|
12519
12126
|
platformLimits: CustomersPlatformLimits
|
|
12520
12127
|
};
|
|
12521
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
12128
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$e(_objectSpread$e({}, props), customersProps));
|
|
12522
12129
|
};
|
|
12523
12130
|
WithCustomersPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
12524
12131
|
return WithCustomersPlatformLimits;
|
|
@@ -12647,11 +12254,11 @@ var messages$f = reactIntl.defineMessages({
|
|
|
12647
12254
|
}
|
|
12648
12255
|
});
|
|
12649
12256
|
|
|
12650
|
-
function ownKeys$
|
|
12651
|
-
function _objectSpread$
|
|
12257
|
+
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; }
|
|
12258
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$d(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$d(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12652
12259
|
const PlatformLimitsCustomerGroupsTooltip = props => {
|
|
12653
12260
|
const intl = reactIntl.useIntl();
|
|
12654
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
12261
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$d(_objectSpread$d({}, props), {}, {
|
|
12655
12262
|
title: intl.formatMessage(messages$f.customerGroupsPlatformLimitReached)
|
|
12656
12263
|
}));
|
|
12657
12264
|
};
|
|
@@ -12666,9 +12273,9 @@ var messages$e = reactIntl.defineMessages({
|
|
|
12666
12273
|
}
|
|
12667
12274
|
});
|
|
12668
12275
|
|
|
12669
|
-
function ownKeys$
|
|
12670
|
-
function _objectSpread$
|
|
12671
|
-
var _ref$
|
|
12276
|
+
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; }
|
|
12277
|
+
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; }
|
|
12278
|
+
var _ref$3 = {
|
|
12672
12279
|
name: "1670krd",
|
|
12673
12280
|
styles: "min-width:max-content"
|
|
12674
12281
|
} ;
|
|
@@ -12683,11 +12290,11 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
12683
12290
|
current = _platformLimits$custo.current,
|
|
12684
12291
|
limit = _platformLimits$custo.limit;
|
|
12685
12292
|
return jsxRuntime.jsx("div", {
|
|
12686
|
-
css: _ref$
|
|
12293
|
+
css: _ref$3,
|
|
12687
12294
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
12688
12295
|
tone: "secondary",
|
|
12689
12296
|
isInline: true,
|
|
12690
|
-
intlMessage: _objectSpread$
|
|
12297
|
+
intlMessage: _objectSpread$c(_objectSpread$c({}, messages$e.customerGroupsStatus), {}, {
|
|
12691
12298
|
values: {
|
|
12692
12299
|
current: intl.formatNumber(current),
|
|
12693
12300
|
limit: intl.formatNumber(limit)
|
|
@@ -12712,10 +12319,10 @@ var messages$d = reactIntl.defineMessages({
|
|
|
12712
12319
|
}
|
|
12713
12320
|
});
|
|
12714
12321
|
|
|
12715
|
-
function ownKeys$
|
|
12716
|
-
function _objectSpread$
|
|
12322
|
+
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; }
|
|
12323
|
+
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; }
|
|
12717
12324
|
var LimitsReachedErrorGraphic = function LimitsReachedErrorGraphic(props) {
|
|
12718
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
12325
|
+
return jsxRuntime.jsxs("svg", _objectSpread$b(_objectSpread$b({}, props), {}, {
|
|
12719
12326
|
children: [jsxRuntime.jsx("defs", {
|
|
12720
12327
|
children: jsxRuntime.jsx("path", {
|
|
12721
12328
|
id: "a",
|
|
@@ -12887,15 +12494,15 @@ const useCustomerGroupsPlatformLimits = () => {
|
|
|
12887
12494
|
};
|
|
12888
12495
|
var useCustomerGroupsPlatformLimits$1 = useCustomerGroupsPlatformLimits;
|
|
12889
12496
|
|
|
12890
|
-
function ownKeys$
|
|
12891
|
-
function _objectSpread$
|
|
12497
|
+
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; }
|
|
12498
|
+
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; }
|
|
12892
12499
|
const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
|
|
12893
12500
|
const WithCustomerGroupsPlatformLimits = props => {
|
|
12894
12501
|
const CustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits$1();
|
|
12895
12502
|
const customersProps = {
|
|
12896
12503
|
platformLimits: CustomerGroupsPlatformLimits
|
|
12897
12504
|
};
|
|
12898
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
12505
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$a(_objectSpread$a({}, props), customersProps));
|
|
12899
12506
|
};
|
|
12900
12507
|
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
12901
12508
|
return WithCustomerGroupsPlatformLimits;
|
|
@@ -13044,17 +12651,17 @@ const messages$a = reactIntl.defineMessages({
|
|
|
13044
12651
|
});
|
|
13045
12652
|
var messages$b = messages$a;
|
|
13046
12653
|
|
|
13047
|
-
function ownKeys$
|
|
13048
|
-
function _objectSpread$
|
|
13049
|
-
var _ref$
|
|
12654
|
+
function ownKeys$9(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12655
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$9(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$9(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12656
|
+
var _ref$2 = {
|
|
13050
12657
|
name: "1rk22b8",
|
|
13051
12658
|
styles: "font-size:0.9rem;font-weight:bold"
|
|
13052
12659
|
} ;
|
|
13053
12660
|
const LabelRange = _ref2 => {
|
|
13054
12661
|
let type = _ref2.type;
|
|
13055
12662
|
return jsxRuntime.jsx("label", {
|
|
13056
|
-
css: _ref$
|
|
13057
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12663
|
+
css: _ref$2,
|
|
12664
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$9({}, messages$b[type]))
|
|
13058
12665
|
});
|
|
13059
12666
|
};
|
|
13060
12667
|
LabelRange.displayName = 'LabelRange';
|
|
@@ -13069,8 +12676,8 @@ var messages$9 = reactIntl.defineMessages({
|
|
|
13069
12676
|
});
|
|
13070
12677
|
|
|
13071
12678
|
const _excluded = ["isChecked"];
|
|
13072
|
-
function ownKeys$
|
|
13073
|
-
function _objectSpread$
|
|
12679
|
+
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; }
|
|
12680
|
+
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; }
|
|
13074
12681
|
const MissingValueField = _ref => {
|
|
13075
12682
|
let _ref$isChecked = _ref.isChecked,
|
|
13076
12683
|
isChecked = _ref$isChecked === void 0 ? false : _ref$isChecked,
|
|
@@ -13079,7 +12686,7 @@ const MissingValueField = _ref => {
|
|
|
13079
12686
|
name: "missing-value",
|
|
13080
12687
|
isChecked: isChecked,
|
|
13081
12688
|
onChange: props.onChange,
|
|
13082
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
12689
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$8({}, messages$9.label))
|
|
13083
12690
|
});
|
|
13084
12691
|
};
|
|
13085
12692
|
var MissingValueField$1 = MissingValueField;
|
|
@@ -13097,8 +12704,8 @@ var messages$8 = reactIntl.defineMessages({
|
|
|
13097
12704
|
}
|
|
13098
12705
|
});
|
|
13099
12706
|
|
|
13100
|
-
function ownKeys$
|
|
13101
|
-
function _objectSpread$
|
|
12707
|
+
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; }
|
|
12708
|
+
function _objectSpread$7(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$7(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$7(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
13102
12709
|
const IS_MULTI_VALUE_FLAG = '?isMulti=true';
|
|
13103
12710
|
const MultiValueSelectorDropdown = props => {
|
|
13104
12711
|
if (!props.isOpen) return null;
|
|
@@ -13110,7 +12717,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
13110
12717
|
css: /*#__PURE__*/react$1.css("padding:", uiKit.designTokens.spacingS, ";&:hover{background-color:", uiKit.designTokens.colorNeutral95, ";border-radius:", uiKit.designTokens.borderRadiusForInput, ";}" + ("" ), "" ),
|
|
13111
12718
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
13112
12719
|
truncate: true,
|
|
13113
|
-
intlMessage: _objectSpread$
|
|
12720
|
+
intlMessage: _objectSpread$7(_objectSpread$7({}, messages$8.filterWholeInput), {}, {
|
|
13114
12721
|
values: {
|
|
13115
12722
|
values: `"${props.value}"`
|
|
13116
12723
|
}
|
|
@@ -13121,7 +12728,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
13121
12728
|
css: /*#__PURE__*/react$1.css("padding:", uiKit.designTokens.spacingS, ";&:hover{background-color:", uiKit.designTokens.colorNeutral95, ";border-bottom-left-radius:", uiKit.designTokens.borderRadiusForInput, ";border-bottom-right-radius:", uiKit.designTokens.borderRadiusForInput, ";}" + ("" ), "" ),
|
|
13122
12729
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
13123
12730
|
truncate: true,
|
|
13124
|
-
intlMessage: _objectSpread$
|
|
12731
|
+
intlMessage: _objectSpread$7(_objectSpread$7({}, messages$8.filterSeparateValues), {}, {
|
|
13125
12732
|
values: {
|
|
13126
12733
|
values: `"${props.multiValue.join('", "')}"` || props.value
|
|
13127
12734
|
}
|
|
@@ -13139,7 +12746,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
13139
12746
|
});
|
|
13140
12747
|
};
|
|
13141
12748
|
MultiValueSelectorDropdown.displayName = 'MultiValueSelectorDropdown';
|
|
13142
|
-
var _ref = {
|
|
12749
|
+
var _ref$1 = {
|
|
13143
12750
|
name: "bjn8wh",
|
|
13144
12751
|
styles: "position:relative"
|
|
13145
12752
|
} ;
|
|
@@ -13213,7 +12820,7 @@ const MultiValueSearchInput = props => {
|
|
|
13213
12820
|
clearRunningTooltipTimer();
|
|
13214
12821
|
});
|
|
13215
12822
|
return jsxRuntime.jsxs("div", {
|
|
13216
|
-
css: _ref,
|
|
12823
|
+
css: _ref$1,
|
|
13217
12824
|
children: [jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
13218
12825
|
size: "s",
|
|
13219
12826
|
children: jsxRuntime.jsx(uiKit.SearchTextInput, {
|
|
@@ -13237,10 +12844,10 @@ const MultiValueSearchInput = props => {
|
|
|
13237
12844
|
MultiValueSearchInput.displayName = 'MultiValueSearchInput';
|
|
13238
12845
|
var MultiValueSearchInput$1 = MultiValueSearchInput;
|
|
13239
12846
|
|
|
13240
|
-
function ownKeys$
|
|
13241
|
-
function _objectSpread$
|
|
13242
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13243
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
12847
|
+
function ownKeys$6(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12848
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$6(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12849
|
+
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)); }
|
|
12850
|
+
function _isNativeReflectConstruct$1() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$1 = function () { return !!t; })(); }
|
|
13244
12851
|
Cleave__default["default"].displayName = 'Cleave';
|
|
13245
12852
|
|
|
13246
12853
|
// only allow values of type Number or values that are nil (null or undefined)
|
|
@@ -13253,7 +12860,7 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
13253
12860
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
13254
12861
|
args[_key] = arguments[_key];
|
|
13255
12862
|
}
|
|
13256
|
-
_this = _callSuper(this, NumericFormatInput, [...args]);
|
|
12863
|
+
_this = _callSuper$1(this, NumericFormatInput, [...args]);
|
|
13257
12864
|
_this.state = {
|
|
13258
12865
|
parsedValue: _this.props.value
|
|
13259
12866
|
};
|
|
@@ -13298,7 +12905,7 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
13298
12905
|
value: function render() {
|
|
13299
12906
|
const separators = getSeparatorsForLocale(this.props.numberFormat);
|
|
13300
12907
|
const dataAttributes = filterDataAttributes(this.props);
|
|
13301
|
-
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$
|
|
12908
|
+
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$6({
|
|
13302
12909
|
placeholder: this.props.placeholder,
|
|
13303
12910
|
htmlRef: this.registerInputRef,
|
|
13304
12911
|
options: {
|
|
@@ -13371,6 +12978,152 @@ const withPropsForMoney = ownProps => ownProps.numberFormatType === 'money' ? {
|
|
|
13371
12978
|
} : {};
|
|
13372
12979
|
var numericFormatInput = withProps$1(withPropsForMoney)(NumericFormatInput);
|
|
13373
12980
|
|
|
12981
|
+
const getTextareaStyles = props => /*#__PURE__*/react$1.css("transition:0.2s ease;border-radius:", designSystem.designTokens.borderRadiusForInput, ";border-style:solid;border-width:1px;color:", designSystem.designTokens.colorSolid, ";font-weight:", designSystem.designTokens.fontWeight500, ";font-size:", designSystem.designTokens.fontSize10, ";font-family:", designSystem.designTokens.fontFamily, ";padding:", designSystem.designTokens.spacingS, " ", designSystem.designTokens.spacingM, ";outline:none;box-shadow:none;appearance:none;width:100%;min-height:", designSystem.designTokens.heightForInput, ";resize:vertical;", props.style === 'primary' && /*#__PURE__*/react$1.css("border-color:", designSystem.designTokens.colorNeutral, ";background-color:", designSystem.designTokens.colorSurface, ";" + ("" ), "" ), " ", props.style === 'secondary' && /*#__PURE__*/react$1.css("background-color:", designSystem.designTokens.colorNeutral95, ";border-color:", designSystem.designTokens.colorSurface, ";" + ("" ), "" ), " ", props.disabled && /*#__PURE__*/react$1.css("cursor:not-allowed;background-color:", designSystem.designTokens.colorAccent98, ";color:", designSystem.designTokens.colorSolid, ";opacity:1;" + ("" ), "" ), " ", !props.isValid && /*#__PURE__*/react$1.css("border-color:", designSystem.designTokens.colorError, ";border:1px solid;" + ("" ), "" ), ";" + ("" ), "" );
|
|
12982
|
+
var _ref = {
|
|
12983
|
+
name: "7g7czh",
|
|
12984
|
+
styles: "border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0"
|
|
12985
|
+
} ;
|
|
12986
|
+
const getInputStyles = props => /*#__PURE__*/react$1.css("transition:0.2s ease;border-radius:", designSystem.designTokens.borderRadiusForInput, ";border-style:solid;border-width:1px;color:", designSystem.designTokens.colorSolid, ";font-weight:", designSystem.designTokens.fontWeight500, ";font-size:", designSystem.designTokens.fontSize10, ";font-family:", designSystem.designTokens.fontFamily, ";padding:", designSystem.designTokens.spacingS, " ", designSystem.designTokens.spacingM, ";outline:none;box-shadow:none;appearance:none;width:100%;min-height:", designSystem.designTokens.heightForInput, ";", props.style === 'primary' && /*#__PURE__*/react$1.css("border-color:", designSystem.designTokens.colorNeutral, ";background-color:", designSystem.designTokens.colorSurface, ";" + ("" ), "" ), " ", props.style === 'secondary' && /*#__PURE__*/react$1.css("background-color:", designSystem.designTokens.colorNeutral95, ";border-color:", designSystem.designTokens.colorSurface, ";" + ("" ), "" ), " ", props.disabled && /*#__PURE__*/react$1.css("cursor:not-allowed;background-color:", designSystem.designTokens.colorAccent98, ";color:", designSystem.designTokens.colorSolid, ";opacity:1;" + ("" ), "" ), " ", !props.isValid && /*#__PURE__*/react$1.css("border-color:", designSystem.designTokens.colorError, "!important;border:1px solid;" + ("" ), "" ), " ", props.isGranular && _ref, ";" + ("" ), "" );
|
|
12987
|
+
|
|
12988
|
+
function ownKeys$5(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12989
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$5(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$5(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12990
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12991
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
12992
|
+
let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
12993
|
+
function ThrottledField() {
|
|
12994
|
+
var _this;
|
|
12995
|
+
_classCallCheck(this, ThrottledField);
|
|
12996
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
12997
|
+
args[_key] = arguments[_key];
|
|
12998
|
+
}
|
|
12999
|
+
_this = _callSuper(this, ThrottledField, [...args]);
|
|
13000
|
+
_this.state = {
|
|
13001
|
+
draftValue: '',
|
|
13002
|
+
prevValue: ''
|
|
13003
|
+
};
|
|
13004
|
+
_this.clearPendingUpdates = () => {
|
|
13005
|
+
clearTimeout(_this.changeTimeout);
|
|
13006
|
+
clearTimeout(_this.blurTimeout);
|
|
13007
|
+
_this.changeTimeout = null;
|
|
13008
|
+
_this.blurTimeout = null;
|
|
13009
|
+
};
|
|
13010
|
+
_this.handleChange = event => {
|
|
13011
|
+
// The `SyntheticEvent` is pooled by default for perf reasons.
|
|
13012
|
+
// See https://facebook.github.io/react/docs/events.html#event-pooling
|
|
13013
|
+
// To access the event in an async way we need to persist it.
|
|
13014
|
+
event.persist();
|
|
13015
|
+
_this.setState({
|
|
13016
|
+
draftValue: event.target.value
|
|
13017
|
+
});
|
|
13018
|
+
_this.doDelayedUpdate(_this.props.onChange, event, 'change');
|
|
13019
|
+
};
|
|
13020
|
+
_this.handleEnter = event => {
|
|
13021
|
+
if (event.keyCode !== 13) return;
|
|
13022
|
+
if (_this.changeTimeout) {
|
|
13023
|
+
// Since there are still are some pending updates that are not sent to the
|
|
13024
|
+
// parent yet we need to call the update here explicitly and clear the
|
|
13025
|
+
// pending updates
|
|
13026
|
+
_this.props.onChange({
|
|
13027
|
+
target: {
|
|
13028
|
+
value: _this.state.draftValue
|
|
13029
|
+
}
|
|
13030
|
+
});
|
|
13031
|
+
// we can savely clear the timeout and thus abort all pending changes
|
|
13032
|
+
// because we just update the parent with the current state
|
|
13033
|
+
clearTimeout(_this.changeTimeout);
|
|
13034
|
+
_this.changeTimeout = null;
|
|
13035
|
+
}
|
|
13036
|
+
_this.props.onEnter(_this.state.draftValue);
|
|
13037
|
+
};
|
|
13038
|
+
_this.handleBlur = event => {
|
|
13039
|
+
// The `SyntheticEvent` is pooled by default for perf reasons.
|
|
13040
|
+
// See https://facebook.github.io/react/docs/events.html#event-pooling
|
|
13041
|
+
// To access the event in an async way we need to persist it.
|
|
13042
|
+
if (_this.props.onBlurValue) {
|
|
13043
|
+
event.persist();
|
|
13044
|
+
_this.doDelayedUpdate(e => _this.props.onBlurValue(e.target.value), event, 'blur');
|
|
13045
|
+
}
|
|
13046
|
+
};
|
|
13047
|
+
_this.doDelayedUpdate = (updateFunction, event, eventType) => {
|
|
13048
|
+
const self = _this;
|
|
13049
|
+
const timeoutKey = `${eventType}Timeout`;
|
|
13050
|
+
// TODO: can't we just use one variable?
|
|
13051
|
+
clearTimeout(_this[timeoutKey]);
|
|
13052
|
+
_this[timeoutKey] = _setTimeout__default["default"](() => {
|
|
13053
|
+
updateFunction.call(self, event);
|
|
13054
|
+
_this[timeoutKey] = null;
|
|
13055
|
+
}, _this.props.throttleMS);
|
|
13056
|
+
};
|
|
13057
|
+
return _this;
|
|
13058
|
+
}
|
|
13059
|
+
_inherits(ThrottledField, _PureComponent);
|
|
13060
|
+
return _createClass(ThrottledField, [{
|
|
13061
|
+
key: "componentWillUnmount",
|
|
13062
|
+
value: function componentWillUnmount() {
|
|
13063
|
+
this.clearPendingUpdates();
|
|
13064
|
+
}
|
|
13065
|
+
}, {
|
|
13066
|
+
key: "render",
|
|
13067
|
+
value: function render() {
|
|
13068
|
+
const commonProps = _objectSpread$5(_objectSpread$5({
|
|
13069
|
+
value: this.state.draftValue,
|
|
13070
|
+
autoComplete: this.props.autoComplete,
|
|
13071
|
+
onChange: this.handleChange,
|
|
13072
|
+
onBlur: this.handleBlur,
|
|
13073
|
+
disabled: this.props.disabled,
|
|
13074
|
+
name: this.props.name,
|
|
13075
|
+
placeholder: this.props.placeholder,
|
|
13076
|
+
autoFocus: this.props.autoFocus
|
|
13077
|
+
}, this.props.onEnter ? {
|
|
13078
|
+
onKeyDown: this.handleEnter
|
|
13079
|
+
} : {}), filterDataAttributes(this.props));
|
|
13080
|
+
const inputId = `throttled-field-${this.props.name}`;
|
|
13081
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
13082
|
+
children: [jsxRuntime.jsx(uiKit.AccessibleHidden, {
|
|
13083
|
+
children: jsxRuntime.jsx("label", {
|
|
13084
|
+
htmlFor: inputId,
|
|
13085
|
+
children: this.props.label
|
|
13086
|
+
})
|
|
13087
|
+
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$5(_objectSpread$5({}, commonProps), {}, {
|
|
13088
|
+
id: inputId,
|
|
13089
|
+
css: getTextareaStyles(this.props),
|
|
13090
|
+
rows: 1,
|
|
13091
|
+
maxRows: this.props.autoSize ? undefined : 1,
|
|
13092
|
+
cacheMeasurements: true
|
|
13093
|
+
})) : jsxRuntime.jsx("input", _objectSpread$5(_objectSpread$5({}, commonProps), {}, {
|
|
13094
|
+
id: inputId,
|
|
13095
|
+
ref: this.props.inputRef,
|
|
13096
|
+
type: this.props.as,
|
|
13097
|
+
css: getInputStyles(this.props)
|
|
13098
|
+
}))]
|
|
13099
|
+
});
|
|
13100
|
+
}
|
|
13101
|
+
}], [{
|
|
13102
|
+
key: "getDerivedStateFromProps",
|
|
13103
|
+
value: function getDerivedStateFromProps(nextProps, prevState) {
|
|
13104
|
+
if (nextProps.value !== prevState.prevValue) {
|
|
13105
|
+
return {
|
|
13106
|
+
draftValue: nextProps.value || nextProps.value === 0 ? nextProps.value : '',
|
|
13107
|
+
prevValue: nextProps.value
|
|
13108
|
+
};
|
|
13109
|
+
}
|
|
13110
|
+
return null;
|
|
13111
|
+
}
|
|
13112
|
+
}]);
|
|
13113
|
+
}(React.PureComponent);
|
|
13114
|
+
ThrottledField.displayName = 'ThrottledField';
|
|
13115
|
+
ThrottledField.defaultProps = {
|
|
13116
|
+
as: 'text',
|
|
13117
|
+
style: 'secondary',
|
|
13118
|
+
throttleMS: 300,
|
|
13119
|
+
isValid: true,
|
|
13120
|
+
disabled: false,
|
|
13121
|
+
autoSize: true,
|
|
13122
|
+
autoFocus: false,
|
|
13123
|
+
label: 'Throttled field'
|
|
13124
|
+
};
|
|
13125
|
+
var ThrottledField$1 = ThrottledField;
|
|
13126
|
+
|
|
13374
13127
|
/**
|
|
13375
13128
|
* @param mixed value
|
|
13376
13129
|
* @param String definitionName
|
|
@@ -14757,7 +14510,6 @@ function withPendingRequests() {
|
|
|
14757
14510
|
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 } } } };
|
|
14758
14511
|
|
|
14759
14512
|
exports.BooleanField = booleanField;
|
|
14760
|
-
exports.Button = Button$1;
|
|
14761
14513
|
exports.CUSTOM_FIELD_TYPES = CUSTOM_FIELD_TYPES;
|
|
14762
14514
|
exports.Carousel = Carousel$1;
|
|
14763
14515
|
exports.CartDiscountReferenceSearch = CartDiscountReferenceSearch;
|
|
@@ -14777,6 +14529,7 @@ exports.CustomerGroupPickerInput = CustomerGroupPickerInput$1;
|
|
|
14777
14529
|
exports.DefaultPageSizes = DefaultPageSizes;
|
|
14778
14530
|
exports.Divider = Divider;
|
|
14779
14531
|
exports.EMAIL_REGEX = EMAIL_REGEX;
|
|
14532
|
+
exports.FILTER_TYPES = FILTER_TYPES;
|
|
14780
14533
|
exports.FileInput = FileInput$1;
|
|
14781
14534
|
exports.FormattedDateTime = FormattedDateTime$1;
|
|
14782
14535
|
exports.FormattedLocalizedString = FormattedLocalizedString;
|
|
@@ -14801,7 +14554,6 @@ exports.RecurrentIntervalPicker = RecurrentIntervalPicker$1;
|
|
|
14801
14554
|
exports.RequestCache = RequestCache$1;
|
|
14802
14555
|
exports.RequiredIndicator = RequiredIndicator$1;
|
|
14803
14556
|
exports.ScrollToFieldError = ScrollToFieldError$1;
|
|
14804
|
-
exports.SearchInput = searchInput;
|
|
14805
14557
|
exports.SelectableFieldSearchInput = SelectableFieldSearchInput$1;
|
|
14806
14558
|
exports.StoreSelectField = StoreSelectField$1;
|
|
14807
14559
|
exports.StoreSelectInput = StoreSelectInput$1;
|
|
@@ -14924,7 +14676,6 @@ exports.resolveStatusType = resolveStatusType;
|
|
|
14924
14676
|
exports.safelyAddFallback = safelyAddFallback;
|
|
14925
14677
|
exports.sanitize = sanitize;
|
|
14926
14678
|
exports.searchCategories = searchCategories;
|
|
14927
|
-
exports.searchInputMessages = messages$P;
|
|
14928
14679
|
exports.setDisplayName = setDisplayName$1;
|
|
14929
14680
|
exports.setToArray = setToArray;
|
|
14930
14681
|
exports.shallowEqual = shallowEqual;
|