@commercetools-frontend/experimental-components 6.3.1 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commercetools-frontend-experimental-components.cjs.dev.js +350 -235
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +350 -235
- package/dist/commercetools-frontend-experimental-components.esm.js +350 -235
- package/dist/styles.css +24 -23
- package/package.json +26 -24
|
@@ -165,6 +165,8 @@ const INTERVALS_IN_SECONDS = {
|
|
|
165
165
|
};
|
|
166
166
|
const EXCLUDING_PRODUCTS = 'excludingProducts';
|
|
167
167
|
const PRODUCT_TAILORING_FOR_ATTRIBUTES = 'productTailoringForAttributes';
|
|
168
|
+
const PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT = 'productTailoringForAttributesTypesOtherThanText';
|
|
169
|
+
const PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES = 'productTailoringForAttributesFallbackValues';
|
|
168
170
|
|
|
169
171
|
// TODO: apply a more robust solution to overlaying issues
|
|
170
172
|
const Z_INDEX_DROPDOWN = 30000;
|
|
@@ -182,7 +184,7 @@ var pickerMessages$1 = defineMessages({
|
|
|
182
184
|
}
|
|
183
185
|
});
|
|
184
186
|
|
|
185
|
-
var messages$
|
|
187
|
+
var messages$R = defineMessages({
|
|
186
188
|
noChannelsFound: {
|
|
187
189
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
188
190
|
description: 'The message to display when no channels were found',
|
|
@@ -266,7 +268,7 @@ const ChannelPickerInput = _ref => {
|
|
|
266
268
|
return inputValue.length === 0 && data.channels.total > 60 ? [...channels, getBottomOption()] : channels;
|
|
267
269
|
}).catch(error => {
|
|
268
270
|
setLoadingError(error);
|
|
269
|
-
onError(error);
|
|
271
|
+
onError && onError(error);
|
|
270
272
|
}), [loadOptions, convertChannelToOption, onError]);
|
|
271
273
|
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
272
274
|
const _useHandlers = useHandlers$1(onChange),
|
|
@@ -279,10 +281,10 @@ const ChannelPickerInput = _ref => {
|
|
|
279
281
|
}, [handleInternalInputChange]);
|
|
280
282
|
const isCurrentOptionLoadingFailed = Boolean(currentOption?.error);
|
|
281
283
|
useEffect(() => {
|
|
282
|
-
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
284
|
+
if (isCurrentOptionLoadingFailed && onError) onError(currentOption.error);
|
|
283
285
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
284
286
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
285
|
-
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$
|
|
287
|
+
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$R.noChannelsFound), [loadingError, formatMessage]);
|
|
286
288
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
287
289
|
return jsx(Constraints.Horizontal, {
|
|
288
290
|
max: "scale",
|
|
@@ -293,7 +295,7 @@ const ChannelPickerInput = _ref => {
|
|
|
293
295
|
children: jsx(AsyncSelectInput, {
|
|
294
296
|
id: name,
|
|
295
297
|
name: name,
|
|
296
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
298
|
+
placeholder: placeholder ?? formatMessage(messages$R.placeholder),
|
|
297
299
|
loadOptions: loadOptionsDebounced,
|
|
298
300
|
defaultOptions: true,
|
|
299
301
|
showOptionGroupDivider: true,
|
|
@@ -349,7 +351,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
349
351
|
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
350
352
|
var FormattedDateTime$1 = injectIntl(FormattedDateTime);
|
|
351
353
|
|
|
352
|
-
var messages$
|
|
354
|
+
var messages$Q = defineMessages({
|
|
353
355
|
noProductTypesFound: {
|
|
354
356
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
355
357
|
description: 'The message to display when no product types were found',
|
|
@@ -438,7 +440,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
438
440
|
children: jsx(AsyncSelectInput, {
|
|
439
441
|
id: name,
|
|
440
442
|
name: name,
|
|
441
|
-
placeholder: formatMessage(messages$
|
|
443
|
+
placeholder: formatMessage(messages$Q.placeholder),
|
|
442
444
|
loadOptions: loadOptionsDebounced,
|
|
443
445
|
defaultOptions: [],
|
|
444
446
|
isClearable: isClearable,
|
|
@@ -451,7 +453,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
451
453
|
onInputChange: handleInputChange,
|
|
452
454
|
onBlur: onBlur,
|
|
453
455
|
value: currentOption.data,
|
|
454
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
456
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$Q.noProductTypesFound),
|
|
455
457
|
hasError: hasError || isLoadingFailed,
|
|
456
458
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
457
459
|
menuPortalTarget: document.body,
|
|
@@ -467,7 +469,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
467
469
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
468
470
|
var ProductTypePickerInput$1 = ProductTypePickerInput;
|
|
469
471
|
|
|
470
|
-
var messages$
|
|
472
|
+
var messages$P = defineMessages({
|
|
471
473
|
noStatesFound: {
|
|
472
474
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
473
475
|
description: 'The message to display when no states were found',
|
|
@@ -551,7 +553,7 @@ const StatePickerInput = _ref => {
|
|
|
551
553
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
552
554
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
553
555
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
554
|
-
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$
|
|
556
|
+
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$P.noStatesFound), [loadingError, formatMessage]);
|
|
555
557
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
556
558
|
return jsx(Constraints.Horizontal, {
|
|
557
559
|
max: "scale",
|
|
@@ -563,7 +565,7 @@ const StatePickerInput = _ref => {
|
|
|
563
565
|
id: name,
|
|
564
566
|
name: name,
|
|
565
567
|
horizontalConstraint: "scale",
|
|
566
|
-
placeholder: formatMessage(messages$
|
|
568
|
+
placeholder: formatMessage(messages$P.placeholder),
|
|
567
569
|
loadOptions: loadOptionsDebounced,
|
|
568
570
|
defaultOptions: true,
|
|
569
571
|
showOptionGroupDivider: true,
|
|
@@ -620,7 +622,7 @@ const CustomFieldTooltip = _ref => {
|
|
|
620
622
|
};
|
|
621
623
|
var CustomFieldTooltip$1 = CustomFieldTooltip;
|
|
622
624
|
|
|
623
|
-
var messages$
|
|
625
|
+
var messages$O = defineMessages({
|
|
624
626
|
bottomOption: {
|
|
625
627
|
id: 'Products.Pickers.bottomOption',
|
|
626
628
|
description: 'The message to display at the end of the options menu',
|
|
@@ -632,7 +634,7 @@ function ownKeys$1p(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertyS
|
|
|
632
634
|
function _objectSpread$1p(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1p(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1p(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
633
635
|
const getBottomOption = formatMessage => ({
|
|
634
636
|
options: [{
|
|
635
|
-
label: formatMessage ? formatMessage(messages$
|
|
637
|
+
label: formatMessage ? formatMessage(messages$O.bottomOption) : messages$O.bottomOption,
|
|
636
638
|
isBottomOption: true,
|
|
637
639
|
isDisabled: true
|
|
638
640
|
}]
|
|
@@ -679,7 +681,7 @@ const useHandlers = onChange => {
|
|
|
679
681
|
};
|
|
680
682
|
var useHandlers$1 = useHandlers;
|
|
681
683
|
|
|
682
|
-
const _excluded$
|
|
684
|
+
const _excluded$e = ["extraWhere"];
|
|
683
685
|
function ownKeys$1n(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
684
686
|
function _objectSpread$1n(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1n(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1n(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
685
687
|
const constructPrefixSearchPredicate$1 = function () {
|
|
@@ -722,7 +724,7 @@ const useLoadOptions = _ref => {
|
|
|
722
724
|
}
|
|
723
725
|
const _ref2 = variables ?? {},
|
|
724
726
|
extraWhere = _ref2.extraWhere,
|
|
725
|
-
restVariables = _objectWithoutProperties(_ref2, _excluded$
|
|
727
|
+
restVariables = _objectWithoutProperties(_ref2, _excluded$e);
|
|
726
728
|
if (typeof extraWhere === 'string') {
|
|
727
729
|
where = where ? `(${where}) and ${variables.extraWhere}` : variables.extraWhere;
|
|
728
730
|
}
|
|
@@ -741,7 +743,7 @@ const useLoadOptions = _ref => {
|
|
|
741
743
|
};
|
|
742
744
|
var useLoadOptions$1 = useLoadOptions;
|
|
743
745
|
|
|
744
|
-
var FetchIndicesExist$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchIndicesExist" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indicesExist" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "products" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end:
|
|
746
|
+
var FetchIndicesExist$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchIndicesExist" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indicesExist" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "products" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 269, source: { body: "query FetchIndicesExist {\n indicesExist {\n products {\n searchableIndexExists\n newInProgress\n }\n productTypes {\n searchableIndexExists\n newInProgress\n }\n productSelections {\n searchableIndexExists\n newInProgress\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
745
747
|
const useExecuteGraphQLRequest = () => {
|
|
746
748
|
const apolloClient = useApolloClient$1();
|
|
747
749
|
return useCallback((query, variables, context, fetchPolicy) => {
|
|
@@ -1155,7 +1157,7 @@ ThrottledField.defaultProps = {
|
|
|
1155
1157
|
};
|
|
1156
1158
|
var ThrottledField$1 = ThrottledField;
|
|
1157
1159
|
|
|
1158
|
-
var messages$
|
|
1160
|
+
var messages$N = defineMessages({
|
|
1159
1161
|
buttonLabel: {
|
|
1160
1162
|
id: 'SearchInput.buttonLabel',
|
|
1161
1163
|
description: 'Label for "Search" button.',
|
|
@@ -1260,7 +1262,7 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
1260
1262
|
"data-testid": this.props.testId || 'search-input',
|
|
1261
1263
|
value: this.state.text,
|
|
1262
1264
|
label: this.props.label,
|
|
1263
|
-
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$
|
|
1265
|
+
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$N.placeholder),
|
|
1264
1266
|
inputRef: this.props.inputRef || this.setInputRef,
|
|
1265
1267
|
onChange: this.handleInputChange,
|
|
1266
1268
|
onEnter: this.handleEnter,
|
|
@@ -1929,7 +1931,7 @@ const usePersistedReminder = function () {
|
|
|
1929
1931
|
};
|
|
1930
1932
|
var usePersistedReminder$1 = usePersistedReminder;
|
|
1931
1933
|
|
|
1932
|
-
var messages$
|
|
1934
|
+
var messages$M = defineMessages({
|
|
1933
1935
|
profileUpdated: {
|
|
1934
1936
|
id: 'NotificationText.profileUpdated',
|
|
1935
1937
|
description: 'Label for the notification header',
|
|
@@ -1966,9 +1968,9 @@ const NotificationText = () => jsxs(Spacings.Stack, {
|
|
|
1966
1968
|
children: [jsx(Text.Body, {
|
|
1967
1969
|
as: "p",
|
|
1968
1970
|
isBold: true,
|
|
1969
|
-
intlMessage: messages$
|
|
1971
|
+
intlMessage: messages$M.profileUpdated
|
|
1970
1972
|
}), jsx(Text.Body, {
|
|
1971
|
-
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$
|
|
1973
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$M.addMoreInformation), {}, {
|
|
1972
1974
|
values: {
|
|
1973
1975
|
newline: getNewLine
|
|
1974
1976
|
}
|
|
@@ -1977,7 +1979,7 @@ const NotificationText = () => jsxs(Spacings.Stack, {
|
|
|
1977
1979
|
}), jsx(Spacings.Stack, {
|
|
1978
1980
|
scale: "xs",
|
|
1979
1981
|
children: jsx(Text.Body, {
|
|
1980
|
-
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$
|
|
1982
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$M.informationAndProfileLink), {}, {
|
|
1981
1983
|
values: {
|
|
1982
1984
|
newline: getNewLine,
|
|
1983
1985
|
link: getLinkToProfile
|
|
@@ -2102,7 +2104,7 @@ const useEventCallback = (fn, dependencies) => {
|
|
|
2102
2104
|
};
|
|
2103
2105
|
var useEventCallback$1 = useEventCallback;
|
|
2104
2106
|
|
|
2105
|
-
var messages$
|
|
2107
|
+
var messages$L = defineMessages({
|
|
2106
2108
|
fallbackHint: {
|
|
2107
2109
|
id: 'KeyFallback.fallbackHint',
|
|
2108
2110
|
description: 'key fallback for a specified resource key (e.g name)',
|
|
@@ -2126,7 +2128,7 @@ const useLocalizedKeyFallback = () => {
|
|
|
2126
2128
|
return values => {
|
|
2127
2129
|
if (!values.resource) return null;
|
|
2128
2130
|
const localizedString = values.resource[values.localizedStringFieldName];
|
|
2129
|
-
const fallbackHintWithKey = intl.formatMessage(messages$
|
|
2131
|
+
const fallbackHintWithKey = intl.formatMessage(messages$L.fallbackHint, {
|
|
2130
2132
|
key: values.resource.key
|
|
2131
2133
|
});
|
|
2132
2134
|
if (!localizedString) return fallbackHintWithKey;
|
|
@@ -3783,7 +3785,7 @@ function formatMoney$2(moneyValue, intl, options) {
|
|
|
3783
3785
|
}, options));
|
|
3784
3786
|
}
|
|
3785
3787
|
|
|
3786
|
-
var messages$
|
|
3788
|
+
var messages$K = defineMessages({
|
|
3787
3789
|
booleanYes: {
|
|
3788
3790
|
id: 'AttributeTypeFormats.boolean.yes',
|
|
3789
3791
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -3865,7 +3867,7 @@ const formatDateTime = _ref7 => {
|
|
|
3865
3867
|
const formatBoolean = _ref8 => {
|
|
3866
3868
|
let value = _ref8.value,
|
|
3867
3869
|
intl = _ref8.intl;
|
|
3868
|
-
return value ? intl.formatMessage(messages$
|
|
3870
|
+
return value ? intl.formatMessage(messages$K.booleanYes) : intl.formatMessage(messages$K.booleanNo);
|
|
3869
3871
|
};
|
|
3870
3872
|
const formatNilType = _ref9 => {
|
|
3871
3873
|
let value = _ref9.value,
|
|
@@ -4024,9 +4026,9 @@ const getPrefixSearchBounds = input => {
|
|
|
4024
4026
|
};
|
|
4025
4027
|
var getPrefixSearchBounds$1 = getPrefixSearchBounds;
|
|
4026
4028
|
|
|
4027
|
-
const _excluded$
|
|
4029
|
+
const _excluded$d = ["action"];
|
|
4028
4030
|
function ownKeys$15(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4029
|
-
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
4031
|
+
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var _context10, _context11; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context10 = ownKeys$15(Object(t), !0)).call(_context10, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context11 = ownKeys$15(Object(t))).call(_context11, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4030
4032
|
|
|
4031
4033
|
/**
|
|
4032
4034
|
* Checks if a value is a LocalizedString
|
|
@@ -4163,6 +4165,7 @@ const createAttributeTypeValue = attribute => {
|
|
|
4163
4165
|
const formatMoney = valueType => money => {
|
|
4164
4166
|
switch (valueType) {
|
|
4165
4167
|
case 'fixed':
|
|
4168
|
+
case 'fixedCart':
|
|
4166
4169
|
return {
|
|
4167
4170
|
[money.type]: _objectSpread$15({
|
|
4168
4171
|
centAmount: money.centAmount,
|
|
@@ -4194,6 +4197,7 @@ const convertChangeValueAction = actionPayload => {
|
|
|
4194
4197
|
absolute: ['money'],
|
|
4195
4198
|
absoluteCart: ['money', 'applicationMode'],
|
|
4196
4199
|
fixed: ['money'],
|
|
4200
|
+
fixedCart: ['money', 'applicationMode'],
|
|
4197
4201
|
giftLineItem: ['product', 'variantId', 'distributionChannel', 'supplyChannel', 'ResourceIdentifierInput']
|
|
4198
4202
|
};
|
|
4199
4203
|
const filteredValue = pick(actionPayload.value, possibleTypeKeys[valueType]);
|
|
@@ -4217,7 +4221,7 @@ const convertChangeValueAction = actionPayload => {
|
|
|
4217
4221
|
* as its dynamic content can not be typed in SDL for the mutation.
|
|
4218
4222
|
*/
|
|
4219
4223
|
const convertAction = (actionName, actionPayload) => {
|
|
4220
|
-
var _context3, _context4, _context5;
|
|
4224
|
+
var _context3, _context4, _context5, _context6, _context7;
|
|
4221
4225
|
const getNameFromPayload = payload => {
|
|
4222
4226
|
// changeName for `Organizations`
|
|
4223
4227
|
if (typeof payload.name === 'string') return payload;
|
|
@@ -4498,18 +4502,26 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4498
4502
|
return {
|
|
4499
4503
|
[actionName]: {
|
|
4500
4504
|
target: {
|
|
4501
|
-
[actionPayload.target.type]: omit(actionPayload.target, ['type', '__typename'])
|
|
4505
|
+
[actionPayload.target.type]: _objectSpread$15(_objectSpread$15(_objectSpread$15({}, omit(actionPayload.target, ['type', '__typename'])), actionPayload.target.triggerPattern && {
|
|
4506
|
+
triggerPattern: _mapInstanceProperty(_context6 = actionPayload.target.triggerPattern).call(_context6, pattern => ({
|
|
4507
|
+
[pattern.type]: omit(pattern, ['type', '__typename'])
|
|
4508
|
+
}))
|
|
4509
|
+
}), actionPayload.target.targetPattern && {
|
|
4510
|
+
targetPattern: _mapInstanceProperty(_context7 = actionPayload.target.targetPattern).call(_context7, pattern => ({
|
|
4511
|
+
[pattern.type]: omit(pattern, ['type', '__typename'])
|
|
4512
|
+
}))
|
|
4513
|
+
})
|
|
4502
4514
|
}
|
|
4503
4515
|
}
|
|
4504
4516
|
};
|
|
4505
4517
|
case 'addAddress':
|
|
4506
4518
|
case 'changeAddress':
|
|
4507
4519
|
{
|
|
4508
|
-
var
|
|
4520
|
+
var _context8;
|
|
4509
4521
|
const _ref3 = actionPayload.address?.custom || {},
|
|
4510
4522
|
_ref3$fields = _ref3.fields,
|
|
4511
4523
|
fields = _ref3$fields === void 0 ? {} : _ref3$fields;
|
|
4512
|
-
const customFields = isEmpty$3(fields) ? null : _mapInstanceProperty(
|
|
4524
|
+
const customFields = isEmpty$3(fields) ? null : _mapInstanceProperty(_context8 = _Object$entries(fields)).call(_context8, _ref4 => {
|
|
4513
4525
|
let _ref5 = _slicedToArray(_ref4, 2),
|
|
4514
4526
|
name = _ref5[0],
|
|
4515
4527
|
value = _ref5[1];
|
|
@@ -4534,13 +4546,13 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4534
4546
|
}
|
|
4535
4547
|
case 'setAddressCustomType':
|
|
4536
4548
|
{
|
|
4537
|
-
var
|
|
4549
|
+
var _context9;
|
|
4538
4550
|
const _ref6 = actionPayload || {},
|
|
4539
4551
|
addressId = _ref6.addressId,
|
|
4540
4552
|
_ref6$fields = _ref6.fields,
|
|
4541
4553
|
fields = _ref6$fields === void 0 ? {} : _ref6$fields,
|
|
4542
4554
|
type = _ref6.type;
|
|
4543
|
-
const customFields = isEmpty$3(fields) ? null : _mapInstanceProperty(
|
|
4555
|
+
const customFields = isEmpty$3(fields) ? null : _mapInstanceProperty(_context9 = _Object$entries(fields)).call(_context9, _ref7 => {
|
|
4544
4556
|
let _ref8 = _slicedToArray(_ref7, 2),
|
|
4545
4557
|
name = _ref8[0],
|
|
4546
4558
|
value = _ref8[1];
|
|
@@ -4568,7 +4580,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4568
4580
|
};
|
|
4569
4581
|
const createGraphQlUpdateActions = actions => _reduceInstanceProperty(actions).call(actions, (previousActions, _ref9) => {
|
|
4570
4582
|
let actionName = _ref9.action,
|
|
4571
|
-
actionPayload = _objectWithoutProperties(_ref9, _excluded$
|
|
4583
|
+
actionPayload = _objectWithoutProperties(_ref9, _excluded$d);
|
|
4572
4584
|
return [...previousActions, convertAction(actionName, actionPayload)];
|
|
4573
4585
|
}, []);
|
|
4574
4586
|
const extractErrorFromGraphQlResponse = graphQlResponse => {
|
|
@@ -4972,7 +4984,7 @@ function uniqueObjects(items) {
|
|
|
4972
4984
|
|
|
4973
4985
|
*/
|
|
4974
4986
|
|
|
4975
|
-
const messages$
|
|
4987
|
+
const messages$J = defineMessages({
|
|
4976
4988
|
unique: {
|
|
4977
4989
|
id: 'Validation.unique',
|
|
4978
4990
|
description: 'An error message to show if the field must be unique',
|
|
@@ -5014,7 +5026,7 @@ const messages$I = defineMessages({
|
|
|
5014
5026
|
defaultMessage: 'Invalid ID format. Please enter a valid ID.'
|
|
5015
5027
|
}
|
|
5016
5028
|
});
|
|
5017
|
-
var validationMessages = messages$
|
|
5029
|
+
var validationMessages = messages$J;
|
|
5018
5030
|
|
|
5019
5031
|
function getIndexesOfInvalidValues(values) {
|
|
5020
5032
|
let invalidValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
@@ -5270,7 +5282,7 @@ function ReferenceSearch(props) {
|
|
|
5270
5282
|
});
|
|
5271
5283
|
}
|
|
5272
5284
|
|
|
5273
|
-
const messages$
|
|
5285
|
+
const messages$H = defineMessages({
|
|
5274
5286
|
placeholder: {
|
|
5275
5287
|
id: 'CartDiscountReferenceSearch.placeholder',
|
|
5276
5288
|
description: 'Placeholder for search for a cart discount',
|
|
@@ -5297,7 +5309,7 @@ const messages$G = defineMessages({
|
|
|
5297
5309
|
defaultMessage: 'Enter search term'
|
|
5298
5310
|
}
|
|
5299
5311
|
});
|
|
5300
|
-
var messages$
|
|
5312
|
+
var messages$I = messages$H;
|
|
5301
5313
|
|
|
5302
5314
|
function ownKeys$11(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5303
5315
|
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$11(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$11(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -5322,7 +5334,7 @@ function Option$1(props) {
|
|
|
5322
5334
|
fallbackOrder: languages
|
|
5323
5335
|
})
|
|
5324
5336
|
}), jsxs(Text.Detail, {
|
|
5325
|
-
children: [formatMessage(messages$
|
|
5337
|
+
children: [formatMessage(messages$I.key), ": ", cartDiscount.key || NO_VALUE_FALLBACK]
|
|
5326
5338
|
})]
|
|
5327
5339
|
})
|
|
5328
5340
|
}));
|
|
@@ -5398,10 +5410,10 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5398
5410
|
onBlur: props.onBlur,
|
|
5399
5411
|
onChange: props.onChange,
|
|
5400
5412
|
value: returnNullIfEmpty(props.value),
|
|
5401
|
-
placeholderLabel: formatMessage(messages$
|
|
5402
|
-
searchPromptLabel: formatMessage(messages$
|
|
5403
|
-
noResultsLabel: formatMessage(messages$
|
|
5404
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5413
|
+
placeholderLabel: formatMessage(messages$I.placeholder),
|
|
5414
|
+
searchPromptLabel: formatMessage(messages$I.searchPrompt),
|
|
5415
|
+
noResultsLabel: formatMessage(messages$I.noResults),
|
|
5416
|
+
referenceIsMissingLabel: formatMessage(messages$I.isMissing),
|
|
5405
5417
|
mapItemToOption: mapItemToOption,
|
|
5406
5418
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5407
5419
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5411,7 +5423,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5411
5423
|
});
|
|
5412
5424
|
}
|
|
5413
5425
|
|
|
5414
|
-
const messages$
|
|
5426
|
+
const messages$F = defineMessages({
|
|
5415
5427
|
placeholder: {
|
|
5416
5428
|
id: 'CategoryReferenceSearch.placeholder',
|
|
5417
5429
|
description: 'Placeholder for search for a category',
|
|
@@ -5443,7 +5455,7 @@ const messages$E = defineMessages({
|
|
|
5443
5455
|
defaultMessage: 'Parent Category'
|
|
5444
5456
|
}
|
|
5445
5457
|
});
|
|
5446
|
-
var messages$
|
|
5458
|
+
var messages$G = messages$F;
|
|
5447
5459
|
|
|
5448
5460
|
function ownKeys$$(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5449
5461
|
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$$(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$$(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -5468,7 +5480,7 @@ function Option(props) {
|
|
|
5468
5480
|
fallbackOrder: languages
|
|
5469
5481
|
})
|
|
5470
5482
|
}), category.parent && jsx(Text.Detail, {
|
|
5471
|
-
children: `${formatMessage(messages$
|
|
5483
|
+
children: `${formatMessage(messages$G.parentCategory)}: ${formatLocalizedString(category.parent, {
|
|
5472
5484
|
key: 'name',
|
|
5473
5485
|
locale: language,
|
|
5474
5486
|
fallbackOrder: languages
|
|
@@ -5480,7 +5492,7 @@ function Option(props) {
|
|
|
5480
5492
|
fallbackOrder: languages
|
|
5481
5493
|
})}`
|
|
5482
5494
|
}), category.externalId && jsx(Text.Detail, {
|
|
5483
|
-
children: `${formatMessage(messages$
|
|
5495
|
+
children: `${formatMessage(messages$G.externalId)}: ${category.externalId || NO_VALUE_FALLBACK}`
|
|
5484
5496
|
})]
|
|
5485
5497
|
})
|
|
5486
5498
|
}));
|
|
@@ -5528,10 +5540,10 @@ function CategoryReferenceSearch(props) {
|
|
|
5528
5540
|
onBlur: props.onBlur,
|
|
5529
5541
|
onChange: props.onChange,
|
|
5530
5542
|
value: props.value,
|
|
5531
|
-
placeholderLabel: formatMessage(messages$
|
|
5532
|
-
searchPromptLabel: formatMessage(messages$
|
|
5533
|
-
noResultsLabel: formatMessage(messages$
|
|
5534
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5543
|
+
placeholderLabel: formatMessage(messages$G.placeholder),
|
|
5544
|
+
searchPromptLabel: formatMessage(messages$G.searchPrompt),
|
|
5545
|
+
noResultsLabel: formatMessage(messages$G.noResults),
|
|
5546
|
+
referenceIsMissingLabel: formatMessage(messages$G.isMissing),
|
|
5535
5547
|
mapItemToOption: mapItemToOption,
|
|
5536
5548
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5537
5549
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5556,6 +5568,7 @@ function useCachedCategoryOptions(ids) {
|
|
|
5556
5568
|
}]));
|
|
5557
5569
|
}
|
|
5558
5570
|
|
|
5571
|
+
const _excluded$c = ["type"];
|
|
5559
5572
|
function ownKeys$Z(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5560
5573
|
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(_context = ownKeys$Z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$Z(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5561
5574
|
var styles$g = {
|
|
@@ -5583,7 +5596,10 @@ var styles$g = {
|
|
|
5583
5596
|
"save-alt": "button-module__save-alt___6iHMF button-module__save___1-KXp button-module__confirm___-W92x button-module__button___1OzVf button-module__alt___Z6PWx",
|
|
5584
5597
|
"add-button": "button-module__add-button___1f093"
|
|
5585
5598
|
};
|
|
5586
|
-
const Button =
|
|
5599
|
+
const Button = _ref => {
|
|
5600
|
+
let _ref$type = _ref.type,
|
|
5601
|
+
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
5602
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
5587
5603
|
const className = props.className,
|
|
5588
5604
|
onClick = props.onClick,
|
|
5589
5605
|
isDisabled = props.isDisabled,
|
|
@@ -5593,7 +5609,7 @@ const Button = props => {
|
|
|
5593
5609
|
const dataProps = filterDataAttributes(props);
|
|
5594
5610
|
return jsx("button", _objectSpread$Z(_objectSpread$Z({
|
|
5595
5611
|
onClick: isDisabled ? null : onClick,
|
|
5596
|
-
type:
|
|
5612
|
+
type: type,
|
|
5597
5613
|
className: classnames(styles$g.button, isDisabled ? styles$g.disabled : null, className),
|
|
5598
5614
|
disabled: isDisabled,
|
|
5599
5615
|
"aria-label": props['aria-label']
|
|
@@ -5602,12 +5618,9 @@ const Button = props => {
|
|
|
5602
5618
|
}));
|
|
5603
5619
|
};
|
|
5604
5620
|
Button.displayName = 'Button';
|
|
5605
|
-
Button.defaultProps = {
|
|
5606
|
-
type: 'button'
|
|
5607
|
-
};
|
|
5608
5621
|
var Button$1 = Button;
|
|
5609
5622
|
|
|
5610
|
-
var messages$
|
|
5623
|
+
var messages$E = defineMessages({
|
|
5611
5624
|
chooseFile: {
|
|
5612
5625
|
id: 'ButtonFileInput.chooseFile',
|
|
5613
5626
|
description: 'The label text of the field for upload local file',
|
|
@@ -5615,34 +5628,39 @@ var messages$D = defineMessages({
|
|
|
5615
5628
|
}
|
|
5616
5629
|
});
|
|
5617
5630
|
|
|
5631
|
+
const _excluded$b = ["children", "allowMultiple", "acceptTypes"];
|
|
5618
5632
|
function ownKeys$Y(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5619
5633
|
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(_context = ownKeys$Y(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$Y(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5620
5634
|
var styles$f = {
|
|
5621
5635
|
"button": "file-input-module__button___2KypN",
|
|
5622
5636
|
"input": "file-input-module__input___3MP4D"
|
|
5623
5637
|
};
|
|
5624
|
-
const FileInput =
|
|
5625
|
-
children
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5638
|
+
const FileInput = _ref => {
|
|
5639
|
+
let _ref$children = _ref.children,
|
|
5640
|
+
children = _ref$children === void 0 ? jsx(FormattedMessage, _objectSpread$Y({}, messages$E.chooseFile)) : _ref$children,
|
|
5641
|
+
_ref$allowMultiple = _ref.allowMultiple,
|
|
5642
|
+
allowMultiple = _ref$allowMultiple === void 0 ? false : _ref$allowMultiple,
|
|
5643
|
+
_ref$acceptTypes = _ref.acceptTypes,
|
|
5644
|
+
acceptTypes = _ref$acceptTypes === void 0 ? 'image/png,image/jpeg,image/gif' : _ref$acceptTypes,
|
|
5645
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
5646
|
+
return jsx("label", {
|
|
5647
|
+
children: jsxs("span", {
|
|
5648
|
+
className: styles$f.button,
|
|
5649
|
+
children: [jsx("input", {
|
|
5650
|
+
className: styles$f.input,
|
|
5651
|
+
type: "file",
|
|
5652
|
+
accept: acceptTypes,
|
|
5653
|
+
name: props.name,
|
|
5654
|
+
onChange: props.onChange,
|
|
5655
|
+
multiple: allowMultiple
|
|
5656
|
+
}), children]
|
|
5657
|
+
})
|
|
5658
|
+
});
|
|
5642
5659
|
};
|
|
5660
|
+
FileInput.displayName = 'FileInput';
|
|
5643
5661
|
var FileInput$1 = FileInput;
|
|
5644
5662
|
|
|
5645
|
-
var messages$
|
|
5663
|
+
var messages$D = defineMessages({
|
|
5646
5664
|
countriesBasicSelectPlaceholder: {
|
|
5647
5665
|
id: 'CountriesPicker.countriesBasicSelectPlaceholder',
|
|
5648
5666
|
description: 'Placeholder of the basic field for countries',
|
|
@@ -5663,7 +5681,7 @@ var messages$C = defineMessages({
|
|
|
5663
5681
|
function ownKeys$X(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5664
5682
|
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context4 = ownKeys$X(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context5 = ownKeys$X(Object(t))).call(_context5, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5665
5683
|
const emptyCountryOption = intl => [{
|
|
5666
|
-
label: intl.formatMessage(messages$
|
|
5684
|
+
label: intl.formatMessage(messages$D.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
5667
5685
|
value: undefined,
|
|
5668
5686
|
isDisabled: true
|
|
5669
5687
|
}];
|
|
@@ -5705,7 +5723,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
5705
5723
|
var _context3;
|
|
5706
5724
|
return _findInstanceProperty(_context3 = props.options).call(_context3, country => country.value === countryCode);
|
|
5707
5725
|
}),
|
|
5708
|
-
placeholder: intl.formatMessage(messages$
|
|
5726
|
+
placeholder: intl.formatMessage(messages$D.countriesAsyncSelectPlaceholder),
|
|
5709
5727
|
loadOptions: handleLoadOptions,
|
|
5710
5728
|
onChange: onOptionChange,
|
|
5711
5729
|
isDisabled: props.isDisabled,
|
|
@@ -5725,7 +5743,7 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
5725
5743
|
value: props.value,
|
|
5726
5744
|
isRequired: props.isRequired,
|
|
5727
5745
|
description: props.description,
|
|
5728
|
-
placeholder: intl.formatMessage(messages$
|
|
5746
|
+
placeholder: intl.formatMessage(messages$D.countriesBasicSelectPlaceholder),
|
|
5729
5747
|
options: props.options,
|
|
5730
5748
|
onChange: props.onChange,
|
|
5731
5749
|
isDisabled: props.isDisabled,
|
|
@@ -5737,22 +5755,31 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
5737
5755
|
|
|
5738
5756
|
const COUNTRIES_ASYNC_LOADING_LIMIT = 60;
|
|
5739
5757
|
|
|
5758
|
+
const _excluded$a = ["countriesAsyncLoadingLimit", "isMulti", "isRequired", "hasWarning"];
|
|
5740
5759
|
function ownKeys$W(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5741
5760
|
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(_context = ownKeys$W(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$W(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5742
|
-
function CountriesPicker(
|
|
5743
|
-
|
|
5761
|
+
function CountriesPicker(_ref) {
|
|
5762
|
+
let _ref$countriesAsyncLo = _ref.countriesAsyncLoadingLimit,
|
|
5763
|
+
countriesAsyncLoadingLimit = _ref$countriesAsyncLo === void 0 ? COUNTRIES_ASYNC_LOADING_LIMIT : _ref$countriesAsyncLo,
|
|
5764
|
+
_ref$isMulti = _ref.isMulti,
|
|
5765
|
+
isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti,
|
|
5766
|
+
_ref$isRequired = _ref.isRequired,
|
|
5767
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
5768
|
+
_ref$hasWarning = _ref.hasWarning,
|
|
5769
|
+
hasWarning = _ref$hasWarning === void 0 ? false : _ref$hasWarning,
|
|
5770
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
5771
|
+
const CustomCountriesPicker = props.options?.length <= countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
|
|
5744
5772
|
return jsx(Spacings.Stack, {
|
|
5745
|
-
children: jsx(CustomCountriesPicker, _objectSpread$W({
|
|
5773
|
+
children: jsx(CustomCountriesPicker, _objectSpread$W({
|
|
5774
|
+
countriesAsyncLoadingLimit: countriesAsyncLoadingLimit,
|
|
5775
|
+
isMulti: isMulti,
|
|
5776
|
+
isRequired: isRequired,
|
|
5777
|
+
hasWarning: hasWarning
|
|
5778
|
+
}, props))
|
|
5746
5779
|
});
|
|
5747
5780
|
}
|
|
5748
|
-
CountriesPicker.defaultProps = {
|
|
5749
|
-
countriesAsyncLoadingLimit: COUNTRIES_ASYNC_LOADING_LIMIT,
|
|
5750
|
-
isMulti: false,
|
|
5751
|
-
isRequired: false,
|
|
5752
|
-
hasWarning: false
|
|
5753
|
-
};
|
|
5754
5781
|
|
|
5755
|
-
var messages$
|
|
5782
|
+
var messages$C = defineMessages({
|
|
5756
5783
|
noCustomerGroupsFound: {
|
|
5757
5784
|
id: 'Prices.CustomerGroupPickerInput.noCustomerGroupsFound',
|
|
5758
5785
|
description: 'The message to display when no customer groups were found',
|
|
@@ -5842,7 +5869,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5842
5869
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
5843
5870
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
5844
5871
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
5845
|
-
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$
|
|
5872
|
+
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$C.noCustomerGroupsFound), [loadingError, formatMessage]);
|
|
5846
5873
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
5847
5874
|
return jsx(Constraints.Horizontal, {
|
|
5848
5875
|
max: "scale",
|
|
@@ -5853,7 +5880,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5853
5880
|
children: jsx(AsyncSelectInput, {
|
|
5854
5881
|
id: name,
|
|
5855
5882
|
name: name,
|
|
5856
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
5883
|
+
placeholder: placeholder ?? formatMessage(messages$C.placeholder),
|
|
5857
5884
|
loadOptions: loadOptionsDebounced,
|
|
5858
5885
|
defaultOptions: true,
|
|
5859
5886
|
showOptionGroupDivider: true,
|
|
@@ -5988,16 +6015,24 @@ const makeChangeHandler = setValue => event => {
|
|
|
5988
6015
|
// attributes.
|
|
5989
6016
|
const omitUnknownValues = (valuesAsMap, fieldDefinitionsAsMap) => omitBy(valuesAsMap, (value, key) => isNil$1(fieldDefinitionsAsMap[key]));
|
|
5990
6017
|
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6018
|
+
var messages$B = defineMessages({
|
|
6019
|
+
booleanSetInputYesLabel: {
|
|
6020
|
+
id: 'CustomBooleanInputSet.booleanSetInputYesLabel',
|
|
6021
|
+
description: 'Custom boolean input set Yes label',
|
|
6022
|
+
defaultMessage: 'YES'
|
|
6023
|
+
},
|
|
6024
|
+
booleanSetInputNoLabel: {
|
|
6025
|
+
id: 'CustomBooleanInputSet.booleanSetInputNoLabel',
|
|
6026
|
+
description: 'Custom boolean input set No label',
|
|
6027
|
+
defaultMessage: 'NO'
|
|
6028
|
+
},
|
|
6029
|
+
booleanSetInputAllLabel: {
|
|
6030
|
+
id: 'CustomBooleanInputSet.booleanSetInputAllLabel',
|
|
6031
|
+
description: 'Custom boolean input set All label',
|
|
6032
|
+
defaultMessage: 'ALL'
|
|
6033
|
+
}
|
|
6034
|
+
});
|
|
6035
|
+
|
|
6001
6036
|
const valueToBooleanSet = value => {
|
|
6002
6037
|
switch (value) {
|
|
6003
6038
|
case 'true':
|
|
@@ -6018,6 +6053,18 @@ const mapToValue = value => {
|
|
|
6018
6053
|
};
|
|
6019
6054
|
function CustomBooleanInputSet(props) {
|
|
6020
6055
|
const value = mapToValue(props.value);
|
|
6056
|
+
const _useIntl = useIntl(),
|
|
6057
|
+
formatMessage = _useIntl.formatMessage;
|
|
6058
|
+
const options = useMemo(() => [{
|
|
6059
|
+
value: 'true',
|
|
6060
|
+
label: formatMessage(messages$B.booleanSetInputYesLabel)
|
|
6061
|
+
}, {
|
|
6062
|
+
value: 'false',
|
|
6063
|
+
label: formatMessage(messages$B.booleanSetInputNoLabel)
|
|
6064
|
+
}, {
|
|
6065
|
+
value: 'all',
|
|
6066
|
+
label: formatMessage(messages$B.booleanSetInputAllLabel)
|
|
6067
|
+
}], [formatMessage]);
|
|
6021
6068
|
const handleChange = makeChangeHandler(rawValue => {
|
|
6022
6069
|
const nullifiedIfNeeded = !rawValue ? undefined : valueToBooleanSet(rawValue);
|
|
6023
6070
|
props.setFieldValue(props.name, nullifiedIfNeeded);
|
|
@@ -6026,7 +6073,7 @@ function CustomBooleanInputSet(props) {
|
|
|
6026
6073
|
id: props.name,
|
|
6027
6074
|
name: props.name,
|
|
6028
6075
|
value: value,
|
|
6029
|
-
options: options
|
|
6076
|
+
options: options,
|
|
6030
6077
|
onChange: handleChange,
|
|
6031
6078
|
onBlur: props.onBlur,
|
|
6032
6079
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -6439,7 +6486,8 @@ function CustomLocalizedTextInput(props) {
|
|
|
6439
6486
|
hasError: props.hasError,
|
|
6440
6487
|
isDisabled: props.isDisabled,
|
|
6441
6488
|
isReadOnly: props.isReadOnly,
|
|
6442
|
-
hasWarning: props.hasWarning
|
|
6489
|
+
hasWarning: props.hasWarning,
|
|
6490
|
+
additionalInfo: props.additionalInfo
|
|
6443
6491
|
})
|
|
6444
6492
|
});
|
|
6445
6493
|
}
|
|
@@ -7250,7 +7298,8 @@ function CustomTimeInput(props) {
|
|
|
7250
7298
|
setInternalValue = _useState2[1];
|
|
7251
7299
|
const lastValueSentToFormik = useRef();
|
|
7252
7300
|
useEffect(() => {
|
|
7253
|
-
if (lastValueSentToFormik.current !== props.value
|
|
7301
|
+
if (lastValueSentToFormik.current !== props.value || !lastValueSentToFormik.current && !props.value // not updating tailored value when the value is empty
|
|
7302
|
+
) {
|
|
7254
7303
|
setInternalValue(formatTime(props.value));
|
|
7255
7304
|
}
|
|
7256
7305
|
}, [props.value, formatTime]);
|
|
@@ -7327,7 +7376,8 @@ const CustomFieldInput = /*#__PURE__*/memo(props => {
|
|
|
7327
7376
|
hasError: props.hasError,
|
|
7328
7377
|
hasWarning: props.hasWarning,
|
|
7329
7378
|
handleWarningChange: props.handleWarningChange,
|
|
7330
|
-
renderWarnings: props.renderWarnings
|
|
7379
|
+
renderWarnings: props.renderWarnings,
|
|
7380
|
+
additionalInfo: props.additionalInfo
|
|
7331
7381
|
});
|
|
7332
7382
|
});
|
|
7333
7383
|
CustomFieldInput.displayName = 'CustomFieldInput';
|
|
@@ -7714,17 +7764,21 @@ const useDnDContext = () => {
|
|
|
7714
7764
|
return useContext(DnDContext);
|
|
7715
7765
|
};
|
|
7716
7766
|
|
|
7717
|
-
const _excluded$
|
|
7767
|
+
const _excluded$9 = ["renderCustomWarnings", "WrapperComponent"];
|
|
7718
7768
|
function ownKeys$J(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7719
7769
|
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(_context = ownKeys$J(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$J(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7720
|
-
const
|
|
7770
|
+
const existingAttributeTypes = ['text', 'ltext'];
|
|
7771
|
+
const newAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time']; // Add more types here
|
|
7772
|
+
const setAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
7721
7773
|
const getFieldName = (parentName, fieldName) => {
|
|
7722
7774
|
if (!parentName) return fieldName;
|
|
7723
7775
|
return `${parentName}.${fieldName}`;
|
|
7724
7776
|
};
|
|
7725
|
-
const
|
|
7777
|
+
const isAttributeType = function () {
|
|
7726
7778
|
let fieldDefinitionType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7727
|
-
|
|
7779
|
+
let isTailoringAttributeForOtherTypes = arguments.length > 1 ? arguments[1] : undefined;
|
|
7780
|
+
const attributeTypes = isTailoringAttributeForOtherTypes ? newAttributeTypes : existingAttributeTypes;
|
|
7781
|
+
return _includesInstanceProperty(attributeTypes).call(attributeTypes, fieldDefinitionType.name) || isTailoringAttributeForOtherTypes && fieldDefinitionType.name === 'set' && _includesInstanceProperty(setAttributeTypes).call(setAttributeTypes, fieldDefinitionType?.elementType?.name);
|
|
7728
7782
|
};
|
|
7729
7783
|
const isNested = fieldDefinition => {
|
|
7730
7784
|
const type = fieldDefinition.type;
|
|
@@ -7736,8 +7790,10 @@ const isNested = fieldDefinition => {
|
|
|
7736
7790
|
return typeName === CUSTOM_FIELD_TYPES.nested;
|
|
7737
7791
|
};
|
|
7738
7792
|
const CustomFieldsInternal = _ref => {
|
|
7739
|
-
let
|
|
7740
|
-
|
|
7793
|
+
let _ref$renderCustomWarn = _ref.renderCustomWarnings,
|
|
7794
|
+
renderCustomWarnings = _ref$renderCustomWarn === void 0 ? () => null : _ref$renderCustomWarn,
|
|
7795
|
+
WrapperComponent = _ref.WrapperComponent,
|
|
7796
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
7741
7797
|
const _useFormikContext = useFormikContext(),
|
|
7742
7798
|
errors = _useFormikContext.errors,
|
|
7743
7799
|
touched = _useFormikContext.touched,
|
|
@@ -7745,6 +7801,8 @@ const CustomFieldsInternal = _ref => {
|
|
|
7745
7801
|
handleBlur = _useFormikContext.handleBlur,
|
|
7746
7802
|
status = _useFormikContext.status;
|
|
7747
7803
|
const isTailoringAttributesEnabled = useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES);
|
|
7804
|
+
const isTailoringAttributeForOtherTypes = useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT);
|
|
7805
|
+
const isTailoringFallbackEnabled = useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES);
|
|
7748
7806
|
const didFormValidationFail = useDidFormValidationFail();
|
|
7749
7807
|
const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
|
|
7750
7808
|
const _useDnDContext = useDnDContext(),
|
|
@@ -7758,7 +7816,8 @@ const CustomFieldsInternal = _ref => {
|
|
|
7758
7816
|
children: _mapInstanceProperty(fieldDefinitions).call(fieldDefinitions, (fieldDefinition, index) => {
|
|
7759
7817
|
const fieldName = getFieldName(props.name, fieldDefinition.name);
|
|
7760
7818
|
const isTouched = Boolean(getIn(touched, fieldName));
|
|
7761
|
-
const isFieldDisabled = props.isDisabled && !(
|
|
7819
|
+
const isFieldDisabled = props.isDisabled && !(isAttributeType(fieldDefinition.type, isTailoringAttributeForOtherTypes) && isTailoringAttributesEnabled);
|
|
7820
|
+
const isSet = fieldDefinition.type.name === 'set';
|
|
7762
7821
|
const fieldErrors = getIn(errors, fieldName);
|
|
7763
7822
|
const value = props.inputValuesConverter(fieldName, getIn(values, fieldName));
|
|
7764
7823
|
|
|
@@ -7783,7 +7842,8 @@ const CustomFieldsInternal = _ref => {
|
|
|
7783
7842
|
hasError: hasError,
|
|
7784
7843
|
hasWarning: props.renderWarnings && status?.warnings[fieldName],
|
|
7785
7844
|
handleWarningChange: props.handleWarningChange,
|
|
7786
|
-
renderWarnings: props.renderWarnings
|
|
7845
|
+
renderWarnings: props.renderWarnings,
|
|
7846
|
+
additionalInfo: isTailoringFallbackEnabled && props.additionalInfoHandler && !isSet ? props.additionalInfoHandler(fieldDefinition) : undefined
|
|
7787
7847
|
};
|
|
7788
7848
|
const Field = jsx(FieldComponent, _objectSpread$J({}, fieldProps));
|
|
7789
7849
|
return jsx(FastField, {
|
|
@@ -7807,7 +7867,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7807
7867
|
alignItems: "stretch",
|
|
7808
7868
|
children: [WrapperComponent ? jsx(WrapperComponent, {
|
|
7809
7869
|
children: Field
|
|
7810
|
-
}) : Field, props.renderWarnings && status?.warnings[fieldName] &&
|
|
7870
|
+
}) : Field, props.renderWarnings && status?.warnings[fieldName] && renderCustomWarnings(fieldDefinition), jsx(CustomFieldErrors$1, {
|
|
7811
7871
|
isTouched: isTouched,
|
|
7812
7872
|
errors: fieldErrors
|
|
7813
7873
|
})]
|
|
@@ -7820,9 +7880,6 @@ const CustomFieldsInternal = _ref => {
|
|
|
7820
7880
|
});
|
|
7821
7881
|
};
|
|
7822
7882
|
CustomFieldsInternal.displayName = 'CustomFieldsInternal';
|
|
7823
|
-
CustomFieldsInternal.defaultProps = {
|
|
7824
|
-
renderCustomWarnings: () => null
|
|
7825
|
-
};
|
|
7826
7883
|
var CustomFieldsInternal$1 = CustomFieldsInternal;
|
|
7827
7884
|
|
|
7828
7885
|
function ownKeys$I(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -7894,14 +7951,14 @@ const attributesMapToNameValuePairs = map => {
|
|
|
7894
7951
|
});
|
|
7895
7952
|
};
|
|
7896
7953
|
|
|
7897
|
-
const _excluded = ["WrapperComponent"];
|
|
7954
|
+
const _excluded$8 = ["WrapperComponent"];
|
|
7898
7955
|
const getAttributeShortName = (fullName, attributesPrefix) => {
|
|
7899
7956
|
if (!attributesPrefix) return fullName;
|
|
7900
7957
|
return fullName.replace(`${attributesPrefix}.`, '');
|
|
7901
7958
|
};
|
|
7902
7959
|
function ProductAttributes(_ref) {
|
|
7903
7960
|
let WrapperComponent = _ref.WrapperComponent,
|
|
7904
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
7961
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
7905
7962
|
const formik = useFormikContext();
|
|
7906
7963
|
const fieldDefinitions = useMemo(() => {
|
|
7907
7964
|
var _context;
|
|
@@ -7929,7 +7986,8 @@ function ProductAttributes(_ref) {
|
|
|
7929
7986
|
WrapperComponent: WrapperComponent,
|
|
7930
7987
|
renderWarnings: props.renderWarnings,
|
|
7931
7988
|
renderCustomWarnings: props.renderCustomWarnings,
|
|
7932
|
-
handleWarningChange: props.handleWarningChange
|
|
7989
|
+
handleWarningChange: props.handleWarningChange,
|
|
7990
|
+
additionalInfoHandler: props.additionalInfoHandler
|
|
7933
7991
|
})
|
|
7934
7992
|
})
|
|
7935
7993
|
});
|
|
@@ -8375,9 +8433,37 @@ function ModeSelectInputOption(props) {
|
|
|
8375
8433
|
}));
|
|
8376
8434
|
}
|
|
8377
8435
|
|
|
8436
|
+
const _excluded$7 = ["lowerProductSelectionsLimit", "upperProductSelectionsLimit", "renderSelectInputOptionValuesByField", "optionType", "isMulti", "isRequired", "hasWarning", "hasError", "isClearable", "isReadOnly", "isDisabled", "excludedProductSelectionIds", "title"];
|
|
8378
8437
|
function ownKeys$F(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8379
8438
|
function _objectSpread$F(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$F(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$F(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8380
|
-
function ProductSelectionsPicker(
|
|
8439
|
+
function ProductSelectionsPicker(_ref) {
|
|
8440
|
+
let _ref$lowerProductSele = _ref.lowerProductSelectionsLimit,
|
|
8441
|
+
lowerProductSelectionsLimit = _ref$lowerProductSele === void 0 ? LOWER_PRODUCT_SELECTIONS_LIMIT : _ref$lowerProductSele,
|
|
8442
|
+
_ref$upperProductSele = _ref.upperProductSelectionsLimit,
|
|
8443
|
+
upperProductSelectionsLimit = _ref$upperProductSele === void 0 ? UPPER_PRODUCT_SELECTIONS_LIMIT : _ref$upperProductSele,
|
|
8444
|
+
_ref$renderSelectInpu = _ref.renderSelectInputOptionValuesByField,
|
|
8445
|
+
renderSelectInputOptionValuesByField = _ref$renderSelectInpu === void 0 ? 'id' : _ref$renderSelectInpu,
|
|
8446
|
+
_ref$optionType = _ref.optionType,
|
|
8447
|
+
optionType = _ref$optionType === void 0 ? 'double-property' : _ref$optionType,
|
|
8448
|
+
_ref$isMulti = _ref.isMulti,
|
|
8449
|
+
isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti,
|
|
8450
|
+
_ref$isRequired = _ref.isRequired,
|
|
8451
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
8452
|
+
_ref$hasWarning = _ref.hasWarning,
|
|
8453
|
+
hasWarning = _ref$hasWarning === void 0 ? false : _ref$hasWarning,
|
|
8454
|
+
_ref$hasError = _ref.hasError,
|
|
8455
|
+
hasError = _ref$hasError === void 0 ? false : _ref$hasError,
|
|
8456
|
+
_ref$isClearable = _ref.isClearable,
|
|
8457
|
+
isClearable = _ref$isClearable === void 0 ? false : _ref$isClearable,
|
|
8458
|
+
_ref$isReadOnly = _ref.isReadOnly,
|
|
8459
|
+
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
8460
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
8461
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
8462
|
+
_ref$excludedProductS = _ref.excludedProductSelectionIds,
|
|
8463
|
+
excludedProductSelectionIds = _ref$excludedProductS === void 0 ? [] : _ref$excludedProductS,
|
|
8464
|
+
_ref$title = _ref.title,
|
|
8465
|
+
title = _ref$title === void 0 ? '' : _ref$title,
|
|
8466
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
8381
8467
|
const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1();
|
|
8382
8468
|
const components = useMemo(() => {
|
|
8383
8469
|
return {
|
|
@@ -8385,39 +8471,38 @@ function ProductSelectionsPicker(props) {
|
|
|
8385
8471
|
if (optionInnerProps.isDisabled) {
|
|
8386
8472
|
return jsx(SelectInput.Option, _objectSpread$F({}, optionInnerProps));
|
|
8387
8473
|
}
|
|
8388
|
-
if (
|
|
8474
|
+
if (optionType === TYPE_PROPERTY) {
|
|
8389
8475
|
return jsx(ModeSelectInputOption, _objectSpread$F({}, optionInnerProps));
|
|
8390
8476
|
}
|
|
8391
8477
|
return jsx(CustomSelectInputOption, {
|
|
8392
|
-
optionType:
|
|
8478
|
+
optionType: optionType,
|
|
8393
8479
|
optionInnerProps: optionInnerProps
|
|
8394
8480
|
});
|
|
8395
8481
|
}
|
|
8396
8482
|
};
|
|
8397
|
-
}, [
|
|
8483
|
+
}, [optionType]);
|
|
8398
8484
|
if (productSelectionsTotalFetcher.isLoading) return jsx(CenteredLoadingSpinner$1, {});
|
|
8399
|
-
const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <=
|
|
8485
|
+
const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
|
|
8400
8486
|
return jsx(Spacings.Stack, {
|
|
8401
|
-
children: jsx(CustomProductSelectionsPicker, _objectSpread$F(_objectSpread$F({
|
|
8487
|
+
children: jsx(CustomProductSelectionsPicker, _objectSpread$F(_objectSpread$F({
|
|
8488
|
+
lowerProductSelectionsLimit: lowerProductSelectionsLimit,
|
|
8489
|
+
upperProductSelectionsLimit: upperProductSelectionsLimit,
|
|
8490
|
+
renderSelectInputOptionValuesByField: renderSelectInputOptionValuesByField,
|
|
8491
|
+
optionType: optionType,
|
|
8492
|
+
isMulti: isMulti,
|
|
8493
|
+
isRequired: isRequired,
|
|
8494
|
+
hasWarning: hasWarning,
|
|
8495
|
+
hasError: hasError,
|
|
8496
|
+
isClearable: isClearable,
|
|
8497
|
+
isReadOnly: isReadOnly,
|
|
8498
|
+
isDisabled: isDisabled,
|
|
8499
|
+
excludedProductSelectionIds: excludedProductSelectionIds,
|
|
8500
|
+
title: title
|
|
8501
|
+
}, props), {}, {
|
|
8402
8502
|
components: components
|
|
8403
8503
|
}))
|
|
8404
8504
|
});
|
|
8405
8505
|
}
|
|
8406
|
-
ProductSelectionsPicker.defaultProps = {
|
|
8407
|
-
lowerProductSelectionsLimit: LOWER_PRODUCT_SELECTIONS_LIMIT,
|
|
8408
|
-
upperProductSelectionsLimit: UPPER_PRODUCT_SELECTIONS_LIMIT,
|
|
8409
|
-
renderSelectInputOptionValuesByField: 'id',
|
|
8410
|
-
optionType: 'double-property',
|
|
8411
|
-
isMulti: false,
|
|
8412
|
-
isRequired: false,
|
|
8413
|
-
hasWarning: false,
|
|
8414
|
-
hasError: false,
|
|
8415
|
-
isClearable: false,
|
|
8416
|
-
isReadOnly: false,
|
|
8417
|
-
isDisabled: false,
|
|
8418
|
-
excludedProductSelectionIds: [],
|
|
8419
|
-
title: '' // FieldLabel requires title to have some value
|
|
8420
|
-
};
|
|
8421
8506
|
|
|
8422
8507
|
// NOTE: this component is duplicated in `app-shell/from-core`.
|
|
8423
8508
|
var styles$b = {
|
|
@@ -8454,19 +8539,21 @@ const ScrollToFieldError = () => {
|
|
|
8454
8539
|
if (firstErrorElement) {
|
|
8455
8540
|
// Get a reference to the label.
|
|
8456
8541
|
const firstElementId = firstErrorElement.getAttribute('id');
|
|
8457
|
-
|
|
8542
|
+
if (firstElementId) {
|
|
8543
|
+
const localizedInputIndex = _indexOfInstanceProperty(firstElementId).call(firstElementId, `.${dataLocale}`);
|
|
8458
8544
|
|
|
8459
|
-
|
|
8460
|
-
|
|
8545
|
+
// check if locale is appended then remove it from id
|
|
8546
|
+
const id = localizedInputIndex > -1 ? firstElementId.replace(`.${dataLocale}`, '') : firstElementId;
|
|
8461
8547
|
|
|
8462
|
-
|
|
8548
|
+
// Scroll to the label (if found), otherwise to the input element itself.
|
|
8463
8549
|
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8550
|
+
const elementToScrollTo =
|
|
8551
|
+
// div is used only for custom fields
|
|
8552
|
+
document.querySelector(`div[aria-errormessage="${firstElementId}"]`) ?? document.querySelector(`label[for="${id}"]`) ?? document.querySelector(`label#${id}`) ?? firstErrorElement;
|
|
8553
|
+
elementToScrollTo.scrollIntoView?.({
|
|
8554
|
+
behavior: 'smooth'
|
|
8555
|
+
});
|
|
8556
|
+
}
|
|
8470
8557
|
}
|
|
8471
8558
|
}, [dataLocale, isValid, submitCount]);
|
|
8472
8559
|
return null;
|
|
@@ -8612,6 +8699,7 @@ const getCustomGroupLabelOption = customLabel => [{
|
|
|
8612
8699
|
isDisabled: true
|
|
8613
8700
|
}];
|
|
8614
8701
|
|
|
8702
|
+
const _excluded$6 = ["shouldFetchProductSelections"];
|
|
8615
8703
|
function ownKeys$E(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8616
8704
|
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context5 = ownKeys$E(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context6 = ownKeys$E(Object(t))).call(_context6, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8617
8705
|
const hasErrors$2 = errors => {
|
|
@@ -8642,7 +8730,10 @@ const emptyStoreOption = intl => [{
|
|
|
8642
8730
|
value: undefined,
|
|
8643
8731
|
isDisabled: true
|
|
8644
8732
|
}];
|
|
8645
|
-
const StoresAsyncSelectInput =
|
|
8733
|
+
const StoresAsyncSelectInput = _ref2 => {
|
|
8734
|
+
let _ref2$shouldFetchProd = _ref2.shouldFetchProductSelections,
|
|
8735
|
+
shouldFetchProductSelections = _ref2$shouldFetchProd === void 0 ? false : _ref2$shouldFetchProd,
|
|
8736
|
+
props = _objectWithoutProperties(_ref2, _excluded$6);
|
|
8646
8737
|
const intl = useIntl();
|
|
8647
8738
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
8648
8739
|
dataLocale: applicationContext.dataLocale,
|
|
@@ -8656,7 +8747,7 @@ const StoresAsyncSelectInput = props => {
|
|
|
8656
8747
|
offset: 0,
|
|
8657
8748
|
sort: 'createdAt asc',
|
|
8658
8749
|
excludeExtendedStoresList: true,
|
|
8659
|
-
excludeProductSelections: !
|
|
8750
|
+
excludeProductSelections: !shouldFetchProductSelections,
|
|
8660
8751
|
stores: keysOfStores?.length && keysOfStores,
|
|
8661
8752
|
projectKey: props.projectKey
|
|
8662
8753
|
});
|
|
@@ -8737,18 +8828,19 @@ const StoresAsyncSelectInput = props => {
|
|
|
8737
8828
|
});
|
|
8738
8829
|
};
|
|
8739
8830
|
StoresAsyncSelectInput.displayName = 'StoresAsyncSelectInput';
|
|
8740
|
-
StoresAsyncSelectInput.defaultProps = {
|
|
8741
|
-
shouldFetchProductSelections: false
|
|
8742
|
-
};
|
|
8743
8831
|
var StoresAsyncSelectInput$1 = StoresAsyncSelectInput;
|
|
8744
8832
|
|
|
8833
|
+
const _excluded$5 = ["shouldFetchProductSelections"];
|
|
8745
8834
|
function ownKeys$D(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8746
8835
|
function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$D(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$D(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8747
8836
|
const hasErrors$1 = errors => {
|
|
8748
8837
|
var _context;
|
|
8749
8838
|
return errors && _someInstanceProperty(_context = _Object$values(errors)).call(_context, Boolean);
|
|
8750
8839
|
};
|
|
8751
|
-
const StoresBasicSelectInput =
|
|
8840
|
+
const StoresBasicSelectInput = _ref => {
|
|
8841
|
+
let _ref$shouldFetchProdu = _ref.shouldFetchProductSelections,
|
|
8842
|
+
shouldFetchProductSelections = _ref$shouldFetchProdu === void 0 ? false : _ref$shouldFetchProdu,
|
|
8843
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
8752
8844
|
const intl = useIntl();
|
|
8753
8845
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
8754
8846
|
dataLocale: applicationContext.dataLocale,
|
|
@@ -8762,7 +8854,7 @@ const StoresBasicSelectInput = props => {
|
|
|
8762
8854
|
offset: 0,
|
|
8763
8855
|
sort: 'createdAt asc',
|
|
8764
8856
|
excludeExtendedStoresList: true,
|
|
8765
|
-
excludeProductSelections: !
|
|
8857
|
+
excludeProductSelections: !shouldFetchProductSelections,
|
|
8766
8858
|
stores: keysOfStores?.length && keysOfStores,
|
|
8767
8859
|
projectKey: props.projectKey
|
|
8768
8860
|
});
|
|
@@ -8787,7 +8879,7 @@ const StoresBasicSelectInput = props => {
|
|
|
8787
8879
|
const currentStore = _findInstanceProperty(listOptions).call(listOptions, store => store.value === value);
|
|
8788
8880
|
|
|
8789
8881
|
// We need complete store info including productSelections
|
|
8790
|
-
if (!
|
|
8882
|
+
if (!shouldFetchProductSelections && !props?.renderLabel) {
|
|
8791
8883
|
props.onChange(event);
|
|
8792
8884
|
} else {
|
|
8793
8885
|
props.onChange({
|
|
@@ -8835,9 +8927,6 @@ const StoresBasicSelectInput = props => {
|
|
|
8835
8927
|
});
|
|
8836
8928
|
};
|
|
8837
8929
|
StoresBasicSelectInput.displayName = 'StoresBasicSelectInput';
|
|
8838
|
-
StoresBasicSelectInput.defaultProps = {
|
|
8839
|
-
shouldFetchProductSelections: false
|
|
8840
|
-
};
|
|
8841
8930
|
var StoresBasicSelectInput$1 = StoresBasicSelectInput;
|
|
8842
8931
|
|
|
8843
8932
|
var TotalNumberOfStores = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "TotalNumberOfStores" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "totalNumberOfStores" }, name: { kind: "Name", value: "stores" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 76, source: { body: "query TotalNumberOfStores {\n totalNumberOfStores: stores {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -8884,6 +8973,7 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
8884
8973
|
};
|
|
8885
8974
|
var useStoresByFieldFetcher$1 = useStoresByFieldFetcher;
|
|
8886
8975
|
|
|
8976
|
+
const _excluded$4 = ["shouldFetchProductSelections"];
|
|
8887
8977
|
function ownKeys$C(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8888
8978
|
function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$C(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$C(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8889
8979
|
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 } } } };
|
|
@@ -8954,7 +9044,10 @@ const getValueFromOptions = _ref2 => {
|
|
|
8954
9044
|
return selectedOptions[0];
|
|
8955
9045
|
}
|
|
8956
9046
|
};
|
|
8957
|
-
const StoresSearchSelectInput =
|
|
9047
|
+
const StoresSearchSelectInput = _ref3 => {
|
|
9048
|
+
let _ref3$shouldFetchProd = _ref3.shouldFetchProductSelections,
|
|
9049
|
+
shouldFetchProductSelections = _ref3$shouldFetchProd === void 0 ? false : _ref3$shouldFetchProd,
|
|
9050
|
+
props = _objectWithoutProperties(_ref3, _excluded$4);
|
|
8958
9051
|
// hooks
|
|
8959
9052
|
const _useApplicationContex = useApplicationContext(applicationContext => ({
|
|
8960
9053
|
dataLocale: applicationContext.dataLocale,
|
|
@@ -8964,7 +9057,7 @@ const StoresSearchSelectInput = props => {
|
|
|
8964
9057
|
projectLanguages = _useApplicationContex.projectLanguages;
|
|
8965
9058
|
const intl = useIntl();
|
|
8966
9059
|
const client = useApolloClient();
|
|
8967
|
-
const storesByFieldFetcher = useStoresByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField, props.projectKey,
|
|
9060
|
+
const storesByFieldFetcher = useStoresByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, shouldFetchProductSelections);
|
|
8968
9061
|
const hasError = AsyncSelectInput.isTouched(props.touched) && hasErrors(props.errors) || props.hasError;
|
|
8969
9062
|
const handleLoadOptions = searchText => {
|
|
8970
9063
|
const extractMatchedStores = client.query({
|
|
@@ -8973,15 +9066,15 @@ const StoresSearchSelectInput = props => {
|
|
|
8973
9066
|
searchText,
|
|
8974
9067
|
dataLocale,
|
|
8975
9068
|
allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
|
|
8976
|
-
shouldFetchProductSelections
|
|
9069
|
+
shouldFetchProductSelections
|
|
8977
9070
|
}),
|
|
8978
9071
|
context: {
|
|
8979
9072
|
target: GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM,
|
|
8980
9073
|
projectKey: props.projectKey
|
|
8981
9074
|
},
|
|
8982
9075
|
fetchPolicy: 'network-only'
|
|
8983
|
-
}).then(
|
|
8984
|
-
let data =
|
|
9076
|
+
}).then(_ref4 => {
|
|
9077
|
+
let data = _ref4.data;
|
|
8985
9078
|
const result = data.storesByWherePredicate?.results.map(store => mapStoresToOptions({
|
|
8986
9079
|
store,
|
|
8987
9080
|
dataLocale,
|
|
@@ -8998,8 +9091,8 @@ const StoresSearchSelectInput = props => {
|
|
|
8998
9091
|
return extractMatchedStores;
|
|
8999
9092
|
};
|
|
9000
9093
|
const loadOptionsDebounced = debounce(handleLoadOptions, 500);
|
|
9001
|
-
const renderNoOptions =
|
|
9002
|
-
let inputValue =
|
|
9094
|
+
const renderNoOptions = _ref5 => {
|
|
9095
|
+
let inputValue = _ref5.inputValue;
|
|
9003
9096
|
return jsxs("div", {
|
|
9004
9097
|
className: styles$9.renderLabelContainer,
|
|
9005
9098
|
children: [jsx("div", {
|
|
@@ -9056,17 +9149,26 @@ const StoresSearchSelectInput = props => {
|
|
|
9056
9149
|
});
|
|
9057
9150
|
};
|
|
9058
9151
|
StoresSearchSelectInput.displayName = 'StoresSearchSelectInput';
|
|
9059
|
-
StoresSearchSelectInput.defaultProps = {
|
|
9060
|
-
shouldFetchProductSelections: false
|
|
9061
|
-
};
|
|
9062
9152
|
var StoresSearchSelectInput$1 = StoresSearchSelectInput;
|
|
9063
9153
|
|
|
9154
|
+
const _excluded$3 = ["lowerStoresLimit", "upperStoresLimit", "renderSelectInputOptionValuesByField", "optionType", "shouldFetchProductSelections"];
|
|
9064
9155
|
function ownKeys$B(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9065
9156
|
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$B(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$B(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9066
9157
|
var styles$8 = {
|
|
9067
9158
|
"customOption": "store-select-input-module__customOption___2SC00"
|
|
9068
9159
|
};
|
|
9069
|
-
const StoreSelectInput =
|
|
9160
|
+
const StoreSelectInput = _ref => {
|
|
9161
|
+
let _ref$lowerStoresLimit = _ref.lowerStoresLimit,
|
|
9162
|
+
lowerStoresLimit = _ref$lowerStoresLimit === void 0 ? LOWER_STORES_LIMIT : _ref$lowerStoresLimit,
|
|
9163
|
+
_ref$upperStoresLimit = _ref.upperStoresLimit,
|
|
9164
|
+
upperStoresLimit = _ref$upperStoresLimit === void 0 ? UPPER_STORES_LIMIT : _ref$upperStoresLimit,
|
|
9165
|
+
_ref$renderSelectInpu = _ref.renderSelectInputOptionValuesByField,
|
|
9166
|
+
renderSelectInputOptionValuesByField = _ref$renderSelectInpu === void 0 ? 'id' : _ref$renderSelectInpu,
|
|
9167
|
+
_ref$optionType = _ref.optionType,
|
|
9168
|
+
optionType = _ref$optionType === void 0 ? 'double-property' : _ref$optionType,
|
|
9169
|
+
_ref$shouldFetchProdu = _ref.shouldFetchProductSelections,
|
|
9170
|
+
shouldFetchProductSelections = _ref$shouldFetchProdu === void 0 ? false : _ref$shouldFetchProdu,
|
|
9171
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
9070
9172
|
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1(props.projectKey);
|
|
9071
9173
|
const components = useMemo(() => {
|
|
9072
9174
|
return {
|
|
@@ -9075,19 +9177,19 @@ const StoreSelectInput = props => {
|
|
|
9075
9177
|
if (optionInnerProps.isDisabled) {
|
|
9076
9178
|
return jsx(SelectInput.Option, _objectSpread$B({}, optionInnerProps));
|
|
9077
9179
|
}
|
|
9078
|
-
const isSearchSelectInput = totalNumberOfStoresFetcher.total >
|
|
9180
|
+
const isSearchSelectInput = totalNumberOfStoresFetcher.total > upperStoresLimit;
|
|
9079
9181
|
return jsx("div", {
|
|
9080
9182
|
className: isSearchSelectInput ? styles$8.customOption : '',
|
|
9081
9183
|
children: jsx(CustomSelectInputOption, {
|
|
9082
|
-
optionType:
|
|
9184
|
+
optionType: optionType,
|
|
9083
9185
|
optionInnerProps: optionInnerProps
|
|
9084
9186
|
})
|
|
9085
9187
|
});
|
|
9086
9188
|
}
|
|
9087
9189
|
};
|
|
9088
|
-
}, [
|
|
9190
|
+
}, [optionType, totalNumberOfStoresFetcher.total, upperStoresLimit]);
|
|
9089
9191
|
if (totalNumberOfStoresFetcher.isLoading) return jsx(CenteredLoadingSpinner$1, {});
|
|
9090
|
-
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <=
|
|
9192
|
+
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= lowerStoresLimit ? StoresBasicSelectInput$1 : totalNumberOfStoresFetcher.total <= upperStoresLimit ? StoresAsyncSelectInput$1 : StoresSearchSelectInput$1;
|
|
9091
9193
|
return jsx(CustomStoreSelectInput, _objectSpread$B(_objectSpread$B({
|
|
9092
9194
|
menuIsOpen: props.menuIsOpen,
|
|
9093
9195
|
placeholder: props.placeholder,
|
|
@@ -9116,27 +9218,27 @@ const StoreSelectInput = props => {
|
|
|
9116
9218
|
maxMenuHeight: props.maxMenuHeight,
|
|
9117
9219
|
menuPortalTarget: props.menuPortalTarget,
|
|
9118
9220
|
menuPortalZIndex: props.menuPortalZIndex,
|
|
9119
|
-
renderSelectInputOptionValuesByField:
|
|
9120
|
-
lowerStoresLimit:
|
|
9121
|
-
upperStoresLimit:
|
|
9221
|
+
renderSelectInputOptionValuesByField: renderSelectInputOptionValuesByField,
|
|
9222
|
+
lowerStoresLimit: lowerStoresLimit,
|
|
9223
|
+
upperStoresLimit: upperStoresLimit,
|
|
9122
9224
|
allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
|
|
9123
|
-
shouldFetchProductSelections:
|
|
9225
|
+
shouldFetchProductSelections: shouldFetchProductSelections,
|
|
9124
9226
|
controlShouldRenderValue: props.controlShouldRenderValue
|
|
9125
9227
|
}, filterDataAttributes$1(props)), filterAriaAttributes(props)));
|
|
9126
9228
|
};
|
|
9127
9229
|
StoreSelectInput.displayName = 'StoreSelectInput';
|
|
9128
|
-
StoreSelectInput.defaultProps = {
|
|
9129
|
-
lowerStoresLimit: LOWER_STORES_LIMIT,
|
|
9130
|
-
upperStoresLimit: UPPER_STORES_LIMIT,
|
|
9131
|
-
renderSelectInputOptionValuesByField: 'id',
|
|
9132
|
-
optionType: 'double-property',
|
|
9133
|
-
shouldFetchProductSelections: false
|
|
9134
|
-
};
|
|
9135
9230
|
var StoreSelectInput$1 = StoreSelectInput;
|
|
9136
9231
|
|
|
9232
|
+
const _excluded$2 = ["lowerStoresLimit", "upperStoresLimit", "mappedValueField"];
|
|
9137
9233
|
function ownKeys$A(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9138
9234
|
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$A(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$A(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9139
|
-
const StoreSelectField =
|
|
9235
|
+
const StoreSelectField = _ref => {
|
|
9236
|
+
let _ref$lowerStoresLimit = _ref.lowerStoresLimit,
|
|
9237
|
+
lowerStoresLimit = _ref$lowerStoresLimit === void 0 ? LOWER_STORES_LIMIT : _ref$lowerStoresLimit,
|
|
9238
|
+
_ref$upperStoresLimit = _ref.upperStoresLimit,
|
|
9239
|
+
upperStoresLimit = _ref$upperStoresLimit === void 0 ? UPPER_STORES_LIMIT : _ref$upperStoresLimit;
|
|
9240
|
+
_ref.mappedValueField;
|
|
9241
|
+
let props = _objectWithoutProperties(_ref, _excluded$2);
|
|
9140
9242
|
return jsx(Constraints.Horizontal, {
|
|
9141
9243
|
max: props.horizontalConstraint,
|
|
9142
9244
|
children: jsxs(Spacings.Stack, {
|
|
@@ -9173,8 +9275,8 @@ const StoreSelectField = props => {
|
|
|
9173
9275
|
menuPortalZIndex: props.menuPortalZIndex,
|
|
9174
9276
|
optionType: props.optionType,
|
|
9175
9277
|
renderSelectInputOptionValuesByField: props.renderSelectInputOptionValuesByField,
|
|
9176
|
-
lowerStoresLimit:
|
|
9177
|
-
upperStoresLimit:
|
|
9278
|
+
lowerStoresLimit: lowerStoresLimit,
|
|
9279
|
+
upperStoresLimit: upperStoresLimit,
|
|
9178
9280
|
allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
|
|
9179
9281
|
controlShouldRenderValue: props.controlShouldRenderValue
|
|
9180
9282
|
}, filterDataAttributes$1(props)), filterAriaAttributes(props)))]
|
|
@@ -9182,11 +9284,6 @@ const StoreSelectField = props => {
|
|
|
9182
9284
|
});
|
|
9183
9285
|
};
|
|
9184
9286
|
StoreSelectField.displayName = 'StoreSelectField';
|
|
9185
|
-
StoreSelectField.defaultProps = {
|
|
9186
|
-
lowerStoresLimit: LOWER_STORES_LIMIT,
|
|
9187
|
-
upperStoresLimit: UPPER_STORES_LIMIT,
|
|
9188
|
-
mappedValueField: 'id'
|
|
9189
|
-
};
|
|
9190
9287
|
var StoreSelectField$1 = StoreSelectField;
|
|
9191
9288
|
|
|
9192
9289
|
function ownKeys$z(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -9615,7 +9712,7 @@ const createEmptyCustomFields = typeDefinition => ({
|
|
|
9615
9712
|
function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9616
9713
|
function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function () { return !!t; })(); }
|
|
9617
9714
|
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 } } } };
|
|
9618
|
-
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'];
|
|
9715
|
+
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'];
|
|
9619
9716
|
const emptyTypeDefinitions = {
|
|
9620
9717
|
total: 0,
|
|
9621
9718
|
count: 0,
|
|
@@ -10168,7 +10265,7 @@ const defaultValue = {
|
|
|
10168
10265
|
const PimIndexerContext = /*#__PURE__*/createContext(defaultValue);
|
|
10169
10266
|
var PimIndexerContext$1 = PimIndexerContext;
|
|
10170
10267
|
|
|
10171
|
-
var FetchIndicesExist = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchIndicesExist" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indicesExist" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "products" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end:
|
|
10268
|
+
var FetchIndicesExist = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchIndicesExist" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indicesExist" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "products" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 269, source: { body: "query FetchIndicesExist {\n indicesExist {\n products {\n searchableIndexExists\n newInProgress\n }\n productTypes {\n searchableIndexExists\n newInProgress\n }\n productSelections {\n searchableIndexExists\n newInProgress\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10172
10269
|
var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
|
|
10173
10270
|
try {
|
|
10174
10271
|
await dispatch(actions.head({
|
|
@@ -10188,11 +10285,12 @@ var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
|
|
|
10188
10285
|
fetchPolicy: 'network-only'
|
|
10189
10286
|
}),
|
|
10190
10287
|
data = _await$apolloClient$q.data;
|
|
10191
|
-
if (data.indicesExist.products.newInProgress || data.indicesExist.productTypes.newInProgress) {
|
|
10288
|
+
if (data.indicesExist.products.newInProgress || data.indicesExist.productTypes.newInProgress || data.indicesExist.productSelections.newInProgress) {
|
|
10192
10289
|
return {
|
|
10193
10290
|
status: 'indexing',
|
|
10194
10291
|
isIndexingProducts: !data.indicesExist.products.searchableIndexExists,
|
|
10195
|
-
isIndexingProductTypes: !data.indicesExist.productTypes.searchableIndexExists
|
|
10292
|
+
isIndexingProductTypes: !data.indicesExist.productTypes.searchableIndexExists,
|
|
10293
|
+
isIndexingProductSelections: !data.indicesExist.productSelections.searchableIndexExists
|
|
10196
10294
|
};
|
|
10197
10295
|
}
|
|
10198
10296
|
return {
|
|
@@ -10226,21 +10324,23 @@ function ownKeys$r(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySy
|
|
|
10226
10324
|
function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$r(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$r(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10227
10325
|
function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10228
10326
|
function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function () { return !!t; })(); }
|
|
10229
|
-
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:
|
|
10230
|
-
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: [] }], 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: [] }] } }] } }], loc: { start: 0, end:
|
|
10231
|
-
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: "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: [] }], 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: [] }] } }] } }], loc: { start: 0, end:
|
|
10327
|
+
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 } } } };
|
|
10328
|
+
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 } } } };
|
|
10329
|
+
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 } } } };
|
|
10232
10330
|
const pimIndexerRequestContext = {
|
|
10233
10331
|
target: GRAPHQL_TARGETS.PIM_INDEXER
|
|
10234
10332
|
};
|
|
10235
|
-
const isIndexingCompleted = (products, productTypes) => products.completed && productTypes.completed;
|
|
10236
|
-
const calculateProgress = (products, productTypes) => (products.percentCompleted + productTypes.percentCompleted) /
|
|
10333
|
+
const isIndexingCompleted = (products, productTypes, productSelections) => products.completed && productTypes.completed && productSelections.completed;
|
|
10334
|
+
const calculateProgress = (products, productTypes, productSelections) => (products.percentCompleted + productTypes.percentCompleted + productSelections.percentCompleted) / 3;
|
|
10237
10335
|
const getIndexingJobIds = _ref => {
|
|
10238
10336
|
let _ref$data = _ref.data,
|
|
10239
10337
|
products = _ref$data.products,
|
|
10240
|
-
productTypes = _ref$data.productTypes
|
|
10338
|
+
productTypes = _ref$data.productTypes,
|
|
10339
|
+
productSelections = _ref$data.productSelections;
|
|
10241
10340
|
return {
|
|
10242
10341
|
productsJobId: products?.indexingJobId || products?.existingIndexingJobId,
|
|
10243
|
-
productTypesJobId: productTypes?.indexingJobId || productTypes?.existingIndexingJobId
|
|
10342
|
+
productTypesJobId: productTypes?.indexingJobId || productTypes?.existingIndexingJobId,
|
|
10343
|
+
productSelectionsJobId: productSelections?.indexingJobId || productSelections?.existingIndexingJobId
|
|
10244
10344
|
};
|
|
10245
10345
|
};
|
|
10246
10346
|
let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
@@ -10263,12 +10363,14 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10263
10363
|
const _await$_this$props$fe = await _this.props.fetchPimIndexStatus(_this.props.client, _this.props.projectKey),
|
|
10264
10364
|
status = _await$_this$props$fe.status,
|
|
10265
10365
|
isIndexingProducts = _await$_this$props$fe.isIndexingProducts,
|
|
10266
|
-
isIndexingProductTypes = _await$_this$props$fe.isIndexingProductTypes
|
|
10366
|
+
isIndexingProductTypes = _await$_this$props$fe.isIndexingProductTypes,
|
|
10367
|
+
isIndexingProductSelections = _await$_this$props$fe.isIndexingProductSelections;
|
|
10267
10368
|
const isPimIndexerUnreachable = _includesInstanceProperty(_context = ['not-configured', 'unreachable']).call(_context, status);
|
|
10268
10369
|
if (status === 'indexing') {
|
|
10269
10370
|
_this.monitorIndexingProgress({
|
|
10270
10371
|
isIndexingProducts,
|
|
10271
|
-
isIndexingProductTypes
|
|
10372
|
+
isIndexingProductTypes,
|
|
10373
|
+
isIndexingProductSelections
|
|
10272
10374
|
});
|
|
10273
10375
|
} else {
|
|
10274
10376
|
_this.setState({
|
|
@@ -10325,8 +10427,10 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10325
10427
|
variables: {
|
|
10326
10428
|
productsJobId: _this.state.productsJobId || '',
|
|
10327
10429
|
productTypesJobId: _this.state.productTypesJobId || '',
|
|
10430
|
+
productSelectionsJobId: _this.state.productSelectionsJobId || '',
|
|
10328
10431
|
shouldIncludeProducts: !!_this.state.productsJobId,
|
|
10329
|
-
shouldIncludeProductTypes: !!_this.state.productTypesJobId
|
|
10432
|
+
shouldIncludeProductTypes: !!_this.state.productTypesJobId,
|
|
10433
|
+
shouldIncludeProductSelections: !!_this.state.productSelectionsJobId
|
|
10330
10434
|
},
|
|
10331
10435
|
fetchPolicy: 'network-only'
|
|
10332
10436
|
});
|
|
@@ -10336,7 +10440,8 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10336
10440
|
};
|
|
10337
10441
|
return {
|
|
10338
10442
|
products: result.data.products || completedStatus,
|
|
10339
|
-
productTypes: result.data.productTypes || completedStatus
|
|
10443
|
+
productTypes: result.data.productTypes || completedStatus,
|
|
10444
|
+
productSelections: result.data.productSelections || completedStatus
|
|
10340
10445
|
};
|
|
10341
10446
|
};
|
|
10342
10447
|
_this.handleFinishedIndexing = async () => {
|
|
@@ -10375,9 +10480,10 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10375
10480
|
try {
|
|
10376
10481
|
const _await$_this$getIndex = await _this.getIndexingProgress(),
|
|
10377
10482
|
products = _await$_this$getIndex.products,
|
|
10378
|
-
productTypes = _await$_this$getIndex.productTypes
|
|
10379
|
-
|
|
10380
|
-
const
|
|
10483
|
+
productTypes = _await$_this$getIndex.productTypes,
|
|
10484
|
+
productSelections = _await$_this$getIndex.productSelections;
|
|
10485
|
+
const isCompleted = isIndexingCompleted(products, productTypes, productSelections);
|
|
10486
|
+
const indexingProgress = calculateProgress(products, productTypes, productSelections);
|
|
10381
10487
|
_this.setState({
|
|
10382
10488
|
indexingProgress
|
|
10383
10489
|
});
|
|
@@ -10395,14 +10501,16 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10395
10501
|
};
|
|
10396
10502
|
_this.monitorIndexingProgress = async _ref2 => {
|
|
10397
10503
|
let isIndexingProducts = _ref2.isIndexingProducts,
|
|
10398
|
-
isIndexingProductTypes = _ref2.isIndexingProductTypes
|
|
10504
|
+
isIndexingProductTypes = _ref2.isIndexingProductTypes,
|
|
10505
|
+
isIndexingProductSelections = _ref2.isIndexingProductSelections;
|
|
10399
10506
|
if (_this.state.isProjectBeingIndexedByPim) return;
|
|
10400
10507
|
try {
|
|
10401
10508
|
const indexMutationResult = await _this.props.indexProject({
|
|
10402
10509
|
context: pimIndexerRequestContext,
|
|
10403
10510
|
variables: {
|
|
10404
10511
|
shouldIndexProducts: isIndexingProducts,
|
|
10405
|
-
shouldIndexProductTypes: isIndexingProductTypes
|
|
10512
|
+
shouldIndexProductTypes: isIndexingProductTypes,
|
|
10513
|
+
shouldIndexProductSelections: isIndexingProductSelections
|
|
10406
10514
|
}
|
|
10407
10515
|
});
|
|
10408
10516
|
_this.setState(_objectSpread$r(_objectSpread$r({
|
|
@@ -10417,7 +10525,8 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10417
10525
|
};
|
|
10418
10526
|
_this.indexProject = () => _this.monitorIndexingProgress({
|
|
10419
10527
|
isIndexingProductTypes: true,
|
|
10420
|
-
isIndexingProducts: true
|
|
10528
|
+
isIndexingProducts: true,
|
|
10529
|
+
isIndexingProductSelections: true
|
|
10421
10530
|
});
|
|
10422
10531
|
return _this;
|
|
10423
10532
|
}
|
|
@@ -11892,12 +12001,18 @@ var messages$c = defineMessages({
|
|
|
11892
12001
|
}
|
|
11893
12002
|
});
|
|
11894
12003
|
|
|
12004
|
+
const _excluded$1 = ["isRequired", "disabled"];
|
|
11895
12005
|
const valueMapping = {
|
|
11896
12006
|
yes: true,
|
|
11897
12007
|
no: false,
|
|
11898
12008
|
all: [true, false]
|
|
11899
12009
|
};
|
|
11900
|
-
const BooleanField =
|
|
12010
|
+
const BooleanField = _ref => {
|
|
12011
|
+
let _ref$isRequired = _ref.isRequired,
|
|
12012
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
12013
|
+
_ref$disabled = _ref.disabled,
|
|
12014
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
12015
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
11901
12016
|
let selectedValue;
|
|
11902
12017
|
if (typeof props.value === 'boolean') selectedValue = getBooleanValue(props.value);else if (props.isMulti && _Array$isArray(props.value) && props.value.length) selectedValue = props.value.length === 2 ? 'all' : getBooleanValue(props.value[0]);
|
|
11903
12018
|
const yesLabel = props.intl.formatMessage(messages$c.yes);
|
|
@@ -11915,7 +12030,7 @@ const BooleanField = props => {
|
|
|
11915
12030
|
});
|
|
11916
12031
|
return jsx(SelectInput, {
|
|
11917
12032
|
name: props.name,
|
|
11918
|
-
isClearable: !
|
|
12033
|
+
isClearable: !isRequired,
|
|
11919
12034
|
isSearchable: false,
|
|
11920
12035
|
value: selectedValue,
|
|
11921
12036
|
onChange: event => {
|
|
@@ -11925,14 +12040,10 @@ const BooleanField = props => {
|
|
|
11925
12040
|
props.onChange(newValue);
|
|
11926
12041
|
},
|
|
11927
12042
|
options,
|
|
11928
|
-
isDisabled:
|
|
12043
|
+
isDisabled: disabled
|
|
11929
12044
|
});
|
|
11930
12045
|
};
|
|
11931
12046
|
BooleanField.displayName = 'BooleanField';
|
|
11932
|
-
BooleanField.defaultProps = {
|
|
11933
|
-
isRequired: false,
|
|
11934
|
-
disabled: false
|
|
11935
|
-
};
|
|
11936
12047
|
var booleanField = injectIntl(BooleanField);
|
|
11937
12048
|
function getBooleanValue(value) {
|
|
11938
12049
|
if (typeof value !== 'boolean') return undefined;
|
|
@@ -11976,16 +12087,19 @@ var messages$9 = defineMessages({
|
|
|
11976
12087
|
}
|
|
11977
12088
|
});
|
|
11978
12089
|
|
|
12090
|
+
const _excluded = ["isChecked"];
|
|
11979
12091
|
function ownKeys$6(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11980
12092
|
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(_context = ownKeys$6(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$6(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11981
|
-
const MissingValueField =
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
12093
|
+
const MissingValueField = _ref => {
|
|
12094
|
+
let _ref$isChecked = _ref.isChecked,
|
|
12095
|
+
isChecked = _ref$isChecked === void 0 ? false : _ref$isChecked,
|
|
12096
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12097
|
+
return jsx(CheckboxInput, {
|
|
12098
|
+
name: "missing-value",
|
|
12099
|
+
isChecked: isChecked,
|
|
12100
|
+
onChange: props.onChange,
|
|
12101
|
+
children: jsx(FormattedMessage, _objectSpread$6({}, messages$9.label))
|
|
12102
|
+
});
|
|
11989
12103
|
};
|
|
11990
12104
|
var MissingValueField$1 = MissingValueField;
|
|
11991
12105
|
|
|
@@ -13259,7 +13373,8 @@ const not = function () {
|
|
|
13259
13373
|
|
|
13260
13374
|
const safelyAddFallback = function (string) {
|
|
13261
13375
|
let fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : NO_VALUE_FALLBACK;
|
|
13262
|
-
|
|
13376
|
+
if (string === '') return fallback;
|
|
13377
|
+
return string ?? fallback;
|
|
13263
13378
|
};
|
|
13264
13379
|
|
|
13265
13380
|
var messages = defineMessages({
|
|
@@ -13632,4 +13747,4 @@ function withPendingRequests() {
|
|
|
13632
13747
|
|
|
13633
13748
|
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 } } } };
|
|
13634
13749
|
|
|
13635
|
-
export { booleanField as BooleanField, Button$1 as Button, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner$1 as CenteredLoadingSpinner, ChannelPickerInput$1 as ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldTooltip$1 as CustomFieldTooltip, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields$1 as CustomFields, CustomFieldsErrorTextNotification$1 as CustomFieldsErrorTextNotification, CustomFieldsFormField$1 as CustomFieldsFormField, CustomerGroupPickerInput$1 as CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FileInput$1 as FileInput, FormattedDateTime$1 as FormattedDateTime, FormattedLocalizedString, LabelRange$1 as LabelRange, MC_RESOURCES_WITH_KEYS, MissingValueField$1 as MissingValueField, MultiValueSearchInput$1 as MultiValueSearchInput, numericFormatInput as NumericFormatInput, Option$2 as Option, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, ProductAttributeInput, ProductAttributes, ProductPickerInput$1 as ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, RequestCache$1 as RequestCache, RequiredIndicator$1 as RequiredIndicator, ScrollToFieldError$1 as ScrollToFieldError, searchInput as SearchInput, SelectableFieldSearchInput$1 as SelectableFieldSearchInput, StoreSelectField$1 as StoreSelectField, StoreSelectInput$1 as StoreSelectInput, ThrottledField$1 as ThrottledField, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer$1 as WithPimIndexer, allowedProperties, and, attributesMapToNameValuePairs, base64ToString, messages$c as booleanMessages, buildSearchQuery$1 as buildSearchQuery, businessRoleConstants$1 as businessRoleConstants, messages$7 as businessRoleMessages, businessRoleKeys$1 as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition$1 as createNextSortDefinition, createReducer, createResourceReducer, customFields as customFieldsTransformer, dateTransformer$1 as dateTransformer, exact, exists, extractErrorFromGraphQlResponse, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomField, formatCustomerAddress, formatCustomerName, formatDateRangeValue, formatDateTime$1 as formatDateTime, formatDiscount, formatMoney$2 as formatMoney, formatMoneyRangeValue, formatMoneyValue, formatPercentage, formatAttribute as formatProductAttribute, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName$1 as getDisplayName, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds$1 as getPrefixSearchBounds, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, dateTransformer as graphqlDateTransformer, missingLocaleTransformer as graphqlMissingLocaleTransformer, missingTransformer as graphqlMissingTransformer, numberTransformer as graphqlNumberTransformer, graphqlQueryBuilder, referenceTransformer as graphqlReferenceTransformer, textTransformer as graphqlTextTransformer, hasInvalidInputError$1 as hasInvalidInputError, hasSemanticError$1 as hasSemanticError, injectCustomerGroupsPlatformLimits$1 as injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits$1 as injectCustomersPlatformLimits, injectDataTablePaginationState$1 as injectDataTablePaginationState, injectModalState$3 as injectModalState, injectNotifications$1 as injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits$1 as injectShippingMethodsPlatformLimits, injectStorage$1 as injectStorage, injectTaxCategoriesPlatformLimits$1 as injectTaxCategoriesPlatformLimits, injectModalState$1 as injectToggleState, injectZonesPlatformLimits$1 as injectZonesPlatformLimits, isEmptyFilter as isEmpty, isEmptyValue, isUUID$1 as isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName$1 as keepDisplayName, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$9 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, pickerMessages$1 as pickerMessages, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$
|
|
13750
|
+
export { booleanField as BooleanField, Button$1 as Button, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner$1 as CenteredLoadingSpinner, ChannelPickerInput$1 as ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldTooltip$1 as CustomFieldTooltip, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields$1 as CustomFields, CustomFieldsErrorTextNotification$1 as CustomFieldsErrorTextNotification, CustomFieldsFormField$1 as CustomFieldsFormField, CustomerGroupPickerInput$1 as CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FileInput$1 as FileInput, FormattedDateTime$1 as FormattedDateTime, FormattedLocalizedString, LabelRange$1 as LabelRange, MC_RESOURCES_WITH_KEYS, MissingValueField$1 as MissingValueField, MultiValueSearchInput$1 as MultiValueSearchInput, numericFormatInput as NumericFormatInput, Option$2 as Option, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, ProductAttributeInput, ProductAttributes, ProductPickerInput$1 as ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, RequestCache$1 as RequestCache, RequiredIndicator$1 as RequiredIndicator, ScrollToFieldError$1 as ScrollToFieldError, searchInput as SearchInput, SelectableFieldSearchInput$1 as SelectableFieldSearchInput, StoreSelectField$1 as StoreSelectField, StoreSelectInput$1 as StoreSelectInput, ThrottledField$1 as ThrottledField, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer$1 as WithPimIndexer, allowedProperties, and, attributesMapToNameValuePairs, base64ToString, messages$c as booleanMessages, buildSearchQuery$1 as buildSearchQuery, businessRoleConstants$1 as businessRoleConstants, messages$7 as businessRoleMessages, businessRoleKeys$1 as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition$1 as createNextSortDefinition, createReducer, createResourceReducer, customFields as customFieldsTransformer, dateTransformer$1 as dateTransformer, exact, exists, extractErrorFromGraphQlResponse, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomField, formatCustomerAddress, formatCustomerName, formatDateRangeValue, formatDateTime$1 as formatDateTime, formatDiscount, formatMoney$2 as formatMoney, formatMoneyRangeValue, formatMoneyValue, formatPercentage, formatAttribute as formatProductAttribute, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName$1 as getDisplayName, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds$1 as getPrefixSearchBounds, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, dateTransformer as graphqlDateTransformer, missingLocaleTransformer as graphqlMissingLocaleTransformer, missingTransformer as graphqlMissingTransformer, numberTransformer as graphqlNumberTransformer, graphqlQueryBuilder, referenceTransformer as graphqlReferenceTransformer, textTransformer as graphqlTextTransformer, hasInvalidInputError$1 as hasInvalidInputError, hasSemanticError$1 as hasSemanticError, injectCustomerGroupsPlatformLimits$1 as injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits$1 as injectCustomersPlatformLimits, injectDataTablePaginationState$1 as injectDataTablePaginationState, injectModalState$3 as injectModalState, injectNotifications$1 as injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits$1 as injectShippingMethodsPlatformLimits, injectStorage$1 as injectStorage, injectTaxCategoriesPlatformLimits$1 as injectTaxCategoriesPlatformLimits, injectModalState$1 as injectToggleState, injectZonesPlatformLimits$1 as injectZonesPlatformLimits, isEmptyFilter as isEmpty, isEmptyValue, isUUID$1 as isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName$1 as keepDisplayName, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$9 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, pickerMessages$1 as pickerMessages, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$N as searchInputMessages, setDisplayName$1 as setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useCurrentOption, useDnDContext as useCustomFieldsDnDContext, useCustomerGroupsPlatformLimits$1 as useCustomerGroupsPlatformLimits, useCustomersPlatformLimits$1 as useCustomersPlatformLimits, useDebouncedPromiseCallback$1 as useDebouncedPromiseCallback, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated$1 as useIsFieldDuplicated, useLoadOptions$1 as useLoadOptions, useLocalizedKeyFallback$1 as useLocalizedKeyFallback, usePendingRequests, usePersistedTableConfiguration$1 as usePersistedTableConfiguration, usePimIndexer, usePrevious$1 as usePrevious, useProductSelectionsFetcher$1 as useProductSelectionsFetcher, useProductSelectionsTotalFetcher$1 as useProductSelectionsTotalFetcher, useRoleNotificationEffect$1 as useRoleNotificationEffect, useShippingMethodsPlatformLimits, useStorage$1 as useStorage, useStoreKeysInDataFences$1 as useStoreKeysInDataFences, useStoresListFetcher$1 as useStoresListFetcher, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher$1 as useTotalNumberOfStoresFetcher, validateFilter$2 as validateCustomField, validations as validateCustomFields, validateFilter$1 as validateDate, validateMultiOptionEnum, validateFilter as validateNumber, validateSingleOptionEnum, validateText, validatedInput, validationMessages, withPendingRequests, withProps$1 as withProps, withRedirectTo$1 as withRedirectTo, withoutEmptyErrorsByField$1 as withoutEmptyErrorsByField, wrapDisplayName$1 as wrapDisplayName };
|