@commercetools-frontend/experimental-components 8.0.1 → 8.0.2
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 +706 -421
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +687 -402
- package/dist/commercetools-frontend-experimental-components.esm.js +701 -422
- package/dist/declarations/src/components/carousel/carousel.d.ts +2 -0
- package/dist/declarations/src/components/channel-picker-input/channel-picker-input.d.ts +18 -33
- package/dist/declarations/src/components/channel-picker-input/index.d.ts +1 -1
- package/dist/declarations/src/components/formatted-date-time/formatted-date-time.d.ts +1 -0
- package/dist/declarations/src/components/recurrent-interval-picker/use-recurrence-intervals/use-recurrence-intervals.d.ts +0 -1
- package/dist/declarations/src/components/validated-input/validated-input.d.ts +26 -5
- package/dist/declarations/src/constants/index.d.ts +2 -0
- package/dist/declarations/src/custom-fields/custom-field-definitions-connector/custom-field-definitions-connector.d.ts +1 -0
- package/dist/declarations/src/custom-fields/custom-field-type-definitions-connector/custom-field-type-definitions-connector.d.ts +1 -0
- package/dist/declarations/src/features/picker/shared/hooks/use-current-multiple-options.d.ts +2 -3
- package/dist/declarations/src/features/pim-indexer/components/pim-indexer-provider/pim-indexer-provider.d.ts +1 -0
- package/dist/declarations/src/features/pim-indexer/components/with-pim-indexer/with-pim-indexer.d.ts +1 -0
- package/dist/declarations/src/fields/numeric-format-input/numeric-format-input.d.ts +1 -0
- package/dist/declarations/src/fields/search-input/search-input.d.ts +1 -0
- package/dist/declarations/src/fields/throttled-field/throttled-field.d.ts +1 -0
- package/dist/declarations/src/hooks/index.d.ts +3 -0
- package/dist/declarations/src/hooks/use-identity-banner-notification/index.d.ts +1 -0
- package/dist/declarations/src/hooks/use-identity-banner-notification/use-identity-banner-notification.d.ts +6 -0
- package/dist/declarations/src/hooks/use-store-search-index-status-fetcher/index.d.ts +1 -0
- package/dist/declarations/src/hooks/use-store-search-index-status-fetcher/use-store-search-index-status-fetcher.d.ts +8 -0
- package/dist/declarations/src/hooks/use-stores-search-fetcher/index.d.ts +1 -0
- package/dist/declarations/src/hooks/use-stores-search-fetcher/use-stores-search-fetcher.d.ts +25 -0
- package/dist/declarations/src/index.d.ts +4 -4
- package/dist/declarations/src/utils/bulk-notifications/get-bulk-notification.d.ts +32 -11
- package/dist/declarations/src/utils/create-reducer/create-reducer.d.ts +1 -1
- package/dist/declarations/src/utils/graphql/graphql.d.ts +3 -3
- package/package.json +23 -23
|
@@ -258,6 +258,7 @@ const REMINDER_OPTION_3_DAY = '3day';
|
|
|
258
258
|
const REMINDER_OPTION_5_DAY = '5day';
|
|
259
259
|
const REMINDER_OPTION_7_DAY = '7day';
|
|
260
260
|
const REMINDER_OPTION_10_DAY = '10day';
|
|
261
|
+
const REMINDER_OPTION_15_DAY = '15day';
|
|
261
262
|
const INTERVALS_IN_SECONDS = {
|
|
262
263
|
[REMINDER_OPTION_1_HOUR]: 3600,
|
|
263
264
|
[REMINDER_OPTION_4_HOUR]: 14400,
|
|
@@ -266,7 +267,8 @@ const INTERVALS_IN_SECONDS = {
|
|
|
266
267
|
[REMINDER_OPTION_3_DAY]: 259200,
|
|
267
268
|
[REMINDER_OPTION_5_DAY]: 432000,
|
|
268
269
|
[REMINDER_OPTION_7_DAY]: 604800,
|
|
269
|
-
[REMINDER_OPTION_10_DAY]: 864000
|
|
270
|
+
[REMINDER_OPTION_10_DAY]: 864000,
|
|
271
|
+
[REMINDER_OPTION_15_DAY]: 1296000
|
|
270
272
|
};
|
|
271
273
|
const EXCLUDING_PRODUCTS = 'excludingProducts';
|
|
272
274
|
|
|
@@ -296,7 +298,7 @@ var commonPickerMessages = reactIntl.defineMessages({
|
|
|
296
298
|
}
|
|
297
299
|
});
|
|
298
300
|
|
|
299
|
-
var messages$
|
|
301
|
+
var messages$T = reactIntl.defineMessages({
|
|
300
302
|
noChannelsFound: {
|
|
301
303
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
302
304
|
description: 'The message to display when no channels were found',
|
|
@@ -309,8 +311,8 @@ var messages$S = reactIntl.defineMessages({
|
|
|
309
311
|
}
|
|
310
312
|
});
|
|
311
313
|
|
|
312
|
-
function ownKeys$
|
|
313
|
-
function _objectSpread$
|
|
314
|
+
function ownKeys$1v(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
315
|
+
function _objectSpread$1v(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1v(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1v(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
314
316
|
var GetChannelsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channels" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "ListValue", values: [{ kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, { kind: "StringValue", value: "key", block: false }] } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "60" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
315
317
|
var GetChannelQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channel" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
316
318
|
var PickerInputChannel = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -339,13 +341,13 @@ const ChannelPickerInput = _ref => {
|
|
|
339
341
|
const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
|
|
340
342
|
const variables = React.useMemo(() => {
|
|
341
343
|
const rolesClause = getRolesClause(roles);
|
|
342
|
-
return _objectSpread$
|
|
344
|
+
return _objectSpread$1v({
|
|
343
345
|
sortByNamePath: `name.${dataLocale}`
|
|
344
346
|
}, rolesClause && {
|
|
345
347
|
extraWhere: rolesClause
|
|
346
348
|
});
|
|
347
349
|
}, [dataLocale, roles]);
|
|
348
|
-
const _useState = React.useState(),
|
|
350
|
+
const _useState = React.useState(null),
|
|
349
351
|
_useState2 = _slicedToArray(_useState, 2),
|
|
350
352
|
loadingError = _useState2[0],
|
|
351
353
|
setLoadingError = _useState2[1];
|
|
@@ -405,16 +407,17 @@ const ChannelPickerInput = _ref => {
|
|
|
405
407
|
_useHandlers2 = _slicedToArray(_useHandlers, 2),
|
|
406
408
|
handleInternalInputChange = _useHandlers2[0],
|
|
407
409
|
handleChange = _useHandlers2[1];
|
|
408
|
-
const handleInputChange = React.useCallback(
|
|
410
|
+
const handleInputChange = React.useCallback(newValue => {
|
|
409
411
|
setLoadingError(null);
|
|
410
|
-
|
|
412
|
+
// FIXME: useHandlers hook is not properly typed
|
|
413
|
+
handleInternalInputChange?.(newValue);
|
|
411
414
|
}, [handleInternalInputChange]);
|
|
412
415
|
const isCurrentOptionLoadingFailed = Boolean(currentOptions?.error);
|
|
413
416
|
React.useEffect(() => {
|
|
414
417
|
if (isCurrentOptionLoadingFailed && onError) onError(currentOptions.error);
|
|
415
418
|
}, [isCurrentOptionLoadingFailed, onError, currentOptions]);
|
|
416
419
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
417
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
420
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$T.noChannelsFound), [loadingError, formatMessage]);
|
|
418
421
|
const tooltipTitle = !isMulti ? currentSingleOption?.data?.label ?? '' : '';
|
|
419
422
|
const selectedValue = currentOptions.data ?? (isMulti ? [] : null);
|
|
420
423
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
@@ -426,7 +429,7 @@ const ChannelPickerInput = _ref => {
|
|
|
426
429
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
427
430
|
id: name,
|
|
428
431
|
name: name,
|
|
429
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
432
|
+
placeholder: placeholder ?? formatMessage(messages$T.placeholder),
|
|
430
433
|
loadOptions: loadOptionsDebounced,
|
|
431
434
|
defaultOptions: true,
|
|
432
435
|
showOptionGroupDivider: true,
|
|
@@ -454,7 +457,6 @@ const ChannelPickerInput = _ref => {
|
|
|
454
457
|
})
|
|
455
458
|
});
|
|
456
459
|
};
|
|
457
|
-
ChannelPickerInput.displayName = 'ChannelPickerInput';
|
|
458
460
|
var ChannelPickerInput$1 = ChannelPickerInput;
|
|
459
461
|
|
|
460
462
|
function _callSuper$9(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$9() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
@@ -483,7 +485,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
483
485
|
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
484
486
|
var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
485
487
|
|
|
486
|
-
var messages$
|
|
488
|
+
var messages$S = reactIntl.defineMessages({
|
|
487
489
|
noProductTypesFound: {
|
|
488
490
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
489
491
|
description: 'The message to display when no product types were found',
|
|
@@ -572,7 +574,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
572
574
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
573
575
|
id: name,
|
|
574
576
|
name: name,
|
|
575
|
-
placeholder: formatMessage(messages$
|
|
577
|
+
placeholder: formatMessage(messages$S.placeholder),
|
|
576
578
|
loadOptions: loadOptionsDebounced,
|
|
577
579
|
defaultOptions: [],
|
|
578
580
|
isClearable: isClearable,
|
|
@@ -585,7 +587,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
585
587
|
onInputChange: handleInputChange,
|
|
586
588
|
onBlur: onBlur,
|
|
587
589
|
value: currentOption.data,
|
|
588
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
590
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$S.noProductTypesFound),
|
|
589
591
|
hasError: hasError || isLoadingFailed,
|
|
590
592
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
591
593
|
menuPortalTarget: document.body,
|
|
@@ -601,7 +603,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
601
603
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
602
604
|
var ProductTypePickerInput$1 = ProductTypePickerInput;
|
|
603
605
|
|
|
604
|
-
var messages$
|
|
606
|
+
var messages$R = reactIntl.defineMessages({
|
|
605
607
|
noStatesFound: {
|
|
606
608
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
607
609
|
description: 'The message to display when no states were found',
|
|
@@ -685,7 +687,7 @@ const StatePickerInput = _ref => {
|
|
|
685
687
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
686
688
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
687
689
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
688
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
690
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$R.noStatesFound), [loadingError, formatMessage]);
|
|
689
691
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
690
692
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
691
693
|
max: "scale",
|
|
@@ -697,7 +699,7 @@ const StatePickerInput = _ref => {
|
|
|
697
699
|
id: name,
|
|
698
700
|
name: name,
|
|
699
701
|
horizontalConstraint: "scale",
|
|
700
|
-
placeholder: formatMessage(messages$
|
|
702
|
+
placeholder: formatMessage(messages$R.placeholder),
|
|
701
703
|
loadOptions: loadOptionsDebounced,
|
|
702
704
|
defaultOptions: true,
|
|
703
705
|
showOptionGroupDivider: true,
|
|
@@ -727,9 +729,9 @@ const StatePickerInput = _ref => {
|
|
|
727
729
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
728
730
|
var StatePickerInput$1 = StatePickerInput;
|
|
729
731
|
|
|
730
|
-
function ownKeys$
|
|
731
|
-
function _objectSpread$
|
|
732
|
-
const TooltipWrapper = /*#__PURE__*/React__namespace["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$
|
|
732
|
+
function ownKeys$1u(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
733
|
+
function _objectSpread$1u(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1u(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1u(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
734
|
+
const TooltipWrapper = /*#__PURE__*/React__namespace["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$1u({
|
|
733
735
|
ref: ref,
|
|
734
736
|
style: {
|
|
735
737
|
display: 'block',
|
|
@@ -754,7 +756,7 @@ const CustomFieldTooltip = _ref => {
|
|
|
754
756
|
};
|
|
755
757
|
var CustomFieldTooltip$1 = CustomFieldTooltip;
|
|
756
758
|
|
|
757
|
-
var messages$
|
|
759
|
+
var messages$Q = reactIntl.defineMessages({
|
|
758
760
|
bottomOption: {
|
|
759
761
|
id: 'Products.Pickers.bottomOption',
|
|
760
762
|
description: 'The message to display at the end of the options menu',
|
|
@@ -762,11 +764,11 @@ var messages$P = reactIntl.defineMessages({
|
|
|
762
764
|
}
|
|
763
765
|
});
|
|
764
766
|
|
|
765
|
-
function ownKeys$
|
|
766
|
-
function _objectSpread$
|
|
767
|
+
function ownKeys$1t(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
768
|
+
function _objectSpread$1t(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1t(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1t(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
767
769
|
const getBottomOption = formatMessage => ({
|
|
768
770
|
options: [{
|
|
769
|
-
label: formatMessage ? formatMessage(messages$
|
|
771
|
+
label: formatMessage ? formatMessage(messages$Q.bottomOption) : messages$Q.bottomOption,
|
|
770
772
|
isBottomOption: true,
|
|
771
773
|
isDisabled: true
|
|
772
774
|
}]
|
|
@@ -774,7 +776,7 @@ const getBottomOption = formatMessage => ({
|
|
|
774
776
|
const Option$2 = props => {
|
|
775
777
|
const _useIntl = reactIntl.useIntl(),
|
|
776
778
|
formatMessage = _useIntl.formatMessage;
|
|
777
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
779
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$1t(_objectSpread$1t({}, props), {}, {
|
|
778
780
|
children: props.data.isBottomOption ? jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
779
781
|
tone: "secondary",
|
|
780
782
|
children: formatMessage(props.data.label)
|
|
@@ -791,8 +793,8 @@ const Option$2 = props => {
|
|
|
791
793
|
};
|
|
792
794
|
Option$2.displayName = 'Option';
|
|
793
795
|
|
|
794
|
-
function ownKeys$
|
|
795
|
-
function _objectSpread$
|
|
796
|
+
function ownKeys$1s(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
797
|
+
function _objectSpread$1s(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1s(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1s(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
796
798
|
const useHandlers = onChange => {
|
|
797
799
|
const _useState = React.useState(),
|
|
798
800
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -803,8 +805,8 @@ const useHandlers = onChange => {
|
|
|
803
805
|
}, []);
|
|
804
806
|
const handleChange = useEventCallback$1(event => {
|
|
805
807
|
var _context;
|
|
806
|
-
const eventWithExtractedValue = _objectSpread$
|
|
807
|
-
target: _objectSpread$
|
|
808
|
+
const eventWithExtractedValue = _objectSpread$1s(_objectSpread$1s({}, event), {}, {
|
|
809
|
+
target: _objectSpread$1s(_objectSpread$1s({}, event.target), {}, {
|
|
808
810
|
value: _Array$isArray__default["default"](event.target.value) ? _mapInstanceProperty__default["default"](_context = event.target.value).call(_context, item => item?.value) : event.target.value?.value
|
|
809
811
|
})
|
|
810
812
|
});
|
|
@@ -815,8 +817,8 @@ const useHandlers = onChange => {
|
|
|
815
817
|
var useHandlers$1 = useHandlers;
|
|
816
818
|
|
|
817
819
|
const _excluded$g = ["extraWhere"];
|
|
818
|
-
function ownKeys$
|
|
819
|
-
function _objectSpread$
|
|
820
|
+
function ownKeys$1r(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
821
|
+
function _objectSpread$1r(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1r(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1r(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
820
822
|
const constructPrefixSearchPredicate$1 = function () {
|
|
821
823
|
let prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
822
824
|
let lowerBound = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -863,7 +865,7 @@ const useLoadOptions = _ref => {
|
|
|
863
865
|
}
|
|
864
866
|
return client$1.query({
|
|
865
867
|
query,
|
|
866
|
-
variables: _objectSpread$
|
|
868
|
+
variables: _objectSpread$1r({
|
|
867
869
|
where
|
|
868
870
|
}, restVariables),
|
|
869
871
|
context: {
|
|
@@ -1168,8 +1170,8 @@ var keepDisplayName$1 = keepDisplayName;
|
|
|
1168
1170
|
const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName$1(BaseComponent)})`;
|
|
1169
1171
|
var wrapDisplayName$1 = wrapDisplayName;
|
|
1170
1172
|
|
|
1171
|
-
function ownKeys$
|
|
1172
|
-
function _objectSpread$
|
|
1173
|
+
function ownKeys$1q(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1174
|
+
function _objectSpread$1q(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1q(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1q(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1173
1175
|
function _callSuper$8(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$8() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1174
1176
|
function _isNativeReflectConstruct$8() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$8 = function () { return !!t; })(); }
|
|
1175
1177
|
const withMouseOverState = BaseComponent => {
|
|
@@ -1200,7 +1202,7 @@ const withMouseOverState = BaseComponent => {
|
|
|
1200
1202
|
handleMouseOver: this.handleMouseOver,
|
|
1201
1203
|
handleMouseOut: this.handleMouseOut
|
|
1202
1204
|
};
|
|
1203
|
-
return jsxRuntime.jsx(BaseComponent, _objectSpread$
|
|
1205
|
+
return jsxRuntime.jsx(BaseComponent, _objectSpread$1q({}, _objectSpread$1q(_objectSpread$1q({}, this.props), injectedProps)));
|
|
1204
1206
|
}
|
|
1205
1207
|
}]);
|
|
1206
1208
|
}(React.Component);
|
|
@@ -1216,8 +1218,8 @@ var _ref$g = {
|
|
|
1216
1218
|
} ;
|
|
1217
1219
|
const getInputStyles = props => /*#__PURE__*/react$1.css("transition:0.2s ease;border-radius:", designSystem.designTokens.borderRadiusForInput, ";border-style:solid;border-width:1px;color:", designSystem.designTokens.colorSolid, ";font-weight:", designSystem.designTokens.fontWeight500, ";font-size:", designSystem.designTokens.fontSize10, ";font-family:", designSystem.designTokens.fontFamily, ";padding:", designSystem.designTokens.spacingS, " ", designSystem.designTokens.spacingM, ";outline:none;box-shadow:none;appearance:none;width:100%;min-height:", designSystem.designTokens.heightForInput, ";", props.style === 'primary' && /*#__PURE__*/react$1.css("border-color:", designSystem.designTokens.colorNeutral, ";background-color:", designSystem.designTokens.colorSurface, ";" + ("" ), "" ), " ", props.style === 'secondary' && /*#__PURE__*/react$1.css("background-color:", designSystem.designTokens.colorNeutral95, ";border-color:", designSystem.designTokens.colorSurface, ";" + ("" ), "" ), " ", props.disabled && /*#__PURE__*/react$1.css("cursor:not-allowed;background-color:", designSystem.designTokens.colorAccent98, ";color:", designSystem.designTokens.colorSolid, ";opacity:1;" + ("" ), "" ), " ", !props.isValid && /*#__PURE__*/react$1.css("border-color:", designSystem.designTokens.colorError, "!important;border:1px solid;" + ("" ), "" ), " ", props.isGranular && _ref$g, ";" + ("" ), "" );
|
|
1218
1220
|
|
|
1219
|
-
function ownKeys$
|
|
1220
|
-
function _objectSpread$
|
|
1221
|
+
function ownKeys$1p(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1222
|
+
function _objectSpread$1p(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1p(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1p(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1221
1223
|
function _callSuper$7(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$7() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1222
1224
|
function _isNativeReflectConstruct$7() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$7 = function () { return !!t; })(); }
|
|
1223
1225
|
let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
@@ -1296,7 +1298,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
1296
1298
|
}, {
|
|
1297
1299
|
key: "render",
|
|
1298
1300
|
value: function render() {
|
|
1299
|
-
const commonProps = _objectSpread$
|
|
1301
|
+
const commonProps = _objectSpread$1p(_objectSpread$1p({
|
|
1300
1302
|
value: this.state.draftValue,
|
|
1301
1303
|
autoComplete: this.props.autoComplete,
|
|
1302
1304
|
onChange: this.handleChange,
|
|
@@ -1315,13 +1317,13 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
1315
1317
|
htmlFor: inputId,
|
|
1316
1318
|
children: this.props.label
|
|
1317
1319
|
})
|
|
1318
|
-
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$
|
|
1320
|
+
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$1p(_objectSpread$1p({}, commonProps), {}, {
|
|
1319
1321
|
id: inputId,
|
|
1320
1322
|
css: getTextareaStyles(this.props),
|
|
1321
1323
|
rows: 1,
|
|
1322
1324
|
maxRows: this.props.autoSize ? undefined : 1,
|
|
1323
1325
|
cacheMeasurements: true
|
|
1324
|
-
})) : jsxRuntime.jsx("input", _objectSpread$
|
|
1326
|
+
})) : jsxRuntime.jsx("input", _objectSpread$1p(_objectSpread$1p({}, commonProps), {}, {
|
|
1325
1327
|
id: inputId,
|
|
1326
1328
|
ref: this.props.inputRef,
|
|
1327
1329
|
type: this.props.as,
|
|
@@ -1355,7 +1357,7 @@ ThrottledField.defaultProps = {
|
|
|
1355
1357
|
};
|
|
1356
1358
|
var ThrottledField$1 = ThrottledField;
|
|
1357
1359
|
|
|
1358
|
-
var messages$
|
|
1360
|
+
var messages$P = reactIntl.defineMessages({
|
|
1359
1361
|
buttonLabel: {
|
|
1360
1362
|
id: 'SearchInput.buttonLabel',
|
|
1361
1363
|
description: 'Label for "Search" button.',
|
|
@@ -1368,7 +1370,7 @@ var messages$O = reactIntl.defineMessages({
|
|
|
1368
1370
|
}
|
|
1369
1371
|
});
|
|
1370
1372
|
|
|
1371
|
-
const getInputContainerStyles = props => /*#__PURE__*/react$1.css("border-color:", props.isGranular ? designSystem.designTokens.colorPrimary : designSystem.designTokens.borderColorForInput, ";height:", designSystem.designTokens.heightForInput, ";position:relative;&>input{padding-right:
|
|
1373
|
+
const getInputContainerStyles = props => /*#__PURE__*/react$1.css("border-color:", props.isGranular ? designSystem.designTokens.colorPrimary : designSystem.designTokens.borderColorForInput, ";height:", designSystem.designTokens.heightForInput, ";position:relative;&>input{padding-right:", designSystem.designTokens.spacing70, ";padding-left:", designSystem.designTokens.spacing55, ";font-size:", designSystem.designTokens.fontSize30, ";}&>input::placeholder{font-weight:", designSystem.designTokens.fontWeight400, ";font-size:", designSystem.designTokens.fontSize30, ";font-family:", designSystem.designTokens.fontFamily, ";color:", designSystem.designTokens.colorNeutral60, ";}", !props.disabled && `
|
|
1372
1374
|
& > input:hover {
|
|
1373
1375
|
border: 1px solid ${designSystem.designTokens.borderColorForInput};
|
|
1374
1376
|
background-color: ${designSystem.designTokens.backgroundColorForInputWhenHovered};
|
|
@@ -1385,10 +1387,10 @@ const getInputContainerStyles = props => /*#__PURE__*/react$1.css("border-color:
|
|
|
1385
1387
|
`, " ", props.isGranular && `
|
|
1386
1388
|
right: 3px;
|
|
1387
1389
|
`, ";" + ("" ), "" );
|
|
1388
|
-
const getSecondaryIconButtonStyles = props => /*#__PURE__*/react$1.css("background-color:transparent;border-color:transparent;position:absolute;right:
|
|
1390
|
+
const getSecondaryIconButtonStyles = props => /*#__PURE__*/react$1.css("background-color:transparent;border-color:transparent;position:absolute;right:20px;top:50%;transform:translateY(-50%);z-index:2;&:hover svg{fill:", designSystem.designTokens.colorError, "!important;}", props.isGranular && `
|
|
1389
1391
|
right: 41px;
|
|
1390
1392
|
`, ";" + ("" ), "" );
|
|
1391
|
-
const getSearchButtonStyles = props => /*#__PURE__*/react$1.css("background-color:transparent;border-color:transparent;position:absolute;
|
|
1393
|
+
const getSearchButtonStyles = props => /*#__PURE__*/react$1.css("background-color:transparent;border-color:transparent;position:absolute;left:10px;top:50%;transform:translateY(-50%);z-index:2;display:inline-flex;align-items:center;justify-content:center;", props.isGranular && `
|
|
1392
1394
|
right: 15px;
|
|
1393
1395
|
`, " ", !props.disabled && `
|
|
1394
1396
|
cursor: pointer;
|
|
@@ -1470,6 +1472,17 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
1470
1472
|
className: classnames__default["default"](this.props.containerClassName),
|
|
1471
1473
|
css: _ref$f,
|
|
1472
1474
|
children: [jsxRuntime.jsx("div", {
|
|
1475
|
+
"data-testid": "search-button",
|
|
1476
|
+
css: getSearchButtonStyles(this.props),
|
|
1477
|
+
onClick: this.props.disabled ? null : this.handleSubmit,
|
|
1478
|
+
label: "search-button",
|
|
1479
|
+
onMouseOver: this.props.handleMouseOver,
|
|
1480
|
+
onMouseOut: this.props.handleMouseOut,
|
|
1481
|
+
children: jsxRuntime.jsx(uiKit.SearchIcon, {
|
|
1482
|
+
color: this.props.iconColor || this.props.isMouseOver && !this.props.disabled ? 'primary' : 'neutral60',
|
|
1483
|
+
size: "big"
|
|
1484
|
+
})
|
|
1485
|
+
}), jsxRuntime.jsx("div", {
|
|
1473
1486
|
css: getInputContainerStyles(this.props),
|
|
1474
1487
|
children: jsxRuntime.jsx(ThrottledField$1, {
|
|
1475
1488
|
style: "primary",
|
|
@@ -1477,7 +1490,7 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
1477
1490
|
"data-testid": this.props.testId || 'search-input',
|
|
1478
1491
|
value: this.state.text,
|
|
1479
1492
|
label: this.props.label,
|
|
1480
|
-
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$
|
|
1493
|
+
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$P.placeholder),
|
|
1481
1494
|
inputRef: this.props.inputRef || this.setInputRef,
|
|
1482
1495
|
onChange: this.handleInputChange,
|
|
1483
1496
|
onEnter: this.handleEnter,
|
|
@@ -1489,20 +1502,10 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
1489
1502
|
}), this.state.text && jsxRuntime.jsx(uiKit.SecondaryIconButton, {
|
|
1490
1503
|
css: getSecondaryIconButtonStyles(this.props),
|
|
1491
1504
|
icon: jsxRuntime.jsx(uiKit.CloseIcon, {}),
|
|
1492
|
-
size: "
|
|
1505
|
+
size: "20",
|
|
1493
1506
|
label: "clear-button",
|
|
1507
|
+
color: "solid",
|
|
1494
1508
|
onClick: this.handleClear
|
|
1495
|
-
}), jsxRuntime.jsx("div", {
|
|
1496
|
-
"data-testid": "search-button",
|
|
1497
|
-
css: getSearchButtonStyles(this.props),
|
|
1498
|
-
onClick: this.props.disabled ? null : this.handleSubmit,
|
|
1499
|
-
label: "search-button",
|
|
1500
|
-
onMouseOver: this.props.handleMouseOver,
|
|
1501
|
-
onMouseOut: this.props.handleMouseOut,
|
|
1502
|
-
children: jsxRuntime.jsx(uiKit.SearchIcon, {
|
|
1503
|
-
color: this.props.iconColor || this.props.isMouseOver && !this.props.disabled ? 'primary' : 'neutral60',
|
|
1504
|
-
size: "big"
|
|
1505
|
-
})
|
|
1506
1509
|
})]
|
|
1507
1510
|
})
|
|
1508
1511
|
});
|
|
@@ -1529,8 +1532,8 @@ SearchInput.defaultProps = {
|
|
|
1529
1532
|
};
|
|
1530
1533
|
var searchInput = flowRight__default["default"](keepDisplayName$1(SearchInput), withMouseOverState$1, reactIntl.injectIntl)(SearchInput);
|
|
1531
1534
|
|
|
1532
|
-
function ownKeys$
|
|
1533
|
-
function _objectSpread$
|
|
1535
|
+
function ownKeys$1o(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1536
|
+
function _objectSpread$1o(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1o(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1o(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1534
1537
|
const injectDataTablePaginationState = initialValues => Component => {
|
|
1535
1538
|
const WithDataTablePaginationState = props => {
|
|
1536
1539
|
const _usePaginationState = uiKit.usePaginationState({
|
|
@@ -1543,7 +1546,7 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1543
1546
|
key: initialValues?.tableSorting?.key,
|
|
1544
1547
|
order: initialValues?.tableSorting?.order
|
|
1545
1548
|
});
|
|
1546
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1549
|
+
return jsxRuntime.jsx(Component, _objectSpread$1o(_objectSpread$1o({}, props), {}, {
|
|
1547
1550
|
dataTablePaginationState: {
|
|
1548
1551
|
page,
|
|
1549
1552
|
perPage,
|
|
@@ -1556,8 +1559,8 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1556
1559
|
};
|
|
1557
1560
|
var injectDataTablePaginationState$1 = injectDataTablePaginationState;
|
|
1558
1561
|
|
|
1559
|
-
function ownKeys$
|
|
1560
|
-
function _objectSpread$
|
|
1562
|
+
function ownKeys$1n(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1563
|
+
function _objectSpread$1n(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1n(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1n(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1561
1564
|
const injectNotifications = function () {
|
|
1562
1565
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
1563
1566
|
return Component => {
|
|
@@ -1572,7 +1575,7 @@ const injectNotifications = function () {
|
|
|
1572
1575
|
onActionError,
|
|
1573
1576
|
hideAllPageNotifications
|
|
1574
1577
|
};
|
|
1575
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1578
|
+
return jsxRuntime.jsx(Component, _objectSpread$1n(_objectSpread$1n({}, props), {}, {
|
|
1576
1579
|
[propName]: notifications
|
|
1577
1580
|
}));
|
|
1578
1581
|
};
|
|
@@ -1582,23 +1585,23 @@ const injectNotifications = function () {
|
|
|
1582
1585
|
};
|
|
1583
1586
|
var injectNotifications$1 = injectNotifications;
|
|
1584
1587
|
|
|
1585
|
-
function ownKeys$
|
|
1586
|
-
function _objectSpread$
|
|
1588
|
+
function ownKeys$1m(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1589
|
+
function _objectSpread$1m(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1m(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1m(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1587
1590
|
function isPropsMapper(mapProps) {
|
|
1588
1591
|
return typeof mapProps === 'function';
|
|
1589
1592
|
}
|
|
1590
1593
|
const withProps = mapProps => Component => {
|
|
1591
1594
|
const EnhancedWithProps = ownProps => {
|
|
1592
|
-
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
1593
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1595
|
+
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1m(_objectSpread$1m({}, ownProps), mapProps(ownProps)) : _objectSpread$1m(_objectSpread$1m({}, ownProps), mapProps);
|
|
1596
|
+
return jsxRuntime.jsx(Component, _objectSpread$1m({}, enhancedProps));
|
|
1594
1597
|
};
|
|
1595
1598
|
EnhancedWithProps.displayName = wrapDisplayName$1(Component, 'withProps');
|
|
1596
1599
|
return EnhancedWithProps;
|
|
1597
1600
|
};
|
|
1598
1601
|
var withProps$1 = withProps;
|
|
1599
1602
|
|
|
1600
|
-
function ownKeys$
|
|
1601
|
-
function _objectSpread$
|
|
1603
|
+
function ownKeys$1l(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1604
|
+
function _objectSpread$1l(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1l(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1l(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1602
1605
|
const useRedirectEffect = _ref => {
|
|
1603
1606
|
let goTo = _ref.goTo;
|
|
1604
1607
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -1618,31 +1621,31 @@ const defaultOptions$5 = {
|
|
|
1618
1621
|
skip: () => false
|
|
1619
1622
|
};
|
|
1620
1623
|
const withRedirectTo = options => Component => {
|
|
1621
|
-
const mergedOptions = _objectSpread$
|
|
1624
|
+
const mergedOptions = _objectSpread$1l(_objectSpread$1l({}, defaultOptions$5), options);
|
|
1622
1625
|
const WithRedirectTo = props => {
|
|
1623
1626
|
if (!mergedOptions.skip(props)) {
|
|
1624
1627
|
return jsxRuntime.jsx(RedirectTo, {
|
|
1625
1628
|
goTo: options.selectGoTo(props)
|
|
1626
1629
|
});
|
|
1627
1630
|
}
|
|
1628
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1631
|
+
return jsxRuntime.jsx(Component, _objectSpread$1l({}, props));
|
|
1629
1632
|
};
|
|
1630
1633
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
1631
1634
|
return WithRedirectTo;
|
|
1632
1635
|
};
|
|
1633
1636
|
var withRedirectTo$1 = withRedirectTo;
|
|
1634
1637
|
|
|
1635
|
-
function ownKeys$
|
|
1636
|
-
function _objectSpread$
|
|
1638
|
+
function ownKeys$1k(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1639
|
+
function _objectSpread$1k(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1637
1640
|
const defaultOptions$4 = {
|
|
1638
1641
|
propName: 'modalState',
|
|
1639
1642
|
isInitiallyOpen: false
|
|
1640
1643
|
};
|
|
1641
1644
|
const injectModalState$2 = options => Component => {
|
|
1642
|
-
const mergedOptions = _objectSpread$
|
|
1645
|
+
const mergedOptions = _objectSpread$1k(_objectSpread$1k({}, defaultOptions$4), options);
|
|
1643
1646
|
const WithModalState = props => {
|
|
1644
1647
|
const modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
1645
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1648
|
+
return jsxRuntime.jsx(Component, _objectSpread$1k(_objectSpread$1k({}, props), {}, {
|
|
1646
1649
|
[mergedOptions.propName]: modalState
|
|
1647
1650
|
}));
|
|
1648
1651
|
};
|
|
@@ -1651,17 +1654,17 @@ const injectModalState$2 = options => Component => {
|
|
|
1651
1654
|
};
|
|
1652
1655
|
var injectModalState$3 = injectModalState$2;
|
|
1653
1656
|
|
|
1654
|
-
function ownKeys$
|
|
1655
|
-
function _objectSpread$
|
|
1657
|
+
function ownKeys$1j(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1658
|
+
function _objectSpread$1j(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1j(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1j(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1656
1659
|
const defaultOptions$3 = {
|
|
1657
1660
|
propName: 'toggleState',
|
|
1658
1661
|
isInitiallyOpen: false
|
|
1659
1662
|
};
|
|
1660
1663
|
const injectModalState = options => Component => {
|
|
1661
|
-
const mergedOptions = _objectSpread$
|
|
1664
|
+
const mergedOptions = _objectSpread$1j(_objectSpread$1j({}, defaultOptions$3), options);
|
|
1662
1665
|
const WithToggleState = props => {
|
|
1663
1666
|
const toggleState = uiKit.useToggleState(mergedOptions.isInitiallyOpen);
|
|
1664
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1667
|
+
return jsxRuntime.jsx(Component, _objectSpread$1j(_objectSpread$1j({}, props), {}, {
|
|
1665
1668
|
[mergedOptions.propName]: toggleState
|
|
1666
1669
|
}));
|
|
1667
1670
|
};
|
|
@@ -1670,8 +1673,8 @@ const injectModalState = options => Component => {
|
|
|
1670
1673
|
};
|
|
1671
1674
|
var injectModalState$1 = injectModalState;
|
|
1672
1675
|
|
|
1673
|
-
function ownKeys$
|
|
1674
|
-
function _objectSpread$
|
|
1676
|
+
function ownKeys$1i(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1677
|
+
function _objectSpread$1i(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1i(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1i(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1675
1678
|
const defaultOptions$2 = {
|
|
1676
1679
|
storageType: 'local',
|
|
1677
1680
|
segregateByUser: true
|
|
@@ -1689,7 +1692,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
|
|
|
1689
1692
|
const isNil = value => typeof value === 'undefined' || value === null;
|
|
1690
1693
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
1691
1694
|
var _context;
|
|
1692
|
-
const mergedOptions = _objectSpread$
|
|
1695
|
+
const mergedOptions = _objectSpread$1i(_objectSpread$1i({}, defaultOptions$2), options);
|
|
1693
1696
|
const userId = applicationShellConnectors.useApplicationContext(context => context.user?.id);
|
|
1694
1697
|
const scopedStorageKey = _filterInstanceProperty__default["default"](_context = [mergedOptions.segregateByUser && userId, storageKey]).call(_context, Boolean).join('/');
|
|
1695
1698
|
const readFromStorage = React.useCallback(() => {
|
|
@@ -1734,8 +1737,8 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
1734
1737
|
};
|
|
1735
1738
|
var useStorage$1 = useStorage;
|
|
1736
1739
|
|
|
1737
|
-
function ownKeys$
|
|
1738
|
-
function _objectSpread$
|
|
1740
|
+
function ownKeys$1h(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1741
|
+
function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1h(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1h(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1739
1742
|
const defaultOptions$1 = {
|
|
1740
1743
|
propName: 'storage',
|
|
1741
1744
|
storageKey: '',
|
|
@@ -1748,7 +1751,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1748
1751
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
1749
1752
|
* argument position does not allow passing specification of option(s).
|
|
1750
1753
|
*/
|
|
1751
|
-
const mergedOptions = _objectSpread$
|
|
1754
|
+
const mergedOptions = _objectSpread$1h(_objectSpread$1h({}, defaultOptions$1), options);
|
|
1752
1755
|
const WithStorage = props => {
|
|
1753
1756
|
const _useStorage = useStorage$1(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
1754
1757
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -1762,7 +1765,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1762
1765
|
readFromStorage
|
|
1763
1766
|
}
|
|
1764
1767
|
};
|
|
1765
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
1768
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1h(_objectSpread$1h({}, props), storageProp));
|
|
1766
1769
|
};
|
|
1767
1770
|
WithStorage.displayName = wrapDisplayName$1(WrappedComponent, 'WithStorage');
|
|
1768
1771
|
return WithStorage;
|
|
@@ -1807,8 +1810,8 @@ function useFormatLocalizedFieldToString() {
|
|
|
1807
1810
|
return formatLocalizedFieldToString;
|
|
1808
1811
|
}
|
|
1809
1812
|
|
|
1810
|
-
function ownKeys$
|
|
1811
|
-
function _objectSpread$
|
|
1813
|
+
function ownKeys$1g(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1814
|
+
function _objectSpread$1g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1g(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1812
1815
|
var FetchResourceTypeDuplicatedField = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchResourceTypeDuplicatedField" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipAssociateRoles" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipAttributeGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipChannels" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipDiscountCodes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipInventoryEntries" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipOrders" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipPayments" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "associateRoles" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipAssociateRoles" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "attributeGroups" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipAttributeGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "categories" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "channels" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipChannels" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "discountCodes" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipDiscountCodes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventoryEntries" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipInventoryEntries" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "orders" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipOrders" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "payments" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipPayments" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "products" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 2328, source: { body: "query FetchResourceTypeDuplicatedField(\n $where: String\n $skipAssociateRoles: Boolean!\n $skipAttributeGroups: Boolean!\n $skipBusinessUnits: Boolean!\n $skipCarts: Boolean!\n $skipCartDiscounts: Boolean!\n $skipCategories: Boolean!\n $skipChannels: Boolean!\n $skipCustomers: Boolean!\n $skipCustomerGroups: Boolean!\n $skipDiscountCodes: Boolean!\n $skipInventoryEntries: Boolean!\n $skipOrders: Boolean!\n $skipPayments: Boolean!\n $skipProducts: Boolean!\n $skipProductDiscounts: Boolean!\n $skipProductSelections: Boolean!\n $skipProductTypes: Boolean!\n $skipShippingMethods: Boolean!\n $skipShoppingLists: Boolean!\n $skipStores: Boolean!\n $skipTaxCategories: Boolean!\n $skipZones: Boolean!\n) {\n associateRoles(where: $where) @skip(if: $skipAssociateRoles) {\n total\n }\n attributeGroups(where: $where) @skip(if: $skipAttributeGroups) {\n total\n }\n businessUnits(where: $where) @skip(if: $skipBusinessUnits) {\n total\n }\n carts(where: $where) @skip(if: $skipCarts) {\n total\n }\n cartDiscounts(where: $where) @skip(if: $skipCartDiscounts) {\n total\n }\n categories(where: $where) @skip(if: $skipCategories) {\n total\n }\n channels(where: $where) @skip(if: $skipChannels) {\n total\n }\n customers(where: $where) @skip(if: $skipCustomers) {\n total\n }\n customerGroups(where: $where) @skip(if: $skipCustomerGroups) {\n total\n }\n discountCodes(where: $where) @skip(if: $skipDiscountCodes) {\n total\n }\n inventoryEntries(where: $where) @skip(if: $skipInventoryEntries) {\n total\n }\n orders(where: $where) @skip(if: $skipOrders) {\n total\n }\n payments(where: $where) @skip(if: $skipPayments) {\n total\n }\n products(where: $where) @skip(if: $skipProducts) {\n total\n }\n productDiscounts(where: $where) @skip(if: $skipProductDiscounts) {\n total\n }\n productSelections(where: $where) @skip(if: $skipProductSelections) {\n total\n }\n productTypes(where: $where) @skip(if: $skipProductTypes) {\n total\n }\n shippingMethods(where: $where) @skip(if: $skipShippingMethods) {\n total\n }\n shoppingLists(where: $where) @skip(if: $skipShoppingLists) {\n total\n }\n stores(where: $where) @skip(if: $skipStores) {\n total\n }\n taxCategories(where: $where) @skip(if: $skipTaxCategories) {\n total\n }\n zones(where: $where) @skip(if: $skipZones) {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
1813
1816
|
const MC_RESOURCES_WITH_KEYS = {
|
|
1814
1817
|
ASSOCIATE_ROLE: 'ASSOCIATE_ROLE',
|
|
@@ -1883,7 +1886,7 @@ const DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES = {
|
|
|
1883
1886
|
[BASE_SKIP_RESOURCE_TYPES_VARIABLES.ZONE]: true
|
|
1884
1887
|
};
|
|
1885
1888
|
const getSkipVariables = resourceType => {
|
|
1886
|
-
return _objectSpread$
|
|
1889
|
+
return _objectSpread$1g(_objectSpread$1g({}, DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES), {}, {
|
|
1887
1890
|
[BASE_SKIP_RESOURCE_TYPES_VARIABLES[resourceType]]: false
|
|
1888
1891
|
});
|
|
1889
1892
|
};
|
|
@@ -1908,7 +1911,7 @@ const getQueryVariables = _ref2 => {
|
|
|
1908
1911
|
fieldValue,
|
|
1909
1912
|
id
|
|
1910
1913
|
});
|
|
1911
|
-
return _objectSpread$
|
|
1914
|
+
return _objectSpread$1g({
|
|
1912
1915
|
where
|
|
1913
1916
|
}, skipVariables);
|
|
1914
1917
|
};
|
|
@@ -1942,8 +1945,8 @@ const usePrevious = value => {
|
|
|
1942
1945
|
};
|
|
1943
1946
|
var usePrevious$1 = usePrevious;
|
|
1944
1947
|
|
|
1945
|
-
function ownKeys$
|
|
1946
|
-
function _objectSpread$
|
|
1948
|
+
function ownKeys$1f(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1949
|
+
function _objectSpread$1f(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys$1f(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys$1f(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1947
1950
|
var FetchStoresQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sort" } }, type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "Variable", name: { kind: "Name", value: "sort" } } }, { kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "count" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "offset" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "StoreBasicInfo" }, directives: [] }, { kind: "Field", name: { kind: "Name", value: "countries" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "languages" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }] }, { kind: "Field", name: { kind: "Name", value: "distributionChannelsRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "distributionChannels" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "supplyChannels" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelection" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "StoreBasicInfo" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Store" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastModifiedAt" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 1089, source: { body: "#import '../../utils/graphql/fragments/store-basic-info.ctp.graphql'\n\nquery FetchStoresQuery(\n $limit: Int\n $offset: Int\n $sort: [String!]\n $where: String\n $excludeExtendedStoresList: Boolean!\n $excludeProductSelections: Boolean!\n) {\n stores(limit: $limit, offset: $offset, sort: $sort, where: $where) {\n total\n count\n offset\n results {\n ...StoreBasicInfo\n countries {\n code\n }\n languages @skip(if: $excludeExtendedStoresList)\n distributionChannelsRef {\n id\n }\n distributionChannels @skip(if: $excludeExtendedStoresList) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n supplyChannels @skip(if: $excludeExtendedStoresList) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n productSelections @skip(if: $excludeProductSelections) {\n active\n productSelection {\n id\n mode\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
1948
1951
|
const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
1949
1952
|
var _context, _context2;
|
|
@@ -1954,20 +1957,22 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
1954
1957
|
offset: storesQueryResult.offset,
|
|
1955
1958
|
results: ((_context = storesQueryResult.results) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(store => {
|
|
1956
1959
|
var _context3, _context4;
|
|
1957
|
-
return _objectSpread$
|
|
1960
|
+
return _objectSpread$1f(_objectSpread$1f({}, store), {}, {
|
|
1958
1961
|
productSelections: ((_context3 = store.productSelections) == null ? void 0 : _bindInstanceProperty__default["default"](_context4 = Function.call).call(_context4, _filterInstanceProperty__default["default"](_context3), _context3))?.(productSelectionRef => Boolean(productSelectionRef.productSelection))
|
|
1959
1962
|
});
|
|
1960
1963
|
})
|
|
1961
1964
|
};
|
|
1962
1965
|
};
|
|
1963
1966
|
const createQueryVariables$6 = ownProps => {
|
|
1964
|
-
var _context5;
|
|
1965
|
-
return _objectSpread$
|
|
1967
|
+
var _context5, _context6;
|
|
1968
|
+
return _objectSpread$1f(_objectSpread$1f(_objectSpread$1f({
|
|
1966
1969
|
limit: ownProps.limit,
|
|
1967
1970
|
offset: ownProps.offset,
|
|
1968
1971
|
sort: _sortInstanceProperty__default["default"](ownProps)
|
|
1969
1972
|
}, Boolean(ownProps.stores) && {
|
|
1970
1973
|
where: `key in (${_mapInstanceProperty__default["default"](_context5 = ownProps.stores).call(_context5, store => `"${store}"`).join(', ')})`
|
|
1974
|
+
}), Boolean(ownProps.storeIds?.length) && {
|
|
1975
|
+
where: `id in (${_mapInstanceProperty__default["default"](_context6 = ownProps.storeIds).call(_context6, storeId => `"${storeId}"`).join(', ')})`
|
|
1971
1976
|
}), {}, {
|
|
1972
1977
|
excludeExtendedStoresList: ownProps.excludeExtendedStoresList,
|
|
1973
1978
|
excludeProductSelections: ownProps.excludeProductSelections
|
|
@@ -1981,6 +1986,7 @@ const useStoresListFetcher = props => {
|
|
|
1981
1986
|
offset: props.offset,
|
|
1982
1987
|
sort: _sortInstanceProperty__default["default"](props),
|
|
1983
1988
|
stores: props.stores,
|
|
1989
|
+
storeIds: props.storeIds,
|
|
1984
1990
|
excludeExtendedStoresList,
|
|
1985
1991
|
excludeProductSelections: excludeProductSelections
|
|
1986
1992
|
});
|
|
@@ -2012,6 +2018,174 @@ const useStoresListFetcher = props => {
|
|
|
2012
2018
|
};
|
|
2013
2019
|
var useStoresListFetcher$1 = useStoresListFetcher;
|
|
2014
2020
|
|
|
2021
|
+
function ownKeys$1e(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2022
|
+
function _objectSpread$1e(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1e(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1e(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2023
|
+
const createSearchQuery = (searchBy, searchTerm, language) => {
|
|
2024
|
+
if (searchBy === 'key/name') {
|
|
2025
|
+
return {
|
|
2026
|
+
or: [{
|
|
2027
|
+
fullTextPrefix: {
|
|
2028
|
+
field: 'name',
|
|
2029
|
+
language: language,
|
|
2030
|
+
value: searchTerm
|
|
2031
|
+
}
|
|
2032
|
+
}, {
|
|
2033
|
+
fullTextPrefix: {
|
|
2034
|
+
field: 'key',
|
|
2035
|
+
value: searchTerm
|
|
2036
|
+
}
|
|
2037
|
+
}]
|
|
2038
|
+
};
|
|
2039
|
+
} else {
|
|
2040
|
+
return {
|
|
2041
|
+
fullTextPrefix: _objectSpread$1e(_objectSpread$1e({
|
|
2042
|
+
field: searchBy
|
|
2043
|
+
}, searchBy === 'name' ? {
|
|
2044
|
+
language: language
|
|
2045
|
+
} : {}), {}, {
|
|
2046
|
+
value: searchTerm
|
|
2047
|
+
})
|
|
2048
|
+
};
|
|
2049
|
+
}
|
|
2050
|
+
};
|
|
2051
|
+
const searchForStores = _ref => {
|
|
2052
|
+
let projectKey = _ref.projectKey,
|
|
2053
|
+
searchTerm = _ref.searchTerm,
|
|
2054
|
+
searchBy = _ref.searchBy,
|
|
2055
|
+
language = _ref.language,
|
|
2056
|
+
_ref$sortOrder = _ref.sortOrder,
|
|
2057
|
+
sortOrder = _ref$sortOrder === void 0 ? 'desc' : _ref$sortOrder,
|
|
2058
|
+
_ref$limit = _ref.limit,
|
|
2059
|
+
limit = _ref$limit === void 0 ? 20 : _ref$limit,
|
|
2060
|
+
_ref$offset = _ref.offset,
|
|
2061
|
+
offset = _ref$offset === void 0 ? 0 : _ref$offset;
|
|
2062
|
+
return sdk.actions.post({
|
|
2063
|
+
mcApiProxyTarget: 'stores-search',
|
|
2064
|
+
uri: `/${projectKey}`,
|
|
2065
|
+
payload: {
|
|
2066
|
+
query: createSearchQuery(searchBy, searchTerm, language),
|
|
2067
|
+
limit,
|
|
2068
|
+
offset,
|
|
2069
|
+
sort: [{
|
|
2070
|
+
field: 'name',
|
|
2071
|
+
language: language,
|
|
2072
|
+
order: sortOrder
|
|
2073
|
+
}]
|
|
2074
|
+
}
|
|
2075
|
+
});
|
|
2076
|
+
};
|
|
2077
|
+
const useStoresSearchFetcher = () => {
|
|
2078
|
+
const dispatch = sdk.useAsyncDispatch();
|
|
2079
|
+
const _useState = React.useState(false),
|
|
2080
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2081
|
+
isLoading = _useState2[0],
|
|
2082
|
+
setIsLoading = _useState2[1];
|
|
2083
|
+
const _useState3 = React.useState({
|
|
2084
|
+
hits: [],
|
|
2085
|
+
total: 0,
|
|
2086
|
+
searchTerm: '',
|
|
2087
|
+
searchBy: ''
|
|
2088
|
+
}),
|
|
2089
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2090
|
+
storeSearchResults = _useState4[0],
|
|
2091
|
+
setStoreSearchResults = _useState4[1];
|
|
2092
|
+
const fetchStoreSearchResults = async _ref2 => {
|
|
2093
|
+
let projectKey = _ref2.projectKey,
|
|
2094
|
+
limit = _ref2.limit,
|
|
2095
|
+
offset = _ref2.offset,
|
|
2096
|
+
searchTerm = _ref2.searchTerm,
|
|
2097
|
+
searchBy = _ref2.searchBy,
|
|
2098
|
+
language = _ref2.language;
|
|
2099
|
+
try {
|
|
2100
|
+
setIsLoading(true);
|
|
2101
|
+
const result = await dispatch(searchForStores({
|
|
2102
|
+
projectKey,
|
|
2103
|
+
searchTerm,
|
|
2104
|
+
searchBy,
|
|
2105
|
+
language,
|
|
2106
|
+
limit,
|
|
2107
|
+
offset
|
|
2108
|
+
}));
|
|
2109
|
+
setStoreSearchResults({
|
|
2110
|
+
hits: result.results ?? [],
|
|
2111
|
+
total: result.total ?? 0,
|
|
2112
|
+
searchTerm,
|
|
2113
|
+
searchBy
|
|
2114
|
+
});
|
|
2115
|
+
setIsLoading(false);
|
|
2116
|
+
} catch (error) {
|
|
2117
|
+
setStoreSearchResults(prev => _objectSpread$1e(_objectSpread$1e({}, prev), {}, {
|
|
2118
|
+
hits: [],
|
|
2119
|
+
total: 0
|
|
2120
|
+
}));
|
|
2121
|
+
setIsLoading(false);
|
|
2122
|
+
}
|
|
2123
|
+
};
|
|
2124
|
+
return {
|
|
2125
|
+
fetchStoreSearchResults,
|
|
2126
|
+
storeSearchResults,
|
|
2127
|
+
isLoading,
|
|
2128
|
+
resetStoreSearchResults: () => setStoreSearchResults(prev => _objectSpread$1e(_objectSpread$1e({}, prev), {}, {
|
|
2129
|
+
hits: [],
|
|
2130
|
+
total: 0
|
|
2131
|
+
}))
|
|
2132
|
+
};
|
|
2133
|
+
};
|
|
2134
|
+
var useStoresSearchFetcher$1 = useStoresSearchFetcher;
|
|
2135
|
+
|
|
2136
|
+
const fetchProjectStoresStatus = _ref => {
|
|
2137
|
+
let projectKey = _ref.projectKey;
|
|
2138
|
+
return sdk.actions.get({
|
|
2139
|
+
mcApiProxyTarget: 'stores-search-indexing-status',
|
|
2140
|
+
uri: `/${projectKey}`
|
|
2141
|
+
});
|
|
2142
|
+
};
|
|
2143
|
+
const useStoreSearchIndexStatusFetcher = _ref2 => {
|
|
2144
|
+
let projectKey = _ref2.projectKey;
|
|
2145
|
+
const _useState = React.useState(null),
|
|
2146
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2147
|
+
status = _useState2[0],
|
|
2148
|
+
setStatus = _useState2[1];
|
|
2149
|
+
const _useState3 = React.useState(false),
|
|
2150
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
2151
|
+
isLoading = _useState4[0],
|
|
2152
|
+
setIsLoading = _useState4[1];
|
|
2153
|
+
const dispatch = sdk.useAsyncDispatch();
|
|
2154
|
+
const fetchStatus = async () => {
|
|
2155
|
+
setIsLoading(true);
|
|
2156
|
+
let result = null;
|
|
2157
|
+
try {
|
|
2158
|
+
result = await dispatch(fetchProjectStoresStatus({
|
|
2159
|
+
projectKey
|
|
2160
|
+
}));
|
|
2161
|
+
} catch (error) {
|
|
2162
|
+
const searchIsNotReady = error.code === 409;
|
|
2163
|
+
result = 'Error';
|
|
2164
|
+
if (searchIsNotReady) {
|
|
2165
|
+
result = 'NotReady';
|
|
2166
|
+
}
|
|
2167
|
+
if (error?.name === 'NetworkError') {
|
|
2168
|
+
result = 'NotReached';
|
|
2169
|
+
}
|
|
2170
|
+
} finally {
|
|
2171
|
+
setIsLoading(false);
|
|
2172
|
+
}
|
|
2173
|
+
setStatus(result.status || result);
|
|
2174
|
+
setIsLoading(false);
|
|
2175
|
+
};
|
|
2176
|
+
React.useEffect(() => {
|
|
2177
|
+
if (status === null && projectKey && !isLoading) {
|
|
2178
|
+
fetchStatus();
|
|
2179
|
+
}
|
|
2180
|
+
}, [status, projectKey, isLoading]);
|
|
2181
|
+
return {
|
|
2182
|
+
status,
|
|
2183
|
+
isLoading,
|
|
2184
|
+
refetch: fetchStatus
|
|
2185
|
+
};
|
|
2186
|
+
};
|
|
2187
|
+
var useStoreSearchIndexStatusFetcher$1 = useStoreSearchIndexStatusFetcher;
|
|
2188
|
+
|
|
2015
2189
|
const toPermission = (permission, resourceName) => camelCase__default["default"](`can ${permission} ${resourceName}`);
|
|
2016
2190
|
const createPermissionsComposePath = permission =>
|
|
2017
2191
|
// e.g applicationContext.permissions?.canViewOrders
|
|
@@ -2042,8 +2216,8 @@ const useStoreKeysInDataFences = _ref => {
|
|
|
2042
2216
|
};
|
|
2043
2217
|
var useStoreKeysInDataFences$1 = useStoreKeysInDataFences;
|
|
2044
2218
|
|
|
2045
|
-
function ownKeys$
|
|
2046
|
-
function _objectSpread$
|
|
2219
|
+
function ownKeys$1d(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2220
|
+
function _objectSpread$1d(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1d(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1d(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2047
2221
|
const TEN_MINUTES_IN_MS = 600000;
|
|
2048
2222
|
const defaultOptions = {
|
|
2049
2223
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -2071,7 +2245,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
2071
2245
|
};
|
|
2072
2246
|
const usePersistedReminder = function () {
|
|
2073
2247
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2074
|
-
const mergedOptions = _objectSpread$
|
|
2248
|
+
const mergedOptions = _objectSpread$1d(_objectSpread$1d({}, defaultOptions), options);
|
|
2075
2249
|
const _useStorage = useStorage$1(mergedOptions.storageKey, null),
|
|
2076
2250
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
2077
2251
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -2118,7 +2292,7 @@ const usePersistedReminder = function () {
|
|
|
2118
2292
|
};
|
|
2119
2293
|
var usePersistedReminder$1 = usePersistedReminder;
|
|
2120
2294
|
|
|
2121
|
-
var messages$
|
|
2295
|
+
var messages$O = reactIntl.defineMessages({
|
|
2122
2296
|
profileUpdated: {
|
|
2123
2297
|
id: 'NotificationText.profileUpdated',
|
|
2124
2298
|
description: 'Label for the notification header',
|
|
@@ -2136,8 +2310,8 @@ var messages$N = reactIntl.defineMessages({
|
|
|
2136
2310
|
}
|
|
2137
2311
|
});
|
|
2138
2312
|
|
|
2139
|
-
function ownKeys$
|
|
2140
|
-
function _objectSpread$
|
|
2313
|
+
function ownKeys$1c(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2314
|
+
function _objectSpread$1c(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1c(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1c(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2141
2315
|
const LinkToProfile = props => {
|
|
2142
2316
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
2143
2317
|
to: "/account/profile",
|
|
@@ -2155,9 +2329,9 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2155
2329
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2156
2330
|
as: "p",
|
|
2157
2331
|
isBold: true,
|
|
2158
|
-
intlMessage: messages$
|
|
2332
|
+
intlMessage: messages$O.profileUpdated
|
|
2159
2333
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2160
|
-
intlMessage: _objectSpread$
|
|
2334
|
+
intlMessage: _objectSpread$1c(_objectSpread$1c({}, messages$O.addMoreInformation), {}, {
|
|
2161
2335
|
values: {
|
|
2162
2336
|
newline: getNewLine
|
|
2163
2337
|
}
|
|
@@ -2166,7 +2340,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2166
2340
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2167
2341
|
scale: "xs",
|
|
2168
2342
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2169
|
-
intlMessage: _objectSpread$
|
|
2343
|
+
intlMessage: _objectSpread$1c(_objectSpread$1c({}, messages$O.informationAndProfileLink), {}, {
|
|
2170
2344
|
values: {
|
|
2171
2345
|
newline: getNewLine,
|
|
2172
2346
|
link: getLinkToProfile
|
|
@@ -2294,7 +2468,7 @@ const useEventCallback = (fn, dependencies) => {
|
|
|
2294
2468
|
};
|
|
2295
2469
|
var useEventCallback$1 = useEventCallback;
|
|
2296
2470
|
|
|
2297
|
-
var messages$
|
|
2471
|
+
var messages$N = reactIntl.defineMessages({
|
|
2298
2472
|
fallbackHint: {
|
|
2299
2473
|
id: 'KeyFallback.fallbackHint',
|
|
2300
2474
|
description: 'key fallback for a specified resource key (e.g name)',
|
|
@@ -2318,7 +2492,7 @@ const useLocalizedKeyFallback = () => {
|
|
|
2318
2492
|
return values => {
|
|
2319
2493
|
if (!values.resource) return null;
|
|
2320
2494
|
const localizedString = values.resource[values.localizedStringFieldName];
|
|
2321
|
-
const fallbackHintWithKey = intl.formatMessage(messages$
|
|
2495
|
+
const fallbackHintWithKey = intl.formatMessage(messages$N.fallbackHint, {
|
|
2322
2496
|
key: values.resource.key
|
|
2323
2497
|
});
|
|
2324
2498
|
if (!localizedString) return fallbackHintWithKey;
|
|
@@ -2332,8 +2506,8 @@ const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
|
2332
2506
|
React.useCallback(debounce__default["default"](promiseCallback, wait), [promiseCallback]);
|
|
2333
2507
|
var useDebouncedPromiseCallback$1 = useDebouncedPromiseCallback;
|
|
2334
2508
|
|
|
2335
|
-
function ownKeys$
|
|
2336
|
-
function _objectSpread$
|
|
2509
|
+
function ownKeys$1b(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2510
|
+
function _objectSpread$1b(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1b(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1b(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2337
2511
|
const prepareMutableColumnProps = (columnConfig, mutableColumnProps) => {
|
|
2338
2512
|
const updatedColumnProps = {};
|
|
2339
2513
|
_forEachInstanceProperty__default["default"](mutableColumnProps).call(mutableColumnProps, columnProp => {
|
|
@@ -2353,14 +2527,14 @@ const retrieveColumnsWithCachedConfiguration = _ref => {
|
|
|
2353
2527
|
mutableColumnProps = _ref.mutableColumnProps;
|
|
2354
2528
|
return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](cachedVisibleTableConfiguration).call(cachedVisibleTableConfiguration, cachedColumn => _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedColumn.key))).call(_context, cachedConfig => {
|
|
2355
2529
|
const initialColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedConfig.key);
|
|
2356
|
-
return _objectSpread$
|
|
2530
|
+
return _objectSpread$1b(_objectSpread$1b({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2357
2531
|
});
|
|
2358
2532
|
};
|
|
2359
2533
|
const handleCacheUpdate = _ref2 => {
|
|
2360
2534
|
let update = _ref2.update,
|
|
2361
2535
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2362
2536
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2363
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2537
|
+
return updateCachedTableConfiguration(_objectSpread$1b(_objectSpread$1b({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2364
2538
|
};
|
|
2365
2539
|
|
|
2366
2540
|
// Signature:
|
|
@@ -2389,7 +2563,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2389
2563
|
return {
|
|
2390
2564
|
columnsConfig: _mapInstanceProperty__default["default"](initialVisibleColumnKeys).call(initialVisibleColumnKeys, visibleColumnKey => {
|
|
2391
2565
|
const visibleColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, columnConfig => columnConfig.key === visibleColumnKey);
|
|
2392
|
-
return _objectSpread$
|
|
2566
|
+
return _objectSpread$1b({
|
|
2393
2567
|
key: visibleColumnKey
|
|
2394
2568
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2395
2569
|
}),
|
|
@@ -2452,14 +2626,14 @@ const useProductSelectionsTotalFetcher = props => {
|
|
|
2452
2626
|
};
|
|
2453
2627
|
var useProductSelectionsTotalFetcher$1 = useProductSelectionsTotalFetcher;
|
|
2454
2628
|
|
|
2455
|
-
function ownKeys$
|
|
2456
|
-
function _objectSpread$
|
|
2629
|
+
function ownKeys$1a(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2630
|
+
function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1a(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2457
2631
|
|
|
2458
2632
|
// eslint-disable-next-line import/prefer-default-export
|
|
2459
2633
|
const convertProductSelectionsFromGraphQl = productSelections => {
|
|
2460
2634
|
var _context;
|
|
2461
|
-
return productSelections?.results && _objectSpread$
|
|
2462
|
-
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$
|
|
2635
|
+
return productSelections?.results && _objectSpread$1a(_objectSpread$1a({}, productSelections), {}, {
|
|
2636
|
+
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$1a({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
2463
2637
|
from: 'nameAllLocales',
|
|
2464
2638
|
to: 'name'
|
|
2465
2639
|
}])))
|
|
@@ -2502,6 +2676,61 @@ const useProductSelectionsFetcher = props => {
|
|
|
2502
2676
|
};
|
|
2503
2677
|
var useProductSelectionsFetcher$1 = useProductSelectionsFetcher;
|
|
2504
2678
|
|
|
2679
|
+
var messages$M = reactIntl.defineMessages({
|
|
2680
|
+
identityBannerNotification: {
|
|
2681
|
+
id: 'Global.identityBannerNotification',
|
|
2682
|
+
description: 'Identity banner notification',
|
|
2683
|
+
defaultMessage: '🎉 <b>Introducing Identity</b>: A more secure sign-in system is coming soon to unify user accounts across commercetools products. You will need to create your new identity account when the time comes but your current Merchant Center access will stay the same.'
|
|
2684
|
+
}
|
|
2685
|
+
});
|
|
2686
|
+
|
|
2687
|
+
const getBoldText = chunks => jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2688
|
+
tone: "inverted",
|
|
2689
|
+
as: "span",
|
|
2690
|
+
fontWeight: "bold",
|
|
2691
|
+
children: chunks
|
|
2692
|
+
}, "bold-text");
|
|
2693
|
+
const DISMISSED_IDENTITY_BANNER = 'dismissed-identity-banner';
|
|
2694
|
+
const PENDING_IDENTITY_BANNER = 'pending-identity-banner';
|
|
2695
|
+
// Hardcode feature flag name here instead of importing it from the private `constants` package.
|
|
2696
|
+
const ENABLE_IDENTITY_BANNER_NOTIFICATION = 'identityBannerNotification';
|
|
2697
|
+
const useIdentityBannerNotification = () => {
|
|
2698
|
+
const isIdentityBannerNotificationEnabled = applicationShell.useFeatureToggle(ENABLE_IDENTITY_BANNER_NOTIFICATION);
|
|
2699
|
+
const intl = reactIntl.useIntl();
|
|
2700
|
+
const showNotification = actionsGlobal.useShowNotification();
|
|
2701
|
+
const hasShownRef = React.useRef(false);
|
|
2702
|
+
React.useEffect(() => {
|
|
2703
|
+
// If running in Cypress, always mark the banner as dismissed
|
|
2704
|
+
if (typeof window !== 'undefined' && window.Cypress) {
|
|
2705
|
+
localStorage.setItem('dismissed-identity-banner', 'true');
|
|
2706
|
+
return;
|
|
2707
|
+
}
|
|
2708
|
+
if (isIdentityBannerNotificationEnabled !== true) return;
|
|
2709
|
+
const hasDismissedBanner = !!localStorage.getItem(DISMISSED_IDENTITY_BANNER);
|
|
2710
|
+
const isPending = !!localStorage.getItem(PENDING_IDENTITY_BANNER);
|
|
2711
|
+
if (!hasDismissedBanner && !isPending && !hasShownRef.current || isPending && !hasShownRef.current) {
|
|
2712
|
+
hasShownRef.current = true;
|
|
2713
|
+
localStorage.setItem(PENDING_IDENTITY_BANNER, 'true');
|
|
2714
|
+
showNotification({
|
|
2715
|
+
kind: constants.NOTIFICATION_KINDS_SIDE.info,
|
|
2716
|
+
domain: constants.DOMAINS.GLOBAL,
|
|
2717
|
+
// @ts-expect-error: notification `text` expects a string but the formatted message is a ReactNode
|
|
2718
|
+
// due to the injected `b` component. Apparently, it still works but the types are not correct.
|
|
2719
|
+
text: intl.formatMessage(messages$M.identityBannerNotification, {
|
|
2720
|
+
b: getBoldText
|
|
2721
|
+
})
|
|
2722
|
+
}, {
|
|
2723
|
+
onDismiss: () => {
|
|
2724
|
+
localStorage.setItem(DISMISSED_IDENTITY_BANNER, 'true');
|
|
2725
|
+
localStorage.removeItem(PENDING_IDENTITY_BANNER);
|
|
2726
|
+
hasShownRef.current = false;
|
|
2727
|
+
}
|
|
2728
|
+
});
|
|
2729
|
+
}
|
|
2730
|
+
// }
|
|
2731
|
+
}, [showNotification, intl, isIdentityBannerNotificationEnabled]);
|
|
2732
|
+
};
|
|
2733
|
+
|
|
2505
2734
|
const setToArray = function () {
|
|
2506
2735
|
let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
2507
2736
|
return `id in (${_mapInstanceProperty__default["default"](values).call(values, value => `"${value}"`).join(', ')})`;
|
|
@@ -3944,8 +4173,8 @@ const getData = (code, field) => {
|
|
|
3944
4173
|
};
|
|
3945
4174
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
3946
4175
|
|
|
3947
|
-
function ownKeys$
|
|
3948
|
-
function _objectSpread$
|
|
4176
|
+
function ownKeys$19(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4177
|
+
function _objectSpread$19(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$19(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$19(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3949
4178
|
function formatMoneyRangeValue(value, intl) {
|
|
3950
4179
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
3951
4180
|
if (value.from && value.to) return `${formatMoneyValue(value.from, value.currency, intl)} -
|
|
@@ -3955,7 +4184,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
3955
4184
|
return '';
|
|
3956
4185
|
}
|
|
3957
4186
|
function formatMoneyValue(amount, currency, intl) {
|
|
3958
|
-
return formatMoney$2(_objectSpread$
|
|
4187
|
+
return formatMoney$2(_objectSpread$19({
|
|
3959
4188
|
centAmount: amount,
|
|
3960
4189
|
fractionDigits: getFractionDigit(currency)
|
|
3961
4190
|
}, currency ? {
|
|
@@ -3971,7 +4200,7 @@ function getFractionedAmount(moneyValue) {
|
|
|
3971
4200
|
return amount / 10 ** fractionDigits;
|
|
3972
4201
|
}
|
|
3973
4202
|
function formatMoney$2(moneyValue, intl, options) {
|
|
3974
|
-
return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$
|
|
4203
|
+
return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$19({
|
|
3975
4204
|
style: 'currency',
|
|
3976
4205
|
currency: moneyValue.currencyCode,
|
|
3977
4206
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
@@ -4245,8 +4474,8 @@ const getPrefixSearchBounds = input => {
|
|
|
4245
4474
|
var getPrefixSearchBounds$1 = getPrefixSearchBounds;
|
|
4246
4475
|
|
|
4247
4476
|
const _excluded$f = ["action"];
|
|
4248
|
-
function ownKeys$
|
|
4249
|
-
function _objectSpread$
|
|
4477
|
+
function ownKeys$18(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4478
|
+
function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var _context0, _context1; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context0 = ownKeys$18(Object(t), !0)).call(_context0, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context1 = ownKeys$18(Object(t))).call(_context1, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4250
4479
|
|
|
4251
4480
|
/**
|
|
4252
4481
|
* Checks if a value is a LocalizedString
|
|
@@ -4268,7 +4497,7 @@ const getIsLocalizedString = maybeLocalizedString => {
|
|
|
4268
4497
|
*/
|
|
4269
4498
|
const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
|
|
4270
4499
|
if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
|
|
4271
|
-
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$
|
|
4500
|
+
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$18(_objectSpread$18({}, customFields), {}, {
|
|
4272
4501
|
[customField.name]: customField.value
|
|
4273
4502
|
}), {});
|
|
4274
4503
|
};
|
|
@@ -4292,7 +4521,7 @@ function transformLocalizedFieldsForCategory(category) {
|
|
|
4292
4521
|
const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
|
|
4293
4522
|
const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
|
|
4294
4523
|
const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
|
|
4295
|
-
return _objectSpread$
|
|
4524
|
+
return _objectSpread$18(_objectSpread$18(_objectSpread$18({}, transformedData), parent ? {
|
|
4296
4525
|
parent
|
|
4297
4526
|
} : {}), ancestors ? {
|
|
4298
4527
|
ancestors
|
|
@@ -4385,7 +4614,7 @@ const formatMoney = valueType => money => {
|
|
|
4385
4614
|
case 'fixed':
|
|
4386
4615
|
case 'fixedCart':
|
|
4387
4616
|
return {
|
|
4388
|
-
[money.type]: _objectSpread$
|
|
4617
|
+
[money.type]: _objectSpread$18({
|
|
4389
4618
|
centAmount: money.centAmount,
|
|
4390
4619
|
currencyCode: money.currencyCode
|
|
4391
4620
|
}, money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4412,6 +4641,7 @@ const convertChangeValueAction = actionPayload => {
|
|
|
4412
4641
|
const valueType = actionPayload.value.type;
|
|
4413
4642
|
const possibleTypeKeys = {
|
|
4414
4643
|
relative: ['permyriad'],
|
|
4644
|
+
relativeCart: ['permyriad', 'applicationMode'],
|
|
4415
4645
|
absolute: ['money'],
|
|
4416
4646
|
absoluteCart: ['money', 'applicationMode'],
|
|
4417
4647
|
fixed: ['money'],
|
|
@@ -4566,7 +4796,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4566
4796
|
case 'addAttributeDefinition':
|
|
4567
4797
|
return {
|
|
4568
4798
|
[actionName]: {
|
|
4569
|
-
attributeDefinition: _objectSpread$
|
|
4799
|
+
attributeDefinition: _objectSpread$18(_objectSpread$18({}, actionPayload.attribute), {}, {
|
|
4570
4800
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
|
|
4571
4801
|
inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
|
|
4572
4802
|
type: createAttributeTypeValue(actionPayload.attribute)
|
|
@@ -4662,7 +4892,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4662
4892
|
return {
|
|
4663
4893
|
[actionName]: {
|
|
4664
4894
|
attributeName: actionPayload.attributeName,
|
|
4665
|
-
value: _objectSpread$
|
|
4895
|
+
value: _objectSpread$18(_objectSpread$18({}, actionPayload.value), {}, {
|
|
4666
4896
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
|
|
4667
4897
|
})
|
|
4668
4898
|
}
|
|
@@ -4671,7 +4901,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4671
4901
|
return {
|
|
4672
4902
|
[actionName]: {
|
|
4673
4903
|
attributeName: actionPayload.attributeName,
|
|
4674
|
-
newValue: _objectSpread$
|
|
4904
|
+
newValue: _objectSpread$18(_objectSpread$18({}, actionPayload.newValue), {}, {
|
|
4675
4905
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
|
|
4676
4906
|
})
|
|
4677
4907
|
}
|
|
@@ -4698,7 +4928,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4698
4928
|
name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
|
|
4699
4929
|
taxCategory: actionPayload.taxCategory,
|
|
4700
4930
|
money: {
|
|
4701
|
-
[actionPayload.money.type]: _objectSpread$
|
|
4931
|
+
[actionPayload.money.type]: _objectSpread$18({
|
|
4702
4932
|
centAmount: actionPayload.money.centAmount,
|
|
4703
4933
|
currencyCode: actionPayload.money.currencyCode
|
|
4704
4934
|
}, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4726,7 +4956,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4726
4956
|
return {
|
|
4727
4957
|
[actionName]: {
|
|
4728
4958
|
target: {
|
|
4729
|
-
[actionPayload.target.type]: _objectSpread$
|
|
4959
|
+
[actionPayload.target.type]: _objectSpread$18(_objectSpread$18(_objectSpread$18({}, omit__default["default"](actionPayload.target, ['type', '__typename'])), actionPayload.target.triggerPattern && {
|
|
4730
4960
|
triggerPattern: _mapInstanceProperty__default["default"](_context6 = actionPayload.target.triggerPattern).call(_context6, pattern => ({
|
|
4731
4961
|
[pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
|
|
4732
4962
|
}))
|
|
@@ -4761,8 +4991,8 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4761
4991
|
fields: customFields
|
|
4762
4992
|
} : null;
|
|
4763
4993
|
return {
|
|
4764
|
-
[actionName]: _objectSpread$
|
|
4765
|
-
address: _objectSpread$
|
|
4994
|
+
[actionName]: _objectSpread$18(_objectSpread$18({}, actionPayload), {}, {
|
|
4995
|
+
address: _objectSpread$18(_objectSpread$18({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
|
|
4766
4996
|
custom
|
|
4767
4997
|
})
|
|
4768
4998
|
})
|
|
@@ -4870,8 +5100,8 @@ function omitDeep(obj, fieldsToOmit) {
|
|
|
4870
5100
|
return originalOmitDeep__default["default"](obj, fieldsToOmit);
|
|
4871
5101
|
}
|
|
4872
5102
|
|
|
4873
|
-
function ownKeys$
|
|
4874
|
-
function _objectSpread$
|
|
5103
|
+
function ownKeys$17(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5104
|
+
function _objectSpread$17(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$17(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$17(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4875
5105
|
function getPriceChannelName(price) {
|
|
4876
5106
|
return price.channel?.name ?? price.channel?.key ?? null;
|
|
4877
5107
|
}
|
|
@@ -4883,11 +5113,11 @@ function getDiscountValue(price) {
|
|
|
4883
5113
|
} else if (price.value?.type === PRECISION_TYPES.highPrecision && price.discounted?.value?.type === PRECISION_TYPES.centPrecision) {
|
|
4884
5114
|
fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
|
|
4885
5115
|
}
|
|
4886
|
-
return price.discounted ? _objectSpread$
|
|
5116
|
+
return price.discounted ? _objectSpread$17(_objectSpread$17({}, price.value), {}, {
|
|
4887
5117
|
fractionedAmount,
|
|
4888
5118
|
centAmount: price.value.centAmount - price.discounted.value.centAmount,
|
|
4889
5119
|
preciseAmount
|
|
4890
|
-
}) : _objectSpread$
|
|
5120
|
+
}) : _objectSpread$17(_objectSpread$17({}, price.value), {}, {
|
|
4891
5121
|
centAmount: 0
|
|
4892
5122
|
});
|
|
4893
5123
|
}
|
|
@@ -4918,7 +5148,7 @@ function getNetUnitPrice(_ref) {
|
|
|
4918
5148
|
}
|
|
4919
5149
|
let preciseAmount;
|
|
4920
5150
|
if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + taxRate.amount);
|
|
4921
|
-
return _objectSpread$
|
|
5151
|
+
return _objectSpread$17(_objectSpread$17({}, price.value), {}, {
|
|
4922
5152
|
centAmount,
|
|
4923
5153
|
preciseAmount
|
|
4924
5154
|
});
|
|
@@ -4934,7 +5164,7 @@ function getNetUnitPrice(_ref) {
|
|
|
4934
5164
|
}
|
|
4935
5165
|
let preciseAmount;
|
|
4936
5166
|
if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + lineItem.taxRate.amount);
|
|
4937
|
-
return _objectSpread$
|
|
5167
|
+
return _objectSpread$17(_objectSpread$17({}, price.value), {}, {
|
|
4938
5168
|
centAmount,
|
|
4939
5169
|
preciseAmount
|
|
4940
5170
|
});
|
|
@@ -4946,7 +5176,7 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4946
5176
|
const currencyCode = price.value.currencyCode;
|
|
4947
5177
|
const fractionedAmount = getFractionedAmount(price.value);
|
|
4948
5178
|
if (currencyCode && !isNil__default["default"](fractionedAmount)) {
|
|
4949
|
-
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$
|
|
5179
|
+
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$17(_objectSpread$17({}, minPrices), {}, {
|
|
4950
5180
|
[currencyCode]: price.value
|
|
4951
5181
|
});
|
|
4952
5182
|
}
|
|
@@ -4955,8 +5185,8 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4955
5185
|
return _Object$values__default["default"](minPricesByCurrency);
|
|
4956
5186
|
}
|
|
4957
5187
|
|
|
4958
|
-
function ownKeys$
|
|
4959
|
-
function _objectSpread$
|
|
5188
|
+
function ownKeys$16(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5189
|
+
function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$16(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$16(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4960
5190
|
const transformCustomFieldFromGraphQLResponse = resource => {
|
|
4961
5191
|
var _context, _context4;
|
|
4962
5192
|
return {
|
|
@@ -4971,14 +5201,14 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4971
5201
|
return {
|
|
4972
5202
|
name: fieldDefinition.name,
|
|
4973
5203
|
required: fieldDefinition.required,
|
|
4974
|
-
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$
|
|
4975
|
-
elementType: _objectSpread$
|
|
5204
|
+
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$16(_objectSpread$16({}, fieldDefinition.type), {}, {
|
|
5205
|
+
elementType: _objectSpread$16(_objectSpread$16({}, fieldDefinition.type.elementType), {}, {
|
|
4976
5206
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
4977
5207
|
key: value.key,
|
|
4978
5208
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
4979
5209
|
}))
|
|
4980
5210
|
})
|
|
4981
|
-
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$
|
|
5211
|
+
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$16(_objectSpread$16({}, fieldDefinition.type), {}, {
|
|
4982
5212
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
4983
5213
|
key: value.key,
|
|
4984
5214
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -4989,7 +5219,7 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4989
5219
|
})
|
|
4990
5220
|
}
|
|
4991
5221
|
},
|
|
4992
|
-
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$
|
|
5222
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$16(_objectSpread$16({}, fields), {}, {
|
|
4993
5223
|
[customField.name]: customField.value
|
|
4994
5224
|
}), {})
|
|
4995
5225
|
};
|
|
@@ -5001,7 +5231,7 @@ const convertProductSelectionFromGraphQl = productSelection => {
|
|
|
5001
5231
|
// Incase the product selection is not missing or if the current project dose not yet have access to the feature,
|
|
5002
5232
|
// in either case we return null
|
|
5003
5233
|
if (!productSelection) return null;
|
|
5004
|
-
return _objectSpread$
|
|
5234
|
+
return _objectSpread$16(_objectSpread$16({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
5005
5235
|
from: 'nameAllLocales',
|
|
5006
5236
|
to: 'name'
|
|
5007
5237
|
}])), {}, {
|
|
@@ -5024,8 +5254,8 @@ const transformAllToProperNounCase = text => {
|
|
|
5024
5254
|
return _mapInstanceProperty__default["default"](_context = text.split(' ')).call(_context, term => transformToProperNounCase(term)).join(' ');
|
|
5025
5255
|
};
|
|
5026
5256
|
|
|
5027
|
-
function ownKeys$
|
|
5028
|
-
function _objectSpread$
|
|
5257
|
+
function ownKeys$15(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5258
|
+
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$15(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$15(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5029
5259
|
const REGEX_ISO8601 = /(\d{4}-\d{2}-\d{2}[T]\d{2}:\d{2}:\d{2}(\.\d{3}[Z]?))/;
|
|
5030
5260
|
const REGEX_TIME = /\d{2}:\d{2}/;
|
|
5031
5261
|
const REGEX_DATE = /\d{4}-\d{2}-\d{2}/;
|
|
@@ -5042,7 +5272,7 @@ function filterCustomTypeUpdateActionValues() {
|
|
|
5042
5272
|
if (updateAction.action === 'setCustomField' && _Array$isArray__default["default"](updateAction.value)) {
|
|
5043
5273
|
const definition = _findInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, field => field.name === updateAction.name);
|
|
5044
5274
|
const definitionName = definition.type.elementType.name;
|
|
5045
|
-
return _objectSpread$
|
|
5275
|
+
return _objectSpread$15(_objectSpread$15({}, updateAction), {}, {
|
|
5046
5276
|
value: filterNotDefinedValues(updateAction.value, definitionName)
|
|
5047
5277
|
});
|
|
5048
5278
|
}
|
|
@@ -5546,8 +5776,8 @@ const messages$I = reactIntl.defineMessages({
|
|
|
5546
5776
|
});
|
|
5547
5777
|
var messages$J = messages$I;
|
|
5548
5778
|
|
|
5549
|
-
function ownKeys$
|
|
5550
|
-
function _objectSpread$
|
|
5779
|
+
function ownKeys$14(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5780
|
+
function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$14(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$14(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5551
5781
|
function Option$1(props) {
|
|
5552
5782
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
5553
5783
|
language: applicationContext.dataLocale,
|
|
@@ -5558,7 +5788,7 @@ function Option$1(props) {
|
|
|
5558
5788
|
const _useIntl = reactIntl.useIntl(),
|
|
5559
5789
|
formatMessage = _useIntl.formatMessage;
|
|
5560
5790
|
const cartDiscount = props.data;
|
|
5561
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
5791
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$14(_objectSpread$14({}, props), {}, {
|
|
5562
5792
|
children: jsxRuntime.jsxs("div", {
|
|
5563
5793
|
"data-testid": "cart-discount-option",
|
|
5564
5794
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -5575,8 +5805,8 @@ function Option$1(props) {
|
|
|
5575
5805
|
}));
|
|
5576
5806
|
}
|
|
5577
5807
|
|
|
5578
|
-
function ownKeys$
|
|
5579
|
-
function _objectSpread$
|
|
5808
|
+
function ownKeys$13(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5809
|
+
function _objectSpread$13(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$13(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$13(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5580
5810
|
var CartDiscountsCount$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "CartDiscountsCount" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 425, source: { body: "query SearchCartDiscount($where: String) {\n cartDiscounts(limit: 500, where: $where) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n\nquery FetchCartDiscountById($cartDiscountId: String!) {\n cartDiscount(id: $cartDiscountId) {\n id\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
5581
5811
|
const returnNullIfEmpty = value => value && value.id === '' ? null : value;
|
|
5582
5812
|
const filterOption$1 = (option, text) => {
|
|
@@ -5602,7 +5832,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5602
5832
|
})),
|
|
5603
5833
|
language = _useApplicationContex.language,
|
|
5604
5834
|
languages = _useApplicationContex.languages;
|
|
5605
|
-
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$
|
|
5835
|
+
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$13(_objectSpread$13({}, cartDiscount), {}, {
|
|
5606
5836
|
value: cartDiscount.id,
|
|
5607
5837
|
key: cartDiscount.key,
|
|
5608
5838
|
label: l10n.formatLocalizedString(cartDiscount, {
|
|
@@ -5692,8 +5922,8 @@ const messages$G = reactIntl.defineMessages({
|
|
|
5692
5922
|
});
|
|
5693
5923
|
var messages$H = messages$G;
|
|
5694
5924
|
|
|
5695
|
-
function ownKeys$
|
|
5696
|
-
function _objectSpread$
|
|
5925
|
+
function ownKeys$12(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5926
|
+
function _objectSpread$12(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$12(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$12(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5697
5927
|
function Option(props) {
|
|
5698
5928
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
5699
5929
|
language: applicationContext.dataLocale,
|
|
@@ -5704,7 +5934,7 @@ function Option(props) {
|
|
|
5704
5934
|
const _useIntl = reactIntl.useIntl(),
|
|
5705
5935
|
formatMessage = _useIntl.formatMessage;
|
|
5706
5936
|
const category = props.data;
|
|
5707
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
5937
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$12(_objectSpread$12({}, props), {}, {
|
|
5708
5938
|
children: jsxRuntime.jsxs("div", {
|
|
5709
5939
|
"data-testid": "category-option",
|
|
5710
5940
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -5733,8 +5963,8 @@ function Option(props) {
|
|
|
5733
5963
|
}));
|
|
5734
5964
|
}
|
|
5735
5965
|
|
|
5736
|
-
function ownKeys$
|
|
5737
|
-
function _objectSpread$
|
|
5966
|
+
function ownKeys$11(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5967
|
+
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$11(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$11(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5738
5968
|
const filterOption = () => true;
|
|
5739
5969
|
function CategoryReferenceSearch(props) {
|
|
5740
5970
|
const _useIntl = reactIntl.useIntl(),
|
|
@@ -5746,7 +5976,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5746
5976
|
})),
|
|
5747
5977
|
language = _useApplicationContex.language,
|
|
5748
5978
|
languages = _useApplicationContex.languages;
|
|
5749
|
-
const mapItemToOption = React.useCallback(category => _objectSpread$
|
|
5979
|
+
const mapItemToOption = React.useCallback(category => _objectSpread$11(_objectSpread$11({}, category), {}, {
|
|
5750
5980
|
value: category.id,
|
|
5751
5981
|
label: l10n.formatLocalizedString(category, {
|
|
5752
5982
|
key: 'name',
|
|
@@ -5764,7 +5994,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5764
5994
|
}), [apolloClient]);
|
|
5765
5995
|
return jsxRuntime.jsx(ReferenceSearch, {
|
|
5766
5996
|
id: props.id,
|
|
5767
|
-
components: _objectSpread$
|
|
5997
|
+
components: _objectSpread$11({
|
|
5768
5998
|
Option
|
|
5769
5999
|
}, props.components),
|
|
5770
6000
|
isClearable: props.isClearable,
|
|
@@ -5815,8 +6045,8 @@ const getButtonStyles = props => /*#__PURE__*/react$1.css("transition:background
|
|
|
5815
6045
|
var getButtonStyles$1 = getButtonStyles;
|
|
5816
6046
|
|
|
5817
6047
|
const _excluded$e = ["type"];
|
|
5818
|
-
function ownKeys
|
|
5819
|
-
function _objectSpread
|
|
6048
|
+
function ownKeys$10(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6049
|
+
function _objectSpread$10(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$10(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$10(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5820
6050
|
const Button = _ref => {
|
|
5821
6051
|
let _ref$type = _ref.type,
|
|
5822
6052
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
@@ -5828,7 +6058,7 @@ const Button = _ref => {
|
|
|
5828
6058
|
|
|
5829
6059
|
// Pass only `data-*` props
|
|
5830
6060
|
const dataProps = filterDataAttributes(props);
|
|
5831
|
-
return jsxRuntime.jsx("button", _objectSpread
|
|
6061
|
+
return jsxRuntime.jsx("button", _objectSpread$10(_objectSpread$10({
|
|
5832
6062
|
onClick: isDisabled ? null : onClick,
|
|
5833
6063
|
type: type,
|
|
5834
6064
|
className: classnames__default["default"](className),
|
|
@@ -5853,15 +6083,15 @@ var messages$F = reactIntl.defineMessages({
|
|
|
5853
6083
|
});
|
|
5854
6084
|
|
|
5855
6085
|
const _excluded$d = ["children", "allowMultiple", "acceptTypes"];
|
|
5856
|
-
function ownKeys
|
|
5857
|
-
function _objectSpread
|
|
6086
|
+
function ownKeys$$(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6087
|
+
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$$(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$$(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5858
6088
|
var _ref$c = {
|
|
5859
6089
|
name: "1wq0eh7",
|
|
5860
6090
|
styles: "visibility:hidden;width:1px;height:1px"
|
|
5861
6091
|
} ;
|
|
5862
6092
|
const FileInput = _ref2 => {
|
|
5863
6093
|
let _ref2$children = _ref2.children,
|
|
5864
|
-
children = _ref2$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread
|
|
6094
|
+
children = _ref2$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$$({}, messages$F.chooseFile)) : _ref2$children,
|
|
5865
6095
|
_ref2$allowMultiple = _ref2.allowMultiple,
|
|
5866
6096
|
allowMultiple = _ref2$allowMultiple === void 0 ? false : _ref2$allowMultiple,
|
|
5867
6097
|
_ref2$acceptTypes = _ref2.acceptTypes,
|
|
@@ -5891,15 +6121,15 @@ const baseButtonStyles = {
|
|
|
5891
6121
|
} ;
|
|
5892
6122
|
|
|
5893
6123
|
const _excluded$c = ["animationOrientation", "children", "onClick"];
|
|
5894
|
-
function ownKeys$
|
|
5895
|
-
function _objectSpread$
|
|
6124
|
+
function ownKeys$_(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6125
|
+
function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$_(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$_(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5896
6126
|
const ICON_COLOR$1 = '#6359ff';
|
|
5897
6127
|
const PaginationIconButton = _ref => {
|
|
5898
6128
|
let animationOrientation = _ref.animationOrientation,
|
|
5899
6129
|
children = _ref.children,
|
|
5900
6130
|
onClick = _ref.onClick,
|
|
5901
6131
|
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
5902
|
-
return jsxRuntime.jsx("button", _objectSpread$
|
|
6132
|
+
return jsxRuntime.jsx("button", _objectSpread$_(_objectSpread$_({
|
|
5903
6133
|
css: [baseButtonStyles, /*#__PURE__*/react$1.css("svg{fill:", ICON_COLOR$1, ";}transition:transform ", uiKit.designTokens.transitionStandard, ";:hover{transform:translateX(\n ", animationOrientation === 'left' ? `calc(0px - var(--spacing-10))` : `var(--spacing-10)`, "\n );}padding-left:1px;padding-right:1px;:focus{border:1px solid ", ICON_COLOR$1, ";border-radius:", uiKit.designTokens.borderRadius1, ";padding-left:0px;padding-right:0px;}" + ("" ), "" ), "" , "" ],
|
|
5904
6134
|
onClick: onClick
|
|
5905
6135
|
}, rest), {}, {
|
|
@@ -5909,8 +6139,8 @@ const PaginationIconButton = _ref => {
|
|
|
5909
6139
|
var PaginationIconButton$1 = PaginationIconButton;
|
|
5910
6140
|
|
|
5911
6141
|
const _excluded$b = ["isFilled", "onClick"];
|
|
5912
|
-
function ownKeys$
|
|
5913
|
-
function _objectSpread$
|
|
6142
|
+
function ownKeys$Z(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6143
|
+
function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Z(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5914
6144
|
const ICON_HEIGHT = '10px';
|
|
5915
6145
|
const ICON_WIDTH = ICON_HEIGHT;
|
|
5916
6146
|
// TODO: Integrate design tokens when redesign is complete
|
|
@@ -5921,7 +6151,7 @@ const PaginationSelectionButton = _ref => {
|
|
|
5921
6151
|
isFilled = _ref$isFilled === void 0 ? false : _ref$isFilled,
|
|
5922
6152
|
onClick = _ref.onClick,
|
|
5923
6153
|
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
5924
|
-
return jsxRuntime.jsx("button", _objectSpread$
|
|
6154
|
+
return jsxRuntime.jsx("button", _objectSpread$Z({
|
|
5925
6155
|
css: [baseButtonStyles, /*#__PURE__*/react$1.css("height:", ICON_HEIGHT, ";width:", ICON_WIDTH, ";border-radius:", uiKit.designTokens.borderRadius6, ";border:", isFilled ? 'none' : `${uiKit.designTokens.borderWidth1} solid ${uiKit.designTokens.colorNeutral}`, ";background:", isFilled ? ICON_COLOR : 'none', ";transition:", uiKit.designTokens.transitionStandard, ";:hover{background:", isFilled ? undefined : ICON_HOVER_COLOR, ";}:focus{border:", uiKit.designTokens.borderWidth1, " solid ", ICON_COLOR, ";}" + ("" ), "" ), "" , "" ],
|
|
5926
6156
|
onClick: onClick
|
|
5927
6157
|
}, rest));
|
|
@@ -5989,8 +6219,8 @@ const BaseCarousel = _ref2 => {
|
|
|
5989
6219
|
role: "region",
|
|
5990
6220
|
"aria-roledescription": "carousel",
|
|
5991
6221
|
"aria-label": "rotunda",
|
|
5992
|
-
children: [jsxRuntime.jsx("a", {
|
|
5993
|
-
href:
|
|
6222
|
+
children: [currentItem.linkTo ? jsxRuntime.jsx("a", {
|
|
6223
|
+
href: getLinkTo(currentItem),
|
|
5994
6224
|
target: currentItem.isExternal ? '_blank' : '_self',
|
|
5995
6225
|
rel: "noopener noreferrer",
|
|
5996
6226
|
children: jsxRuntime.jsx(uiKit.Card, {
|
|
@@ -6005,6 +6235,17 @@ const BaseCarousel = _ref2 => {
|
|
|
6005
6235
|
}, handleFilterItemsWhenFlagDisabled, idx))
|
|
6006
6236
|
})
|
|
6007
6237
|
})
|
|
6238
|
+
}) : jsxRuntime.jsx(uiKit.Card, {
|
|
6239
|
+
insetScale: 'none',
|
|
6240
|
+
onClick: () => {},
|
|
6241
|
+
type: borderless ? 'flat' : undefined,
|
|
6242
|
+
children: jsxRuntime.jsx("div", {
|
|
6243
|
+
css: /*#__PURE__*/react$1.css("position:relative;display:flex;scroll-snap-type:x mandatory;overflow:hidden;margin:0;padding-bottom:", uiKit.designTokens.spacing60, ";" + ("" ), "" ),
|
|
6244
|
+
ref: scrollRef,
|
|
6245
|
+
children: _mapInstanceProperty__default["default"](shuffledItems).call(shuffledItems, (item, idx) => renderItem({
|
|
6246
|
+
item
|
|
6247
|
+
}, handleFilterItemsWhenFlagDisabled, idx))
|
|
6248
|
+
})
|
|
6008
6249
|
}), jsxRuntime.jsx("div", {
|
|
6009
6250
|
css: /*#__PURE__*/react$1.css("position:absolute;bottom:", uiKit.designTokens.spacingM, ";left:50%;pointer-events:none;" + ("" ), "" ),
|
|
6010
6251
|
children: jsxRuntime.jsx("div", {
|
|
@@ -6017,17 +6258,20 @@ const BaseCarousel = _ref2 => {
|
|
|
6017
6258
|
animationOrientation: "left",
|
|
6018
6259
|
onClick: handlePrev,
|
|
6019
6260
|
"aria-label": "go to previous slide",
|
|
6261
|
+
"data-testid": "go-to-previous-slide-button",
|
|
6020
6262
|
children: jsxRuntime.jsx(uiKit.AngleLeftIcon, {
|
|
6021
6263
|
size: "small"
|
|
6022
6264
|
})
|
|
6023
6265
|
}), _mapInstanceProperty__default["default"](pages).call(pages, (_, i) => jsxRuntime.jsx(PaginationSelectionButton$1, {
|
|
6024
6266
|
isFilled: activePageIndex === i,
|
|
6025
6267
|
onClick: () => goTo(i),
|
|
6026
|
-
"aria-label": `go to slide ${i + 1}
|
|
6268
|
+
"aria-label": `go to slide ${i + 1}`,
|
|
6269
|
+
"data-testid": `go-to-slide-${i + 1}-button`
|
|
6027
6270
|
}, i)), jsxRuntime.jsx(PaginationIconButton$1, {
|
|
6028
6271
|
animationOrientation: "right",
|
|
6029
6272
|
onClick: handleNext,
|
|
6030
6273
|
"aria-label": "go to next slide",
|
|
6274
|
+
"data-testid": "go-to-next-slide-button",
|
|
6031
6275
|
children: jsxRuntime.jsx(uiKit.AngleRightIcon, {
|
|
6032
6276
|
size: "small"
|
|
6033
6277
|
})
|
|
@@ -6070,9 +6314,11 @@ const CarouselContent = _ref3 => {
|
|
|
6070
6314
|
css: /*#__PURE__*/react$1.css("padding:0 ", hasPadding ? uiKit.designTokens.spacingL : 0, " 0 ", hasPadding ? uiKit.designTokens.spacingL : 0, ";" + ("" ), "" ),
|
|
6071
6315
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
6072
6316
|
scale: "xs",
|
|
6317
|
+
alignItems: "flex-start",
|
|
6073
6318
|
children: [item.stampLabel && item.stampTone && jsxRuntime.jsx(uiKit.Stamp, {
|
|
6074
6319
|
tone: item.stampTone,
|
|
6075
|
-
label: intl.formatMessage(item.stampLabel)
|
|
6320
|
+
label: intl.formatMessage(item.stampLabel),
|
|
6321
|
+
isCondensed: !!item?.isStampCondensed
|
|
6076
6322
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6077
6323
|
intlMessage: item.textContent
|
|
6078
6324
|
})]
|
|
@@ -6124,8 +6370,8 @@ var messages$E = reactIntl.defineMessages({
|
|
|
6124
6370
|
}
|
|
6125
6371
|
});
|
|
6126
6372
|
|
|
6127
|
-
function ownKeys$
|
|
6128
|
-
function _objectSpread$
|
|
6373
|
+
function ownKeys$Y(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6374
|
+
function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$Y(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$Y(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6129
6375
|
const emptyCountryOption = intl => [{
|
|
6130
6376
|
label: intl.formatMessage(messages$E.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
6131
6377
|
value: undefined,
|
|
@@ -6152,7 +6398,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
6152
6398
|
const onOptionChange = event => {
|
|
6153
6399
|
const countries = event.target.value;
|
|
6154
6400
|
props.onChange({
|
|
6155
|
-
target: _objectSpread$
|
|
6401
|
+
target: _objectSpread$Y(_objectSpread$Y({}, event.target), {}, {
|
|
6156
6402
|
value: _mapInstanceProperty__default["default"](countries).call(countries, country => country?.value ?? country)
|
|
6157
6403
|
})
|
|
6158
6404
|
});
|
|
@@ -6203,8 +6449,8 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
6203
6449
|
const COUNTRIES_ASYNC_LOADING_LIMIT = 60;
|
|
6204
6450
|
|
|
6205
6451
|
const _excluded$a = ["countriesAsyncLoadingLimit", "isMulti", "isRequired", "hasWarning"];
|
|
6206
|
-
function ownKeys$
|
|
6207
|
-
function _objectSpread$
|
|
6452
|
+
function ownKeys$X(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6453
|
+
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$X(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$X(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6208
6454
|
function CountriesPicker(_ref) {
|
|
6209
6455
|
let _ref$countriesAsyncLo = _ref.countriesAsyncLoadingLimit,
|
|
6210
6456
|
countriesAsyncLoadingLimit = _ref$countriesAsyncLo === void 0 ? COUNTRIES_ASYNC_LOADING_LIMIT : _ref$countriesAsyncLo,
|
|
@@ -6217,7 +6463,7 @@ function CountriesPicker(_ref) {
|
|
|
6217
6463
|
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
6218
6464
|
const CustomCountriesPicker = props.options?.length <= countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
|
|
6219
6465
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
6220
|
-
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$
|
|
6466
|
+
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$X({
|
|
6221
6467
|
countriesAsyncLoadingLimit: countriesAsyncLoadingLimit,
|
|
6222
6468
|
isMulti: isMulti,
|
|
6223
6469
|
isRequired: isRequired,
|
|
@@ -6423,9 +6669,9 @@ const REFERENCED_TYPES = {
|
|
|
6423
6669
|
const ATTRIBUTE_TYPES = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time'];
|
|
6424
6670
|
const SET_ATTRIBUTE_TYPES = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
6425
6671
|
|
|
6426
|
-
function ownKeys$
|
|
6427
|
-
function _objectSpread$
|
|
6428
|
-
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$
|
|
6672
|
+
function ownKeys$W(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6673
|
+
function _objectSpread$W(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$W(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$W(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6674
|
+
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$W(_objectSpread$W({}, result), itemErrors), {});
|
|
6429
6675
|
|
|
6430
6676
|
// TODO(pa3): worth splitting in two components: one of set errors and one for
|
|
6431
6677
|
// all the other types of fields. So that there will be no isArray check.
|
|
@@ -6578,8 +6824,8 @@ const SetButtons = props => {
|
|
|
6578
6824
|
SetButtons.displayName = 'SetButtons';
|
|
6579
6825
|
var SetButtons$1 = SetButtons;
|
|
6580
6826
|
|
|
6581
|
-
function ownKeys$
|
|
6582
|
-
function _objectSpread$
|
|
6827
|
+
function ownKeys$V(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6828
|
+
function _objectSpread$V(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$V(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$V(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6583
6829
|
const getDuplicateErrors = setValues => {
|
|
6584
6830
|
/* eslint-disable no-plusplus */
|
|
6585
6831
|
const result = [];
|
|
@@ -6632,7 +6878,7 @@ function CustomInputSet(props) {
|
|
|
6632
6878
|
touched = _useFormikContext.touched,
|
|
6633
6879
|
isSubmitting = _useFormikContext.isSubmitting,
|
|
6634
6880
|
dirty = _useFormikContext.dirty;
|
|
6635
|
-
const itemFieldDefinition = _objectSpread$
|
|
6881
|
+
const itemFieldDefinition = _objectSpread$V(_objectSpread$V({}, props.fieldDefinition), {}, {
|
|
6636
6882
|
type: props.fieldDefinition.type.elementType
|
|
6637
6883
|
});
|
|
6638
6884
|
const value = React.useMemo(() => props.value || [undefined], [props.value]);
|
|
@@ -6888,8 +7134,8 @@ function CustomLocalizedEnumInput(props) {
|
|
|
6888
7134
|
}
|
|
6889
7135
|
CustomLocalizedEnumInput.displayName = 'CustomLocalizedEnumInput';
|
|
6890
7136
|
|
|
6891
|
-
function ownKeys$
|
|
6892
|
-
function _objectSpread$
|
|
7137
|
+
function ownKeys$U(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7138
|
+
function _objectSpread$U(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$U(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$U(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6893
7139
|
const getSubfieldLanguage = subfieldName => {
|
|
6894
7140
|
const lastDotIndex = _lastIndexOfInstanceProperty__default["default"](subfieldName).call(subfieldName, '.');
|
|
6895
7141
|
return subfieldName.substring(lastDotIndex + 1);
|
|
@@ -6912,7 +7158,7 @@ function CustomLocalizedTextInput(props) {
|
|
|
6912
7158
|
// as a whole.
|
|
6913
7159
|
|
|
6914
7160
|
const fieldLanguage = getSubfieldLanguage(subfieldName);
|
|
6915
|
-
const newValue = _objectSpread$
|
|
7161
|
+
const newValue = _objectSpread$U(_objectSpread$U({}, props.value), {}, {
|
|
6916
7162
|
[fieldLanguage]: rawValue
|
|
6917
7163
|
});
|
|
6918
7164
|
const nullifiedIfNeeded = uiKit.LocalizedTextInput.isEmpty(newValue) ? undefined : newValue;
|
|
@@ -6940,18 +7186,18 @@ function CustomLocalizedTextInput(props) {
|
|
|
6940
7186
|
}
|
|
6941
7187
|
CustomLocalizedTextInput.displayName = 'CustomLocalizedTextInput';
|
|
6942
7188
|
|
|
6943
|
-
function ownKeys$
|
|
6944
|
-
function _objectSpread$
|
|
7189
|
+
function ownKeys$T(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7190
|
+
function _objectSpread$T(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$T(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$T(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6945
7191
|
const fixCurrencyCode = (value, currencies) => {
|
|
6946
7192
|
if (value.currencyCode) return value;
|
|
6947
7193
|
const firstCurrency = currencies[0];
|
|
6948
|
-
return _objectSpread$
|
|
7194
|
+
return _objectSpread$T(_objectSpread$T({}, value), {}, {
|
|
6949
7195
|
currencyCode: firstCurrency
|
|
6950
7196
|
});
|
|
6951
7197
|
};
|
|
6952
7198
|
const fixAmount = value => {
|
|
6953
7199
|
if (!value.amount) {
|
|
6954
|
-
return _objectSpread$
|
|
7200
|
+
return _objectSpread$T(_objectSpread$T({}, value), {}, {
|
|
6955
7201
|
amount: '0'
|
|
6956
7202
|
});
|
|
6957
7203
|
}
|
|
@@ -6997,7 +7243,7 @@ function CustomMoneyInput(props) {
|
|
|
6997
7243
|
}
|
|
6998
7244
|
const handleChange = makeChangeHandler((rawValue, subfieldName) => {
|
|
6999
7245
|
const isAmount = _endsWithInstanceProperty__default["default"](subfieldName).call(subfieldName, 'amount');
|
|
7000
|
-
const newValue = _objectSpread$
|
|
7246
|
+
const newValue = _objectSpread$T({}, internalValue.current);
|
|
7001
7247
|
if (isAmount) newValue.amount = rawValue;else newValue.currencyCode = rawValue;
|
|
7002
7248
|
const fixedValue = fixEnteredValue(newValue, internalValue.current, currencies);
|
|
7003
7249
|
internalValue.current = fixedValue;
|
|
@@ -7034,23 +7280,23 @@ function CustomMoneyInput(props) {
|
|
|
7034
7280
|
}
|
|
7035
7281
|
CustomMoneyInput.displayName = 'CustomMoneyInput';
|
|
7036
7282
|
|
|
7037
|
-
function ownKeys$
|
|
7038
|
-
function _objectSpread$
|
|
7283
|
+
function ownKeys$S(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7284
|
+
function _objectSpread$S(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$S(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$S(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7039
7285
|
var FetchProductTypeQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductTypeQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productType" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "attributeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "100" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "isRequired" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputTipAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "NestedAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizableEnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "NestedAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizableEnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1905, source: { body: "query FetchProductTypeQuery($id: String!) {\n productType(id: $id) {\n name\n attributeDefinitions(limit: 100) {\n results {\n name\n isRequired\n inputHint\n inputTipAllLocales {\n value\n locale\n }\n labelAllLocales {\n value\n locale\n }\n type {\n name\n ... on SetAttributeDefinitionType {\n elementType {\n name\n ... on NestedAttributeDefinitionType {\n typeRef {\n id\n }\n }\n ... on EnumAttributeDefinitionType {\n values {\n results {\n key\n label\n }\n }\n }\n ... on LocalizableEnumAttributeDefinitionType {\n values {\n results {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n ... on ReferenceAttributeDefinitionType {\n referenceTypeId\n }\n }\n }\n ... on ReferenceAttributeDefinitionType {\n referenceTypeId\n }\n ... on NestedAttributeDefinitionType {\n typeRef {\n id\n }\n }\n ... on EnumAttributeDefinitionType {\n values {\n results {\n key\n label\n }\n }\n }\n ... on LocalizableEnumAttributeDefinitionType {\n values {\n results {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
7040
7286
|
const mapAttributeDefinition = definition => {
|
|
7041
7287
|
var _context, _context2, _context3, _context4;
|
|
7042
|
-
return _objectSpread$
|
|
7288
|
+
return _objectSpread$S(_objectSpread$S({}, definition), {}, {
|
|
7043
7289
|
required: definition.isRequired,
|
|
7044
7290
|
inputTip: l10n.transformLocalizedFieldToLocalizedString(definition.inputTipAllLocales),
|
|
7045
7291
|
label: l10n.transformLocalizedFieldToLocalizedString(definition.labelAllLocales),
|
|
7046
|
-
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, definition.type?.elementType?.name) ? _objectSpread$
|
|
7047
|
-
elementType: _objectSpread$
|
|
7292
|
+
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, definition.type?.elementType?.name) ? _objectSpread$S(_objectSpread$S({}, definition.type), {}, {
|
|
7293
|
+
elementType: _objectSpread$S(_objectSpread$S({}, definition.type.elementType), {}, {
|
|
7048
7294
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](definition.type.elementType).results).call(_context2, value => ({
|
|
7049
7295
|
key: value.key,
|
|
7050
7296
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
7051
7297
|
}))
|
|
7052
7298
|
})
|
|
7053
|
-
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, definition.type?.name) ? _objectSpread$
|
|
7299
|
+
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, definition.type?.name) ? _objectSpread$S(_objectSpread$S({}, definition.type), {}, {
|
|
7054
7300
|
values: _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](definition.type).results).call(_context4, value => ({
|
|
7055
7301
|
key: value.key,
|
|
7056
7302
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -7187,8 +7433,8 @@ var messages$A = reactIntl.defineMessages({
|
|
|
7187
7433
|
}
|
|
7188
7434
|
});
|
|
7189
7435
|
|
|
7190
|
-
function ownKeys$
|
|
7191
|
-
function _objectSpread$
|
|
7436
|
+
function ownKeys$R(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7437
|
+
function _objectSpread$R(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$R(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$R(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7192
7438
|
const EditButton = props => {
|
|
7193
7439
|
const _useIntl = reactIntl.useIntl(),
|
|
7194
7440
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -7336,13 +7582,13 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
7336
7582
|
const valuesAsMap = nameValuePairsToMap(value);
|
|
7337
7583
|
const initialValues = omitUnknownValues(valuesAsMap, attributeDefinitionsAsMap);
|
|
7338
7584
|
const openNestedAttributesForm = () => {
|
|
7339
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
7585
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$R(_objectSpread$R({}, parentFormik.status), {}, {
|
|
7340
7586
|
hideSaveToolbar: true
|
|
7341
7587
|
}));
|
|
7342
7588
|
attributesForm.openModal();
|
|
7343
7589
|
};
|
|
7344
7590
|
const closeNestedAttributesForm = () => {
|
|
7345
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
7591
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$R(_objectSpread$R({}, parentFormik.status), {}, {
|
|
7346
7592
|
hideSaveToolbar: false
|
|
7347
7593
|
}));
|
|
7348
7594
|
attributesForm.closeModal();
|
|
@@ -7833,6 +8079,16 @@ const CustomFieldInput = /*#__PURE__*/React.memo(props => {
|
|
|
7833
8079
|
CustomFieldInput.displayName = 'CustomFieldInput';
|
|
7834
8080
|
var CustomFieldInput$1 = CustomFieldInput;
|
|
7835
8081
|
|
|
8082
|
+
const DEFAULT_LENGTH = 50;
|
|
8083
|
+
const DEFAULT_END = '...';
|
|
8084
|
+
function truncate (text) {
|
|
8085
|
+
let length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_LENGTH;
|
|
8086
|
+
let end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_END;
|
|
8087
|
+
if (!text) return '';
|
|
8088
|
+
if (text.length < length) return text;
|
|
8089
|
+
return `${text.substring(0, length)}${end}`;
|
|
8090
|
+
}
|
|
8091
|
+
|
|
7836
8092
|
var messages$y = reactIntl.defineMessages({
|
|
7837
8093
|
productReferenceLabel: {
|
|
7838
8094
|
id: 'CustomFieldsLabel.productReferenceLabel',
|
|
@@ -7871,8 +8127,8 @@ var messages$y = reactIntl.defineMessages({
|
|
|
7871
8127
|
}
|
|
7872
8128
|
});
|
|
7873
8129
|
|
|
7874
|
-
function ownKeys$
|
|
7875
|
-
function _objectSpread$
|
|
8130
|
+
function ownKeys$Q(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8131
|
+
function _objectSpread$Q(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$Q(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$Q(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7876
8132
|
var CartDiscountsCount = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "CartDiscountsCount" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 61, source: { body: "query CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
7877
8133
|
const CustomFieldsLabelHint = _ref2 => {
|
|
7878
8134
|
let fieldDefinition = _ref2.fieldDefinition;
|
|
@@ -7901,7 +8157,7 @@ const CustomFieldsLabelHint = _ref2 => {
|
|
|
7901
8157
|
children: [jsxRuntime.jsx(uiKit.WarningIcon, {
|
|
7902
8158
|
size: "medium",
|
|
7903
8159
|
color: "warning"
|
|
7904
|
-
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
8160
|
+
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Q({}, messages$y.cartDiscountMoreThan500))]
|
|
7905
8161
|
});
|
|
7906
8162
|
}
|
|
7907
8163
|
return l10n.formatLocalizedString(fieldDefinition, {
|
|
@@ -7981,6 +8237,12 @@ const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref5 => {
|
|
|
7981
8237
|
})),
|
|
7982
8238
|
languages = _useApplicationContex2.languages,
|
|
7983
8239
|
language = _useApplicationContex2.language;
|
|
8240
|
+
const labelText = l10n.formatLocalizedString(fieldDefinition, {
|
|
8241
|
+
key: 'label',
|
|
8242
|
+
locale: language,
|
|
8243
|
+
fallbackOrder: languages,
|
|
8244
|
+
fallback: fieldDefinition.name
|
|
8245
|
+
});
|
|
7984
8246
|
return jsxRuntime.jsx(uiKit.FieldLabel, {
|
|
7985
8247
|
htmlFor: name,
|
|
7986
8248
|
title: jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
@@ -7989,12 +8251,8 @@ const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref5 => {
|
|
|
7989
8251
|
scale: "s",
|
|
7990
8252
|
alignItems: "flex-end",
|
|
7991
8253
|
children: [jsxRuntime.jsx("div", {
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
locale: language,
|
|
7995
|
-
fallbackOrder: languages,
|
|
7996
|
-
fallback: fieldDefinition.name
|
|
7997
|
-
})
|
|
8254
|
+
title: labelText,
|
|
8255
|
+
children: truncate(labelText)
|
|
7998
8256
|
}), jsxRuntime.jsx(CustomFieldsCountIndicator, {
|
|
7999
8257
|
assignedAttributeGroups: fieldDefinition.assignedAttributeGroups
|
|
8000
8258
|
})]
|
|
@@ -8020,10 +8278,10 @@ var messages$x = reactIntl.defineMessages({
|
|
|
8020
8278
|
}
|
|
8021
8279
|
});
|
|
8022
8280
|
|
|
8023
|
-
function ownKeys$
|
|
8024
|
-
function _objectSpread$
|
|
8281
|
+
function ownKeys$P(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8282
|
+
function _objectSpread$P(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$P(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$P(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8025
8283
|
function ProductTypeReference(props) {
|
|
8026
|
-
const productTypeMessage = _objectSpread$
|
|
8284
|
+
const productTypeMessage = _objectSpread$P(_objectSpread$P({}, messages$x.referencedProductType), {}, {
|
|
8027
8285
|
values: {
|
|
8028
8286
|
productTypeName: props.productType.name
|
|
8029
8287
|
}
|
|
@@ -8072,10 +8330,10 @@ function CustomNestedFieldInput(props) {
|
|
|
8072
8330
|
}
|
|
8073
8331
|
CustomNestedFieldInput.displayName = 'CustomNestedFieldInput';
|
|
8074
8332
|
|
|
8075
|
-
function ownKeys$
|
|
8076
|
-
function _objectSpread$
|
|
8333
|
+
function ownKeys$O(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8334
|
+
function _objectSpread$O(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$O(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$O(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8077
8335
|
function DragHandle(props) {
|
|
8078
|
-
return jsxRuntime.jsx("div", _objectSpread$
|
|
8336
|
+
return jsxRuntime.jsx("div", _objectSpread$O(_objectSpread$O({}, props), {}, {
|
|
8079
8337
|
children: jsxRuntime.jsx(uiKit.IconButton, {
|
|
8080
8338
|
icon: jsxRuntime.jsx(uiKit.DragIcon, {}),
|
|
8081
8339
|
size: "medium",
|
|
@@ -8085,8 +8343,8 @@ function DragHandle(props) {
|
|
|
8085
8343
|
}
|
|
8086
8344
|
DragHandle.displayName = 'DragHandle';
|
|
8087
8345
|
|
|
8088
|
-
function ownKeys$
|
|
8089
|
-
function _objectSpread$
|
|
8346
|
+
function ownKeys$N(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8347
|
+
function _objectSpread$N(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$N(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$N(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8090
8348
|
var _ref$7 = {
|
|
8091
8349
|
name: "1onfs6j",
|
|
8092
8350
|
styles: "z-index:100000!important"
|
|
@@ -8116,7 +8374,7 @@ const DraggableWrapper = _ref2 => {
|
|
|
8116
8374
|
draggableId: draggableId,
|
|
8117
8375
|
index: index,
|
|
8118
8376
|
children: (provided, snapshot) => {
|
|
8119
|
-
const child = jsxRuntime.jsx("div", _objectSpread$
|
|
8377
|
+
const child = jsxRuntime.jsx("div", _objectSpread$N(_objectSpread$N({
|
|
8120
8378
|
ref: provided.innerRef
|
|
8121
8379
|
}, provided.draggableProps), {}, {
|
|
8122
8380
|
css: _ref$7,
|
|
@@ -8127,7 +8385,7 @@ const DraggableWrapper = _ref2 => {
|
|
|
8127
8385
|
gridTemplateRows: "auto 1fr auto",
|
|
8128
8386
|
gridGap: snapshot.isDragging ? uiKit.customProperties.spacingS : uiKit.customProperties.spacingM,
|
|
8129
8387
|
children: [jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
8130
|
-
children: jsxRuntime.jsx(DragHandle, _objectSpread$
|
|
8388
|
+
children: jsxRuntime.jsx(DragHandle, _objectSpread$N({}, provided.dragHandleProps))
|
|
8131
8389
|
}), jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
8132
8390
|
children: children
|
|
8133
8391
|
})]
|
|
@@ -8146,8 +8404,8 @@ const DraggableWrapper = _ref2 => {
|
|
|
8146
8404
|
}, draggableKey);
|
|
8147
8405
|
};
|
|
8148
8406
|
|
|
8149
|
-
function ownKeys$
|
|
8150
|
-
function _objectSpread$
|
|
8407
|
+
function ownKeys$M(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8408
|
+
function _objectSpread$M(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$M(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$M(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8151
8409
|
const DroppableWrapper = _ref => {
|
|
8152
8410
|
let children = _ref.children,
|
|
8153
8411
|
onDragEnd = _ref.onDragEnd;
|
|
@@ -8155,7 +8413,7 @@ const DroppableWrapper = _ref => {
|
|
|
8155
8413
|
onDragEnd: onDragEnd,
|
|
8156
8414
|
children: jsxRuntime.jsx(dnd.Droppable, {
|
|
8157
8415
|
droppableId: "droppable",
|
|
8158
|
-
children: provided => jsxRuntime.jsxs("div", _objectSpread$
|
|
8416
|
+
children: provided => jsxRuntime.jsxs("div", _objectSpread$M(_objectSpread$M({
|
|
8159
8417
|
ref: provided.innerRef
|
|
8160
8418
|
}, provided.droppableProps), {}, {
|
|
8161
8419
|
children: [children, provided.placeholder]
|
|
@@ -8164,8 +8422,8 @@ const DroppableWrapper = _ref => {
|
|
|
8164
8422
|
});
|
|
8165
8423
|
};
|
|
8166
8424
|
|
|
8167
|
-
function ownKeys$
|
|
8168
|
-
function _objectSpread$
|
|
8425
|
+
function ownKeys$L(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8426
|
+
function _objectSpread$L(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$L(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$L(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8169
8427
|
const DefaultWrapper = _ref => {
|
|
8170
8428
|
let children = _ref.children;
|
|
8171
8429
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
@@ -8201,7 +8459,7 @@ const DndProvider = _ref2 => {
|
|
|
8201
8459
|
});
|
|
8202
8460
|
}
|
|
8203
8461
|
return jsxRuntime.jsx(DnDContext.Provider, {
|
|
8204
|
-
value: _objectSpread$
|
|
8462
|
+
value: _objectSpread$L(_objectSpread$L({}, dndContextDefaultValues), {}, {
|
|
8205
8463
|
isDnDMode,
|
|
8206
8464
|
setDnDMode
|
|
8207
8465
|
}),
|
|
@@ -8213,8 +8471,8 @@ const useDnDContext = () => {
|
|
|
8213
8471
|
};
|
|
8214
8472
|
|
|
8215
8473
|
const _excluded$9 = ["renderCustomWarnings", "WrapperComponent"];
|
|
8216
|
-
function ownKeys$
|
|
8217
|
-
function _objectSpread$
|
|
8474
|
+
function ownKeys$K(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8475
|
+
function _objectSpread$K(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$K(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$K(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8218
8476
|
const ENABLED_FALLBACK_ATTRIBUTE_TYPES = [CUSTOM_FIELD_TYPES.enum, CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.number, CUSTOM_FIELD_TYPES.text, CUSTOM_FIELD_TYPES.boolean, CUSTOM_FIELD_TYPES.money, CUSTOM_FIELD_TYPES.datetime, CUSTOM_FIELD_TYPES.date, CUSTOM_FIELD_TYPES.reference, CUSTOM_FIELD_TYPES.time, CUSTOM_FIELD_TYPES.set];
|
|
8219
8477
|
const getFieldName = (parentName, fieldName) => {
|
|
8220
8478
|
if (!parentName) return fieldName;
|
|
@@ -8296,7 +8554,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
8296
8554
|
renderWarnings: props.renderWarnings,
|
|
8297
8555
|
additionalInfo: shouldUseAdditionalInfoProp && props?.additionalInfoHandler ? props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) : undefined
|
|
8298
8556
|
};
|
|
8299
|
-
const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$
|
|
8557
|
+
const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$K({}, fieldProps));
|
|
8300
8558
|
// the several values inside the key are needed to make sure the field is re-rendered when those values change
|
|
8301
8559
|
return jsxRuntime.jsx(formik.FastField, {
|
|
8302
8560
|
name: fieldName,
|
|
@@ -8339,8 +8597,8 @@ const CustomFieldsInternal = _ref => {
|
|
|
8339
8597
|
CustomFieldsInternal.displayName = 'CustomFieldsInternal';
|
|
8340
8598
|
var CustomFieldsInternal$1 = CustomFieldsInternal;
|
|
8341
8599
|
|
|
8342
|
-
function ownKeys$
|
|
8343
|
-
function _objectSpread$
|
|
8600
|
+
function ownKeys$J(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8601
|
+
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys$J(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys$J(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8344
8602
|
const getTypeName = type => type.name.toLowerCase();
|
|
8345
8603
|
const findLabel = (enumType, key) => {
|
|
8346
8604
|
var _context;
|
|
@@ -8391,7 +8649,7 @@ const attributeDefinitionToFieldDefinition = attributeDefinition => ({
|
|
|
8391
8649
|
const nameValuePairsToMap = pairs => _reduceInstanceProperty__default["default"](pairs).call(pairs, (result, _ref2) => {
|
|
8392
8650
|
let name = _ref2.name,
|
|
8393
8651
|
value = _ref2.value;
|
|
8394
|
-
return _objectSpread$
|
|
8652
|
+
return _objectSpread$J(_objectSpread$J({}, result), {}, {
|
|
8395
8653
|
[name]: value
|
|
8396
8654
|
});
|
|
8397
8655
|
}, {});
|
|
@@ -8509,8 +8767,8 @@ var pickerMessages = reactIntl.defineMessages({
|
|
|
8509
8767
|
}
|
|
8510
8768
|
});
|
|
8511
8769
|
|
|
8512
|
-
function ownKeys$
|
|
8513
|
-
function _objectSpread$
|
|
8770
|
+
function ownKeys$I(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8771
|
+
function _objectSpread$I(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$I(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$I(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8514
8772
|
const PRODUCT_SELECTION_MODES = {
|
|
8515
8773
|
INCLUSION: 'Individual',
|
|
8516
8774
|
EXCLUSION: 'IndividualExclusion'
|
|
@@ -8523,7 +8781,7 @@ const getMode = mode => mode === PRODUCT_SELECTION_MODES.INCLUSION || mode === P
|
|
|
8523
8781
|
const addModeToLabel = function (ps) {
|
|
8524
8782
|
let enableExcludingProducts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
8525
8783
|
if (!ps) return undefined;
|
|
8526
|
-
return _objectSpread$
|
|
8784
|
+
return _objectSpread$I(_objectSpread$I({}, ps), {}, {
|
|
8527
8785
|
label: `${ps?.label}${enableExcludingProducts ? ` (type: ${getMode(ps?.mode)})` : ''}`
|
|
8528
8786
|
});
|
|
8529
8787
|
};
|
|
@@ -8887,12 +9145,12 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
8887
9145
|
});
|
|
8888
9146
|
}
|
|
8889
9147
|
|
|
8890
|
-
function ownKeys$
|
|
8891
|
-
function _objectSpread$
|
|
9148
|
+
function ownKeys$H(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9149
|
+
function _objectSpread$H(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$H(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$H(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8892
9150
|
function ModeSelectInputOption(props) {
|
|
8893
9151
|
const data = props.data;
|
|
8894
9152
|
const noValueFallback = props.noValueFallback || constants.NO_VALUE_FALLBACK;
|
|
8895
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
9153
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$H(_objectSpread$H({}, props), {}, {
|
|
8896
9154
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
8897
9155
|
scale: "xs",
|
|
8898
9156
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -8908,8 +9166,8 @@ function ModeSelectInputOption(props) {
|
|
|
8908
9166
|
}
|
|
8909
9167
|
|
|
8910
9168
|
const _excluded$7 = ["lowerProductSelectionsLimit", "upperProductSelectionsLimit", "renderSelectInputOptionValuesByField", "optionType", "isMulti", "isRequired", "hasWarning", "hasError", "isClearable", "isReadOnly", "isDisabled", "excludedProductSelectionIds", "title"];
|
|
8911
|
-
function ownKeys$
|
|
8912
|
-
function _objectSpread$
|
|
9169
|
+
function ownKeys$G(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9170
|
+
function _objectSpread$G(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$G(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$G(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8913
9171
|
function ProductSelectionsPicker(_ref) {
|
|
8914
9172
|
let _ref$lowerProductSele = _ref.lowerProductSelectionsLimit,
|
|
8915
9173
|
lowerProductSelectionsLimit = _ref$lowerProductSele === void 0 ? LOWER_PRODUCT_SELECTIONS_LIMIT : _ref$lowerProductSele,
|
|
@@ -8943,10 +9201,10 @@ function ProductSelectionsPicker(_ref) {
|
|
|
8943
9201
|
return {
|
|
8944
9202
|
Option: optionInnerProps => {
|
|
8945
9203
|
if (optionInnerProps.isDisabled) {
|
|
8946
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
9204
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$G({}, optionInnerProps));
|
|
8947
9205
|
}
|
|
8948
9206
|
if (optionType === TYPE_PROPERTY) {
|
|
8949
|
-
return jsxRuntime.jsx(ModeSelectInputOption, _objectSpread$
|
|
9207
|
+
return jsxRuntime.jsx(ModeSelectInputOption, _objectSpread$G({}, optionInnerProps));
|
|
8950
9208
|
}
|
|
8951
9209
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8952
9210
|
optionType: optionType,
|
|
@@ -8959,7 +9217,7 @@ function ProductSelectionsPicker(_ref) {
|
|
|
8959
9217
|
let CustomProductSelectionsPicker;
|
|
8960
9218
|
if (productSelectionsTotalFetcher.total <= lowerProductSelectionsLimit) CustomProductSelectionsPicker = ProductSelectionBasicSelectDropdown;else if (productSelectionsTotalFetcher.total <= upperProductSelectionsLimit) CustomProductSelectionsPicker = ProductSelectionsAsyncSelectDropdown;else CustomProductSelectionsPicker = ProductSelectionsSearchSelectDropdown;
|
|
8961
9219
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8962
|
-
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$
|
|
9220
|
+
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$G(_objectSpread$G({
|
|
8963
9221
|
lowerProductSelectionsLimit: lowerProductSelectionsLimit,
|
|
8964
9222
|
upperProductSelectionsLimit: upperProductSelectionsLimit,
|
|
8965
9223
|
renderSelectInputOptionValuesByField: renderSelectInputOptionValuesByField,
|
|
@@ -9003,11 +9261,6 @@ var messages$w = reactIntl.defineMessages({
|
|
|
9003
9261
|
});
|
|
9004
9262
|
|
|
9005
9263
|
var FetchRecurrencePolicies = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchRecurrencePolicies" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "recurrencePolicies" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 191, source: { body: "query FetchRecurrencePolicies($where: String) {\n recurrencePolicies(where: $where) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
9006
|
-
const isRecurringOrdersDisabledError = error => {
|
|
9007
|
-
var _context;
|
|
9008
|
-
return error.extensions?.code === '403' && _includesInstanceProperty__default["default"](_context = error.message).call(_context, "The feature 'recurring-orders' is not enabled for this project. Please contact commercetools support.");
|
|
9009
|
-
};
|
|
9010
|
-
// @TODO: Remove these error checks when the feature is enabled by default
|
|
9011
9264
|
const useRecurrenceIntervals = _ref => {
|
|
9012
9265
|
let where = _ref.where,
|
|
9013
9266
|
_ref$skip = _ref.skip,
|
|
@@ -9024,17 +9277,11 @@ const useRecurrenceIntervals = _ref => {
|
|
|
9024
9277
|
}),
|
|
9025
9278
|
data = _useQuery.data,
|
|
9026
9279
|
loading = _useQuery.loading,
|
|
9027
|
-
|
|
9028
|
-
const extractedErrors = rawError ? extractErrorFromGraphQlResponse(rawError) : [];
|
|
9029
|
-
const isRecurringOrdersDisabled = extractedErrors.length > 0 &&
|
|
9030
|
-
// If the only error is a 403 with the specific message, we assume the feature is disabled.
|
|
9031
|
-
_everyInstanceProperty__default["default"](extractedErrors).call(extractedErrors, isRecurringOrdersDisabledError);
|
|
9032
|
-
const error = isRecurringOrdersDisabled ? undefined : rawError;
|
|
9280
|
+
error = _useQuery.error;
|
|
9033
9281
|
return {
|
|
9034
9282
|
recurrencePolicies: data?.recurrencePolicies?.results ?? [],
|
|
9035
9283
|
loading,
|
|
9036
|
-
error
|
|
9037
|
-
isRecurringOrdersDisabled
|
|
9284
|
+
error
|
|
9038
9285
|
};
|
|
9039
9286
|
};
|
|
9040
9287
|
|
|
@@ -9303,8 +9550,8 @@ const getCustomGroupLabelOption = customLabel => [{
|
|
|
9303
9550
|
}];
|
|
9304
9551
|
|
|
9305
9552
|
const _excluded$6 = ["shouldFetchProductSelections"];
|
|
9306
|
-
function ownKeys$
|
|
9307
|
-
function _objectSpread$
|
|
9553
|
+
function ownKeys$F(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9554
|
+
function _objectSpread$F(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys$F(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys$F(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9308
9555
|
const hasErrors$2 = errors => {
|
|
9309
9556
|
var _context;
|
|
9310
9557
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -9392,7 +9639,7 @@ const StoresAsyncSelectInput = _ref2 => {
|
|
|
9392
9639
|
};
|
|
9393
9640
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
9394
9641
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9395
|
-
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$
|
|
9642
|
+
children: [jsxRuntime.jsx(uiKit.AsyncSelectInput, _objectSpread$F(_objectSpread$F(_objectSpread$F({
|
|
9396
9643
|
id: props.id,
|
|
9397
9644
|
name: props.name,
|
|
9398
9645
|
placeholder: intl.formatMessage(messages$u.basicSelectInputPlaceholder),
|
|
@@ -9437,8 +9684,8 @@ StoresAsyncSelectInput.displayName = 'StoresAsyncSelectInput';
|
|
|
9437
9684
|
var StoresAsyncSelectInput$1 = StoresAsyncSelectInput;
|
|
9438
9685
|
|
|
9439
9686
|
const _excluded$5 = ["shouldFetchProductSelections"];
|
|
9440
|
-
function ownKeys$
|
|
9441
|
-
function _objectSpread$
|
|
9687
|
+
function ownKeys$E(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9688
|
+
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$E(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$E(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9442
9689
|
const hasErrors$1 = errors => {
|
|
9443
9690
|
var _context;
|
|
9444
9691
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -9497,7 +9744,7 @@ const StoresBasicSelectInput = _ref => {
|
|
|
9497
9744
|
};
|
|
9498
9745
|
if (storesListFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
9499
9746
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9500
|
-
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$
|
|
9747
|
+
children: [jsxRuntime.jsx(uiKit.SelectInput, _objectSpread$E(_objectSpread$E(_objectSpread$E({
|
|
9501
9748
|
id: props.id,
|
|
9502
9749
|
name: props.name,
|
|
9503
9750
|
placeholder: props.placeholder || intl.formatMessage(messages$u.basicSelectInputPlaceholder),
|
|
@@ -9580,8 +9827,8 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
9580
9827
|
var useStoresByFieldFetcher$1 = useStoresByFieldFetcher;
|
|
9581
9828
|
|
|
9582
9829
|
const _excluded$4 = ["shouldFetchProductSelections"];
|
|
9583
|
-
function ownKeys$
|
|
9584
|
-
function _objectSpread$
|
|
9830
|
+
function ownKeys$D(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9831
|
+
function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context0; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context9 = ownKeys$D(Object(t), !0)).call(_context9, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context0 = ownKeys$D(Object(t))).call(_context0, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9585
9832
|
var FetchStoresByWherePredicate = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresByWherePredicate" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "storesByWherePredicate" }, name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelection" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 525, source: { body: "query FetchStoresByWherePredicate(\n $where: String!\n $skipFetchingStores: Boolean!\n $excludeProductSelections: Boolean!\n) {\n storesByWherePredicate: stores(where: $where) @skip(if: $skipFetchingStores) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n productSelections @skip(if: $excludeProductSelections) {\n active\n productSelection {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } }; // check wether there are any errors
|
|
9586
9833
|
const hasErrors = errors => {
|
|
9587
9834
|
var _context;
|
|
@@ -9715,7 +9962,7 @@ const StoresSearchSelectInput = _ref4 => {
|
|
|
9715
9962
|
};
|
|
9716
9963
|
if (storesByFieldFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
9717
9964
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
9718
|
-
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$
|
|
9965
|
+
children: [jsxRuntime.jsx(uiKit.SearchSelectInput, _objectSpread$D(_objectSpread$D({
|
|
9719
9966
|
id: props.id,
|
|
9720
9967
|
name: props.name,
|
|
9721
9968
|
placeholder: intl.formatMessage(messages$u.searchSelectInputPlaceholder),
|
|
@@ -9762,8 +10009,8 @@ StoresSearchSelectInput.displayName = 'StoresSearchSelectInput';
|
|
|
9762
10009
|
var StoresSearchSelectInput$1 = StoresSearchSelectInput;
|
|
9763
10010
|
|
|
9764
10011
|
const _excluded$3 = ["lowerStoresLimit", "upperStoresLimit", "renderSelectInputOptionValuesByField", "optionType", "shouldFetchProductSelections"];
|
|
9765
|
-
function ownKeys$
|
|
9766
|
-
function _objectSpread$
|
|
10012
|
+
function ownKeys$C(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10013
|
+
function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$C(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$C(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9767
10014
|
var _ref$5 = {
|
|
9768
10015
|
name: "1r0yqr6",
|
|
9769
10016
|
styles: "margin-top:10px"
|
|
@@ -9786,7 +10033,7 @@ const StoreSelectInput = _ref2 => {
|
|
|
9786
10033
|
// eslint-disable-next-line react/display-name
|
|
9787
10034
|
Option: optionInnerProps => {
|
|
9788
10035
|
if (optionInnerProps.isDisabled) {
|
|
9789
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
10036
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$C({}, optionInnerProps));
|
|
9790
10037
|
}
|
|
9791
10038
|
const isSearchSelectInput = totalNumberOfStoresFetcher.total > upperStoresLimit;
|
|
9792
10039
|
return jsxRuntime.jsx("div", {
|
|
@@ -9817,7 +10064,7 @@ const StoreSelectInput = _ref2 => {
|
|
|
9817
10064
|
else {
|
|
9818
10065
|
CustomStoreSelectInput = StoresSearchSelectInput$1;
|
|
9819
10066
|
}
|
|
9820
|
-
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$
|
|
10067
|
+
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$C(_objectSpread$C({
|
|
9821
10068
|
menuIsOpen: props.menuIsOpen,
|
|
9822
10069
|
placeholder: props.placeholder,
|
|
9823
10070
|
iconLeft: props.iconLeft,
|
|
@@ -9857,8 +10104,8 @@ StoreSelectInput.displayName = 'StoreSelectInput';
|
|
|
9857
10104
|
var StoreSelectInput$1 = StoreSelectInput;
|
|
9858
10105
|
|
|
9859
10106
|
const _excluded$2 = ["lowerStoresLimit", "upperStoresLimit", "mappedValueField"];
|
|
9860
|
-
function ownKeys$
|
|
9861
|
-
function _objectSpread$
|
|
10107
|
+
function ownKeys$B(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10108
|
+
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$B(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$B(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9862
10109
|
const StoreSelectField = _ref => {
|
|
9863
10110
|
let _ref$lowerStoresLimit = _ref.lowerStoresLimit,
|
|
9864
10111
|
lowerStoresLimit = _ref$lowerStoresLimit === void 0 ? LOWER_STORES_LIMIT : _ref$lowerStoresLimit,
|
|
@@ -9878,7 +10125,7 @@ const StoreSelectField = _ref => {
|
|
|
9878
10125
|
htmlFor: props.id,
|
|
9879
10126
|
hasRequiredIndicator: props.isRequired,
|
|
9880
10127
|
isBold: true
|
|
9881
|
-
}), jsxRuntime.jsx(StoreSelectInput$1, _objectSpread$
|
|
10128
|
+
}), jsxRuntime.jsx(StoreSelectInput$1, _objectSpread$B(_objectSpread$B({
|
|
9882
10129
|
projectKey: props.projectKey,
|
|
9883
10130
|
id: props.id,
|
|
9884
10131
|
name: props.name,
|
|
@@ -9913,8 +10160,8 @@ const StoreSelectField = _ref => {
|
|
|
9913
10160
|
StoreSelectField.displayName = 'StoreSelectField';
|
|
9914
10161
|
var StoreSelectField$1 = StoreSelectField;
|
|
9915
10162
|
|
|
9916
|
-
function ownKeys$
|
|
9917
|
-
function _objectSpread$
|
|
10163
|
+
function ownKeys$A(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10164
|
+
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$A(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$A(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9918
10165
|
function _callSuper$5(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$5() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9919
10166
|
function _isNativeReflectConstruct$5() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$5 = function () { return !!t; })(); }
|
|
9920
10167
|
const EMAIL_REGEX = /^[-!#$%&'*+/0-9=?A-Z^_a-z`{|}~](\.?[-!#$%&'*+/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/i;
|
|
@@ -10058,7 +10305,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
10058
10305
|
* so it must be an invalid numeric value
|
|
10059
10306
|
*/
|
|
10060
10307
|
_this.handleInvalid = () => {
|
|
10061
|
-
const nextValidStatus = _objectSpread$
|
|
10308
|
+
const nextValidStatus = _objectSpread$A({}, _this.state.validStatus);
|
|
10062
10309
|
if (has__default["default"](nextValidStatus, 'numeric')) {
|
|
10063
10310
|
nextValidStatus.numeric = false;
|
|
10064
10311
|
_this.conditionalSetValidStatus(nextValidStatus);
|
|
@@ -10109,7 +10356,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
10109
10356
|
if (prev) return this.state.validStatus[v.name];
|
|
10110
10357
|
return prev;
|
|
10111
10358
|
}, true);
|
|
10112
|
-
const componentProps = _objectSpread$
|
|
10359
|
+
const componentProps = _objectSpread$A(_objectSpread$A({}, this.props), {}, {
|
|
10113
10360
|
[blurHandler || 'onBlurValue']: this.handleBlur,
|
|
10114
10361
|
[changeHandler || 'onChange']: this.handleChange,
|
|
10115
10362
|
onInvalidValue: this.handleInvalid,
|
|
@@ -10127,7 +10374,7 @@ function validatedInput(InnerComponent, validators) {
|
|
|
10127
10374
|
components: {
|
|
10128
10375
|
WrapperComponent: ToolTipWrapperComponent
|
|
10129
10376
|
},
|
|
10130
|
-
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$
|
|
10377
|
+
children: jsxRuntime.jsx(_InnerComponent, _objectSpread$A({}, componentProps))
|
|
10131
10378
|
})
|
|
10132
10379
|
});
|
|
10133
10380
|
}
|
|
@@ -10178,8 +10425,8 @@ function simpleInput(type) {
|
|
|
10178
10425
|
}, _Class;
|
|
10179
10426
|
}
|
|
10180
10427
|
|
|
10181
|
-
function ownKeys$
|
|
10182
|
-
function _objectSpread$
|
|
10428
|
+
function ownKeys$z(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10429
|
+
function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$z(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$z(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10183
10430
|
function _callSuper$4(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$4() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10184
10431
|
function _isNativeReflectConstruct$4() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$4 = function () { return !!t; })(); }
|
|
10185
10432
|
var FetchTypeDefinitionsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1172, source: { body: "query FetchTypeDefinitionsQuery($where: String, $limit: Int, $offset: Int) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n fieldDefinitions {\n type {\n name\n ... on SetType {\n elementType {\n name\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n ... on ReferenceType {\n referenceTypeId\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -10239,7 +10486,7 @@ const mapDataToProps = _ref => {
|
|
|
10239
10486
|
return {
|
|
10240
10487
|
fetchTypeDefinitionsQuery: {
|
|
10241
10488
|
loading: fetchTypeDefinitionsQuery.loading,
|
|
10242
|
-
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$
|
|
10489
|
+
customFieldDefinitions: uniqBy__default["default"](_mapInstanceProperty__default["default"](fieldDefinitionsToOptionsMap).call(fieldDefinitionsToOptionsMap, fieldDefinition => _objectSpread$z({}, l10n.applyTransformedLocalizedFields(omitDeep(fieldDefinition, ['__typename'], {
|
|
10243
10490
|
isImmutable: true
|
|
10244
10491
|
}), [{
|
|
10245
10492
|
from: 'labelAllLocales',
|
|
@@ -10259,12 +10506,12 @@ var customFieldDefinitionsConnector = flowRight__default["default"](hoc.graphql(
|
|
|
10259
10506
|
props: mapDataToProps
|
|
10260
10507
|
}))(CustomFieldDefinitionsConnector);
|
|
10261
10508
|
|
|
10262
|
-
function ownKeys$
|
|
10263
|
-
function _objectSpread$
|
|
10509
|
+
function ownKeys$y(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10510
|
+
function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$y(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$y(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10264
10511
|
const restDocToForm = customFieldsFromRestResponse => {
|
|
10265
10512
|
return {
|
|
10266
10513
|
fields: customFieldsFromRestResponse.fields,
|
|
10267
|
-
type: _objectSpread$
|
|
10514
|
+
type: _objectSpread$y({
|
|
10268
10515
|
id: customFieldsFromRestResponse.type.id
|
|
10269
10516
|
}, customFieldsFromRestResponse.type.obj)
|
|
10270
10517
|
};
|
|
@@ -10283,14 +10530,14 @@ const graphQlDocToForm = typeDefinition => {
|
|
|
10283
10530
|
name: fieldDefinition.name,
|
|
10284
10531
|
required: fieldDefinition.required,
|
|
10285
10532
|
inputHint: fieldDefinition.inputHint,
|
|
10286
|
-
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$
|
|
10287
|
-
elementType: _objectSpread$
|
|
10533
|
+
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$y(_objectSpread$y({}, fieldDefinition.type), {}, {
|
|
10534
|
+
elementType: _objectSpread$y(_objectSpread$y({}, fieldDefinition.type.elementType), {}, {
|
|
10288
10535
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
10289
10536
|
key: value.key,
|
|
10290
10537
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
10291
10538
|
}))
|
|
10292
10539
|
})
|
|
10293
|
-
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$
|
|
10540
|
+
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$y(_objectSpread$y({}, fieldDefinition.type), {}, {
|
|
10294
10541
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
10295
10542
|
key: value.key,
|
|
10296
10543
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -10306,7 +10553,7 @@ const formToRestDoc = formCustomFields => ({
|
|
|
10306
10553
|
type: {
|
|
10307
10554
|
id: formCustomFields.type.id,
|
|
10308
10555
|
typeId: 'type',
|
|
10309
|
-
obj: _objectSpread$
|
|
10556
|
+
obj: _objectSpread$y({}, formCustomFields.type)
|
|
10310
10557
|
},
|
|
10311
10558
|
fields: formCustomFields.fields
|
|
10312
10559
|
});
|
|
@@ -10314,7 +10561,7 @@ const formToGraphQlDoc = formCustomFields => ({
|
|
|
10314
10561
|
type: {
|
|
10315
10562
|
id: formCustomFields.type.id,
|
|
10316
10563
|
typeId: 'type',
|
|
10317
|
-
obj: _objectSpread$
|
|
10564
|
+
obj: _objectSpread$y({}, omit__default["default"](formCustomFields.type, ['id']))
|
|
10318
10565
|
},
|
|
10319
10566
|
fields: omitBy__default["default"](formCustomFields.fields || {}, isNil__default["default"])
|
|
10320
10567
|
});
|
|
@@ -10417,8 +10664,8 @@ const CustomFields = props => {
|
|
|
10417
10664
|
CustomFields.displayName = 'CustomFields';
|
|
10418
10665
|
var CustomFields$1 = CustomFields;
|
|
10419
10666
|
|
|
10420
|
-
function ownKeys$
|
|
10421
|
-
function _objectSpread$
|
|
10667
|
+
function ownKeys$x(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10668
|
+
function _objectSpread$x(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$x(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$x(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10422
10669
|
const extractDuplicatedValues = (values, type, language, languages) => {
|
|
10423
10670
|
let validatedValues = [];
|
|
10424
10671
|
if (type.name.toLowerCase() === 'money') {
|
|
@@ -10485,8 +10732,8 @@ function validations (formValues, language, languages) {
|
|
|
10485
10732
|
var _context2;
|
|
10486
10733
|
// Collect all required and set type fields
|
|
10487
10734
|
const fieldDefinitionsToValidate = _filterInstanceProperty__default["default"](_context2 = formValues.custom.type.fieldDefinitions).call(_context2, fieldDefinition => fieldDefinition.required || fieldDefinition.type.name.toLowerCase() === 'set');
|
|
10488
|
-
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$
|
|
10489
|
-
[fieldDefinition.name]: _objectSpread$
|
|
10735
|
+
const errors = _reduceInstanceProperty__default["default"](fieldDefinitionsToValidate).call(fieldDefinitionsToValidate, (acc, fieldDefinition) => _objectSpread$x(_objectSpread$x({}, acc), {}, {
|
|
10736
|
+
[fieldDefinition.name]: _objectSpread$x(_objectSpread$x({}, setMissingIfRequired(formValues, fieldDefinition)), setDuplicatedIfSet(formValues, fieldDefinition, language, languages))
|
|
10490
10737
|
}), {});
|
|
10491
10738
|
return withoutEmptyErrorsByField$1(errors);
|
|
10492
10739
|
}
|
|
@@ -10501,14 +10748,14 @@ var messages$t = reactIntl.defineMessages({
|
|
|
10501
10748
|
}
|
|
10502
10749
|
});
|
|
10503
10750
|
|
|
10504
|
-
function ownKeys$
|
|
10505
|
-
function _objectSpread$
|
|
10751
|
+
function ownKeys$w(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10752
|
+
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$w(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$w(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10506
10753
|
const CustomFieldsErrorTextNotification = props => {
|
|
10507
10754
|
var _context;
|
|
10508
10755
|
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
10509
10756
|
scale: "s",
|
|
10510
10757
|
children: [jsxRuntime.jsx(uiKit.Text.Wrap, {
|
|
10511
|
-
intlMessage: _objectSpread$
|
|
10758
|
+
intlMessage: _objectSpread$w({}, messages$t.customFieldsError)
|
|
10512
10759
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
10513
10760
|
scale: "xs",
|
|
10514
10761
|
children: _mapInstanceProperty__default["default"](_context = props.formErrors).call(_context, formError => jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -10561,13 +10808,13 @@ var messages$s = reactIntl.defineMessages({
|
|
|
10561
10808
|
|
|
10562
10809
|
const FIELD_NAME = 'custom';
|
|
10563
10810
|
|
|
10564
|
-
function ownKeys$
|
|
10565
|
-
function _objectSpread$
|
|
10811
|
+
function ownKeys$v(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10812
|
+
function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$v(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$v(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10566
10813
|
const transformFieldType = fieldDefinition => {
|
|
10567
10814
|
if (fieldDefinition.type?.elementType?.name === 'LocalizedEnum') {
|
|
10568
10815
|
var _context;
|
|
10569
|
-
return _objectSpread$
|
|
10570
|
-
elementType: _objectSpread$
|
|
10816
|
+
return _objectSpread$v(_objectSpread$v({}, fieldDefinition.type), {}, {
|
|
10817
|
+
elementType: _objectSpread$v(_objectSpread$v({}, fieldDefinition.type.elementType), {}, {
|
|
10571
10818
|
values: _mapInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context, value => ({
|
|
10572
10819
|
key: value.key,
|
|
10573
10820
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -10576,7 +10823,7 @@ const transformFieldType = fieldDefinition => {
|
|
|
10576
10823
|
});
|
|
10577
10824
|
} else if (fieldDefinition.type?.name === 'LocalizedEnum') {
|
|
10578
10825
|
var _context2;
|
|
10579
|
-
return _objectSpread$
|
|
10826
|
+
return _objectSpread$v(_objectSpread$v({}, fieldDefinition.type), {}, {
|
|
10580
10827
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context2, value => ({
|
|
10581
10828
|
key: value.key,
|
|
10582
10829
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -10604,7 +10851,7 @@ const convertCustomField = resource => {
|
|
|
10604
10851
|
}))
|
|
10605
10852
|
}
|
|
10606
10853
|
},
|
|
10607
|
-
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$
|
|
10854
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$v(_objectSpread$v({}, fields), {}, {
|
|
10608
10855
|
[customField.name]: customField.value
|
|
10609
10856
|
}), {})
|
|
10610
10857
|
};
|
|
@@ -10652,8 +10899,8 @@ const createRootFieldName = rootFieldName => {
|
|
|
10652
10899
|
return rootFieldName ? `${rootFieldName}.${FIELD_NAME}` : FIELD_NAME;
|
|
10653
10900
|
};
|
|
10654
10901
|
|
|
10655
|
-
function ownKeys$
|
|
10656
|
-
function _objectSpread$
|
|
10902
|
+
function ownKeys$u(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10903
|
+
function _objectSpread$u(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$u(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$u(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10657
10904
|
const typeDefinitionsExist = typeDefinitions => {
|
|
10658
10905
|
return typeDefinitions.length > 0;
|
|
10659
10906
|
};
|
|
@@ -10680,19 +10927,19 @@ const CustomFieldsInputWrapper = _ref2 => {
|
|
|
10680
10927
|
formValues = _valuesInstanceProperty__default["default"](_useFormikContext);
|
|
10681
10928
|
const rootFieldName = createRootFieldName(rootFormStateFieldName);
|
|
10682
10929
|
if (!typeDefinitionsExist(typeDefinitions)) {
|
|
10683
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
10930
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$u({}, messages$s.noTypes));
|
|
10684
10931
|
}
|
|
10685
10932
|
if (!typeDefinitionSelected(formValues, rootFieldName) && isReadOnly) {
|
|
10686
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
10933
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$u({}, messages$s.noCustomTypeReadOnly));
|
|
10687
10934
|
}
|
|
10688
10935
|
if (!typeDefinitionSelected(formValues, rootFieldName)) {
|
|
10689
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
10936
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$u({}, messages$s.noCustomType));
|
|
10690
10937
|
}
|
|
10691
10938
|
if (!typeDefinitionContainsFieldDefinitions(formValues, rootFieldName)) {
|
|
10692
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
10939
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$u({}, messages$s.noCustomFields));
|
|
10693
10940
|
}
|
|
10694
10941
|
if (fieldDefinitionsWithValues(formValues, rootFieldName).length === 0 && isReadOnly && hideEmptyFields) {
|
|
10695
|
-
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
10942
|
+
return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$u({}, messages$s.noInputValues));
|
|
10696
10943
|
}
|
|
10697
10944
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
10698
10945
|
max: "scale",
|
|
@@ -10706,8 +10953,8 @@ const CustomFieldsInputWrapper = _ref2 => {
|
|
|
10706
10953
|
CustomFieldsInputWrapper.displayName = 'CustomFieldsInputWrapper';
|
|
10707
10954
|
var CustomFieldsInputWrapper$1 = CustomFieldsInputWrapper;
|
|
10708
10955
|
|
|
10709
|
-
function ownKeys$
|
|
10710
|
-
function _objectSpread$
|
|
10956
|
+
function ownKeys$t(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10957
|
+
function _objectSpread$t(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$t(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$t(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10711
10958
|
const mapTypeDefinitionsToOptions = (typeDefinitions, language, languages, selectedTypeDefinitionId) => {
|
|
10712
10959
|
return _mapInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => ({
|
|
10713
10960
|
isDisabled: selectedTypeDefinitionId && selectedTypeDefinitionId === typeDefinition.type.id,
|
|
@@ -10794,7 +11041,7 @@ const CustomTypeSubform = _ref => {
|
|
|
10794
11041
|
return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
|
|
10795
11042
|
header: jsxRuntime.jsx(uiKit.CollapsiblePanel.Header, {
|
|
10796
11043
|
isCondensed: isCondensed,
|
|
10797
|
-
children: panelTitle || jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11044
|
+
children: panelTitle || jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$t({}, messages$s.title))
|
|
10798
11045
|
}),
|
|
10799
11046
|
headerControls: typeDefinitions.length > 0 && jsxRuntime.jsx("div", {
|
|
10800
11047
|
css: /*#__PURE__*/react$1.css("min-width:", uiKit.designTokens.constraint11, ";" + ("" ), "" ),
|
|
@@ -10934,11 +11181,16 @@ var messages$r = reactIntl.defineMessages({
|
|
|
10934
11181
|
id: 'Products.PimIndexer.Notifications.indexingFailed',
|
|
10935
11182
|
description: 'Message to show to used in case PIM failed to index project',
|
|
10936
11183
|
defaultMessage: 'Indexing has failed. Please refresh the page and try again.'
|
|
11184
|
+
},
|
|
11185
|
+
refreshIndicesFailed: {
|
|
11186
|
+
id: 'Products.PimIndexer.Notifications.refreshIndicesFailed',
|
|
11187
|
+
description: 'Message to show to user in case refreshing indices failed',
|
|
11188
|
+
defaultMessage: 'We are experiencing a temporary delay in updating your product data, so the results you are seeing may be out of date. Please try again later or contact our support team if the issue persists.'
|
|
10937
11189
|
}
|
|
10938
11190
|
});
|
|
10939
11191
|
|
|
10940
|
-
function ownKeys$
|
|
10941
|
-
function _objectSpread$
|
|
11192
|
+
function ownKeys$s(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11193
|
+
function _objectSpread$s(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$s(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$s(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10942
11194
|
function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10943
11195
|
function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function () { return !!t; })(); }
|
|
10944
11196
|
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 } } } };
|
|
@@ -11022,6 +11274,12 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11022
11274
|
// Alternative approach to this would be to look into `dataIdFromObject` and amend product id with __typeName (IndexedDocument) if we
|
|
11023
11275
|
// would have been interested in caching this information in addition to using an `update` method provided from react-apollo itself
|
|
11024
11276
|
fetchPolicy: 'no-cache'
|
|
11277
|
+
}).catch(error => {
|
|
11278
|
+
_this.props.notifications.showNotification({
|
|
11279
|
+
kind: 'warning',
|
|
11280
|
+
domain: constants.DOMAINS.PAGE,
|
|
11281
|
+
text: _this.props.intl.formatMessage(messages$r.refreshIndicesFailed)
|
|
11282
|
+
});
|
|
11025
11283
|
});
|
|
11026
11284
|
}
|
|
11027
11285
|
return _Promise__default["default"].resolve();
|
|
@@ -11130,7 +11388,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11130
11388
|
shouldIndexProductSelections: isIndexingProductSelections
|
|
11131
11389
|
}
|
|
11132
11390
|
});
|
|
11133
|
-
_this.setState(_objectSpread$
|
|
11391
|
+
_this.setState(_objectSpread$s(_objectSpread$s({
|
|
11134
11392
|
isLoading: false,
|
|
11135
11393
|
isProjectBeingIndexedByPim: true
|
|
11136
11394
|
}, getIndexingJobIds(indexMutationResult)), {}, {
|
|
@@ -11157,7 +11415,7 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
11157
11415
|
key: "render",
|
|
11158
11416
|
value: function render() {
|
|
11159
11417
|
return jsxRuntime.jsx(PimIndexerContext$1.Provider, {
|
|
11160
|
-
value: _objectSpread$
|
|
11418
|
+
value: _objectSpread$s(_objectSpread$s({}, this.state), {}, {
|
|
11161
11419
|
attemptToRefreshProducts: this.attemptToRefreshProducts,
|
|
11162
11420
|
indexProject: this.indexProject
|
|
11163
11421
|
}),
|
|
@@ -11197,13 +11455,13 @@ let WithPimIndexer = /*#__PURE__*/function (_PureComponent) {
|
|
|
11197
11455
|
WithPimIndexer.displayName = 'WithPimIndexer';
|
|
11198
11456
|
var WithPimIndexer$1 = WithPimIndexer;
|
|
11199
11457
|
|
|
11200
|
-
function ownKeys$
|
|
11201
|
-
function _objectSpread$
|
|
11458
|
+
function ownKeys$r(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11459
|
+
function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$r(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$r(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11202
11460
|
var injectPimIndexer = (function () {
|
|
11203
11461
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'pimIndexer';
|
|
11204
11462
|
return Component => {
|
|
11205
11463
|
const WrappedComponent = props => jsxRuntime.jsx(WithPimIndexer$1, {
|
|
11206
|
-
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$
|
|
11464
|
+
children: pimIndexerProps => jsxRuntime.jsx(Component, _objectSpread$r(_objectSpread$r({}, props), {}, {
|
|
11207
11465
|
[propName]: pimIndexerProps
|
|
11208
11466
|
}))
|
|
11209
11467
|
});
|
|
@@ -11231,10 +11489,10 @@ const RESOURCES_WITH_PLATFORM_LIMITS = {
|
|
|
11231
11489
|
carts: 'carts'
|
|
11232
11490
|
};
|
|
11233
11491
|
|
|
11234
|
-
function ownKeys$
|
|
11235
|
-
function _objectSpread$
|
|
11492
|
+
function ownKeys$q(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11493
|
+
function _objectSpread$q(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$q(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$q(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11236
11494
|
const resourcesWithPlatformLimits = _Object$keys__default["default"](RESOURCES_WITH_PLATFORM_LIMITS);
|
|
11237
|
-
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$
|
|
11495
|
+
const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$q({
|
|
11238
11496
|
[camelCase__default["default"](`should include ${nextNameOfLimit}`)]: platformLimit ? nextNameOfLimit === platformLimit : true
|
|
11239
11497
|
}, previousIncludedLimits), {});
|
|
11240
11498
|
var createPlatformLimitsQueryVariables = createQueryVariables;
|
|
@@ -11330,8 +11588,8 @@ var messages$q = reactIntl.defineMessages({
|
|
|
11330
11588
|
}
|
|
11331
11589
|
});
|
|
11332
11590
|
|
|
11333
|
-
function ownKeys$
|
|
11334
|
-
function _objectSpread$
|
|
11591
|
+
function ownKeys$p(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11592
|
+
function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$p(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$p(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11335
11593
|
const getCustomerSupportLink$1 = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
11336
11594
|
isExternal: true,
|
|
11337
11595
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -11342,7 +11600,7 @@ const PlatformLimitErrorNotification = _ref => {
|
|
|
11342
11600
|
limit = _ref.limit;
|
|
11343
11601
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
11344
11602
|
type: "error",
|
|
11345
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11603
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$p(_objectSpread$p({}, messages$q[resource]), {}, {
|
|
11346
11604
|
values: {
|
|
11347
11605
|
limit,
|
|
11348
11606
|
customersupport: getCustomerSupportLink$1
|
|
@@ -11384,8 +11642,8 @@ var messages$p = reactIntl.defineMessages({
|
|
|
11384
11642
|
}
|
|
11385
11643
|
});
|
|
11386
11644
|
|
|
11387
|
-
function ownKeys$
|
|
11388
|
-
function _objectSpread$
|
|
11645
|
+
function ownKeys$o(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11646
|
+
function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$o(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$o(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11389
11647
|
const getCustomerSupportLink = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
11390
11648
|
isExternal: true,
|
|
11391
11649
|
to: constants.SUPPORT_PORTAL_URL,
|
|
@@ -11396,7 +11654,7 @@ const PlatformLimitWarningNotification = _ref => {
|
|
|
11396
11654
|
limit = _ref.limit;
|
|
11397
11655
|
return jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
11398
11656
|
type: "warning",
|
|
11399
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11657
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$o(_objectSpread$o({}, messages$p[resource]), {}, {
|
|
11400
11658
|
values: {
|
|
11401
11659
|
limit,
|
|
11402
11660
|
customersupport: getCustomerSupportLink
|
|
@@ -11416,8 +11674,8 @@ const Notifications = {
|
|
|
11416
11674
|
};
|
|
11417
11675
|
var Notifications$1 = Notifications;
|
|
11418
11676
|
|
|
11419
|
-
function ownKeys$
|
|
11420
|
-
function _objectSpread$
|
|
11677
|
+
function ownKeys$n(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11678
|
+
function _objectSpread$n(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$n(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$n(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11421
11679
|
const PlatformLimitsStatusText = _ref => {
|
|
11422
11680
|
let intlMessage = _ref.intlMessage,
|
|
11423
11681
|
children = _ref.children;
|
|
@@ -11426,7 +11684,7 @@ const PlatformLimitsStatusText = _ref => {
|
|
|
11426
11684
|
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
11427
11685
|
size: "xs",
|
|
11428
11686
|
children: [jsxRuntime.jsx("span", {
|
|
11429
|
-
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
11687
|
+
children: intlMessage && jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$n({}, intlMessage))
|
|
11430
11688
|
}), jsxRuntime.jsx("span", {
|
|
11431
11689
|
children: children
|
|
11432
11690
|
})]
|
|
@@ -11536,11 +11794,11 @@ var messages$o = reactIntl.defineMessages({
|
|
|
11536
11794
|
}
|
|
11537
11795
|
});
|
|
11538
11796
|
|
|
11539
|
-
function ownKeys$
|
|
11540
|
-
function _objectSpread$
|
|
11797
|
+
function ownKeys$m(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11798
|
+
function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$m(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$m(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11541
11799
|
const PlatformLimitsShippingMethodsTooltip = props => {
|
|
11542
11800
|
const intl = reactIntl.useIntl();
|
|
11543
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
11801
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$m(_objectSpread$m({}, props), {}, {
|
|
11544
11802
|
title: intl.formatMessage(messages$o.shippingMethodsPlatformLimitReached)
|
|
11545
11803
|
}));
|
|
11546
11804
|
};
|
|
@@ -11602,15 +11860,15 @@ const useShippingMethodsLimits = () => {
|
|
|
11602
11860
|
};
|
|
11603
11861
|
var useShippingMethodsPlatformLimits = useShippingMethodsLimits;
|
|
11604
11862
|
|
|
11605
|
-
function ownKeys$
|
|
11606
|
-
function _objectSpread$
|
|
11863
|
+
function ownKeys$l(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11864
|
+
function _objectSpread$l(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$l(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$l(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11607
11865
|
const injectShippingMethodsPlatformLimits = () => WrappedComponent => {
|
|
11608
11866
|
const WithShippingMethodsPlatformLimits = props => {
|
|
11609
11867
|
const shippingMethodsPlatformLimits = useShippingMethodsPlatformLimits();
|
|
11610
11868
|
const shippingMethodsProps = {
|
|
11611
11869
|
platformLimits: shippingMethodsPlatformLimits
|
|
11612
11870
|
};
|
|
11613
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
11871
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$l(_objectSpread$l({}, props), shippingMethodsProps));
|
|
11614
11872
|
};
|
|
11615
11873
|
WithShippingMethodsPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithShippingMethodsPlatformLimits');
|
|
11616
11874
|
return WithShippingMethodsPlatformLimits;
|
|
@@ -11693,11 +11951,11 @@ var messages$m = reactIntl.defineMessages({
|
|
|
11693
11951
|
}
|
|
11694
11952
|
});
|
|
11695
11953
|
|
|
11696
|
-
function ownKeys$
|
|
11697
|
-
function _objectSpread$
|
|
11954
|
+
function ownKeys$k(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11955
|
+
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11698
11956
|
const PlatformLimitsTaxCategoriesTooltip = props => {
|
|
11699
11957
|
const intl = reactIntl.useIntl();
|
|
11700
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
11958
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$k(_objectSpread$k({}, props), {}, {
|
|
11701
11959
|
title: intl.formatMessage(messages$m.taxCategoriesPlatformLimitReached)
|
|
11702
11960
|
}));
|
|
11703
11961
|
};
|
|
@@ -11753,15 +12011,15 @@ const useTaxCategoriesLimits = () => {
|
|
|
11753
12011
|
};
|
|
11754
12012
|
var useTaxCategoriesPlatformLimits = useTaxCategoriesLimits;
|
|
11755
12013
|
|
|
11756
|
-
function ownKeys$
|
|
11757
|
-
function _objectSpread$
|
|
12014
|
+
function ownKeys$j(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12015
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$j(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$j(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11758
12016
|
const injectTaxCategoriesPlatformLimits = WrappedComponent => {
|
|
11759
12017
|
const WithTaxCategoriesPlatformLimits = props => {
|
|
11760
12018
|
const taxCategoriesPlatformLimits = useTaxCategoriesPlatformLimits();
|
|
11761
12019
|
const taxCategoriesProps = {
|
|
11762
12020
|
platformLimits: taxCategoriesPlatformLimits
|
|
11763
12021
|
};
|
|
11764
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
12022
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$j(_objectSpread$j({}, props), taxCategoriesProps));
|
|
11765
12023
|
};
|
|
11766
12024
|
WithTaxCategoriesPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithTaxCategoriesPlatformLimits');
|
|
11767
12025
|
return WithTaxCategoriesPlatformLimits;
|
|
@@ -11844,11 +12102,11 @@ var messages$k = reactIntl.defineMessages({
|
|
|
11844
12102
|
}
|
|
11845
12103
|
});
|
|
11846
12104
|
|
|
11847
|
-
function ownKeys$
|
|
11848
|
-
function _objectSpread$
|
|
12105
|
+
function ownKeys$i(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12106
|
+
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11849
12107
|
const PlatformLimitsZonesTooltip = props => {
|
|
11850
12108
|
const intl = reactIntl.useIntl();
|
|
11851
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
12109
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
11852
12110
|
title: intl.formatMessage(messages$k.zonesPlatformLimitReached)
|
|
11853
12111
|
}));
|
|
11854
12112
|
};
|
|
@@ -11904,15 +12162,15 @@ const useZonesLimits = () => {
|
|
|
11904
12162
|
};
|
|
11905
12163
|
var useZonesPlatformLimits = useZonesLimits;
|
|
11906
12164
|
|
|
11907
|
-
function ownKeys$
|
|
11908
|
-
function _objectSpread$
|
|
12165
|
+
function ownKeys$h(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12166
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$h(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$h(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
11909
12167
|
const injectZonesPlatformLimits = () => WrappedComponent => {
|
|
11910
12168
|
const WithZonesPlatformLimits = props => {
|
|
11911
12169
|
const zonesPlatformLimits = useZonesPlatformLimits();
|
|
11912
12170
|
const zonesProps = {
|
|
11913
12171
|
platformLimits: zonesPlatformLimits
|
|
11914
12172
|
};
|
|
11915
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
12173
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$h(_objectSpread$h({}, props), zonesProps));
|
|
11916
12174
|
};
|
|
11917
12175
|
WithZonesPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithZonesPlatformLimits');
|
|
11918
12176
|
return WithZonesPlatformLimits;
|
|
@@ -12009,11 +12267,11 @@ var messages$i = reactIntl.defineMessages({
|
|
|
12009
12267
|
}
|
|
12010
12268
|
});
|
|
12011
12269
|
|
|
12012
|
-
function ownKeys$
|
|
12013
|
-
function _objectSpread$
|
|
12270
|
+
function ownKeys$g(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12271
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$g(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$g(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12014
12272
|
const PlatformLimitsCustomersTooltip = props => {
|
|
12015
12273
|
const intl = reactIntl.useIntl();
|
|
12016
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
12274
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$g(_objectSpread$g({}, props), {}, {
|
|
12017
12275
|
title: intl.formatMessage(messages$i.customersPlatformLimitReached)
|
|
12018
12276
|
}));
|
|
12019
12277
|
};
|
|
@@ -12028,8 +12286,8 @@ var messages$h = reactIntl.defineMessages({
|
|
|
12028
12286
|
}
|
|
12029
12287
|
});
|
|
12030
12288
|
|
|
12031
|
-
function ownKeys$
|
|
12032
|
-
function _objectSpread$
|
|
12289
|
+
function ownKeys$f(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12290
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$f(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12033
12291
|
var _ref$3 = {
|
|
12034
12292
|
name: "1670krd",
|
|
12035
12293
|
styles: "min-width:max-content"
|
|
@@ -12049,7 +12307,7 @@ const PlatformLimitsCustomersStatus = () => {
|
|
|
12049
12307
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
12050
12308
|
tone: "secondary",
|
|
12051
12309
|
isInline: true,
|
|
12052
|
-
intlMessage: _objectSpread$
|
|
12310
|
+
intlMessage: _objectSpread$f(_objectSpread$f({}, messages$h.customersStatus), {}, {
|
|
12053
12311
|
values: {
|
|
12054
12312
|
current: intl.formatNumber(current),
|
|
12055
12313
|
limit: intl.formatNumber(limit)
|
|
@@ -12074,10 +12332,10 @@ var messages$g = reactIntl.defineMessages({
|
|
|
12074
12332
|
}
|
|
12075
12333
|
});
|
|
12076
12334
|
|
|
12077
|
-
function ownKeys$
|
|
12078
|
-
function _objectSpread$
|
|
12335
|
+
function ownKeys$e(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12336
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$e(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$e(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12079
12337
|
var LimitsReachedErrorGraphic$1 = function LimitsReachedErrorGraphic(props) {
|
|
12080
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
12338
|
+
return jsxRuntime.jsxs("svg", _objectSpread$e(_objectSpread$e({}, props), {}, {
|
|
12081
12339
|
children: [jsxRuntime.jsx("defs", {
|
|
12082
12340
|
children: jsxRuntime.jsx("path", {
|
|
12083
12341
|
id: "a",
|
|
@@ -12252,15 +12510,15 @@ const useCustomersPlatformLimits = () => {
|
|
|
12252
12510
|
};
|
|
12253
12511
|
var useCustomersPlatformLimits$1 = useCustomersPlatformLimits;
|
|
12254
12512
|
|
|
12255
|
-
function ownKeys$
|
|
12256
|
-
function _objectSpread$
|
|
12513
|
+
function ownKeys$d(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12514
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$d(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$d(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12257
12515
|
const injectCustomersPlatformLimits = () => WrappedComponent => {
|
|
12258
12516
|
const WithCustomersPlatformLimits = props => {
|
|
12259
12517
|
const CustomersPlatformLimits = useCustomersPlatformLimits$1();
|
|
12260
12518
|
const customersProps = {
|
|
12261
12519
|
platformLimits: CustomersPlatformLimits
|
|
12262
12520
|
};
|
|
12263
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
12521
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$d(_objectSpread$d({}, props), customersProps));
|
|
12264
12522
|
};
|
|
12265
12523
|
WithCustomersPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithCustomersPlatformLimits');
|
|
12266
12524
|
return WithCustomersPlatformLimits;
|
|
@@ -12389,11 +12647,11 @@ var messages$f = reactIntl.defineMessages({
|
|
|
12389
12647
|
}
|
|
12390
12648
|
});
|
|
12391
12649
|
|
|
12392
|
-
function ownKeys$
|
|
12393
|
-
function _objectSpread$
|
|
12650
|
+
function ownKeys$c(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12651
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$c(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$c(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12394
12652
|
const PlatformLimitsCustomerGroupsTooltip = props => {
|
|
12395
12653
|
const intl = reactIntl.useIntl();
|
|
12396
|
-
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$
|
|
12654
|
+
return jsxRuntime.jsx(uiKit.Tooltip, _objectSpread$c(_objectSpread$c({}, props), {}, {
|
|
12397
12655
|
title: intl.formatMessage(messages$f.customerGroupsPlatformLimitReached)
|
|
12398
12656
|
}));
|
|
12399
12657
|
};
|
|
@@ -12408,8 +12666,8 @@ var messages$e = reactIntl.defineMessages({
|
|
|
12408
12666
|
}
|
|
12409
12667
|
});
|
|
12410
12668
|
|
|
12411
|
-
function ownKeys$
|
|
12412
|
-
function _objectSpread$
|
|
12669
|
+
function ownKeys$b(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12670
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$b(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$b(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12413
12671
|
var _ref$2 = {
|
|
12414
12672
|
name: "1670krd",
|
|
12415
12673
|
styles: "min-width:max-content"
|
|
@@ -12429,7 +12687,7 @@ const PlatformLimitsCustomerGroupsStatus = () => {
|
|
|
12429
12687
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
12430
12688
|
tone: "secondary",
|
|
12431
12689
|
isInline: true,
|
|
12432
|
-
intlMessage: _objectSpread$
|
|
12690
|
+
intlMessage: _objectSpread$b(_objectSpread$b({}, messages$e.customerGroupsStatus), {}, {
|
|
12433
12691
|
values: {
|
|
12434
12692
|
current: intl.formatNumber(current),
|
|
12435
12693
|
limit: intl.formatNumber(limit)
|
|
@@ -12454,10 +12712,10 @@ var messages$d = reactIntl.defineMessages({
|
|
|
12454
12712
|
}
|
|
12455
12713
|
});
|
|
12456
12714
|
|
|
12457
|
-
function ownKeys$
|
|
12458
|
-
function _objectSpread$
|
|
12715
|
+
function ownKeys$a(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12716
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$a(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$a(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12459
12717
|
var LimitsReachedErrorGraphic = function LimitsReachedErrorGraphic(props) {
|
|
12460
|
-
return jsxRuntime.jsxs("svg", _objectSpread$
|
|
12718
|
+
return jsxRuntime.jsxs("svg", _objectSpread$a(_objectSpread$a({}, props), {}, {
|
|
12461
12719
|
children: [jsxRuntime.jsx("defs", {
|
|
12462
12720
|
children: jsxRuntime.jsx("path", {
|
|
12463
12721
|
id: "a",
|
|
@@ -12629,15 +12887,15 @@ const useCustomerGroupsPlatformLimits = () => {
|
|
|
12629
12887
|
};
|
|
12630
12888
|
var useCustomerGroupsPlatformLimits$1 = useCustomerGroupsPlatformLimits;
|
|
12631
12889
|
|
|
12632
|
-
function ownKeys$
|
|
12633
|
-
function _objectSpread$
|
|
12890
|
+
function ownKeys$9(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12891
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$9(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$9(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12634
12892
|
const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
|
|
12635
12893
|
const WithCustomerGroupsPlatformLimits = props => {
|
|
12636
12894
|
const CustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits$1();
|
|
12637
12895
|
const customersProps = {
|
|
12638
12896
|
platformLimits: CustomerGroupsPlatformLimits
|
|
12639
12897
|
};
|
|
12640
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
12898
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$9(_objectSpread$9({}, props), customersProps));
|
|
12641
12899
|
};
|
|
12642
12900
|
WithCustomerGroupsPlatformLimits.displayName = wrapDisplayName$1(WrappedComponent, 'WithCustomerGroupsPlatformLimits');
|
|
12643
12901
|
return WithCustomerGroupsPlatformLimits;
|
|
@@ -12786,8 +13044,8 @@ const messages$a = reactIntl.defineMessages({
|
|
|
12786
13044
|
});
|
|
12787
13045
|
var messages$b = messages$a;
|
|
12788
13046
|
|
|
12789
|
-
function ownKeys$
|
|
12790
|
-
function _objectSpread$
|
|
13047
|
+
function ownKeys$8(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13048
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$8(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$8(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12791
13049
|
var _ref$1 = {
|
|
12792
13050
|
name: "1rk22b8",
|
|
12793
13051
|
styles: "font-size:0.9rem;font-weight:bold"
|
|
@@ -12796,7 +13054,7 @@ const LabelRange = _ref2 => {
|
|
|
12796
13054
|
let type = _ref2.type;
|
|
12797
13055
|
return jsxRuntime.jsx("label", {
|
|
12798
13056
|
css: _ref$1,
|
|
12799
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
13057
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$8({}, messages$b[type]))
|
|
12800
13058
|
});
|
|
12801
13059
|
};
|
|
12802
13060
|
LabelRange.displayName = 'LabelRange';
|
|
@@ -12811,8 +13069,8 @@ var messages$9 = reactIntl.defineMessages({
|
|
|
12811
13069
|
});
|
|
12812
13070
|
|
|
12813
13071
|
const _excluded = ["isChecked"];
|
|
12814
|
-
function ownKeys$
|
|
12815
|
-
function _objectSpread$
|
|
13072
|
+
function ownKeys$7(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13073
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$7(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$7(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12816
13074
|
const MissingValueField = _ref => {
|
|
12817
13075
|
let _ref$isChecked = _ref.isChecked,
|
|
12818
13076
|
isChecked = _ref$isChecked === void 0 ? false : _ref$isChecked,
|
|
@@ -12821,7 +13079,7 @@ const MissingValueField = _ref => {
|
|
|
12821
13079
|
name: "missing-value",
|
|
12822
13080
|
isChecked: isChecked,
|
|
12823
13081
|
onChange: props.onChange,
|
|
12824
|
-
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
13082
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$7({}, messages$9.label))
|
|
12825
13083
|
});
|
|
12826
13084
|
};
|
|
12827
13085
|
var MissingValueField$1 = MissingValueField;
|
|
@@ -12839,8 +13097,8 @@ var messages$8 = reactIntl.defineMessages({
|
|
|
12839
13097
|
}
|
|
12840
13098
|
});
|
|
12841
13099
|
|
|
12842
|
-
function ownKeys$
|
|
12843
|
-
function _objectSpread$
|
|
13100
|
+
function ownKeys$6(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13101
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$6(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12844
13102
|
const IS_MULTI_VALUE_FLAG = '?isMulti=true';
|
|
12845
13103
|
const MultiValueSelectorDropdown = props => {
|
|
12846
13104
|
if (!props.isOpen) return null;
|
|
@@ -12852,7 +13110,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
12852
13110
|
css: /*#__PURE__*/react$1.css("padding:", uiKit.designTokens.spacingS, ";&:hover{background-color:", uiKit.designTokens.colorNeutral95, ";border-radius:", uiKit.designTokens.borderRadiusForInput, ";}" + ("" ), "" ),
|
|
12853
13111
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
12854
13112
|
truncate: true,
|
|
12855
|
-
intlMessage: _objectSpread$
|
|
13113
|
+
intlMessage: _objectSpread$6(_objectSpread$6({}, messages$8.filterWholeInput), {}, {
|
|
12856
13114
|
values: {
|
|
12857
13115
|
values: `"${props.value}"`
|
|
12858
13116
|
}
|
|
@@ -12863,7 +13121,7 @@ const MultiValueSelectorDropdown = props => {
|
|
|
12863
13121
|
css: /*#__PURE__*/react$1.css("padding:", uiKit.designTokens.spacingS, ";&:hover{background-color:", uiKit.designTokens.colorNeutral95, ";border-bottom-left-radius:", uiKit.designTokens.borderRadiusForInput, ";border-bottom-right-radius:", uiKit.designTokens.borderRadiusForInput, ";}" + ("" ), "" ),
|
|
12864
13122
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
12865
13123
|
truncate: true,
|
|
12866
|
-
intlMessage: _objectSpread$
|
|
13124
|
+
intlMessage: _objectSpread$6(_objectSpread$6({}, messages$8.filterSeparateValues), {}, {
|
|
12867
13125
|
values: {
|
|
12868
13126
|
values: `"${props.multiValue.join('", "')}"` || props.value
|
|
12869
13127
|
}
|
|
@@ -12979,8 +13237,8 @@ const MultiValueSearchInput = props => {
|
|
|
12979
13237
|
MultiValueSearchInput.displayName = 'MultiValueSearchInput';
|
|
12980
13238
|
var MultiValueSearchInput$1 = MultiValueSearchInput;
|
|
12981
13239
|
|
|
12982
|
-
function ownKeys$
|
|
12983
|
-
function _objectSpread$
|
|
13240
|
+
function ownKeys$5(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13241
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$5(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$5(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12984
13242
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12985
13243
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
12986
13244
|
Cleave__default["default"].displayName = 'Cleave';
|
|
@@ -13040,7 +13298,7 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
13040
13298
|
value: function render() {
|
|
13041
13299
|
const separators = getSeparatorsForLocale(this.props.numberFormat);
|
|
13042
13300
|
const dataAttributes = filterDataAttributes(this.props);
|
|
13043
|
-
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$
|
|
13301
|
+
return jsxRuntime.jsx(Cleave__default["default"], _objectSpread$5({
|
|
13044
13302
|
placeholder: this.props.placeholder,
|
|
13045
13303
|
htmlRef: this.registerInputRef,
|
|
13046
13304
|
options: {
|
|
@@ -13170,6 +13428,8 @@ const buildSearchQuery = (searchQuery, searchMode, fragments) => {
|
|
|
13170
13428
|
};
|
|
13171
13429
|
var buildSearchQuery$1 = buildSearchQuery;
|
|
13172
13430
|
|
|
13431
|
+
function ownKeys$4(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13432
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$4(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$4(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
13173
13433
|
const getBulkNotification = _ref => {
|
|
13174
13434
|
let counts = _ref.counts,
|
|
13175
13435
|
texts = _ref.texts;
|
|
@@ -13199,6 +13459,31 @@ const getCountsFromBulkSummary = bulkSummary => {
|
|
|
13199
13459
|
failed
|
|
13200
13460
|
};
|
|
13201
13461
|
};
|
|
13462
|
+
const useShowBulkNotification = () => {
|
|
13463
|
+
const _useIntl = reactIntl.useIntl(),
|
|
13464
|
+
formatMessage = _useIntl.formatMessage;
|
|
13465
|
+
const showNotification = actionsGlobal.useShowNotification();
|
|
13466
|
+
const showBulkNotification = React.useCallback(_ref2 => {
|
|
13467
|
+
let bulkSummary = _ref2.bulkSummary,
|
|
13468
|
+
messages = _ref2.messages,
|
|
13469
|
+
messagesValues = _ref2.messagesValues;
|
|
13470
|
+
const counts = getCountsFromBulkSummary(bulkSummary);
|
|
13471
|
+
const formatMessageValues = _objectSpread$4({
|
|
13472
|
+
successfulCount: counts.successful,
|
|
13473
|
+
unsuccessfulCount: counts.failed,
|
|
13474
|
+
totalCount: counts.total
|
|
13475
|
+
}, messagesValues);
|
|
13476
|
+
showNotification(getBulkNotification({
|
|
13477
|
+
counts,
|
|
13478
|
+
texts: {
|
|
13479
|
+
success: formatMessage(messages.success, formatMessageValues),
|
|
13480
|
+
warning: formatMessage(messages.warning, formatMessageValues),
|
|
13481
|
+
failure: formatMessage(messages.failure, formatMessageValues)
|
|
13482
|
+
}
|
|
13483
|
+
}));
|
|
13484
|
+
}, [formatMessage, showNotification]);
|
|
13485
|
+
return showBulkNotification;
|
|
13486
|
+
};
|
|
13202
13487
|
|
|
13203
13488
|
// Values have to match enum values on core ws
|
|
13204
13489
|
// https://github.com/sphereio/sphere-backend/blob/master/ws/core/users.md#-businessrole
|
|
@@ -14299,9 +14584,13 @@ const getAttributeValueByType = _ref10 => {
|
|
|
14299
14584
|
return constants.NO_VALUE_FALLBACK;
|
|
14300
14585
|
}
|
|
14301
14586
|
};
|
|
14587
|
+
|
|
14588
|
+
// TODO: rename to isProductLevelAttribute since it returns a boolean
|
|
14302
14589
|
const getProductLevelAttributes = attribueDefinition => {
|
|
14303
14590
|
return attribueDefinition?.level === ATTRIBUTE_LEVELS.PRODUCT;
|
|
14304
14591
|
};
|
|
14592
|
+
|
|
14593
|
+
// TODO: rename to isProductAttribute since it returns a boolean
|
|
14305
14594
|
const getProductAttributes = attribueDefinition => {
|
|
14306
14595
|
return attribueDefinition?.attributeConstraint === ATTRIBUTE_CONSTRAINTS.SAME_FOR_ALL || getProductLevelAttributes(attribueDefinition);
|
|
14307
14596
|
};
|
|
@@ -14448,16 +14737,6 @@ const getTimeZoneLabel = memoize__default["default"]((selectedTimeZone, timeZone
|
|
|
14448
14737
|
return `(GMT ${timeZoneData.offset}) ${timeZoneData.name}`;
|
|
14449
14738
|
});
|
|
14450
14739
|
|
|
14451
|
-
const DEFAULT_LENGTH = 50;
|
|
14452
|
-
const DEFAULT_END = '...';
|
|
14453
|
-
function truncate (text) {
|
|
14454
|
-
let length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_LENGTH;
|
|
14455
|
-
let end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_END;
|
|
14456
|
-
if (!text) return '';
|
|
14457
|
-
if (text.length < length) return text;
|
|
14458
|
-
return `${text.substring(0, length)}${end}`;
|
|
14459
|
-
}
|
|
14460
|
-
|
|
14461
14740
|
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14462
14741
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
14463
14742
|
function withPendingRequests() {
|
|
@@ -14645,7 +14924,7 @@ exports.resolveStatusType = resolveStatusType;
|
|
|
14645
14924
|
exports.safelyAddFallback = safelyAddFallback;
|
|
14646
14925
|
exports.sanitize = sanitize;
|
|
14647
14926
|
exports.searchCategories = searchCategories;
|
|
14648
|
-
exports.searchInputMessages = messages$
|
|
14927
|
+
exports.searchInputMessages = messages$P;
|
|
14649
14928
|
exports.setDisplayName = setDisplayName$1;
|
|
14650
14929
|
exports.setToArray = setToArray;
|
|
14651
14930
|
exports.shallowEqual = shallowEqual;
|
|
@@ -14673,10 +14952,12 @@ exports.useDebouncedPromiseCallback = useDebouncedPromiseCallback$1;
|
|
|
14673
14952
|
exports.useFormatCustomField = useFormatCustomField;
|
|
14674
14953
|
exports.useFormatLocalizedFieldToString = useFormatLocalizedFieldToString;
|
|
14675
14954
|
exports.useFormatLocalizedString = useFormatLocalizedString;
|
|
14955
|
+
exports.useIdentityBannerNotification = useIdentityBannerNotification;
|
|
14676
14956
|
exports.useIsFieldDuplicated = useIsFieldDuplicated$1;
|
|
14677
14957
|
exports.useLoadOptions = useLoadOptions$1;
|
|
14678
14958
|
exports.useLocalizedKeyFallback = useLocalizedKeyFallback$1;
|
|
14679
14959
|
exports.usePendingRequests = usePendingRequests;
|
|
14960
|
+
exports.usePersistedReminder = usePersistedReminder$1;
|
|
14680
14961
|
exports.usePersistedTableConfiguration = usePersistedTableConfiguration$1;
|
|
14681
14962
|
exports.usePimIndexer = usePimIndexer;
|
|
14682
14963
|
exports.usePrevious = usePrevious$1;
|
|
@@ -14685,10 +14966,13 @@ exports.useProductSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1;
|
|
|
14685
14966
|
exports.useRecurrenceIntervals = useRecurrenceIntervals;
|
|
14686
14967
|
exports.useRoleNotificationEffect = useRoleNotificationEffect$1;
|
|
14687
14968
|
exports.useShippingMethodsPlatformLimits = useShippingMethodsPlatformLimits;
|
|
14969
|
+
exports.useShowBulkNotification = useShowBulkNotification;
|
|
14688
14970
|
exports.useStorage = useStorage$1;
|
|
14689
14971
|
exports.useStoreKeysInDataFences = useStoreKeysInDataFences$1;
|
|
14972
|
+
exports.useStoreSearchIndexStatusFetcher = useStoreSearchIndexStatusFetcher$1;
|
|
14690
14973
|
exports.useStoresListFetcher = useStoresListFetcher$1;
|
|
14691
14974
|
exports.useStoresPlatformLimits = useStoresLimits$1;
|
|
14975
|
+
exports.useStoresSearchFetcher = useStoresSearchFetcher$1;
|
|
14692
14976
|
exports.useTaxCategoriesPlatformLimits = useTaxCategoriesPlatformLimits;
|
|
14693
14977
|
exports.useTotalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1;
|
|
14694
14978
|
exports.validateCustomField = validateFilter$2;
|
|
@@ -14700,6 +14984,7 @@ exports.validateSingleOptionEnum = validateSingleOptionEnum;
|
|
|
14700
14984
|
exports.validateText = validateText;
|
|
14701
14985
|
exports.validatedInput = validatedInput;
|
|
14702
14986
|
exports.validationMessages = validationMessages;
|
|
14987
|
+
exports.valueMapping = valueMapping;
|
|
14703
14988
|
exports.withPendingRequests = withPendingRequests;
|
|
14704
14989
|
exports.withProps = withProps$1;
|
|
14705
14990
|
exports.withRedirectTo = withRedirectTo$1;
|