@commercetools-frontend/experimental-components 8.0.4 → 8.0.6
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 +308 -289
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +308 -289
- package/dist/commercetools-frontend-experimental-components.esm.js +309 -290
- package/dist/declarations/src/components/recurrent-interval-picker/recurrent-interval-picker.d.ts +4 -2
- package/dist/declarations/src/hooks/index.d.ts +0 -1
- package/dist/declarations/src/index.d.ts +3 -3
- package/dist/declarations/src/utils/pim-query-clauses.d.ts +10 -0
- package/package.json +15 -15
- package/dist/declarations/src/hooks/use-identity-banner-notification/index.d.ts +0 -1
- package/dist/declarations/src/hooks/use-identity-banner-notification/use-identity-banner-notification.d.ts +0 -6
|
@@ -304,7 +304,7 @@ var commonPickerMessages = reactIntl.defineMessages({
|
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
306
|
|
|
307
|
-
var messages$
|
|
307
|
+
var messages$R = reactIntl.defineMessages({
|
|
308
308
|
noChannelsFound: {
|
|
309
309
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
310
310
|
description: 'The message to display when no channels were found',
|
|
@@ -317,8 +317,8 @@ var messages$S = reactIntl.defineMessages({
|
|
|
317
317
|
}
|
|
318
318
|
});
|
|
319
319
|
|
|
320
|
-
function ownKeys$
|
|
321
|
-
function _objectSpread$
|
|
320
|
+
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; }
|
|
321
|
+
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; }
|
|
322
322
|
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 } } } };
|
|
323
323
|
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 } } } };
|
|
324
324
|
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 } } } };
|
|
@@ -347,7 +347,7 @@ const ChannelPickerInput = _ref => {
|
|
|
347
347
|
const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
|
|
348
348
|
const variables = React.useMemo(() => {
|
|
349
349
|
const rolesClause = getRolesClause(roles);
|
|
350
|
-
return _objectSpread$
|
|
350
|
+
return _objectSpread$1v({
|
|
351
351
|
sortByNamePath: `name.${dataLocale}`
|
|
352
352
|
}, rolesClause && {
|
|
353
353
|
extraWhere: rolesClause
|
|
@@ -423,7 +423,7 @@ const ChannelPickerInput = _ref => {
|
|
|
423
423
|
if (isCurrentOptionLoadingFailed && onError) onError(currentOptions.error);
|
|
424
424
|
}, [isCurrentOptionLoadingFailed, onError, currentOptions]);
|
|
425
425
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
426
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
426
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$R.noChannelsFound), [loadingError, formatMessage]);
|
|
427
427
|
const tooltipTitle = !isMulti ? currentSingleOption?.data?.label ?? '' : '';
|
|
428
428
|
const selectedValue = currentOptions.data ?? (isMulti ? [] : null);
|
|
429
429
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
@@ -435,7 +435,7 @@ const ChannelPickerInput = _ref => {
|
|
|
435
435
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
436
436
|
id: name,
|
|
437
437
|
name: name,
|
|
438
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
438
|
+
placeholder: placeholder ?? formatMessage(messages$R.placeholder),
|
|
439
439
|
loadOptions: loadOptionsDebounced,
|
|
440
440
|
defaultOptions: true,
|
|
441
441
|
showOptionGroupDivider: true,
|
|
@@ -491,7 +491,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
491
491
|
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
492
492
|
var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
493
493
|
|
|
494
|
-
var messages$
|
|
494
|
+
var messages$Q = reactIntl.defineMessages({
|
|
495
495
|
noProductTypesFound: {
|
|
496
496
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
497
497
|
description: 'The message to display when no product types were found',
|
|
@@ -580,7 +580,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
580
580
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
581
581
|
id: name,
|
|
582
582
|
name: name,
|
|
583
|
-
placeholder: formatMessage(messages$
|
|
583
|
+
placeholder: formatMessage(messages$Q.placeholder),
|
|
584
584
|
loadOptions: loadOptionsDebounced,
|
|
585
585
|
defaultOptions: [],
|
|
586
586
|
isClearable: isClearable,
|
|
@@ -593,7 +593,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
593
593
|
onInputChange: handleInputChange,
|
|
594
594
|
onBlur: onBlur,
|
|
595
595
|
value: currentOption.data,
|
|
596
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
596
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$Q.noProductTypesFound),
|
|
597
597
|
hasError: hasError || isLoadingFailed,
|
|
598
598
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
599
599
|
menuPortalTarget: document.body,
|
|
@@ -609,7 +609,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
609
609
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
610
610
|
var ProductTypePickerInput$1 = ProductTypePickerInput;
|
|
611
611
|
|
|
612
|
-
var messages$
|
|
612
|
+
var messages$P = reactIntl.defineMessages({
|
|
613
613
|
noStatesFound: {
|
|
614
614
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
615
615
|
description: 'The message to display when no states were found',
|
|
@@ -693,7 +693,7 @@ const StatePickerInput = _ref => {
|
|
|
693
693
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
694
694
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
695
695
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
696
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
696
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$P.noStatesFound), [loadingError, formatMessage]);
|
|
697
697
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
698
698
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
699
699
|
max: "scale",
|
|
@@ -705,7 +705,7 @@ const StatePickerInput = _ref => {
|
|
|
705
705
|
id: name,
|
|
706
706
|
name: name,
|
|
707
707
|
horizontalConstraint: "scale",
|
|
708
|
-
placeholder: formatMessage(messages$
|
|
708
|
+
placeholder: formatMessage(messages$P.placeholder),
|
|
709
709
|
loadOptions: loadOptionsDebounced,
|
|
710
710
|
defaultOptions: true,
|
|
711
711
|
showOptionGroupDivider: true,
|
|
@@ -735,9 +735,9 @@ const StatePickerInput = _ref => {
|
|
|
735
735
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
736
736
|
var StatePickerInput$1 = StatePickerInput;
|
|
737
737
|
|
|
738
|
-
function ownKeys$
|
|
739
|
-
function _objectSpread$
|
|
740
|
-
const TooltipWrapper = /*#__PURE__*/React__namespace["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$
|
|
738
|
+
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; }
|
|
739
|
+
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; }
|
|
740
|
+
const TooltipWrapper = /*#__PURE__*/React__namespace["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$1u({
|
|
741
741
|
ref: ref,
|
|
742
742
|
style: {
|
|
743
743
|
display: 'block',
|
|
@@ -762,7 +762,7 @@ const CustomFieldTooltip = _ref => {
|
|
|
762
762
|
};
|
|
763
763
|
var CustomFieldTooltip$1 = CustomFieldTooltip;
|
|
764
764
|
|
|
765
|
-
var messages$
|
|
765
|
+
var messages$O = reactIntl.defineMessages({
|
|
766
766
|
bottomOption: {
|
|
767
767
|
id: 'Products.Pickers.bottomOption',
|
|
768
768
|
description: 'The message to display at the end of the options menu',
|
|
@@ -770,11 +770,11 @@ var messages$P = reactIntl.defineMessages({
|
|
|
770
770
|
}
|
|
771
771
|
});
|
|
772
772
|
|
|
773
|
-
function ownKeys$
|
|
774
|
-
function _objectSpread$
|
|
773
|
+
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; }
|
|
774
|
+
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; }
|
|
775
775
|
const getBottomOption = formatMessage => ({
|
|
776
776
|
options: [{
|
|
777
|
-
label: formatMessage ? formatMessage(messages$
|
|
777
|
+
label: formatMessage ? formatMessage(messages$O.bottomOption) : messages$O.bottomOption,
|
|
778
778
|
isBottomOption: true,
|
|
779
779
|
isDisabled: true
|
|
780
780
|
}]
|
|
@@ -782,7 +782,7 @@ const getBottomOption = formatMessage => ({
|
|
|
782
782
|
const Option$2 = props => {
|
|
783
783
|
const _useIntl = reactIntl.useIntl(),
|
|
784
784
|
formatMessage = _useIntl.formatMessage;
|
|
785
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
785
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$1t(_objectSpread$1t({}, props), {}, {
|
|
786
786
|
children: props.data.isBottomOption ? jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
787
787
|
tone: "secondary",
|
|
788
788
|
children: formatMessage(props.data.label)
|
|
@@ -799,8 +799,8 @@ const Option$2 = props => {
|
|
|
799
799
|
};
|
|
800
800
|
Option$2.displayName = 'Option';
|
|
801
801
|
|
|
802
|
-
function ownKeys$
|
|
803
|
-
function _objectSpread$
|
|
802
|
+
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; }
|
|
803
|
+
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; }
|
|
804
804
|
const useHandlers = onChange => {
|
|
805
805
|
const _useState = React.useState(),
|
|
806
806
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -811,8 +811,8 @@ const useHandlers = onChange => {
|
|
|
811
811
|
}, []);
|
|
812
812
|
const handleChange = useEventCallback$1(event => {
|
|
813
813
|
var _context;
|
|
814
|
-
const eventWithExtractedValue = _objectSpread$
|
|
815
|
-
target: _objectSpread$
|
|
814
|
+
const eventWithExtractedValue = _objectSpread$1s(_objectSpread$1s({}, event), {}, {
|
|
815
|
+
target: _objectSpread$1s(_objectSpread$1s({}, event.target), {}, {
|
|
816
816
|
value: _Array$isArray__default["default"](event.target.value) ? _mapInstanceProperty__default["default"](_context = event.target.value).call(_context, item => item?.value) : event.target.value?.value
|
|
817
817
|
})
|
|
818
818
|
});
|
|
@@ -823,19 +823,20 @@ const useHandlers = onChange => {
|
|
|
823
823
|
var useHandlers$1 = useHandlers;
|
|
824
824
|
|
|
825
825
|
const _excluded$f = ["extraWhere"];
|
|
826
|
-
function ownKeys$
|
|
827
|
-
function _objectSpread$
|
|
826
|
+
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; }
|
|
827
|
+
function _objectSpread$1r(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$1r(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$1r(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
828
|
+
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
828
829
|
const constructPrefixSearchPredicate$1 = function () {
|
|
829
830
|
let prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
830
831
|
let lowerBound = arguments.length > 1 ? arguments[1] : undefined;
|
|
831
832
|
let upperBound = arguments.length > 2 ? arguments[2] : undefined;
|
|
832
833
|
const constructPrefixSearchExpression = field => {
|
|
833
|
-
var _context;
|
|
834
|
+
var _context, _context2;
|
|
834
835
|
const path = field.split('.');
|
|
835
836
|
const _path$slice$reverse = _reverseInstanceProperty__default["default"](_context = _sliceInstanceProperty__default["default"](path).call(path)).call(_context),
|
|
836
837
|
_path$slice$reverse2 = _toArray(_path$slice$reverse),
|
|
837
838
|
finalValueInPath = _path$slice$reverse2[0],
|
|
838
|
-
remainPathInReverse = _sliceInstanceProperty__default["default"](_path$slice$reverse2).call(
|
|
839
|
+
remainPathInReverse = _sliceInstanceProperty__default["default"](_context2 = _arrayLikeToArray$1(_path$slice$reverse2)).call(_context2, 1);
|
|
839
840
|
const comparison = `${finalValueInPath} >= "${lowerBound}" and ${finalValueInPath} < "${upperBound}"`;
|
|
840
841
|
if (remainPathInReverse.length) {
|
|
841
842
|
return _reduceInstanceProperty__default["default"](remainPathInReverse).call(remainPathInReverse, (nestedPath, nextPath) => `${nextPath}(${nestedPath})`, comparison);
|
|
@@ -871,7 +872,7 @@ const useLoadOptions = _ref => {
|
|
|
871
872
|
}
|
|
872
873
|
return client$1.query({
|
|
873
874
|
query,
|
|
874
|
-
variables: _objectSpread$
|
|
875
|
+
variables: _objectSpread$1r({
|
|
875
876
|
where
|
|
876
877
|
}, restVariables),
|
|
877
878
|
context: {
|
|
@@ -884,6 +885,7 @@ const useLoadOptions = _ref => {
|
|
|
884
885
|
};
|
|
885
886
|
var useLoadOptions$1 = useLoadOptions;
|
|
886
887
|
|
|
888
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
887
889
|
var FetchIndicesExist$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchIndicesExist" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indicesExist" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "products" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 269, source: { body: "query FetchIndicesExist {\n indicesExist {\n products {\n searchableIndexExists\n newInProgress\n }\n productTypes {\n searchableIndexExists\n newInProgress\n }\n productSelections {\n searchableIndexExists\n newInProgress\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
888
890
|
const useExecuteGraphQLRequest = () => {
|
|
889
891
|
const apolloClient = react.useApolloClient();
|
|
@@ -960,12 +962,12 @@ const constructNestedExpression = (reversedPath, predicate) => {
|
|
|
960
962
|
};
|
|
961
963
|
const constructPrefixSearchPredicate = (prefixSearchFields, lowerBound, upperBound) => {
|
|
962
964
|
const constructPrefixSearchExpression = field => {
|
|
963
|
-
var _context3;
|
|
965
|
+
var _context3, _context4;
|
|
964
966
|
const parts = field.split('.');
|
|
965
967
|
const _parts$slice$reverse = _reverseInstanceProperty__default["default"](_context3 = _sliceInstanceProperty__default["default"](parts).call(parts)).call(_context3),
|
|
966
968
|
_parts$slice$reverse2 = _toArray(_parts$slice$reverse),
|
|
967
969
|
valueToNest = _parts$slice$reverse2[0],
|
|
968
|
-
reversedPathToNestedValue = _sliceInstanceProperty__default["default"](_parts$slice$reverse2).call(
|
|
970
|
+
reversedPathToNestedValue = _sliceInstanceProperty__default["default"](_context4 = _arrayLikeToArray(_parts$slice$reverse2)).call(_context4, 1);
|
|
969
971
|
const predicateExpression = `${valueToNest} >= "${lowerBound}" and ${valueToNest} < "${upperBound}"`;
|
|
970
972
|
return constructNestedExpression(reversedPathToNestedValue, predicateExpression);
|
|
971
973
|
};
|
|
@@ -1173,8 +1175,8 @@ var setDisplayName$1 = setDisplayName;
|
|
|
1173
1175
|
const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName$1(BaseComponent)})`;
|
|
1174
1176
|
var wrapDisplayName$1 = wrapDisplayName;
|
|
1175
1177
|
|
|
1176
|
-
function ownKeys$
|
|
1177
|
-
function _objectSpread$
|
|
1178
|
+
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; }
|
|
1179
|
+
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; }
|
|
1178
1180
|
const injectDataTablePaginationState = initialValues => Component => {
|
|
1179
1181
|
const WithDataTablePaginationState = props => {
|
|
1180
1182
|
const _usePaginationState = uiKit.usePaginationState({
|
|
@@ -1187,7 +1189,7 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1187
1189
|
key: initialValues?.tableSorting?.key,
|
|
1188
1190
|
order: initialValues?.tableSorting?.order
|
|
1189
1191
|
});
|
|
1190
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1192
|
+
return jsxRuntime.jsx(Component, _objectSpread$1q(_objectSpread$1q({}, props), {}, {
|
|
1191
1193
|
dataTablePaginationState: {
|
|
1192
1194
|
page,
|
|
1193
1195
|
perPage,
|
|
@@ -1200,8 +1202,8 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1200
1202
|
};
|
|
1201
1203
|
var injectDataTablePaginationState$1 = injectDataTablePaginationState;
|
|
1202
1204
|
|
|
1203
|
-
function ownKeys$
|
|
1204
|
-
function _objectSpread$
|
|
1205
|
+
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; }
|
|
1206
|
+
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; }
|
|
1205
1207
|
const injectNotifications = function () {
|
|
1206
1208
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
1207
1209
|
return Component => {
|
|
@@ -1216,7 +1218,7 @@ const injectNotifications = function () {
|
|
|
1216
1218
|
onActionError,
|
|
1217
1219
|
hideAllPageNotifications
|
|
1218
1220
|
};
|
|
1219
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1221
|
+
return jsxRuntime.jsx(Component, _objectSpread$1p(_objectSpread$1p({}, props), {}, {
|
|
1220
1222
|
[propName]: notifications
|
|
1221
1223
|
}));
|
|
1222
1224
|
};
|
|
@@ -1226,23 +1228,23 @@ const injectNotifications = function () {
|
|
|
1226
1228
|
};
|
|
1227
1229
|
var injectNotifications$1 = injectNotifications;
|
|
1228
1230
|
|
|
1229
|
-
function ownKeys$
|
|
1230
|
-
function _objectSpread$
|
|
1231
|
+
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; }
|
|
1232
|
+
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; }
|
|
1231
1233
|
function isPropsMapper(mapProps) {
|
|
1232
1234
|
return typeof mapProps === 'function';
|
|
1233
1235
|
}
|
|
1234
1236
|
const withProps = mapProps => Component => {
|
|
1235
1237
|
const EnhancedWithProps = ownProps => {
|
|
1236
|
-
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
1237
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1238
|
+
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1o(_objectSpread$1o({}, ownProps), mapProps(ownProps)) : _objectSpread$1o(_objectSpread$1o({}, ownProps), mapProps);
|
|
1239
|
+
return jsxRuntime.jsx(Component, _objectSpread$1o({}, enhancedProps));
|
|
1238
1240
|
};
|
|
1239
1241
|
EnhancedWithProps.displayName = wrapDisplayName$1(Component, 'withProps');
|
|
1240
1242
|
return EnhancedWithProps;
|
|
1241
1243
|
};
|
|
1242
1244
|
var withProps$1 = withProps;
|
|
1243
1245
|
|
|
1244
|
-
function ownKeys$
|
|
1245
|
-
function _objectSpread$
|
|
1246
|
+
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; }
|
|
1247
|
+
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; }
|
|
1246
1248
|
const useRedirectEffect = _ref => {
|
|
1247
1249
|
let goTo = _ref.goTo;
|
|
1248
1250
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -1262,31 +1264,31 @@ const defaultOptions$5 = {
|
|
|
1262
1264
|
skip: () => false
|
|
1263
1265
|
};
|
|
1264
1266
|
const withRedirectTo = options => Component => {
|
|
1265
|
-
const mergedOptions = _objectSpread$
|
|
1267
|
+
const mergedOptions = _objectSpread$1n(_objectSpread$1n({}, defaultOptions$5), options);
|
|
1266
1268
|
const WithRedirectTo = props => {
|
|
1267
1269
|
if (!mergedOptions.skip(props)) {
|
|
1268
1270
|
return jsxRuntime.jsx(RedirectTo, {
|
|
1269
1271
|
goTo: options.selectGoTo(props)
|
|
1270
1272
|
});
|
|
1271
1273
|
}
|
|
1272
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1274
|
+
return jsxRuntime.jsx(Component, _objectSpread$1n({}, props));
|
|
1273
1275
|
};
|
|
1274
1276
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
1275
1277
|
return WithRedirectTo;
|
|
1276
1278
|
};
|
|
1277
1279
|
var withRedirectTo$1 = withRedirectTo;
|
|
1278
1280
|
|
|
1279
|
-
function ownKeys$
|
|
1280
|
-
function _objectSpread$
|
|
1281
|
+
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; }
|
|
1282
|
+
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; }
|
|
1281
1283
|
const defaultOptions$4 = {
|
|
1282
1284
|
propName: 'modalState',
|
|
1283
1285
|
isInitiallyOpen: false
|
|
1284
1286
|
};
|
|
1285
1287
|
const injectModalState$2 = options => Component => {
|
|
1286
|
-
const mergedOptions = _objectSpread$
|
|
1288
|
+
const mergedOptions = _objectSpread$1m(_objectSpread$1m({}, defaultOptions$4), options);
|
|
1287
1289
|
const WithModalState = props => {
|
|
1288
1290
|
const modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
1289
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1291
|
+
return jsxRuntime.jsx(Component, _objectSpread$1m(_objectSpread$1m({}, props), {}, {
|
|
1290
1292
|
[mergedOptions.propName]: modalState
|
|
1291
1293
|
}));
|
|
1292
1294
|
};
|
|
@@ -1295,17 +1297,17 @@ const injectModalState$2 = options => Component => {
|
|
|
1295
1297
|
};
|
|
1296
1298
|
var injectModalState$3 = injectModalState$2;
|
|
1297
1299
|
|
|
1298
|
-
function ownKeys$
|
|
1299
|
-
function _objectSpread$
|
|
1300
|
+
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; }
|
|
1301
|
+
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; }
|
|
1300
1302
|
const defaultOptions$3 = {
|
|
1301
1303
|
propName: 'toggleState',
|
|
1302
1304
|
isInitiallyOpen: false
|
|
1303
1305
|
};
|
|
1304
1306
|
const injectModalState = options => Component => {
|
|
1305
|
-
const mergedOptions = _objectSpread$
|
|
1307
|
+
const mergedOptions = _objectSpread$1l(_objectSpread$1l({}, defaultOptions$3), options);
|
|
1306
1308
|
const WithToggleState = props => {
|
|
1307
1309
|
const toggleState = uiKit.useToggleState(mergedOptions.isInitiallyOpen);
|
|
1308
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1310
|
+
return jsxRuntime.jsx(Component, _objectSpread$1l(_objectSpread$1l({}, props), {}, {
|
|
1309
1311
|
[mergedOptions.propName]: toggleState
|
|
1310
1312
|
}));
|
|
1311
1313
|
};
|
|
@@ -1314,8 +1316,8 @@ const injectModalState = options => Component => {
|
|
|
1314
1316
|
};
|
|
1315
1317
|
var injectModalState$1 = injectModalState;
|
|
1316
1318
|
|
|
1317
|
-
function ownKeys$
|
|
1318
|
-
function _objectSpread$
|
|
1319
|
+
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; }
|
|
1320
|
+
function _objectSpread$1k(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$1k(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$1k(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1319
1321
|
const defaultOptions$2 = {
|
|
1320
1322
|
storageType: 'local',
|
|
1321
1323
|
segregateByUser: true
|
|
@@ -1333,7 +1335,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
|
|
|
1333
1335
|
const isNil = value => typeof value === 'undefined' || value === null;
|
|
1334
1336
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
1335
1337
|
var _context;
|
|
1336
|
-
const mergedOptions = _objectSpread$
|
|
1338
|
+
const mergedOptions = _objectSpread$1k(_objectSpread$1k({}, defaultOptions$2), options);
|
|
1337
1339
|
const userId = applicationShellConnectors.useApplicationContext(context => context.user?.id);
|
|
1338
1340
|
const scopedStorageKey = _filterInstanceProperty__default["default"](_context = [mergedOptions.segregateByUser && userId, storageKey]).call(_context, Boolean).join('/');
|
|
1339
1341
|
const readFromStorage = React.useCallback(() => {
|
|
@@ -1378,8 +1380,8 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
1378
1380
|
};
|
|
1379
1381
|
var useStorage$1 = useStorage;
|
|
1380
1382
|
|
|
1381
|
-
function ownKeys$
|
|
1382
|
-
function _objectSpread$
|
|
1383
|
+
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; }
|
|
1384
|
+
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; }
|
|
1383
1385
|
const defaultOptions$1 = {
|
|
1384
1386
|
propName: 'storage',
|
|
1385
1387
|
storageKey: '',
|
|
@@ -1392,7 +1394,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1392
1394
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
1393
1395
|
* argument position does not allow passing specification of option(s).
|
|
1394
1396
|
*/
|
|
1395
|
-
const mergedOptions = _objectSpread$
|
|
1397
|
+
const mergedOptions = _objectSpread$1j(_objectSpread$1j({}, defaultOptions$1), options);
|
|
1396
1398
|
const WithStorage = props => {
|
|
1397
1399
|
const _useStorage = useStorage$1(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
1398
1400
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -1406,7 +1408,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1406
1408
|
readFromStorage
|
|
1407
1409
|
}
|
|
1408
1410
|
};
|
|
1409
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
1411
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1j(_objectSpread$1j({}, props), storageProp));
|
|
1410
1412
|
};
|
|
1411
1413
|
WithStorage.displayName = wrapDisplayName$1(WrappedComponent, 'WithStorage');
|
|
1412
1414
|
return WithStorage;
|
|
@@ -1451,8 +1453,8 @@ function useFormatLocalizedFieldToString() {
|
|
|
1451
1453
|
return formatLocalizedFieldToString;
|
|
1452
1454
|
}
|
|
1453
1455
|
|
|
1454
|
-
function ownKeys$
|
|
1455
|
-
function _objectSpread$
|
|
1456
|
+
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; }
|
|
1457
|
+
function _objectSpread$1i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1456
1458
|
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 } } } };
|
|
1457
1459
|
const MC_RESOURCES_WITH_KEYS = {
|
|
1458
1460
|
ASSOCIATE_ROLE: 'ASSOCIATE_ROLE',
|
|
@@ -1527,7 +1529,7 @@ const DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES = {
|
|
|
1527
1529
|
[BASE_SKIP_RESOURCE_TYPES_VARIABLES.ZONE]: true
|
|
1528
1530
|
};
|
|
1529
1531
|
const getSkipVariables = resourceType => {
|
|
1530
|
-
return _objectSpread$
|
|
1532
|
+
return _objectSpread$1i(_objectSpread$1i({}, DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES), {}, {
|
|
1531
1533
|
[BASE_SKIP_RESOURCE_TYPES_VARIABLES[resourceType]]: false
|
|
1532
1534
|
});
|
|
1533
1535
|
};
|
|
@@ -1552,7 +1554,7 @@ const getQueryVariables = _ref2 => {
|
|
|
1552
1554
|
fieldValue,
|
|
1553
1555
|
id
|
|
1554
1556
|
});
|
|
1555
|
-
return _objectSpread$
|
|
1557
|
+
return _objectSpread$1i({
|
|
1556
1558
|
where
|
|
1557
1559
|
}, skipVariables);
|
|
1558
1560
|
};
|
|
@@ -1586,8 +1588,8 @@ const usePrevious = value => {
|
|
|
1586
1588
|
};
|
|
1587
1589
|
var usePrevious$1 = usePrevious;
|
|
1588
1590
|
|
|
1589
|
-
function ownKeys$
|
|
1590
|
-
function _objectSpread$
|
|
1591
|
+
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; }
|
|
1592
|
+
function _objectSpread$1h(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$1h(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$1h(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1591
1593
|
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 } } } };
|
|
1592
1594
|
const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
1593
1595
|
var _context, _context2;
|
|
@@ -1598,7 +1600,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
1598
1600
|
offset: storesQueryResult.offset,
|
|
1599
1601
|
results: ((_context = storesQueryResult.results) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(store => {
|
|
1600
1602
|
var _context3, _context4;
|
|
1601
|
-
return _objectSpread$
|
|
1603
|
+
return _objectSpread$1h(_objectSpread$1h({}, store), {}, {
|
|
1602
1604
|
productSelections: ((_context3 = store.productSelections) == null ? void 0 : _bindInstanceProperty__default["default"](_context4 = Function.call).call(_context4, _filterInstanceProperty__default["default"](_context3), _context3))?.(productSelectionRef => Boolean(productSelectionRef.productSelection))
|
|
1603
1605
|
});
|
|
1604
1606
|
})
|
|
@@ -1606,7 +1608,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
1606
1608
|
};
|
|
1607
1609
|
const createQueryVariables$6 = ownProps => {
|
|
1608
1610
|
var _context5, _context6;
|
|
1609
|
-
return _objectSpread$
|
|
1611
|
+
return _objectSpread$1h(_objectSpread$1h(_objectSpread$1h({
|
|
1610
1612
|
limit: ownProps.limit,
|
|
1611
1613
|
offset: ownProps.offset,
|
|
1612
1614
|
sort: _sortInstanceProperty__default["default"](ownProps)
|
|
@@ -1659,8 +1661,8 @@ const useStoresListFetcher = props => {
|
|
|
1659
1661
|
};
|
|
1660
1662
|
var useStoresListFetcher$1 = useStoresListFetcher;
|
|
1661
1663
|
|
|
1662
|
-
function ownKeys$
|
|
1663
|
-
function _objectSpread$
|
|
1664
|
+
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; }
|
|
1665
|
+
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; }
|
|
1664
1666
|
const createSearchQuery = (searchBy, searchTerm, language) => {
|
|
1665
1667
|
if (searchBy === 'key/name') {
|
|
1666
1668
|
return {
|
|
@@ -1679,7 +1681,7 @@ const createSearchQuery = (searchBy, searchTerm, language) => {
|
|
|
1679
1681
|
};
|
|
1680
1682
|
} else {
|
|
1681
1683
|
return {
|
|
1682
|
-
fullTextPrefix: _objectSpread$
|
|
1684
|
+
fullTextPrefix: _objectSpread$1g(_objectSpread$1g({
|
|
1683
1685
|
field: searchBy
|
|
1684
1686
|
}, searchBy === 'name' ? {
|
|
1685
1687
|
language: language
|
|
@@ -1755,7 +1757,7 @@ const useStoresSearchFetcher = () => {
|
|
|
1755
1757
|
});
|
|
1756
1758
|
setIsLoading(false);
|
|
1757
1759
|
} catch (error) {
|
|
1758
|
-
setStoreSearchResults(prev => _objectSpread$
|
|
1760
|
+
setStoreSearchResults(prev => _objectSpread$1g(_objectSpread$1g({}, prev), {}, {
|
|
1759
1761
|
hits: [],
|
|
1760
1762
|
total: 0
|
|
1761
1763
|
}));
|
|
@@ -1766,7 +1768,7 @@ const useStoresSearchFetcher = () => {
|
|
|
1766
1768
|
fetchStoreSearchResults,
|
|
1767
1769
|
storeSearchResults,
|
|
1768
1770
|
isLoading,
|
|
1769
|
-
resetStoreSearchResults: () => setStoreSearchResults(prev => _objectSpread$
|
|
1771
|
+
resetStoreSearchResults: () => setStoreSearchResults(prev => _objectSpread$1g(_objectSpread$1g({}, prev), {}, {
|
|
1770
1772
|
hits: [],
|
|
1771
1773
|
total: 0
|
|
1772
1774
|
}))
|
|
@@ -1857,8 +1859,8 @@ const useStoreKeysInDataFences = _ref => {
|
|
|
1857
1859
|
};
|
|
1858
1860
|
var useStoreKeysInDataFences$1 = useStoreKeysInDataFences;
|
|
1859
1861
|
|
|
1860
|
-
function ownKeys$
|
|
1861
|
-
function _objectSpread$
|
|
1862
|
+
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; }
|
|
1863
|
+
function _objectSpread$1f(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1f(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1f(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1862
1864
|
const TEN_MINUTES_IN_MS = 600000;
|
|
1863
1865
|
const defaultOptions = {
|
|
1864
1866
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -1886,7 +1888,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
1886
1888
|
};
|
|
1887
1889
|
const usePersistedReminder = function () {
|
|
1888
1890
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1889
|
-
const mergedOptions = _objectSpread$
|
|
1891
|
+
const mergedOptions = _objectSpread$1f(_objectSpread$1f({}, defaultOptions), options);
|
|
1890
1892
|
const _useStorage = useStorage$1(mergedOptions.storageKey, null),
|
|
1891
1893
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
1892
1894
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -1933,7 +1935,7 @@ const usePersistedReminder = function () {
|
|
|
1933
1935
|
};
|
|
1934
1936
|
var usePersistedReminder$1 = usePersistedReminder;
|
|
1935
1937
|
|
|
1936
|
-
var messages$
|
|
1938
|
+
var messages$N = reactIntl.defineMessages({
|
|
1937
1939
|
profileUpdated: {
|
|
1938
1940
|
id: 'NotificationText.profileUpdated',
|
|
1939
1941
|
description: 'Label for the notification header',
|
|
@@ -1951,8 +1953,8 @@ var messages$O = reactIntl.defineMessages({
|
|
|
1951
1953
|
}
|
|
1952
1954
|
});
|
|
1953
1955
|
|
|
1954
|
-
function ownKeys$
|
|
1955
|
-
function _objectSpread$
|
|
1956
|
+
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; }
|
|
1957
|
+
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; }
|
|
1956
1958
|
const LinkToProfile = props => {
|
|
1957
1959
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
1958
1960
|
to: "/account/profile",
|
|
@@ -1970,9 +1972,9 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
1970
1972
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1971
1973
|
as: "p",
|
|
1972
1974
|
isBold: true,
|
|
1973
|
-
intlMessage: messages$
|
|
1975
|
+
intlMessage: messages$N.profileUpdated
|
|
1974
1976
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1975
|
-
intlMessage: _objectSpread$
|
|
1977
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$N.addMoreInformation), {}, {
|
|
1976
1978
|
values: {
|
|
1977
1979
|
newline: getNewLine
|
|
1978
1980
|
}
|
|
@@ -1981,7 +1983,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
1981
1983
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
1982
1984
|
scale: "xs",
|
|
1983
1985
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1984
|
-
intlMessage: _objectSpread$
|
|
1986
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$N.informationAndProfileLink), {}, {
|
|
1985
1987
|
values: {
|
|
1986
1988
|
newline: getNewLine,
|
|
1987
1989
|
link: getLinkToProfile
|
|
@@ -2109,7 +2111,7 @@ const useEventCallback = (fn, dependencies) => {
|
|
|
2109
2111
|
};
|
|
2110
2112
|
var useEventCallback$1 = useEventCallback;
|
|
2111
2113
|
|
|
2112
|
-
var messages$
|
|
2114
|
+
var messages$M = reactIntl.defineMessages({
|
|
2113
2115
|
fallbackHint: {
|
|
2114
2116
|
id: 'KeyFallback.fallbackHint',
|
|
2115
2117
|
description: 'key fallback for a specified resource key (e.g name)',
|
|
@@ -2133,7 +2135,7 @@ const useLocalizedKeyFallback = () => {
|
|
|
2133
2135
|
return values => {
|
|
2134
2136
|
if (!values.resource) return null;
|
|
2135
2137
|
const localizedString = values.resource[values.localizedStringFieldName];
|
|
2136
|
-
const fallbackHintWithKey = intl.formatMessage(messages$
|
|
2138
|
+
const fallbackHintWithKey = intl.formatMessage(messages$M.fallbackHint, {
|
|
2137
2139
|
key: values.resource.key
|
|
2138
2140
|
});
|
|
2139
2141
|
if (!localizedString) return fallbackHintWithKey;
|
|
@@ -2147,8 +2149,8 @@ const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
|
2147
2149
|
React.useCallback(debounce__default["default"](promiseCallback, wait), [promiseCallback]);
|
|
2148
2150
|
var useDebouncedPromiseCallback$1 = useDebouncedPromiseCallback;
|
|
2149
2151
|
|
|
2150
|
-
function ownKeys$
|
|
2151
|
-
function _objectSpread$
|
|
2152
|
+
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; }
|
|
2153
|
+
function _objectSpread$1d(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$1d(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$1d(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2152
2154
|
const prepareMutableColumnProps = (columnConfig, mutableColumnProps) => {
|
|
2153
2155
|
const updatedColumnProps = {};
|
|
2154
2156
|
_forEachInstanceProperty__default["default"](mutableColumnProps).call(mutableColumnProps, columnProp => {
|
|
@@ -2168,14 +2170,14 @@ const retrieveColumnsWithCachedConfiguration = _ref => {
|
|
|
2168
2170
|
mutableColumnProps = _ref.mutableColumnProps;
|
|
2169
2171
|
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 => {
|
|
2170
2172
|
const initialColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedConfig.key);
|
|
2171
|
-
return _objectSpread$
|
|
2173
|
+
return _objectSpread$1d(_objectSpread$1d({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2172
2174
|
});
|
|
2173
2175
|
};
|
|
2174
2176
|
const handleCacheUpdate = _ref2 => {
|
|
2175
2177
|
let update = _ref2.update,
|
|
2176
2178
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2177
2179
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2178
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2180
|
+
return updateCachedTableConfiguration(_objectSpread$1d(_objectSpread$1d({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2179
2181
|
};
|
|
2180
2182
|
|
|
2181
2183
|
// Signature:
|
|
@@ -2204,7 +2206,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2204
2206
|
return {
|
|
2205
2207
|
columnsConfig: _mapInstanceProperty__default["default"](initialVisibleColumnKeys).call(initialVisibleColumnKeys, visibleColumnKey => {
|
|
2206
2208
|
const visibleColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, columnConfig => columnConfig.key === visibleColumnKey);
|
|
2207
|
-
return _objectSpread$
|
|
2209
|
+
return _objectSpread$1d({
|
|
2208
2210
|
key: visibleColumnKey
|
|
2209
2211
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2210
2212
|
}),
|
|
@@ -2267,14 +2269,14 @@ const useProductSelectionsTotalFetcher = props => {
|
|
|
2267
2269
|
};
|
|
2268
2270
|
var useProductSelectionsTotalFetcher$1 = useProductSelectionsTotalFetcher;
|
|
2269
2271
|
|
|
2270
|
-
function ownKeys$
|
|
2271
|
-
function _objectSpread$
|
|
2272
|
+
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; }
|
|
2273
|
+
function _objectSpread$1c(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1c(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1c(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2272
2274
|
|
|
2273
2275
|
// eslint-disable-next-line import/prefer-default-export
|
|
2274
2276
|
const convertProductSelectionsFromGraphQl = productSelections => {
|
|
2275
2277
|
var _context;
|
|
2276
|
-
return productSelections?.results && _objectSpread$
|
|
2277
|
-
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$
|
|
2278
|
+
return productSelections?.results && _objectSpread$1c(_objectSpread$1c({}, productSelections), {}, {
|
|
2279
|
+
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$1c({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
2278
2280
|
from: 'nameAllLocales',
|
|
2279
2281
|
to: 'name'
|
|
2280
2282
|
}])))
|
|
@@ -2317,61 +2319,6 @@ const useProductSelectionsFetcher = props => {
|
|
|
2317
2319
|
};
|
|
2318
2320
|
var useProductSelectionsFetcher$1 = useProductSelectionsFetcher;
|
|
2319
2321
|
|
|
2320
|
-
var messages$M = reactIntl.defineMessages({
|
|
2321
|
-
identityBannerNotification: {
|
|
2322
|
-
id: 'Global.identityBannerNotification',
|
|
2323
|
-
description: 'Identity banner notification',
|
|
2324
|
-
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.'
|
|
2325
|
-
}
|
|
2326
|
-
});
|
|
2327
|
-
|
|
2328
|
-
const getBoldText = chunks => jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2329
|
-
tone: "inverted",
|
|
2330
|
-
as: "span",
|
|
2331
|
-
fontWeight: "bold",
|
|
2332
|
-
children: chunks
|
|
2333
|
-
}, "bold-text");
|
|
2334
|
-
const DISMISSED_IDENTITY_BANNER = 'dismissed-identity-banner';
|
|
2335
|
-
const PENDING_IDENTITY_BANNER = 'pending-identity-banner';
|
|
2336
|
-
// Hardcode feature flag name here instead of importing it from the private `constants` package.
|
|
2337
|
-
const ENABLE_IDENTITY_BANNER_NOTIFICATION = 'identityBannerNotification';
|
|
2338
|
-
const useIdentityBannerNotification = () => {
|
|
2339
|
-
const isIdentityBannerNotificationEnabled = applicationShell.useFeatureToggle(ENABLE_IDENTITY_BANNER_NOTIFICATION);
|
|
2340
|
-
const intl = reactIntl.useIntl();
|
|
2341
|
-
const showNotification = actionsGlobal.useShowNotification();
|
|
2342
|
-
const hasShownRef = React.useRef(false);
|
|
2343
|
-
React.useEffect(() => {
|
|
2344
|
-
// If running in Cypress, always mark the banner as dismissed
|
|
2345
|
-
if (typeof window !== 'undefined' && window.Cypress) {
|
|
2346
|
-
localStorage.setItem('dismissed-identity-banner', 'true');
|
|
2347
|
-
return;
|
|
2348
|
-
}
|
|
2349
|
-
if (isIdentityBannerNotificationEnabled !== true) return;
|
|
2350
|
-
const hasDismissedBanner = !!localStorage.getItem(DISMISSED_IDENTITY_BANNER);
|
|
2351
|
-
const isPending = !!localStorage.getItem(PENDING_IDENTITY_BANNER);
|
|
2352
|
-
if (!hasDismissedBanner && !isPending && !hasShownRef.current || isPending && !hasShownRef.current) {
|
|
2353
|
-
hasShownRef.current = true;
|
|
2354
|
-
localStorage.setItem(PENDING_IDENTITY_BANNER, 'true');
|
|
2355
|
-
showNotification({
|
|
2356
|
-
kind: constants.NOTIFICATION_KINDS_SIDE.info,
|
|
2357
|
-
domain: constants.DOMAINS.GLOBAL,
|
|
2358
|
-
// @ts-expect-error: notification `text` expects a string but the formatted message is a ReactNode
|
|
2359
|
-
// due to the injected `b` component. Apparently, it still works but the types are not correct.
|
|
2360
|
-
text: intl.formatMessage(messages$M.identityBannerNotification, {
|
|
2361
|
-
b: getBoldText
|
|
2362
|
-
})
|
|
2363
|
-
}, {
|
|
2364
|
-
onDismiss: () => {
|
|
2365
|
-
localStorage.setItem(DISMISSED_IDENTITY_BANNER, 'true');
|
|
2366
|
-
localStorage.removeItem(PENDING_IDENTITY_BANNER);
|
|
2367
|
-
hasShownRef.current = false;
|
|
2368
|
-
}
|
|
2369
|
-
});
|
|
2370
|
-
}
|
|
2371
|
-
// }
|
|
2372
|
-
}, [showNotification, intl, isIdentityBannerNotificationEnabled]);
|
|
2373
|
-
};
|
|
2374
|
-
|
|
2375
2322
|
const setToArray = function () {
|
|
2376
2323
|
let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
2377
2324
|
return `id in (${_mapInstanceProperty__default["default"](values).call(values, value => `"${value}"`).join(', ')})`;
|
|
@@ -3814,8 +3761,8 @@ const getData = (code, field) => {
|
|
|
3814
3761
|
};
|
|
3815
3762
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
3816
3763
|
|
|
3817
|
-
function ownKeys$
|
|
3818
|
-
function _objectSpread$
|
|
3764
|
+
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; }
|
|
3765
|
+
function _objectSpread$1b(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$1b(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$1b(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
3819
3766
|
function formatMoneyRangeValue(value, intl) {
|
|
3820
3767
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
3821
3768
|
if (value.from && value.to) return `${formatMoneyValue(value.from, value.currency, intl)} -
|
|
@@ -3825,7 +3772,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
3825
3772
|
return '';
|
|
3826
3773
|
}
|
|
3827
3774
|
function formatMoneyValue(amount, currency, intl) {
|
|
3828
|
-
return formatMoney$2(_objectSpread$
|
|
3775
|
+
return formatMoney$2(_objectSpread$1b({
|
|
3829
3776
|
centAmount: amount,
|
|
3830
3777
|
fractionDigits: getFractionDigit(currency)
|
|
3831
3778
|
}, currency ? {
|
|
@@ -3841,7 +3788,7 @@ function getFractionedAmount(moneyValue) {
|
|
|
3841
3788
|
return amount / 10 ** fractionDigits;
|
|
3842
3789
|
}
|
|
3843
3790
|
function formatMoney$2(moneyValue, intl, options) {
|
|
3844
|
-
return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$
|
|
3791
|
+
return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$1b({
|
|
3845
3792
|
style: 'currency',
|
|
3846
3793
|
currency: moneyValue.currencyCode,
|
|
3847
3794
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
@@ -4115,8 +4062,8 @@ const getPrefixSearchBounds = input => {
|
|
|
4115
4062
|
var getPrefixSearchBounds$1 = getPrefixSearchBounds;
|
|
4116
4063
|
|
|
4117
4064
|
const _excluded$e = ["action"];
|
|
4118
|
-
function ownKeys$
|
|
4119
|
-
function _objectSpread$
|
|
4065
|
+
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; }
|
|
4066
|
+
function _objectSpread$1a(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$1a(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$1a(Object(t))).call(_context1, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4120
4067
|
|
|
4121
4068
|
/**
|
|
4122
4069
|
* Checks if a value is a LocalizedString
|
|
@@ -4138,7 +4085,7 @@ const getIsLocalizedString = maybeLocalizedString => {
|
|
|
4138
4085
|
*/
|
|
4139
4086
|
const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
|
|
4140
4087
|
if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
|
|
4141
|
-
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$
|
|
4088
|
+
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$1a(_objectSpread$1a({}, customFields), {}, {
|
|
4142
4089
|
[customField.name]: customField.value
|
|
4143
4090
|
}), {});
|
|
4144
4091
|
};
|
|
@@ -4162,7 +4109,7 @@ function transformLocalizedFieldsForCategory(category) {
|
|
|
4162
4109
|
const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
|
|
4163
4110
|
const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
|
|
4164
4111
|
const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
|
|
4165
|
-
return _objectSpread$
|
|
4112
|
+
return _objectSpread$1a(_objectSpread$1a(_objectSpread$1a({}, transformedData), parent ? {
|
|
4166
4113
|
parent
|
|
4167
4114
|
} : {}), ancestors ? {
|
|
4168
4115
|
ancestors
|
|
@@ -4255,7 +4202,7 @@ const formatMoney = valueType => money => {
|
|
|
4255
4202
|
case 'fixed':
|
|
4256
4203
|
case 'fixedCart':
|
|
4257
4204
|
return {
|
|
4258
|
-
[money.type]: _objectSpread$
|
|
4205
|
+
[money.type]: _objectSpread$1a({
|
|
4259
4206
|
centAmount: money.centAmount,
|
|
4260
4207
|
currencyCode: money.currencyCode
|
|
4261
4208
|
}, money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4437,7 +4384,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4437
4384
|
case 'addAttributeDefinition':
|
|
4438
4385
|
return {
|
|
4439
4386
|
[actionName]: {
|
|
4440
|
-
attributeDefinition: _objectSpread$
|
|
4387
|
+
attributeDefinition: _objectSpread$1a(_objectSpread$1a({}, actionPayload.attribute), {}, {
|
|
4441
4388
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
|
|
4442
4389
|
inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
|
|
4443
4390
|
type: createAttributeTypeValue(actionPayload.attribute)
|
|
@@ -4533,7 +4480,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4533
4480
|
return {
|
|
4534
4481
|
[actionName]: {
|
|
4535
4482
|
attributeName: actionPayload.attributeName,
|
|
4536
|
-
value: _objectSpread$
|
|
4483
|
+
value: _objectSpread$1a(_objectSpread$1a({}, actionPayload.value), {}, {
|
|
4537
4484
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
|
|
4538
4485
|
})
|
|
4539
4486
|
}
|
|
@@ -4542,7 +4489,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4542
4489
|
return {
|
|
4543
4490
|
[actionName]: {
|
|
4544
4491
|
attributeName: actionPayload.attributeName,
|
|
4545
|
-
newValue: _objectSpread$
|
|
4492
|
+
newValue: _objectSpread$1a(_objectSpread$1a({}, actionPayload.newValue), {}, {
|
|
4546
4493
|
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
|
|
4547
4494
|
})
|
|
4548
4495
|
}
|
|
@@ -4569,7 +4516,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4569
4516
|
name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
|
|
4570
4517
|
taxCategory: actionPayload.taxCategory,
|
|
4571
4518
|
money: {
|
|
4572
|
-
[actionPayload.money.type]: _objectSpread$
|
|
4519
|
+
[actionPayload.money.type]: _objectSpread$1a({
|
|
4573
4520
|
centAmount: actionPayload.money.centAmount,
|
|
4574
4521
|
currencyCode: actionPayload.money.currencyCode
|
|
4575
4522
|
}, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
|
|
@@ -4597,7 +4544,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4597
4544
|
return {
|
|
4598
4545
|
[actionName]: {
|
|
4599
4546
|
target: {
|
|
4600
|
-
[actionPayload.target.type]: _objectSpread$
|
|
4547
|
+
[actionPayload.target.type]: _objectSpread$1a(_objectSpread$1a(_objectSpread$1a({}, omit__default["default"](actionPayload.target, ['type', '__typename'])), actionPayload.target.triggerPattern && {
|
|
4601
4548
|
triggerPattern: _mapInstanceProperty__default["default"](_context6 = actionPayload.target.triggerPattern).call(_context6, pattern => ({
|
|
4602
4549
|
[pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
|
|
4603
4550
|
}))
|
|
@@ -4632,8 +4579,8 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4632
4579
|
fields: customFields
|
|
4633
4580
|
} : null;
|
|
4634
4581
|
return {
|
|
4635
|
-
[actionName]: _objectSpread$
|
|
4636
|
-
address: _objectSpread$
|
|
4582
|
+
[actionName]: _objectSpread$1a(_objectSpread$1a({}, actionPayload), {}, {
|
|
4583
|
+
address: _objectSpread$1a(_objectSpread$1a({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
|
|
4637
4584
|
custom
|
|
4638
4585
|
})
|
|
4639
4586
|
})
|
|
@@ -4741,8 +4688,8 @@ function omitDeep(obj, fieldsToOmit) {
|
|
|
4741
4688
|
return originalOmitDeep__default["default"](obj, fieldsToOmit);
|
|
4742
4689
|
}
|
|
4743
4690
|
|
|
4744
|
-
function ownKeys$
|
|
4745
|
-
function _objectSpread$
|
|
4691
|
+
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; }
|
|
4692
|
+
function _objectSpread$19(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$19(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$19(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4746
4693
|
function getPriceChannelName(price) {
|
|
4747
4694
|
return price.channel?.name ?? price.channel?.key ?? null;
|
|
4748
4695
|
}
|
|
@@ -4754,11 +4701,11 @@ function getDiscountValue(price) {
|
|
|
4754
4701
|
} else if (price.value?.type === PRECISION_TYPES.highPrecision && price.discounted?.value?.type === PRECISION_TYPES.centPrecision) {
|
|
4755
4702
|
fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
|
|
4756
4703
|
}
|
|
4757
|
-
return price.discounted ? _objectSpread$
|
|
4704
|
+
return price.discounted ? _objectSpread$19(_objectSpread$19({}, price.value), {}, {
|
|
4758
4705
|
fractionedAmount,
|
|
4759
4706
|
centAmount: price.value.centAmount - price.discounted.value.centAmount,
|
|
4760
4707
|
preciseAmount
|
|
4761
|
-
}) : _objectSpread$
|
|
4708
|
+
}) : _objectSpread$19(_objectSpread$19({}, price.value), {}, {
|
|
4762
4709
|
centAmount: 0
|
|
4763
4710
|
});
|
|
4764
4711
|
}
|
|
@@ -4789,7 +4736,7 @@ function getNetUnitPrice(_ref) {
|
|
|
4789
4736
|
}
|
|
4790
4737
|
let preciseAmount;
|
|
4791
4738
|
if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + taxRate.amount);
|
|
4792
|
-
return _objectSpread$
|
|
4739
|
+
return _objectSpread$19(_objectSpread$19({}, price.value), {}, {
|
|
4793
4740
|
centAmount,
|
|
4794
4741
|
preciseAmount
|
|
4795
4742
|
});
|
|
@@ -4805,7 +4752,7 @@ function getNetUnitPrice(_ref) {
|
|
|
4805
4752
|
}
|
|
4806
4753
|
let preciseAmount;
|
|
4807
4754
|
if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + lineItem.taxRate.amount);
|
|
4808
|
-
return _objectSpread$
|
|
4755
|
+
return _objectSpread$19(_objectSpread$19({}, price.value), {}, {
|
|
4809
4756
|
centAmount,
|
|
4810
4757
|
preciseAmount
|
|
4811
4758
|
});
|
|
@@ -4817,7 +4764,7 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4817
4764
|
const currencyCode = price.value.currencyCode;
|
|
4818
4765
|
const fractionedAmount = getFractionedAmount(price.value);
|
|
4819
4766
|
if (currencyCode && !isNil__default["default"](fractionedAmount)) {
|
|
4820
|
-
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$
|
|
4767
|
+
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$19(_objectSpread$19({}, minPrices), {}, {
|
|
4821
4768
|
[currencyCode]: price.value
|
|
4822
4769
|
});
|
|
4823
4770
|
}
|
|
@@ -4826,8 +4773,8 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4826
4773
|
return _Object$values__default["default"](minPricesByCurrency);
|
|
4827
4774
|
}
|
|
4828
4775
|
|
|
4829
|
-
function ownKeys$
|
|
4830
|
-
function _objectSpread$
|
|
4776
|
+
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; }
|
|
4777
|
+
function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$18(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$18(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4831
4778
|
const transformCustomFieldFromGraphQLResponse = resource => {
|
|
4832
4779
|
var _context, _context4;
|
|
4833
4780
|
return {
|
|
@@ -4842,14 +4789,14 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4842
4789
|
return {
|
|
4843
4790
|
name: fieldDefinition.name,
|
|
4844
4791
|
required: fieldDefinition.required,
|
|
4845
|
-
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$
|
|
4846
|
-
elementType: _objectSpread$
|
|
4792
|
+
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$18(_objectSpread$18({}, fieldDefinition.type), {}, {
|
|
4793
|
+
elementType: _objectSpread$18(_objectSpread$18({}, fieldDefinition.type.elementType), {}, {
|
|
4847
4794
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
4848
4795
|
key: value.key,
|
|
4849
4796
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
4850
4797
|
}))
|
|
4851
4798
|
})
|
|
4852
|
-
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$
|
|
4799
|
+
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$18(_objectSpread$18({}, fieldDefinition.type), {}, {
|
|
4853
4800
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
4854
4801
|
key: value.key,
|
|
4855
4802
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -4860,7 +4807,7 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4860
4807
|
})
|
|
4861
4808
|
}
|
|
4862
4809
|
},
|
|
4863
|
-
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$
|
|
4810
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$18(_objectSpread$18({}, fields), {}, {
|
|
4864
4811
|
[customField.name]: customField.value
|
|
4865
4812
|
}), {})
|
|
4866
4813
|
};
|
|
@@ -4872,7 +4819,7 @@ const convertProductSelectionFromGraphQl = productSelection => {
|
|
|
4872
4819
|
// Incase the product selection is not missing or if the current project dose not yet have access to the feature,
|
|
4873
4820
|
// in either case we return null
|
|
4874
4821
|
if (!productSelection) return null;
|
|
4875
|
-
return _objectSpread$
|
|
4822
|
+
return _objectSpread$18(_objectSpread$18({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
4876
4823
|
from: 'nameAllLocales',
|
|
4877
4824
|
to: 'name'
|
|
4878
4825
|
}])), {}, {
|
|
@@ -4895,8 +4842,8 @@ const transformAllToProperNounCase = text => {
|
|
|
4895
4842
|
return _mapInstanceProperty__default["default"](_context = text.split(' ')).call(_context, term => transformToProperNounCase(term)).join(' ');
|
|
4896
4843
|
};
|
|
4897
4844
|
|
|
4898
|
-
function ownKeys$
|
|
4899
|
-
function _objectSpread$
|
|
4845
|
+
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; }
|
|
4846
|
+
function _objectSpread$17(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$17(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$17(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4900
4847
|
const REGEX_ISO8601 = /(\d{4}-\d{2}-\d{2}[T]\d{2}:\d{2}:\d{2}(\.\d{3}[Z]?))/;
|
|
4901
4848
|
const REGEX_TIME = /\d{2}:\d{2}/;
|
|
4902
4849
|
const REGEX_DATE = /\d{4}-\d{2}-\d{2}/;
|
|
@@ -4913,7 +4860,7 @@ function filterCustomTypeUpdateActionValues() {
|
|
|
4913
4860
|
if (updateAction.action === 'setCustomField' && _Array$isArray__default["default"](updateAction.value)) {
|
|
4914
4861
|
const definition = _findInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, field => field.name === updateAction.name);
|
|
4915
4862
|
const definitionName = definition.type.elementType.name;
|
|
4916
|
-
return _objectSpread$
|
|
4863
|
+
return _objectSpread$17(_objectSpread$17({}, updateAction), {}, {
|
|
4917
4864
|
value: filterNotDefinedValues(updateAction.value, definitionName)
|
|
4918
4865
|
});
|
|
4919
4866
|
}
|
|
@@ -5422,8 +5369,8 @@ const messages$I = reactIntl.defineMessages({
|
|
|
5422
5369
|
});
|
|
5423
5370
|
var messages$J = messages$I;
|
|
5424
5371
|
|
|
5425
|
-
function ownKeys$
|
|
5426
|
-
function _objectSpread$
|
|
5372
|
+
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; }
|
|
5373
|
+
function _objectSpread$16(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$16(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$16(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5427
5374
|
function Option$1(props) {
|
|
5428
5375
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
5429
5376
|
language: applicationContext.dataLocale,
|
|
@@ -5434,7 +5381,7 @@ function Option$1(props) {
|
|
|
5434
5381
|
const _useIntl = reactIntl.useIntl(),
|
|
5435
5382
|
formatMessage = _useIntl.formatMessage;
|
|
5436
5383
|
const cartDiscount = props.data;
|
|
5437
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
5384
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$16(_objectSpread$16({}, props), {}, {
|
|
5438
5385
|
children: jsxRuntime.jsxs("div", {
|
|
5439
5386
|
"data-testid": "cart-discount-option",
|
|
5440
5387
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -5451,8 +5398,8 @@ function Option$1(props) {
|
|
|
5451
5398
|
}));
|
|
5452
5399
|
}
|
|
5453
5400
|
|
|
5454
|
-
function ownKeys$
|
|
5455
|
-
function _objectSpread$
|
|
5401
|
+
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; }
|
|
5402
|
+
function _objectSpread$15(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$15(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$15(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5456
5403
|
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 } } } };
|
|
5457
5404
|
const returnNullIfEmpty = value => value && value.id === '' ? null : value;
|
|
5458
5405
|
const filterOption$1 = (option, text) => {
|
|
@@ -5478,7 +5425,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5478
5425
|
})),
|
|
5479
5426
|
language = _useApplicationContex.language,
|
|
5480
5427
|
languages = _useApplicationContex.languages;
|
|
5481
|
-
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$
|
|
5428
|
+
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$15(_objectSpread$15({}, cartDiscount), {}, {
|
|
5482
5429
|
value: cartDiscount.id,
|
|
5483
5430
|
key: cartDiscount.key,
|
|
5484
5431
|
label: l10n.formatLocalizedString(cartDiscount, {
|
|
@@ -5568,8 +5515,8 @@ const messages$G = reactIntl.defineMessages({
|
|
|
5568
5515
|
});
|
|
5569
5516
|
var messages$H = messages$G;
|
|
5570
5517
|
|
|
5571
|
-
function ownKeys$
|
|
5572
|
-
function _objectSpread$
|
|
5518
|
+
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; }
|
|
5519
|
+
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; }
|
|
5573
5520
|
function Option(props) {
|
|
5574
5521
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
5575
5522
|
language: applicationContext.dataLocale,
|
|
@@ -5580,7 +5527,7 @@ function Option(props) {
|
|
|
5580
5527
|
const _useIntl = reactIntl.useIntl(),
|
|
5581
5528
|
formatMessage = _useIntl.formatMessage;
|
|
5582
5529
|
const category = props.data;
|
|
5583
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
5530
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$14(_objectSpread$14({}, props), {}, {
|
|
5584
5531
|
children: jsxRuntime.jsxs("div", {
|
|
5585
5532
|
"data-testid": "category-option",
|
|
5586
5533
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -5609,8 +5556,8 @@ function Option(props) {
|
|
|
5609
5556
|
}));
|
|
5610
5557
|
}
|
|
5611
5558
|
|
|
5612
|
-
function ownKeys$
|
|
5613
|
-
function _objectSpread$
|
|
5559
|
+
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; }
|
|
5560
|
+
function _objectSpread$13(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$13(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$13(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5614
5561
|
const filterOption = () => true;
|
|
5615
5562
|
function CategoryReferenceSearch(props) {
|
|
5616
5563
|
const _useIntl = reactIntl.useIntl(),
|
|
@@ -5622,7 +5569,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5622
5569
|
})),
|
|
5623
5570
|
language = _useApplicationContex.language,
|
|
5624
5571
|
languages = _useApplicationContex.languages;
|
|
5625
|
-
const mapItemToOption = React.useCallback(category => _objectSpread$
|
|
5572
|
+
const mapItemToOption = React.useCallback(category => _objectSpread$13(_objectSpread$13({}, category), {}, {
|
|
5626
5573
|
value: category.id,
|
|
5627
5574
|
label: l10n.formatLocalizedString(category, {
|
|
5628
5575
|
key: 'name',
|
|
@@ -5640,7 +5587,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5640
5587
|
}), [apolloClient]);
|
|
5641
5588
|
return jsxRuntime.jsx(ReferenceSearch, {
|
|
5642
5589
|
id: props.id,
|
|
5643
|
-
components: _objectSpread$
|
|
5590
|
+
components: _objectSpread$13({
|
|
5644
5591
|
Option
|
|
5645
5592
|
}, props.components),
|
|
5646
5593
|
isClearable: props.isClearable,
|
|
@@ -5690,8 +5637,8 @@ var messages$F = reactIntl.defineMessages({
|
|
|
5690
5637
|
});
|
|
5691
5638
|
|
|
5692
5639
|
const _excluded$d = ["children", "allowMultiple", "acceptTypes"];
|
|
5693
|
-
function ownKeys$
|
|
5694
|
-
function _objectSpread$
|
|
5640
|
+
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; }
|
|
5641
|
+
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; }
|
|
5695
5642
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$e() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
5696
5643
|
var _ref$d = process.env.NODE_ENV === "production" ? {
|
|
5697
5644
|
name: "1wq0eh7",
|
|
@@ -5703,7 +5650,7 @@ var _ref$d = process.env.NODE_ENV === "production" ? {
|
|
|
5703
5650
|
};
|
|
5704
5651
|
const FileInput = _ref2 => {
|
|
5705
5652
|
let _ref2$children = _ref2.children,
|
|
5706
|
-
children = _ref2$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
5653
|
+
children = _ref2$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$12({}, messages$F.chooseFile)) : _ref2$children,
|
|
5707
5654
|
_ref2$allowMultiple = _ref2.allowMultiple,
|
|
5708
5655
|
allowMultiple = _ref2$allowMultiple === void 0 ? false : _ref2$allowMultiple,
|
|
5709
5656
|
_ref2$acceptTypes = _ref2.acceptTypes,
|
|
@@ -5739,15 +5686,15 @@ const baseButtonStyles = process.env.NODE_ENV === "production" ? {
|
|
|
5739
5686
|
};
|
|
5740
5687
|
|
|
5741
5688
|
const _excluded$c = ["animationOrientation", "children", "onClick"];
|
|
5742
|
-
function ownKeys$
|
|
5743
|
-
function _objectSpread$
|
|
5689
|
+
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; }
|
|
5690
|
+
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; }
|
|
5744
5691
|
const ICON_COLOR$1 = '#6359ff';
|
|
5745
5692
|
const PaginationIconButton = _ref => {
|
|
5746
5693
|
let animationOrientation = _ref.animationOrientation,
|
|
5747
5694
|
children = _ref.children,
|
|
5748
5695
|
onClick = _ref.onClick,
|
|
5749
5696
|
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
5750
|
-
return jsxRuntime.jsx("button", _objectSpread$
|
|
5697
|
+
return jsxRuntime.jsx("button", _objectSpread$11(_objectSpread$11({
|
|
5751
5698
|
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;}" + (process.env.NODE_ENV === "production" ? "" : ";label:PaginationIconButton;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24taWNvbi1idXR0b24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCUyIsImZpbGUiOiJwYWdpbmF0aW9uLWljb24tYnV0dG9uLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgUmVhY3RFbGVtZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgZGVzaWduVG9rZW5zIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvdWkta2l0JztcbmltcG9ydCB7IGJhc2VCdXR0b25TdHlsZXMgfSBmcm9tICcuL3NoYXJlZC9zdHlsZXMnO1xuXG4vLyBUT0RPOiBJbnRlZ3JhdGUgZGVzaWduIHRva2VuIHdoZW4gcmVkZXNpZ24gaXMgY29tcGxldGVcbmNvbnN0IElDT05fQ09MT1IgPSAnIzYzNTlmZic7XG5cbmNvbnN0IFBhZ2luYXRpb25JY29uQnV0dG9uID0gKHtcbiAgYW5pbWF0aW9uT3JpZW50YXRpb24sXG4gIGNoaWxkcmVuLFxuICBvbkNsaWNrLFxuICAuLi5yZXN0XG59OiB7XG4gIGFuaW1hdGlvbk9yaWVudGF0aW9uOiAnbGVmdCcgfCAncmlnaHQnO1xuICBjaGlsZHJlbjogUmVhY3RFbGVtZW50O1xuICBvbkNsaWNrOiAoKSA9PiB2b2lkO1xufSkgPT4gKFxuICA8YnV0dG9uXG4gICAgY3NzPXtbXG4gICAgICBiYXNlQnV0dG9uU3R5bGVzLFxuICAgICAgY3NzYFxuICAgICAgICBzdmcge1xuICAgICAgICAgIGZpbGw6ICR7SUNPTl9DT0xPUn07XG4gICAgICAgIH1cbiAgICAgICAgdHJhbnNpdGlvbjogdHJhbnNmb3JtICR7ZGVzaWduVG9rZW5zLnRyYW5zaXRpb25TdGFuZGFyZH07XG4gICAgICAgIDpob3ZlciB7XG4gICAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuICAgICAgICAgICAgJHthbmltYXRpb25PcmllbnRhdGlvbiA9PT0gJ2xlZnQnXG4gICAgICAgICAgICAgID8gYGNhbGMoMHB4IC0gdmFyKC0tc3BhY2luZy0xMCkpYFxuICAgICAgICAgICAgICA6IGB2YXIoLS1zcGFjaW5nLTEwKWB9XG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBDb21wZW5zYXRlIGZvciBmb2N1cyBib3JkZXJcbiAgICAgICAgcGFkZGluZy1sZWZ0OiAxcHg7XG4gICAgICAgIHBhZGRpbmctcmlnaHQ6IDFweDtcbiAgICAgICAgOmZvY3VzIHtcbiAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCAke0lDT05fQ09MT1J9O1xuICAgICAgICAgIGJvcmRlci1yYWRpdXM6ICR7ZGVzaWduVG9rZW5zLmJvcmRlclJhZGl1czF9O1xuICAgICAgICAgIHBhZGRpbmctbGVmdDogMHB4O1xuICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IDBweDtcbiAgICAgICAgfVxuICAgICAgYCxcbiAgICBdfVxuICAgIG9uQ2xpY2s9e29uQ2xpY2t9XG4gICAgey4uLnJlc3R9XG4gID5cbiAgICB7Y2hpbGRyZW59XG4gIDwvYnV0dG9uPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvbkljb25CdXR0b247XG4iXX0= */"), process.env.NODE_ENV === "production" ? "" : ";label:PaginationIconButton;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24taWNvbi1idXR0b24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1CSSIsImZpbGUiOiJwYWdpbmF0aW9uLWljb24tYnV0dG9uLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgUmVhY3RFbGVtZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgZGVzaWduVG9rZW5zIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvdWkta2l0JztcbmltcG9ydCB7IGJhc2VCdXR0b25TdHlsZXMgfSBmcm9tICcuL3NoYXJlZC9zdHlsZXMnO1xuXG4vLyBUT0RPOiBJbnRlZ3JhdGUgZGVzaWduIHRva2VuIHdoZW4gcmVkZXNpZ24gaXMgY29tcGxldGVcbmNvbnN0IElDT05fQ09MT1IgPSAnIzYzNTlmZic7XG5cbmNvbnN0IFBhZ2luYXRpb25JY29uQnV0dG9uID0gKHtcbiAgYW5pbWF0aW9uT3JpZW50YXRpb24sXG4gIGNoaWxkcmVuLFxuICBvbkNsaWNrLFxuICAuLi5yZXN0XG59OiB7XG4gIGFuaW1hdGlvbk9yaWVudGF0aW9uOiAnbGVmdCcgfCAncmlnaHQnO1xuICBjaGlsZHJlbjogUmVhY3RFbGVtZW50O1xuICBvbkNsaWNrOiAoKSA9PiB2b2lkO1xufSkgPT4gKFxuICA8YnV0dG9uXG4gICAgY3NzPXtbXG4gICAgICBiYXNlQnV0dG9uU3R5bGVzLFxuICAgICAgY3NzYFxuICAgICAgICBzdmcge1xuICAgICAgICAgIGZpbGw6ICR7SUNPTl9DT0xPUn07XG4gICAgICAgIH1cbiAgICAgICAgdHJhbnNpdGlvbjogdHJhbnNmb3JtICR7ZGVzaWduVG9rZW5zLnRyYW5zaXRpb25TdGFuZGFyZH07XG4gICAgICAgIDpob3ZlciB7XG4gICAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVYKFxuICAgICAgICAgICAgJHthbmltYXRpb25PcmllbnRhdGlvbiA9PT0gJ2xlZnQnXG4gICAgICAgICAgICAgID8gYGNhbGMoMHB4IC0gdmFyKC0tc3BhY2luZy0xMCkpYFxuICAgICAgICAgICAgICA6IGB2YXIoLS1zcGFjaW5nLTEwKWB9XG4gICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBDb21wZW5zYXRlIGZvciBmb2N1cyBib3JkZXJcbiAgICAgICAgcGFkZGluZy1sZWZ0OiAxcHg7XG4gICAgICAgIHBhZGRpbmctcmlnaHQ6IDFweDtcbiAgICAgICAgOmZvY3VzIHtcbiAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCAke0lDT05fQ09MT1J9O1xuICAgICAgICAgIGJvcmRlci1yYWRpdXM6ICR7ZGVzaWduVG9rZW5zLmJvcmRlclJhZGl1czF9O1xuICAgICAgICAgIHBhZGRpbmctbGVmdDogMHB4O1xuICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IDBweDtcbiAgICAgICAgfVxuICAgICAgYCxcbiAgICBdfVxuICAgIG9uQ2xpY2s9e29uQ2xpY2t9XG4gICAgey4uLnJlc3R9XG4gID5cbiAgICB7Y2hpbGRyZW59XG4gIDwvYnV0dG9uPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvbkljb25CdXR0b247XG4iXX0= */"],
|
|
5752
5699
|
onClick: onClick
|
|
5753
5700
|
}, rest), {}, {
|
|
@@ -5757,8 +5704,8 @@ const PaginationIconButton = _ref => {
|
|
|
5757
5704
|
var PaginationIconButton$1 = PaginationIconButton;
|
|
5758
5705
|
|
|
5759
5706
|
const _excluded$b = ["isFilled", "onClick"];
|
|
5760
|
-
function ownKeys
|
|
5761
|
-
function _objectSpread
|
|
5707
|
+
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; }
|
|
5708
|
+
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; }
|
|
5762
5709
|
const ICON_HEIGHT = '10px';
|
|
5763
5710
|
const ICON_WIDTH = ICON_HEIGHT;
|
|
5764
5711
|
// TODO: Integrate design tokens when redesign is complete
|
|
@@ -5769,7 +5716,7 @@ const PaginationSelectionButton = _ref => {
|
|
|
5769
5716
|
isFilled = _ref$isFilled === void 0 ? false : _ref$isFilled,
|
|
5770
5717
|
onClick = _ref.onClick,
|
|
5771
5718
|
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
5772
|
-
return jsxRuntime.jsx("button", _objectSpread
|
|
5719
|
+
return jsxRuntime.jsx("button", _objectSpread$10({
|
|
5773
5720
|
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, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:PaginationSelectionButton;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcUJTIiwiZmlsZSI6InBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBkZXNpZ25Ub2tlbnMgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC91aS1raXQnO1xuaW1wb3J0IHsgYmFzZUJ1dHRvblN0eWxlcyB9IGZyb20gJy4vc2hhcmVkL3N0eWxlcyc7XG5cbmNvbnN0IElDT05fSEVJR0hUID0gJzEwcHgnO1xuY29uc3QgSUNPTl9XSURUSCA9IElDT05fSEVJR0hUO1xuLy8gVE9ETzogSW50ZWdyYXRlIGRlc2lnbiB0b2tlbnMgd2hlbiByZWRlc2lnbiBpcyBjb21wbGV0ZVxuY29uc3QgSUNPTl9DT0xPUiA9ICcjNjM1OUZGJztcbmNvbnN0IElDT05fSE9WRVJfQ09MT1IgPSAnI0IxQUNGRic7XG5cbmNvbnN0IFBhZ2luYXRpb25TZWxlY3Rpb25CdXR0b24gPSAoe1xuICBpc0ZpbGxlZCA9IGZhbHNlLFxuICBvbkNsaWNrLFxuICAuLi5yZXN0XG59OiB7XG4gIGlzRmlsbGVkPzogYm9vbGVhbjtcbiAgb25DbGljazogKCkgPT4gdm9pZDtcbn0pID0+IChcbiAgPGJ1dHRvblxuICAgIGNzcz17W1xuICAgICAgYmFzZUJ1dHRvblN0eWxlcyxcbiAgICAgIGNzc2BcbiAgICAgICAgaGVpZ2h0OiAke0lDT05fSEVJR0hUfTtcbiAgICAgICAgd2lkdGg6ICR7SUNPTl9XSURUSH07XG4gICAgICAgIGJvcmRlci1yYWRpdXM6ICR7ZGVzaWduVG9rZW5zLmJvcmRlclJhZGl1czZ9O1xuICAgICAgICBib3JkZXI6ICR7aXNGaWxsZWRcbiAgICAgICAgICA/ICdub25lJ1xuICAgICAgICAgIDogYCR7ZGVzaWduVG9rZW5zLmJvcmRlcldpZHRoMX0gc29saWQgJHtkZXNpZ25Ub2tlbnMuY29sb3JOZXV0cmFsfWB9O1xuICAgICAgICBiYWNrZ3JvdW5kOiAke2lzRmlsbGVkID8gSUNPTl9DT0xPUiA6ICdub25lJ307XG4gICAgICAgIHRyYW5zaXRpb246ICR7ZGVzaWduVG9rZW5zLnRyYW5zaXRpb25TdGFuZGFyZH07XG4gICAgICAgIDpob3ZlciB7XG4gICAgICAgICAgYmFja2dyb3VuZDogJHtpc0ZpbGxlZCA/IHVuZGVmaW5lZCA6IElDT05fSE9WRVJfQ09MT1J9O1xuICAgICAgICB9XG4gICAgICAgIDpmb2N1cyB7XG4gICAgICAgICAgYm9yZGVyOiAke2Rlc2lnblRva2Vucy5ib3JkZXJXaWR0aDF9IHNvbGlkICR7SUNPTl9DT0xPUn07XG4gICAgICAgIH1cbiAgICAgIGAsXG4gICAgXX1cbiAgICBvbkNsaWNrPXtvbkNsaWNrfVxuICAgIHsuLi5yZXN0fVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvblNlbGVjdGlvbkJ1dHRvbjtcbiJdfQ== */"), process.env.NODE_ENV === "production" ? "" : ";label:PaginationSelectionButton;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUJJIiwiZmlsZSI6InBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBkZXNpZ25Ub2tlbnMgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC91aS1raXQnO1xuaW1wb3J0IHsgYmFzZUJ1dHRvblN0eWxlcyB9IGZyb20gJy4vc2hhcmVkL3N0eWxlcyc7XG5cbmNvbnN0IElDT05fSEVJR0hUID0gJzEwcHgnO1xuY29uc3QgSUNPTl9XSURUSCA9IElDT05fSEVJR0hUO1xuLy8gVE9ETzogSW50ZWdyYXRlIGRlc2lnbiB0b2tlbnMgd2hlbiByZWRlc2lnbiBpcyBjb21wbGV0ZVxuY29uc3QgSUNPTl9DT0xPUiA9ICcjNjM1OUZGJztcbmNvbnN0IElDT05fSE9WRVJfQ09MT1IgPSAnI0IxQUNGRic7XG5cbmNvbnN0IFBhZ2luYXRpb25TZWxlY3Rpb25CdXR0b24gPSAoe1xuICBpc0ZpbGxlZCA9IGZhbHNlLFxuICBvbkNsaWNrLFxuICAuLi5yZXN0XG59OiB7XG4gIGlzRmlsbGVkPzogYm9vbGVhbjtcbiAgb25DbGljazogKCkgPT4gdm9pZDtcbn0pID0+IChcbiAgPGJ1dHRvblxuICAgIGNzcz17W1xuICAgICAgYmFzZUJ1dHRvblN0eWxlcyxcbiAgICAgIGNzc2BcbiAgICAgICAgaGVpZ2h0OiAke0lDT05fSEVJR0hUfTtcbiAgICAgICAgd2lkdGg6ICR7SUNPTl9XSURUSH07XG4gICAgICAgIGJvcmRlci1yYWRpdXM6ICR7ZGVzaWduVG9rZW5zLmJvcmRlclJhZGl1czZ9O1xuICAgICAgICBib3JkZXI6ICR7aXNGaWxsZWRcbiAgICAgICAgICA/ICdub25lJ1xuICAgICAgICAgIDogYCR7ZGVzaWduVG9rZW5zLmJvcmRlcldpZHRoMX0gc29saWQgJHtkZXNpZ25Ub2tlbnMuY29sb3JOZXV0cmFsfWB9O1xuICAgICAgICBiYWNrZ3JvdW5kOiAke2lzRmlsbGVkID8gSUNPTl9DT0xPUiA6ICdub25lJ307XG4gICAgICAgIHRyYW5zaXRpb246ICR7ZGVzaWduVG9rZW5zLnRyYW5zaXRpb25TdGFuZGFyZH07XG4gICAgICAgIDpob3ZlciB7XG4gICAgICAgICAgYmFja2dyb3VuZDogJHtpc0ZpbGxlZCA/IHVuZGVmaW5lZCA6IElDT05fSE9WRVJfQ09MT1J9O1xuICAgICAgICB9XG4gICAgICAgIDpmb2N1cyB7XG4gICAgICAgICAgYm9yZGVyOiAke2Rlc2lnblRva2Vucy5ib3JkZXJXaWR0aDF9IHNvbGlkICR7SUNPTl9DT0xPUn07XG4gICAgICAgIH1cbiAgICAgIGAsXG4gICAgXX1cbiAgICBvbkNsaWNrPXtvbkNsaWNrfVxuICAgIHsuLi5yZXN0fVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvblNlbGVjdGlvbkJ1dHRvbjtcbiJdfQ== */"],
|
|
5774
5721
|
onClick: onClick
|
|
5775
5722
|
}, rest));
|
|
@@ -5993,8 +5940,8 @@ var messages$E = reactIntl.defineMessages({
|
|
|
5993
5940
|
}
|
|
5994
5941
|
});
|
|
5995
5942
|
|
|
5996
|
-
function ownKeys
|
|
5997
|
-
function _objectSpread
|
|
5943
|
+
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; }
|
|
5944
|
+
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$$(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$$(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5998
5945
|
const emptyCountryOption = intl => [{
|
|
5999
5946
|
label: intl.formatMessage(messages$E.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
6000
5947
|
value: undefined,
|
|
@@ -6021,7 +5968,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
6021
5968
|
const onOptionChange = event => {
|
|
6022
5969
|
const countries = event.target.value;
|
|
6023
5970
|
props.onChange({
|
|
6024
|
-
target: _objectSpread
|
|
5971
|
+
target: _objectSpread$$(_objectSpread$$({}, event.target), {}, {
|
|
6025
5972
|
value: _mapInstanceProperty__default["default"](countries).call(countries, country => country?.value ?? country)
|
|
6026
5973
|
})
|
|
6027
5974
|
});
|
|
@@ -6072,8 +6019,8 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
6072
6019
|
const COUNTRIES_ASYNC_LOADING_LIMIT = 60;
|
|
6073
6020
|
|
|
6074
6021
|
const _excluded$a = ["countriesAsyncLoadingLimit", "isMulti", "isRequired", "hasWarning"];
|
|
6075
|
-
function ownKeys$
|
|
6076
|
-
function _objectSpread$
|
|
6022
|
+
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; }
|
|
6023
|
+
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; }
|
|
6077
6024
|
function CountriesPicker(_ref) {
|
|
6078
6025
|
let _ref$countriesAsyncLo = _ref.countriesAsyncLoadingLimit,
|
|
6079
6026
|
countriesAsyncLoadingLimit = _ref$countriesAsyncLo === void 0 ? COUNTRIES_ASYNC_LOADING_LIMIT : _ref$countriesAsyncLo,
|
|
@@ -6086,7 +6033,7 @@ function CountriesPicker(_ref) {
|
|
|
6086
6033
|
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
6087
6034
|
const CustomCountriesPicker = props.options?.length <= countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
|
|
6088
6035
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
6089
|
-
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$
|
|
6036
|
+
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$_({
|
|
6090
6037
|
countriesAsyncLoadingLimit: countriesAsyncLoadingLimit,
|
|
6091
6038
|
isMulti: isMulti,
|
|
6092
6039
|
isRequired: isRequired,
|
|
@@ -6295,9 +6242,9 @@ const REFERENCED_TYPES = {
|
|
|
6295
6242
|
const ATTRIBUTE_TYPES = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time'];
|
|
6296
6243
|
const SET_ATTRIBUTE_TYPES = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
6297
6244
|
|
|
6298
|
-
function ownKeys$
|
|
6299
|
-
function _objectSpread$
|
|
6300
|
-
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$
|
|
6245
|
+
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; }
|
|
6246
|
+
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; }
|
|
6247
|
+
const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"](errors).call(errors, (result, itemErrors) => _objectSpread$Z(_objectSpread$Z({}, result), itemErrors), {});
|
|
6301
6248
|
|
|
6302
6249
|
// TODO(pa3): worth splitting in two components: one of set errors and one for
|
|
6303
6250
|
// all the other types of fields. So that there will be no isArray check.
|
|
@@ -6455,8 +6402,8 @@ const SetButtons = props => {
|
|
|
6455
6402
|
SetButtons.displayName = 'SetButtons';
|
|
6456
6403
|
var SetButtons$1 = SetButtons;
|
|
6457
6404
|
|
|
6458
|
-
function ownKeys$
|
|
6459
|
-
function _objectSpread$
|
|
6405
|
+
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; }
|
|
6406
|
+
function _objectSpread$Y(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$Y(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$Y(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6460
6407
|
const getDuplicateErrors = setValues => {
|
|
6461
6408
|
/* eslint-disable no-plusplus */
|
|
6462
6409
|
const result = [];
|
|
@@ -6509,7 +6456,7 @@ function CustomInputSet(props) {
|
|
|
6509
6456
|
touched = _useFormikContext.touched,
|
|
6510
6457
|
isSubmitting = _useFormikContext.isSubmitting,
|
|
6511
6458
|
dirty = _useFormikContext.dirty;
|
|
6512
|
-
const itemFieldDefinition = _objectSpread$
|
|
6459
|
+
const itemFieldDefinition = _objectSpread$Y(_objectSpread$Y({}, props.fieldDefinition), {}, {
|
|
6513
6460
|
type: props.fieldDefinition.type.elementType
|
|
6514
6461
|
});
|
|
6515
6462
|
const value = React.useMemo(() => props.value || [undefined], [props.value]);
|
|
@@ -6765,8 +6712,8 @@ function CustomLocalizedEnumInput(props) {
|
|
|
6765
6712
|
}
|
|
6766
6713
|
CustomLocalizedEnumInput.displayName = 'CustomLocalizedEnumInput';
|
|
6767
6714
|
|
|
6768
|
-
function ownKeys$
|
|
6769
|
-
function _objectSpread$
|
|
6715
|
+
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; }
|
|
6716
|
+
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; }
|
|
6770
6717
|
const getSubfieldLanguage = subfieldName => {
|
|
6771
6718
|
const lastDotIndex = _lastIndexOfInstanceProperty__default["default"](subfieldName).call(subfieldName, '.');
|
|
6772
6719
|
return subfieldName.substring(lastDotIndex + 1);
|
|
@@ -6789,7 +6736,7 @@ function CustomLocalizedTextInput(props) {
|
|
|
6789
6736
|
// as a whole.
|
|
6790
6737
|
|
|
6791
6738
|
const fieldLanguage = getSubfieldLanguage(subfieldName);
|
|
6792
|
-
const newValue = _objectSpread$
|
|
6739
|
+
const newValue = _objectSpread$X(_objectSpread$X({}, props.value), {}, {
|
|
6793
6740
|
[fieldLanguage]: rawValue
|
|
6794
6741
|
});
|
|
6795
6742
|
const nullifiedIfNeeded = uiKit.LocalizedTextInput.isEmpty(newValue) ? undefined : newValue;
|
|
@@ -6817,19 +6764,19 @@ function CustomLocalizedTextInput(props) {
|
|
|
6817
6764
|
}
|
|
6818
6765
|
CustomLocalizedTextInput.displayName = 'CustomLocalizedTextInput';
|
|
6819
6766
|
|
|
6820
|
-
function ownKeys$
|
|
6821
|
-
function _objectSpread$
|
|
6767
|
+
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; }
|
|
6768
|
+
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; }
|
|
6822
6769
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$a() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
6823
6770
|
const fixCurrencyCode = (value, currencies) => {
|
|
6824
6771
|
if (value.currencyCode) return value;
|
|
6825
6772
|
const firstCurrency = currencies[0];
|
|
6826
|
-
return _objectSpread$
|
|
6773
|
+
return _objectSpread$W(_objectSpread$W({}, value), {}, {
|
|
6827
6774
|
currencyCode: firstCurrency
|
|
6828
6775
|
});
|
|
6829
6776
|
};
|
|
6830
6777
|
const fixAmount = value => {
|
|
6831
6778
|
if (!value.amount) {
|
|
6832
|
-
return _objectSpread$
|
|
6779
|
+
return _objectSpread$W(_objectSpread$W({}, value), {}, {
|
|
6833
6780
|
amount: '0'
|
|
6834
6781
|
});
|
|
6835
6782
|
}
|
|
@@ -6879,7 +6826,7 @@ function CustomMoneyInput(props) {
|
|
|
6879
6826
|
}
|
|
6880
6827
|
const handleChange = makeChangeHandler((rawValue, subfieldName) => {
|
|
6881
6828
|
const isAmount = _endsWithInstanceProperty__default["default"](subfieldName).call(subfieldName, 'amount');
|
|
6882
|
-
const newValue = _objectSpread$
|
|
6829
|
+
const newValue = _objectSpread$W({}, internalValue.current);
|
|
6883
6830
|
if (isAmount) newValue.amount = rawValue;else newValue.currencyCode = rawValue;
|
|
6884
6831
|
const fixedValue = fixEnteredValue(newValue, internalValue.current, currencies);
|
|
6885
6832
|
internalValue.current = fixedValue;
|
|
@@ -6916,23 +6863,23 @@ function CustomMoneyInput(props) {
|
|
|
6916
6863
|
}
|
|
6917
6864
|
CustomMoneyInput.displayName = 'CustomMoneyInput';
|
|
6918
6865
|
|
|
6919
|
-
function ownKeys$
|
|
6920
|
-
function _objectSpread$
|
|
6866
|
+
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; }
|
|
6867
|
+
function _objectSpread$V(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$V(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$V(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
6921
6868
|
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 } } } };
|
|
6922
6869
|
const mapAttributeDefinition = definition => {
|
|
6923
6870
|
var _context, _context2, _context3, _context4;
|
|
6924
|
-
return _objectSpread$
|
|
6871
|
+
return _objectSpread$V(_objectSpread$V({}, definition), {}, {
|
|
6925
6872
|
required: definition.isRequired,
|
|
6926
6873
|
inputTip: l10n.transformLocalizedFieldToLocalizedString(definition.inputTipAllLocales),
|
|
6927
6874
|
label: l10n.transformLocalizedFieldToLocalizedString(definition.labelAllLocales),
|
|
6928
|
-
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, definition.type?.elementType?.name) ? _objectSpread$
|
|
6929
|
-
elementType: _objectSpread$
|
|
6875
|
+
type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, definition.type?.elementType?.name) ? _objectSpread$V(_objectSpread$V({}, definition.type), {}, {
|
|
6876
|
+
elementType: _objectSpread$V(_objectSpread$V({}, definition.type.elementType), {}, {
|
|
6930
6877
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](definition.type.elementType).results).call(_context2, value => ({
|
|
6931
6878
|
key: value.key,
|
|
6932
6879
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
6933
6880
|
}))
|
|
6934
6881
|
})
|
|
6935
|
-
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, definition.type?.name) ? _objectSpread$
|
|
6882
|
+
}) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, definition.type?.name) ? _objectSpread$V(_objectSpread$V({}, definition.type), {}, {
|
|
6936
6883
|
values: _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](definition.type).results).call(_context4, value => ({
|
|
6937
6884
|
key: value.key,
|
|
6938
6885
|
label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -7069,8 +7016,8 @@ var messages$A = reactIntl.defineMessages({
|
|
|
7069
7016
|
}
|
|
7070
7017
|
});
|
|
7071
7018
|
|
|
7072
|
-
function ownKeys$
|
|
7073
|
-
function _objectSpread$
|
|
7019
|
+
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; }
|
|
7020
|
+
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; }
|
|
7074
7021
|
const EditButton = props => {
|
|
7075
7022
|
const _useIntl = reactIntl.useIntl(),
|
|
7076
7023
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -7218,13 +7165,13 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
7218
7165
|
const valuesAsMap = nameValuePairsToMap(value);
|
|
7219
7166
|
const initialValues = omitUnknownValues(valuesAsMap, attributeDefinitionsAsMap);
|
|
7220
7167
|
const openNestedAttributesForm = () => {
|
|
7221
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
7168
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$U(_objectSpread$U({}, parentFormik.status), {}, {
|
|
7222
7169
|
hideSaveToolbar: true
|
|
7223
7170
|
}));
|
|
7224
7171
|
attributesForm.openModal();
|
|
7225
7172
|
};
|
|
7226
7173
|
const closeNestedAttributesForm = () => {
|
|
7227
|
-
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$
|
|
7174
|
+
if (nestingLevel === 0) parentFormik.setStatus(_objectSpread$U(_objectSpread$U({}, parentFormik.status), {}, {
|
|
7228
7175
|
hideSaveToolbar: false
|
|
7229
7176
|
}));
|
|
7230
7177
|
attributesForm.closeModal();
|
|
@@ -7763,8 +7710,8 @@ var messages$y = reactIntl.defineMessages({
|
|
|
7763
7710
|
}
|
|
7764
7711
|
});
|
|
7765
7712
|
|
|
7766
|
-
function ownKeys$
|
|
7767
|
-
function _objectSpread$
|
|
7713
|
+
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; }
|
|
7714
|
+
function _objectSpread$T(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$T(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$T(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7768
7715
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$9() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
7769
7716
|
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 } } } };
|
|
7770
7717
|
const CustomFieldsLabelHint = _ref2 => {
|
|
@@ -7794,7 +7741,7 @@ const CustomFieldsLabelHint = _ref2 => {
|
|
|
7794
7741
|
children: [jsxRuntime.jsx(uiKit.WarningIcon, {
|
|
7795
7742
|
size: "medium",
|
|
7796
7743
|
color: "warning"
|
|
7797
|
-
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
7744
|
+
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$T({}, messages$y.cartDiscountMoreThan500))]
|
|
7798
7745
|
});
|
|
7799
7746
|
}
|
|
7800
7747
|
return l10n.formatLocalizedString(fieldDefinition, {
|
|
@@ -7919,10 +7866,10 @@ var messages$x = reactIntl.defineMessages({
|
|
|
7919
7866
|
}
|
|
7920
7867
|
});
|
|
7921
7868
|
|
|
7922
|
-
function ownKeys$
|
|
7923
|
-
function _objectSpread$
|
|
7869
|
+
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; }
|
|
7870
|
+
function _objectSpread$S(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$S(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$S(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7924
7871
|
function ProductTypeReference(props) {
|
|
7925
|
-
const productTypeMessage = _objectSpread$
|
|
7872
|
+
const productTypeMessage = _objectSpread$S(_objectSpread$S({}, messages$x.referencedProductType), {}, {
|
|
7926
7873
|
values: {
|
|
7927
7874
|
productTypeName: props.productType.name
|
|
7928
7875
|
}
|
|
@@ -7971,10 +7918,10 @@ function CustomNestedFieldInput(props) {
|
|
|
7971
7918
|
}
|
|
7972
7919
|
CustomNestedFieldInput.displayName = 'CustomNestedFieldInput';
|
|
7973
7920
|
|
|
7974
|
-
function ownKeys$
|
|
7975
|
-
function _objectSpread$
|
|
7921
|
+
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; }
|
|
7922
|
+
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; }
|
|
7976
7923
|
function DragHandle(props) {
|
|
7977
|
-
return jsxRuntime.jsx("div", _objectSpread$
|
|
7924
|
+
return jsxRuntime.jsx("div", _objectSpread$R(_objectSpread$R({}, props), {}, {
|
|
7978
7925
|
children: jsxRuntime.jsx(uiKit.IconButton, {
|
|
7979
7926
|
icon: jsxRuntime.jsx(uiKit.DragIcon, {}),
|
|
7980
7927
|
size: "medium",
|
|
@@ -7984,8 +7931,8 @@ function DragHandle(props) {
|
|
|
7984
7931
|
}
|
|
7985
7932
|
DragHandle.displayName = 'DragHandle';
|
|
7986
7933
|
|
|
7987
|
-
function ownKeys$
|
|
7988
|
-
function _objectSpread$
|
|
7934
|
+
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; }
|
|
7935
|
+
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; }
|
|
7989
7936
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$8() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
7990
7937
|
var _ref$8 = process.env.NODE_ENV === "production" ? {
|
|
7991
7938
|
name: "1onfs6j",
|
|
@@ -8020,7 +7967,7 @@ const DraggableWrapper = _ref2 => {
|
|
|
8020
7967
|
draggableId: draggableId,
|
|
8021
7968
|
index: index,
|
|
8022
7969
|
children: (provided, snapshot) => {
|
|
8023
|
-
const child = jsxRuntime.jsx("div", _objectSpread$
|
|
7970
|
+
const child = jsxRuntime.jsx("div", _objectSpread$Q(_objectSpread$Q({
|
|
8024
7971
|
ref: provided.innerRef
|
|
8025
7972
|
}, provided.draggableProps), {}, {
|
|
8026
7973
|
css: _ref$8,
|
|
@@ -8031,7 +7978,7 @@ const DraggableWrapper = _ref2 => {
|
|
|
8031
7978
|
gridTemplateRows: "auto 1fr auto",
|
|
8032
7979
|
gridGap: snapshot.isDragging ? uiKit.customProperties.spacingS : uiKit.customProperties.spacingM,
|
|
8033
7980
|
children: [jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
8034
|
-
children: jsxRuntime.jsx(DragHandle, _objectSpread$
|
|
7981
|
+
children: jsxRuntime.jsx(DragHandle, _objectSpread$Q({}, provided.dragHandleProps))
|
|
8035
7982
|
}), jsxRuntime.jsx(uiKit.Grid.Item, {
|
|
8036
7983
|
children: children
|
|
8037
7984
|
})]
|
|
@@ -8050,8 +7997,8 @@ const DraggableWrapper = _ref2 => {
|
|
|
8050
7997
|
}, draggableKey);
|
|
8051
7998
|
};
|
|
8052
7999
|
|
|
8053
|
-
function ownKeys$
|
|
8054
|
-
function _objectSpread$
|
|
8000
|
+
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; }
|
|
8001
|
+
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; }
|
|
8055
8002
|
const DroppableWrapper = _ref => {
|
|
8056
8003
|
let children = _ref.children,
|
|
8057
8004
|
onDragEnd = _ref.onDragEnd;
|
|
@@ -8059,7 +8006,7 @@ const DroppableWrapper = _ref => {
|
|
|
8059
8006
|
onDragEnd: onDragEnd,
|
|
8060
8007
|
children: jsxRuntime.jsx(dnd.Droppable, {
|
|
8061
8008
|
droppableId: "droppable",
|
|
8062
|
-
children: provided => jsxRuntime.jsxs("div", _objectSpread$
|
|
8009
|
+
children: provided => jsxRuntime.jsxs("div", _objectSpread$P(_objectSpread$P({
|
|
8063
8010
|
ref: provided.innerRef
|
|
8064
8011
|
}, provided.droppableProps), {}, {
|
|
8065
8012
|
children: [children, provided.placeholder]
|
|
@@ -8068,8 +8015,8 @@ const DroppableWrapper = _ref => {
|
|
|
8068
8015
|
});
|
|
8069
8016
|
};
|
|
8070
8017
|
|
|
8071
|
-
function ownKeys$
|
|
8072
|
-
function _objectSpread$
|
|
8018
|
+
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; }
|
|
8019
|
+
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; }
|
|
8073
8020
|
const DefaultWrapper = _ref => {
|
|
8074
8021
|
let children = _ref.children;
|
|
8075
8022
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
@@ -8105,7 +8052,7 @@ const DndProvider = _ref2 => {
|
|
|
8105
8052
|
});
|
|
8106
8053
|
}
|
|
8107
8054
|
return jsxRuntime.jsx(DnDContext.Provider, {
|
|
8108
|
-
value: _objectSpread$
|
|
8055
|
+
value: _objectSpread$O(_objectSpread$O({}, dndContextDefaultValues), {}, {
|
|
8109
8056
|
isDnDMode,
|
|
8110
8057
|
setDnDMode
|
|
8111
8058
|
}),
|
|
@@ -8117,8 +8064,8 @@ const useDnDContext = () => {
|
|
|
8117
8064
|
};
|
|
8118
8065
|
|
|
8119
8066
|
const _excluded$9 = ["renderCustomWarnings", "WrapperComponent"];
|
|
8120
|
-
function ownKeys$
|
|
8121
|
-
function _objectSpread$
|
|
8067
|
+
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; }
|
|
8068
|
+
function _objectSpread$N(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$N(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$N(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8122
8069
|
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];
|
|
8123
8070
|
const getFieldName = (parentName, fieldName) => {
|
|
8124
8071
|
if (!parentName) return fieldName;
|
|
@@ -8200,7 +8147,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
8200
8147
|
renderWarnings: props.renderWarnings,
|
|
8201
8148
|
additionalInfo: shouldUseAdditionalInfoProp && props?.additionalInfoHandler ? props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) : undefined
|
|
8202
8149
|
};
|
|
8203
|
-
const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$
|
|
8150
|
+
const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$N({}, fieldProps));
|
|
8204
8151
|
// the several values inside the key are needed to make sure the field is re-rendered when those values change
|
|
8205
8152
|
return jsxRuntime.jsx(formik.FastField, {
|
|
8206
8153
|
name: fieldName,
|
|
@@ -8243,8 +8190,8 @@ const CustomFieldsInternal = _ref => {
|
|
|
8243
8190
|
CustomFieldsInternal.displayName = 'CustomFieldsInternal';
|
|
8244
8191
|
var CustomFieldsInternal$1 = CustomFieldsInternal;
|
|
8245
8192
|
|
|
8246
|
-
function ownKeys$
|
|
8247
|
-
function _objectSpread$
|
|
8193
|
+
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; }
|
|
8194
|
+
function _objectSpread$M(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$M(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$M(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8248
8195
|
const getTypeName = type => type.name.toLowerCase();
|
|
8249
8196
|
const findLabel = (enumType, key) => {
|
|
8250
8197
|
var _context;
|
|
@@ -8295,7 +8242,7 @@ const attributeDefinitionToFieldDefinition = attributeDefinition => ({
|
|
|
8295
8242
|
const nameValuePairsToMap = pairs => _reduceInstanceProperty__default["default"](pairs).call(pairs, (result, _ref2) => {
|
|
8296
8243
|
let name = _ref2.name,
|
|
8297
8244
|
value = _ref2.value;
|
|
8298
|
-
return _objectSpread$
|
|
8245
|
+
return _objectSpread$M(_objectSpread$M({}, result), {}, {
|
|
8299
8246
|
[name]: value
|
|
8300
8247
|
});
|
|
8301
8248
|
}, {});
|
|
@@ -8413,8 +8360,8 @@ var pickerMessages = reactIntl.defineMessages({
|
|
|
8413
8360
|
}
|
|
8414
8361
|
});
|
|
8415
8362
|
|
|
8416
|
-
function ownKeys$
|
|
8417
|
-
function _objectSpread$
|
|
8363
|
+
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; }
|
|
8364
|
+
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; }
|
|
8418
8365
|
const PRODUCT_SELECTION_MODES = {
|
|
8419
8366
|
INCLUSION: 'Individual',
|
|
8420
8367
|
EXCLUSION: 'IndividualExclusion'
|
|
@@ -8427,7 +8374,7 @@ const getMode = mode => mode === PRODUCT_SELECTION_MODES.INCLUSION || mode === P
|
|
|
8427
8374
|
const addModeToLabel = function (ps) {
|
|
8428
8375
|
let enableExcludingProducts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
8429
8376
|
if (!ps) return undefined;
|
|
8430
|
-
return _objectSpread$
|
|
8377
|
+
return _objectSpread$L(_objectSpread$L({}, ps), {}, {
|
|
8431
8378
|
label: `${ps?.label}${enableExcludingProducts ? ` (type: ${getMode(ps?.mode)})` : ''}`
|
|
8432
8379
|
});
|
|
8433
8380
|
};
|
|
@@ -8791,12 +8738,12 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
8791
8738
|
});
|
|
8792
8739
|
}
|
|
8793
8740
|
|
|
8794
|
-
function ownKeys$
|
|
8795
|
-
function _objectSpread$
|
|
8741
|
+
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; }
|
|
8742
|
+
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; }
|
|
8796
8743
|
function ModeSelectInputOption(props) {
|
|
8797
8744
|
const data = props.data;
|
|
8798
8745
|
const noValueFallback = props.noValueFallback || constants.NO_VALUE_FALLBACK;
|
|
8799
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8746
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$K(_objectSpread$K({}, props), {}, {
|
|
8800
8747
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
8801
8748
|
scale: "xs",
|
|
8802
8749
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -8812,8 +8759,8 @@ function ModeSelectInputOption(props) {
|
|
|
8812
8759
|
}
|
|
8813
8760
|
|
|
8814
8761
|
const _excluded$7 = ["lowerProductSelectionsLimit", "upperProductSelectionsLimit", "renderSelectInputOptionValuesByField", "optionType", "isMulti", "isRequired", "hasWarning", "hasError", "isClearable", "isReadOnly", "isDisabled", "excludedProductSelectionIds", "title"];
|
|
8815
|
-
function ownKeys$
|
|
8816
|
-
function _objectSpread$
|
|
8762
|
+
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; }
|
|
8763
|
+
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; }
|
|
8817
8764
|
function ProductSelectionsPicker(_ref) {
|
|
8818
8765
|
let _ref$lowerProductSele = _ref.lowerProductSelectionsLimit,
|
|
8819
8766
|
lowerProductSelectionsLimit = _ref$lowerProductSele === void 0 ? LOWER_PRODUCT_SELECTIONS_LIMIT : _ref$lowerProductSele,
|
|
@@ -8847,10 +8794,10 @@ function ProductSelectionsPicker(_ref) {
|
|
|
8847
8794
|
return {
|
|
8848
8795
|
Option: optionInnerProps => {
|
|
8849
8796
|
if (optionInnerProps.isDisabled) {
|
|
8850
|
-
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$
|
|
8797
|
+
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$J({}, optionInnerProps));
|
|
8851
8798
|
}
|
|
8852
8799
|
if (optionType === TYPE_PROPERTY) {
|
|
8853
|
-
return jsxRuntime.jsx(ModeSelectInputOption, _objectSpread$
|
|
8800
|
+
return jsxRuntime.jsx(ModeSelectInputOption, _objectSpread$J({}, optionInnerProps));
|
|
8854
8801
|
}
|
|
8855
8802
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8856
8803
|
optionType: optionType,
|
|
@@ -8863,7 +8810,7 @@ function ProductSelectionsPicker(_ref) {
|
|
|
8863
8810
|
let CustomProductSelectionsPicker;
|
|
8864
8811
|
if (productSelectionsTotalFetcher.total <= lowerProductSelectionsLimit) CustomProductSelectionsPicker = ProductSelectionBasicSelectDropdown;else if (productSelectionsTotalFetcher.total <= upperProductSelectionsLimit) CustomProductSelectionsPicker = ProductSelectionsAsyncSelectDropdown;else CustomProductSelectionsPicker = ProductSelectionsSearchSelectDropdown;
|
|
8865
8812
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8866
|
-
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$
|
|
8813
|
+
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$J(_objectSpread$J({
|
|
8867
8814
|
lowerProductSelectionsLimit: lowerProductSelectionsLimit,
|
|
8868
8815
|
upperProductSelectionsLimit: upperProductSelectionsLimit,
|
|
8869
8816
|
renderSelectInputOptionValuesByField: renderSelectInputOptionValuesByField,
|
|
@@ -8900,14 +8847,14 @@ var messages$w = reactIntl.defineMessages({
|
|
|
8900
8847
|
defaultMessage: 'The selected recurrent interval could not be retrieved. Please check your recurrence policy configuration.'
|
|
8901
8848
|
},
|
|
8902
8849
|
noRecurrentIntervalsConfigured: {
|
|
8903
|
-
id: 'RecurrentIntervalPicker.noRecurrentIntervalsConfigured',
|
|
8850
|
+
id: 'RecurrentIntervalPicker.noRecurrentIntervalsConfigured.withLinkToSettings',
|
|
8904
8851
|
description: 'Banner warning message shown when no recurrent intervals are configured in the project',
|
|
8905
|
-
defaultMessage: 'No recurrent intervals configured. Please check your recurrence policy configuration
|
|
8852
|
+
defaultMessage: 'No recurrent intervals configured. Please check your <linkToSettings>recurrence policy configuration</linkToSettings>.'
|
|
8906
8853
|
}
|
|
8907
8854
|
});
|
|
8908
8855
|
|
|
8909
|
-
function ownKeys$
|
|
8910
|
-
function _objectSpread$
|
|
8856
|
+
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; }
|
|
8857
|
+
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; }
|
|
8911
8858
|
var FetchRecurrencePolicies = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchRecurrencePolicies" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Int" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "recurrencePolicies" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 220, source: { body: "query FetchRecurrencePolicies($where: String, $limit: Int!) {\n recurrencePolicies(where: $where, limit: $limit) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8912
8859
|
const useRecurrenceIntervals = _ref => {
|
|
8913
8860
|
let where = _ref.where,
|
|
@@ -8918,7 +8865,7 @@ const useRecurrenceIntervals = _ref => {
|
|
|
8918
8865
|
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
8919
8866
|
},
|
|
8920
8867
|
fetchPolicy: 'cache-and-network',
|
|
8921
|
-
variables: _objectSpread$
|
|
8868
|
+
variables: _objectSpread$I({
|
|
8922
8869
|
limit: 500
|
|
8923
8870
|
}, where && {
|
|
8924
8871
|
where
|
|
@@ -8935,6 +8882,8 @@ const useRecurrenceIntervals = _ref => {
|
|
|
8935
8882
|
};
|
|
8936
8883
|
};
|
|
8937
8884
|
|
|
8885
|
+
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; }
|
|
8886
|
+
function _objectSpread$H(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$H(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$H(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8938
8887
|
const RecurrentIntervalPicker = _ref => {
|
|
8939
8888
|
let name = _ref.name,
|
|
8940
8889
|
value = _ref.value,
|
|
@@ -8946,13 +8895,27 @@ const RecurrentIntervalPicker = _ref => {
|
|
|
8946
8895
|
_ref$isDisabled = _ref.isDisabled,
|
|
8947
8896
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
8948
8897
|
_ref$isReadOnly = _ref.isReadOnly,
|
|
8949
|
-
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly
|
|
8898
|
+
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
8899
|
+
_ref$isMulti = _ref.isMulti,
|
|
8900
|
+
isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti,
|
|
8901
|
+
dataTestId = _ref['data-testid'];
|
|
8950
8902
|
const _useIntl = reactIntl.useIntl(),
|
|
8951
8903
|
formatMessage = _useIntl.formatMessage;
|
|
8952
|
-
const
|
|
8904
|
+
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
8905
|
+
dataLocale: applicationContext.dataLocale,
|
|
8906
|
+
projectKey: applicationContext.project?.key
|
|
8907
|
+
})),
|
|
8908
|
+
dataLocale = _useApplicationContex.dataLocale,
|
|
8909
|
+
projectKey = _useApplicationContex.projectKey;
|
|
8953
8910
|
const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
|
|
8954
8911
|
const skipFetch = isReadOnly && !value;
|
|
8955
|
-
const where =
|
|
8912
|
+
const where = React.useMemo(() => {
|
|
8913
|
+
if (!isReadOnly || !value) return undefined;
|
|
8914
|
+
if (_Array$isArray__default["default"](value)) {
|
|
8915
|
+
return `id in (${_mapInstanceProperty__default["default"](value).call(value, id => `"${id}"`).join(',')})`;
|
|
8916
|
+
}
|
|
8917
|
+
return `id="${value}"`;
|
|
8918
|
+
}, [isReadOnly, value]);
|
|
8956
8919
|
const _useRecurrenceInterva = useRecurrenceIntervals({
|
|
8957
8920
|
where,
|
|
8958
8921
|
skip: skipFetch
|
|
@@ -8960,7 +8923,13 @@ const RecurrentIntervalPicker = _ref => {
|
|
|
8960
8923
|
recurrencePolicies = _useRecurrenceInterva.recurrencePolicies,
|
|
8961
8924
|
loading = _useRecurrenceInterva.loading,
|
|
8962
8925
|
error = _useRecurrenceInterva.error;
|
|
8963
|
-
const selectedIsMissingInData =
|
|
8926
|
+
const selectedIsMissingInData = React.useMemo(() => {
|
|
8927
|
+
if (!value) return false;
|
|
8928
|
+
if (_Array$isArray__default["default"](value)) {
|
|
8929
|
+
return _someInstanceProperty__default["default"](value).call(value, val => !_someInstanceProperty__default["default"](recurrencePolicies).call(recurrencePolicies, policy => policy.id === val));
|
|
8930
|
+
}
|
|
8931
|
+
return !_someInstanceProperty__default["default"](recurrencePolicies).call(recurrencePolicies, policy => policy.id === value);
|
|
8932
|
+
}, [value, recurrencePolicies]);
|
|
8964
8933
|
const options = React.useMemo(() => {
|
|
8965
8934
|
if (loading) return [];
|
|
8966
8935
|
const mapped = _mapInstanceProperty__default["default"](recurrencePolicies).call(recurrencePolicies, policy => ({
|
|
@@ -8968,15 +8937,17 @@ const RecurrentIntervalPicker = _ref => {
|
|
|
8968
8937
|
label: formatLocalizedFieldToString(policy.nameAllLocales, policy.key)
|
|
8969
8938
|
}));
|
|
8970
8939
|
|
|
8971
|
-
// If the selected value cannot be loaded, add
|
|
8940
|
+
// If the selected value(s) cannot be loaded, add them as missing options
|
|
8972
8941
|
if (selectedIsMissingInData && value) {
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8942
|
+
var _context;
|
|
8943
|
+
const valueArray = _Array$isArray__default["default"](value) ? value : [value];
|
|
8944
|
+
const missingOptions = _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](valueArray).call(valueArray, val => !_someInstanceProperty__default["default"](recurrencePolicies).call(recurrencePolicies, policy => policy.id === val))).call(_context, val => ({
|
|
8945
|
+
value: val,
|
|
8946
|
+
label: formatMessage(messages$w.missingOptionLabel, {
|
|
8947
|
+
value: val
|
|
8948
|
+
})
|
|
8949
|
+
}));
|
|
8950
|
+
return [...missingOptions, ...mapped];
|
|
8980
8951
|
}
|
|
8981
8952
|
return mapped;
|
|
8982
8953
|
}, [recurrencePolicies, selectedIsMissingInData, value, dataLocale, formatMessage, formatLocalizedFieldToString, loading]);
|
|
@@ -8996,10 +8967,12 @@ const RecurrentIntervalPicker = _ref => {
|
|
|
8996
8967
|
options: options,
|
|
8997
8968
|
isClearable: isClearable,
|
|
8998
8969
|
isReadOnly: isReadOnly,
|
|
8970
|
+
isMulti: isMulti,
|
|
8999
8971
|
isDisabled: isDisabled || loading || noRecurrentIntervalsConfigured,
|
|
9000
8972
|
onChange: onChange,
|
|
9001
8973
|
onBlur: onBlur,
|
|
9002
|
-
hasError: !loading && !error && selectedIsMissingInData
|
|
8974
|
+
hasError: !loading && !error && selectedIsMissingInData,
|
|
8975
|
+
"data-testid": dataTestId
|
|
9003
8976
|
}), error ? jsxRuntime.jsx(uiKit.Text.Body, {
|
|
9004
8977
|
tone: "negative",
|
|
9005
8978
|
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
@@ -9009,7 +8982,14 @@ const RecurrentIntervalPicker = _ref => {
|
|
|
9009
8982
|
}) : null, !error && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9010
8983
|
type: "info",
|
|
9011
8984
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
9012
|
-
intlMessage: messages$w.noRecurrentIntervalsConfigured
|
|
8985
|
+
intlMessage: _objectSpread$H(_objectSpread$H({}, messages$w.noRecurrentIntervalsConfigured), {}, {
|
|
8986
|
+
values: {
|
|
8987
|
+
linkToSettings: msg => jsxRuntime.jsx(uiKit.Link, {
|
|
8988
|
+
to: `/${projectKey}/settings/project/intervals`,
|
|
8989
|
+
children: msg
|
|
8990
|
+
}, "link-to-settings")
|
|
8991
|
+
}
|
|
8992
|
+
})
|
|
9013
8993
|
})
|
|
9014
8994
|
})]
|
|
9015
8995
|
});
|
|
@@ -14184,6 +14164,45 @@ const range = (field, attributeType, _ref) => {
|
|
|
14184
14164
|
}
|
|
14185
14165
|
};
|
|
14186
14166
|
};
|
|
14167
|
+
|
|
14168
|
+
/**
|
|
14169
|
+
* Serializes attribute values to primitives suitable for PIM search queries.
|
|
14170
|
+
* Handles complex attribute types like enum, lenum, ltext, money, and reference.
|
|
14171
|
+
*
|
|
14172
|
+
* @param {*} value - The attribute value to serialize
|
|
14173
|
+
* @param {string} typeName - The attribute type name (e.g., 'enum', 'lenum', 'ltext')
|
|
14174
|
+
* @param {string} [dataLocale] - The locale to use for localized text attributes
|
|
14175
|
+
* @returns {*} The serialized primitive value
|
|
14176
|
+
*/
|
|
14177
|
+
function serializeAttributeValueForPimSearch(value, typeName, dataLocale) {
|
|
14178
|
+
if (value == null) return value;
|
|
14179
|
+
switch (typeName) {
|
|
14180
|
+
case 'enum':
|
|
14181
|
+
case 'lenum':
|
|
14182
|
+
// Extract key from enum object { key: 'xl', label: '...' }
|
|
14183
|
+
return typeof value === 'object' && value.key ? value.key : value;
|
|
14184
|
+
case 'ltext':
|
|
14185
|
+
// For localized text, use the specified locale or first available
|
|
14186
|
+
if (typeof value === 'object' && !_Array$isArray__default["default"](value)) {
|
|
14187
|
+
return dataLocale && value[dataLocale] ? value[dataLocale] : _Object$values__default["default"](value)[0];
|
|
14188
|
+
}
|
|
14189
|
+
return value;
|
|
14190
|
+
case 'money':
|
|
14191
|
+
// Money objects have { centAmount, currencyCode }
|
|
14192
|
+
// For PIM search, return the object as-is - caller will handle it specially
|
|
14193
|
+
return value;
|
|
14194
|
+
case 'reference':
|
|
14195
|
+
// Reference objects have { id, typeId }
|
|
14196
|
+
// For PIM search, we need just the ID
|
|
14197
|
+
if (typeof value === 'object' && value.id) {
|
|
14198
|
+
return value.id;
|
|
14199
|
+
}
|
|
14200
|
+
return value;
|
|
14201
|
+
default:
|
|
14202
|
+
// Primitives (text, number, boolean, date/time) pass through unchanged
|
|
14203
|
+
return value;
|
|
14204
|
+
}
|
|
14205
|
+
}
|
|
14187
14206
|
const or = function () {
|
|
14188
14207
|
for (var _len = arguments.length, clauses = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
14189
14208
|
clauses[_key] = arguments[_key];
|
|
@@ -14771,6 +14790,7 @@ exports.resolveStatusType = resolveStatusType;
|
|
|
14771
14790
|
exports.safelyAddFallback = safelyAddFallback;
|
|
14772
14791
|
exports.sanitize = sanitize;
|
|
14773
14792
|
exports.searchCategories = searchCategories;
|
|
14793
|
+
exports.serializeAttributeValueForPimSearch = serializeAttributeValueForPimSearch;
|
|
14774
14794
|
exports.setDisplayName = setDisplayName$1;
|
|
14775
14795
|
exports.setToArray = setToArray;
|
|
14776
14796
|
exports.shallowEqual = shallowEqual;
|
|
@@ -14798,7 +14818,6 @@ exports.useDebouncedPromiseCallback = useDebouncedPromiseCallback$1;
|
|
|
14798
14818
|
exports.useFormatCustomField = useFormatCustomField;
|
|
14799
14819
|
exports.useFormatLocalizedFieldToString = useFormatLocalizedFieldToString;
|
|
14800
14820
|
exports.useFormatLocalizedString = useFormatLocalizedString;
|
|
14801
|
-
exports.useIdentityBannerNotification = useIdentityBannerNotification;
|
|
14802
14821
|
exports.useIsFieldDuplicated = useIsFieldDuplicated$1;
|
|
14803
14822
|
exports.useLoadOptions = useLoadOptions$1;
|
|
14804
14823
|
exports.useLocalizedKeyFallback = useLocalizedKeyFallback$1;
|