@commercetools-frontend/experimental-components 6.4.6 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commercetools-frontend-experimental-components.cjs.dev.js +1607 -1167
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +1584 -1155
- package/dist/commercetools-frontend-experimental-components.esm.js +1587 -1163
- package/dist/declarations/src/components/carousel/carousel.d.ts +28 -0
- package/dist/declarations/src/components/carousel/index.d.ts +2 -0
- package/dist/declarations/src/components/channel-picker-input/channel-picker-input.d.ts +3 -3
- package/dist/declarations/src/components/divider/divider.d.ts +2 -2
- package/dist/declarations/src/components/formatted-date-time/formatted-date-time.d.ts +0 -1
- package/dist/declarations/src/components/recurrent-interval-picker/index.d.ts +2 -0
- package/dist/declarations/src/components/recurrent-interval-picker/recurrent-interval-picker.d.ts +13 -0
- package/dist/declarations/src/components/recurrent-interval-picker/use-recurrence-intervals/index.d.ts +1 -0
- package/dist/declarations/src/{hooks → components/recurrent-interval-picker}/use-recurrence-intervals/use-recurrence-intervals.d.ts +6 -1
- package/dist/declarations/src/components/store-select-input/constants.d.ts +2 -0
- package/dist/declarations/src/components/validated-input/validated-input.d.ts +7 -38
- package/dist/declarations/src/constants/index.d.ts +1 -0
- package/dist/declarations/src/custom-fields/custom-field-definitions-connector/custom-field-definitions-connector.d.ts +0 -1
- package/dist/declarations/src/custom-fields/custom-field-type-definitions-connector/custom-field-type-definitions-connector.d.ts +0 -1
- package/dist/declarations/src/custom-fields/custom-fields/constants.d.ts +36 -0
- package/dist/declarations/src/custom-fields/custom-fields/custom-field-input.d.ts +2 -0
- package/dist/declarations/src/custom-fields/custom-fields/index.d.ts +2 -1
- package/dist/declarations/src/features/picker/shared/hooks/use-load-options.d.ts +1 -1
- package/dist/declarations/src/features/picker/shared/hooks/use-product-type-options.d.ts +2 -2
- package/dist/declarations/src/features/pim-indexer/components/pim-indexer-provider/pim-indexer-provider.d.ts +0 -1
- package/dist/declarations/src/features/pim-indexer/components/with-pim-indexer/with-pim-indexer.d.ts +0 -1
- package/dist/declarations/src/features/platform-limits/business-units/hooks/index.d.ts +2 -0
- package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits/use-business-units-platform-limits.d.ts +10 -0
- package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits-fetcher/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits-fetcher/use-business-units-platform-limits-fetcher.d.ts +12 -0
- package/dist/declarations/src/features/platform-limits/business-units/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/customer-groups/hooks/use-customer-groups-platform-limits/use-customer-groups-platform-limits.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/customer-groups/hooks/use-customer-groups-platform-limits-fetcher/use-customer-groups-platform-limits-fetcher.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/customers/hooks/use-customers-platform-limits/use-customers-platform-limits.d.ts +2 -1
- package/dist/declarations/src/features/platform-limits/customers/hooks/use-customers-platform-limits-fetcher/use-customers-platform-limits-fetcher.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/index.d.ts +3 -0
- package/dist/declarations/src/features/platform-limits/shared/components/index.d.ts +2 -0
- package/dist/declarations/src/features/platform-limits/shared/components/notifications/error/error.d.ts +12 -0
- package/dist/declarations/src/features/platform-limits/shared/components/notifications/error/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/components/notifications/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/components/notifications/notifications.d.ts +7 -0
- package/dist/declarations/src/features/platform-limits/shared/components/notifications/warning/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/components/notifications/warning/warning.d.ts +12 -0
- package/dist/declarations/src/features/platform-limits/shared/components/status-text/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/components/status-text/status-text.d.ts +12 -0
- package/dist/declarations/src/features/platform-limits/shared/constants.d.ts +13 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/index.d.ts +3 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-intercept-navigation/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-intercept-navigation/use-intercept-navigation.d.ts +7 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-limits-modal-state/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-limits-modal-state/use-limits-modal-state.d.ts +6 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-platform-limits-fetcher/index.d.ts +3 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-platform-limits-fetcher/platform-limits-query-variables.d.ts +2 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-platform-limits-fetcher/use-platform-limits-fetcher.d.ts +7 -0
- package/dist/declarations/src/features/platform-limits/shared/index.d.ts +4 -0
- package/dist/declarations/src/features/platform-limits/shared/utils/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/utils/utils.d.ts +14 -0
- package/dist/declarations/src/features/platform-limits/shipping-methods/hooks/use-shipping-methods-platform-limits/use-shipping-methods-platform-limits.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/shipping-methods/hooks/use-shipping-methods-platform-limits-fetcher/use-shipping-methods-platform-limits-fetcher.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/stores/hooks/index.d.ts +3 -0
- package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits/use-store-platform-limits.d.ts +15 -0
- package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-fetcher/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-fetcher/use-store-platform-limits-fetcher.d.ts +13 -0
- package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-status/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-status/use-store-platform-limits-status.d.ts +5 -0
- package/dist/declarations/src/features/platform-limits/stores/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/tax-categories/hooks/use-tax-categories-platform-limits/use-tax-categories-platform-limits.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/tax-categories/hooks/use-tax-categories-platform-limits-fetcher/use-tax-categories-platform-limits-fetcher.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/zones/hooks/use-zones-platform-limits/use-zones-platform-limits.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/zones/hooks/use-zones-platform-limits-fetcher/use-zones-platform-limits-fetcher.d.ts +1 -1
- package/dist/declarations/src/fields/numeric-format-input/numeric-format-input.d.ts +0 -1
- package/dist/declarations/src/fields/search-input/search-input.d.ts +0 -1
- package/dist/declarations/src/fields/throttled-field/throttled-field.d.ts +0 -1
- package/dist/declarations/src/hooks/index.d.ts +0 -2
- package/dist/declarations/src/hooks/use-persisted-reminder/use-persisted-reminder.d.ts +1 -1
- package/dist/declarations/src/hooks/use-previous/use-previous.d.ts +1 -1
- package/dist/declarations/src/hooks/use-product-selections-fetcher/use-product-selections-fetcher.d.ts +1 -6
- package/dist/declarations/src/hooks/use-stores-list-fetcher/use-stores-list-fetcher.d.ts +1 -8
- package/dist/declarations/src/index.d.ts +11 -8
- package/dist/declarations/src/utils/type-definitions/type-definitions.d.ts +1 -1
- package/dist/styles.css +88 -88
- package/package.json +26 -28
- package/dist/declarations/src/hooks/use-did-form-validation-fail/index.d.ts +0 -1
- package/dist/declarations/src/hooks/use-did-form-validation-fail/use-did-form-validation-fail.d.ts +0 -1
|
@@ -76,7 +76,7 @@ var applicationShell = require('@commercetools-frontend/application-shell');
|
|
|
76
76
|
var _ = require('@commercetools-frontend/ui-kit/');
|
|
77
77
|
var PropTypes = require('prop-types');
|
|
78
78
|
var react$1 = require('@emotion/react');
|
|
79
|
-
var
|
|
79
|
+
var dnd = require('@hello-pangea/dnd');
|
|
80
80
|
var ReactDOM = require('react-dom');
|
|
81
81
|
var _indexOfInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
|
|
82
82
|
var selectUtils = require('@commercetools-uikit/select-utils');
|
|
@@ -108,6 +108,8 @@ var _Date$now = require('@babel/runtime-corejs3/core-js-stable/date/now');
|
|
|
108
108
|
var _spliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/splice');
|
|
109
109
|
var memoize = require('memoize-one');
|
|
110
110
|
var omitEmpty = require('omit-empty-es');
|
|
111
|
+
var shuffle = require('lodash/shuffle');
|
|
112
|
+
var reactSnapCarousel = require('react-snap-carousel');
|
|
111
113
|
var hoc = require('@apollo/client/react/hoc');
|
|
112
114
|
var flatten = require('lodash/flatten');
|
|
113
115
|
var uniqBy = require('lodash/uniqBy');
|
|
@@ -209,6 +211,7 @@ var _Date$now__default = /*#__PURE__*/_interopDefault(_Date$now);
|
|
|
209
211
|
var _spliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_spliceInstanceProperty);
|
|
210
212
|
var memoize__default = /*#__PURE__*/_interopDefault(memoize);
|
|
211
213
|
var omitEmpty__default = /*#__PURE__*/_interopDefault(omitEmpty);
|
|
214
|
+
var shuffle__default = /*#__PURE__*/_interopDefault(shuffle);
|
|
212
215
|
var flatten__default = /*#__PURE__*/_interopDefault(flatten);
|
|
213
216
|
var uniqBy__default = /*#__PURE__*/_interopDefault(uniqBy);
|
|
214
217
|
var invariant__default = /*#__PURE__*/_interopDefault(invariant);
|
|
@@ -230,6 +233,9 @@ const CenteredLoadingSpinner = () => jsxRuntime.jsx("div", {
|
|
|
230
233
|
CenteredLoadingSpinner.displayName = 'CenteredLoadingSpinner';
|
|
231
234
|
var CenteredLoadingSpinner$1 = CenteredLoadingSpinner;
|
|
232
235
|
|
|
236
|
+
const LOWER_STORES_LIMIT = 60;
|
|
237
|
+
const UPPER_STORES_LIMIT = 500;
|
|
238
|
+
|
|
233
239
|
const QUERY_MAX_LIMIT = 500;
|
|
234
240
|
const SHOW_TOOLTIP_CHARS_COUNT = 40;
|
|
235
241
|
const SEARCHABLE_REFERENCES = {
|
|
@@ -273,7 +279,7 @@ const PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES = 'productTailoringForAtt
|
|
|
273
279
|
// TODO: apply a more robust solution to overlaying issues
|
|
274
280
|
const Z_INDEX_DROPDOWN = 30000;
|
|
275
281
|
|
|
276
|
-
var
|
|
282
|
+
var commonPickerMessages = reactIntl.defineMessages({
|
|
277
283
|
loadingErrorMessage: {
|
|
278
284
|
id: 'Pickers.loadingErrorMessage',
|
|
279
285
|
description: 'Message shown to used when picker fails to load data from server.',
|
|
@@ -286,7 +292,7 @@ var pickerMessages$1 = reactIntl.defineMessages({
|
|
|
286
292
|
}
|
|
287
293
|
});
|
|
288
294
|
|
|
289
|
-
var messages$
|
|
295
|
+
var messages$S = reactIntl.defineMessages({
|
|
290
296
|
noChannelsFound: {
|
|
291
297
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
292
298
|
description: 'The message to display when no channels were found',
|
|
@@ -299,8 +305,8 @@ var messages$R = reactIntl.defineMessages({
|
|
|
299
305
|
}
|
|
300
306
|
});
|
|
301
307
|
|
|
302
|
-
function ownKeys$
|
|
303
|
-
function _objectSpread$
|
|
308
|
+
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; }
|
|
309
|
+
function _objectSpread$1t(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$1t(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$1t(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
304
310
|
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 } } } };
|
|
305
311
|
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 } } } };
|
|
306
312
|
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 } } } };
|
|
@@ -308,16 +314,19 @@ const getRolesClause = roles => roles && roles.length > 0 ? `roles contains any
|
|
|
308
314
|
const ChannelPickerInput = _ref => {
|
|
309
315
|
let isClearable = _ref.isClearable,
|
|
310
316
|
isDisabled = _ref.isDisabled,
|
|
311
|
-
isReadOnly = _ref.isReadOnly,
|
|
317
|
+
_ref$isReadOnly = _ref.isReadOnly,
|
|
318
|
+
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
312
319
|
onChange = _ref.onChange,
|
|
313
320
|
name = _ref.name,
|
|
314
321
|
onBlur = _ref.onBlur,
|
|
315
322
|
value = _ref.value,
|
|
316
323
|
hasError = _ref.hasError,
|
|
317
|
-
onError = _ref.onError,
|
|
324
|
+
_ref$onError = _ref.onError,
|
|
325
|
+
onError = _ref$onError === void 0 ? null : _ref$onError,
|
|
318
326
|
placeholder = _ref.placeholder,
|
|
319
327
|
roles = _ref.roles,
|
|
320
|
-
hasWarning = _ref.hasWarning,
|
|
328
|
+
_ref$hasWarning = _ref.hasWarning,
|
|
329
|
+
hasWarning = _ref$hasWarning === void 0 ? false : _ref$hasWarning,
|
|
321
330
|
_ref$isMulti = _ref.isMulti,
|
|
322
331
|
isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti;
|
|
323
332
|
const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
|
|
@@ -326,7 +335,7 @@ const ChannelPickerInput = _ref => {
|
|
|
326
335
|
const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
|
|
327
336
|
const variables = React.useMemo(() => {
|
|
328
337
|
const rolesClause = getRolesClause(roles);
|
|
329
|
-
return _objectSpread$
|
|
338
|
+
return _objectSpread$1t({
|
|
330
339
|
sortByNamePath: `name.${dataLocale}`
|
|
331
340
|
}, rolesClause && {
|
|
332
341
|
extraWhere: rolesClause
|
|
@@ -401,7 +410,7 @@ const ChannelPickerInput = _ref => {
|
|
|
401
410
|
if (isCurrentOptionLoadingFailed && onError) onError(currentOptions.error);
|
|
402
411
|
}, [isCurrentOptionLoadingFailed, onError, currentOptions]);
|
|
403
412
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
404
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
413
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$S.noChannelsFound), [loadingError, formatMessage]);
|
|
405
414
|
const tooltipTitle = !isMulti ? currentSingleOption?.data?.label ?? '' : '';
|
|
406
415
|
const selectedValue = currentOptions.data ?? (isMulti ? [] : null);
|
|
407
416
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
@@ -413,7 +422,7 @@ const ChannelPickerInput = _ref => {
|
|
|
413
422
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
414
423
|
id: name,
|
|
415
424
|
name: name,
|
|
416
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
425
|
+
placeholder: placeholder ?? formatMessage(messages$S.placeholder),
|
|
417
426
|
loadOptions: loadOptionsDebounced,
|
|
418
427
|
defaultOptions: true,
|
|
419
428
|
showOptionGroupDivider: true,
|
|
@@ -436,7 +445,7 @@ const ChannelPickerInput = _ref => {
|
|
|
436
445
|
})
|
|
437
446
|
}), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
438
447
|
tone: "negative",
|
|
439
|
-
intlMessage:
|
|
448
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
440
449
|
})]
|
|
441
450
|
})
|
|
442
451
|
});
|
|
@@ -470,7 +479,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
470
479
|
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
471
480
|
var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
472
481
|
|
|
473
|
-
var messages$
|
|
482
|
+
var messages$R = reactIntl.defineMessages({
|
|
474
483
|
noProductTypesFound: {
|
|
475
484
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
476
485
|
description: 'The message to display when no product types were found',
|
|
@@ -559,7 +568,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
559
568
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
560
569
|
id: name,
|
|
561
570
|
name: name,
|
|
562
|
-
placeholder: formatMessage(messages$
|
|
571
|
+
placeholder: formatMessage(messages$R.placeholder),
|
|
563
572
|
loadOptions: loadOptionsDebounced,
|
|
564
573
|
defaultOptions: [],
|
|
565
574
|
isClearable: isClearable,
|
|
@@ -572,7 +581,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
572
581
|
onInputChange: handleInputChange,
|
|
573
582
|
onBlur: onBlur,
|
|
574
583
|
value: currentOption.data,
|
|
575
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
584
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$R.noProductTypesFound),
|
|
576
585
|
hasError: hasError || isLoadingFailed,
|
|
577
586
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
578
587
|
menuPortalTarget: document.body,
|
|
@@ -580,7 +589,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
580
589
|
})
|
|
581
590
|
}), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
582
591
|
tone: "negative",
|
|
583
|
-
intlMessage:
|
|
592
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
584
593
|
})]
|
|
585
594
|
})
|
|
586
595
|
});
|
|
@@ -588,7 +597,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
588
597
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
589
598
|
var ProductTypePickerInput$1 = ProductTypePickerInput;
|
|
590
599
|
|
|
591
|
-
var messages$
|
|
600
|
+
var messages$Q = reactIntl.defineMessages({
|
|
592
601
|
noStatesFound: {
|
|
593
602
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
594
603
|
description: 'The message to display when no states were found',
|
|
@@ -672,7 +681,7 @@ const StatePickerInput = _ref => {
|
|
|
672
681
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
673
682
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
674
683
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
675
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
684
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$Q.noStatesFound), [loadingError, formatMessage]);
|
|
676
685
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
677
686
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
678
687
|
max: "scale",
|
|
@@ -684,7 +693,7 @@ const StatePickerInput = _ref => {
|
|
|
684
693
|
id: name,
|
|
685
694
|
name: name,
|
|
686
695
|
horizontalConstraint: "scale",
|
|
687
|
-
placeholder: formatMessage(messages$
|
|
696
|
+
placeholder: formatMessage(messages$Q.placeholder),
|
|
688
697
|
loadOptions: loadOptionsDebounced,
|
|
689
698
|
defaultOptions: true,
|
|
690
699
|
showOptionGroupDivider: true,
|
|
@@ -706,7 +715,7 @@ const StatePickerInput = _ref => {
|
|
|
706
715
|
}, dataLocale)
|
|
707
716
|
}), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
708
717
|
tone: "negative",
|
|
709
|
-
intlMessage:
|
|
718
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
710
719
|
})]
|
|
711
720
|
})
|
|
712
721
|
});
|
|
@@ -714,9 +723,9 @@ const StatePickerInput = _ref => {
|
|
|
714
723
|
StatePickerInput.displayName = 'StatePickerInput';
|
|
715
724
|
var StatePickerInput$1 = StatePickerInput;
|
|
716
725
|
|
|
717
|
-
function ownKeys$
|
|
718
|
-
function _objectSpread$
|
|
719
|
-
const TooltipWrapper = /*#__PURE__*/React__namespace["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$
|
|
726
|
+
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; }
|
|
727
|
+
function _objectSpread$1s(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1s(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1s(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
728
|
+
const TooltipWrapper = /*#__PURE__*/React__namespace["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$1s({
|
|
720
729
|
ref: ref,
|
|
721
730
|
style: {
|
|
722
731
|
display: 'block',
|
|
@@ -741,7 +750,7 @@ const CustomFieldTooltip = _ref => {
|
|
|
741
750
|
};
|
|
742
751
|
var CustomFieldTooltip$1 = CustomFieldTooltip;
|
|
743
752
|
|
|
744
|
-
var messages$
|
|
753
|
+
var messages$P = reactIntl.defineMessages({
|
|
745
754
|
bottomOption: {
|
|
746
755
|
id: 'Products.Pickers.bottomOption',
|
|
747
756
|
description: 'The message to display at the end of the options menu',
|
|
@@ -749,11 +758,11 @@ var messages$O = reactIntl.defineMessages({
|
|
|
749
758
|
}
|
|
750
759
|
});
|
|
751
760
|
|
|
752
|
-
function ownKeys$
|
|
753
|
-
function _objectSpread$
|
|
761
|
+
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; }
|
|
762
|
+
function _objectSpread$1r(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$1r(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$1r(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
754
763
|
const getBottomOption = formatMessage => ({
|
|
755
764
|
options: [{
|
|
756
|
-
label: formatMessage ? formatMessage(messages$
|
|
765
|
+
label: formatMessage ? formatMessage(messages$P.bottomOption) : messages$P.bottomOption,
|
|
757
766
|
isBottomOption: true,
|
|
758
767
|
isDisabled: true
|
|
759
768
|
}]
|
|
@@ -761,7 +770,7 @@ const getBottomOption = formatMessage => ({
|
|
|
761
770
|
const Option$2 = props => {
|
|
762
771
|
const _useIntl = reactIntl.useIntl(),
|
|
763
772
|
formatMessage = _useIntl.formatMessage;
|
|
764
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
773
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$1r(_objectSpread$1r({}, props), {}, {
|
|
765
774
|
children: props.data.isBottomOption ? jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
766
775
|
tone: "secondary",
|
|
767
776
|
children: formatMessage(props.data.label)
|
|
@@ -778,8 +787,8 @@ const Option$2 = props => {
|
|
|
778
787
|
};
|
|
779
788
|
Option$2.displayName = 'Option';
|
|
780
789
|
|
|
781
|
-
function ownKeys$
|
|
782
|
-
function _objectSpread$
|
|
790
|
+
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; }
|
|
791
|
+
function _objectSpread$1q(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1q(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1q(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
783
792
|
const useHandlers = onChange => {
|
|
784
793
|
const _useState = React.useState(),
|
|
785
794
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -790,8 +799,8 @@ const useHandlers = onChange => {
|
|
|
790
799
|
}, []);
|
|
791
800
|
const handleChange = useEventCallback$1(event => {
|
|
792
801
|
var _context;
|
|
793
|
-
const eventWithExtractedValue = _objectSpread$
|
|
794
|
-
target: _objectSpread$
|
|
802
|
+
const eventWithExtractedValue = _objectSpread$1q(_objectSpread$1q({}, event), {}, {
|
|
803
|
+
target: _objectSpread$1q(_objectSpread$1q({}, event.target), {}, {
|
|
795
804
|
value: _Array$isArray__default["default"](event.target.value) ? _mapInstanceProperty__default["default"](_context = event.target.value).call(_context, item => item?.value) : event.target.value?.value
|
|
796
805
|
})
|
|
797
806
|
});
|
|
@@ -801,9 +810,9 @@ const useHandlers = onChange => {
|
|
|
801
810
|
};
|
|
802
811
|
var useHandlers$1 = useHandlers;
|
|
803
812
|
|
|
804
|
-
const _excluded$
|
|
805
|
-
function ownKeys$
|
|
806
|
-
function _objectSpread$
|
|
813
|
+
const _excluded$g = ["extraWhere"];
|
|
814
|
+
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; }
|
|
815
|
+
function _objectSpread$1p(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$1p(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$1p(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
807
816
|
const constructPrefixSearchPredicate$1 = function () {
|
|
808
817
|
let prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
809
818
|
let lowerBound = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -844,13 +853,13 @@ const useLoadOptions = _ref => {
|
|
|
844
853
|
}
|
|
845
854
|
const _ref2 = variables ?? {},
|
|
846
855
|
extraWhere = _ref2.extraWhere,
|
|
847
|
-
restVariables = _objectWithoutProperties(_ref2, _excluded$
|
|
856
|
+
restVariables = _objectWithoutProperties(_ref2, _excluded$g);
|
|
848
857
|
if (typeof extraWhere === 'string') {
|
|
849
858
|
where = where ? `(${where}) and ${variables.extraWhere}` : variables.extraWhere;
|
|
850
859
|
}
|
|
851
860
|
return client$1.query({
|
|
852
861
|
query,
|
|
853
|
-
variables: _objectSpread$
|
|
862
|
+
variables: _objectSpread$1p({
|
|
854
863
|
where
|
|
855
864
|
}, restVariables),
|
|
856
865
|
context: {
|
|
@@ -1155,8 +1164,8 @@ var keepDisplayName$1 = keepDisplayName;
|
|
|
1155
1164
|
const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName$1(BaseComponent)})`;
|
|
1156
1165
|
var wrapDisplayName$1 = wrapDisplayName;
|
|
1157
1166
|
|
|
1158
|
-
function ownKeys$
|
|
1159
|
-
function _objectSpread$
|
|
1167
|
+
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; }
|
|
1168
|
+
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; }
|
|
1160
1169
|
function _callSuper$8(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$8() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1161
1170
|
function _isNativeReflectConstruct$8() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$8 = function () { return !!t; })(); }
|
|
1162
1171
|
const withMouseOverState = BaseComponent => {
|
|
@@ -1187,7 +1196,7 @@ const withMouseOverState = BaseComponent => {
|
|
|
1187
1196
|
handleMouseOver: this.handleMouseOver,
|
|
1188
1197
|
handleMouseOut: this.handleMouseOut
|
|
1189
1198
|
};
|
|
1190
|
-
return jsxRuntime.jsx(BaseComponent, _objectSpread$
|
|
1199
|
+
return jsxRuntime.jsx(BaseComponent, _objectSpread$1o({}, _objectSpread$1o(_objectSpread$1o({}, this.props), injectedProps)));
|
|
1191
1200
|
}
|
|
1192
1201
|
}]);
|
|
1193
1202
|
}(React.Component);
|
|
@@ -1196,8 +1205,8 @@ const withMouseOverState = BaseComponent => {
|
|
|
1196
1205
|
};
|
|
1197
1206
|
var withMouseOverState$1 = withMouseOverState;
|
|
1198
1207
|
|
|
1199
|
-
function ownKeys$
|
|
1200
|
-
function _objectSpread$
|
|
1208
|
+
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; }
|
|
1209
|
+
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; }
|
|
1201
1210
|
function _callSuper$7(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$7() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1202
1211
|
function _isNativeReflectConstruct$7() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$7 = function () { return !!t; })(); }
|
|
1203
1212
|
var styles$j = {
|
|
@@ -1288,7 +1297,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
1288
1297
|
}, {
|
|
1289
1298
|
key: "render",
|
|
1290
1299
|
value: function render() {
|
|
1291
|
-
const commonProps = _objectSpread$
|
|
1300
|
+
const commonProps = _objectSpread$1n(_objectSpread$1n({
|
|
1292
1301
|
value: this.state.draftValue,
|
|
1293
1302
|
autoComplete: this.props.autoComplete,
|
|
1294
1303
|
onChange: this.handleChange,
|
|
@@ -1307,7 +1316,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
1307
1316
|
htmlFor: inputId,
|
|
1308
1317
|
children: this.props.label
|
|
1309
1318
|
})
|
|
1310
|
-
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$
|
|
1319
|
+
}), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$1n(_objectSpread$1n({}, commonProps), {}, {
|
|
1311
1320
|
id: inputId,
|
|
1312
1321
|
className: classnames__default["default"](styles$j.textarea, styles$j[`textarea-${this.props.style}`], {
|
|
1313
1322
|
[styles$j.invalid]: !this.props.isValid,
|
|
@@ -1316,7 +1325,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
|
|
|
1316
1325
|
rows: 1,
|
|
1317
1326
|
maxRows: this.props.autoSize ? undefined : 1,
|
|
1318
1327
|
cacheMeasurements: true
|
|
1319
|
-
})) : jsxRuntime.jsx("input", _objectSpread$
|
|
1328
|
+
})) : jsxRuntime.jsx("input", _objectSpread$1n(_objectSpread$1n({}, commonProps), {}, {
|
|
1320
1329
|
id: inputId,
|
|
1321
1330
|
ref: this.props.inputRef,
|
|
1322
1331
|
type: this.props.as,
|
|
@@ -1354,7 +1363,7 @@ ThrottledField.defaultProps = {
|
|
|
1354
1363
|
};
|
|
1355
1364
|
var ThrottledField$1 = ThrottledField;
|
|
1356
1365
|
|
|
1357
|
-
var messages$
|
|
1366
|
+
var messages$O = reactIntl.defineMessages({
|
|
1358
1367
|
buttonLabel: {
|
|
1359
1368
|
id: 'SearchInput.buttonLabel',
|
|
1360
1369
|
description: 'Label for "Search" button.',
|
|
@@ -1459,7 +1468,7 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
1459
1468
|
"data-testid": this.props.testId || 'search-input',
|
|
1460
1469
|
value: this.state.text,
|
|
1461
1470
|
label: this.props.label,
|
|
1462
|
-
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$
|
|
1471
|
+
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$O.placeholder),
|
|
1463
1472
|
inputRef: this.props.inputRef || this.setInputRef,
|
|
1464
1473
|
onChange: this.handleInputChange,
|
|
1465
1474
|
onEnter: this.handleEnter,
|
|
@@ -1516,8 +1525,8 @@ SearchInput.defaultProps = {
|
|
|
1516
1525
|
};
|
|
1517
1526
|
var searchInput = flowRight__default["default"](keepDisplayName$1(SearchInput), withMouseOverState$1, reactIntl.injectIntl)(SearchInput);
|
|
1518
1527
|
|
|
1519
|
-
function ownKeys$
|
|
1520
|
-
function _objectSpread$
|
|
1528
|
+
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; }
|
|
1529
|
+
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; }
|
|
1521
1530
|
const injectDataTablePaginationState = initialValues => Component => {
|
|
1522
1531
|
const WithDataTablePaginationState = props => {
|
|
1523
1532
|
const _usePaginationState = uiKit.usePaginationState({
|
|
@@ -1530,7 +1539,7 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1530
1539
|
key: initialValues?.tableSorting?.key,
|
|
1531
1540
|
order: initialValues?.tableSorting?.order
|
|
1532
1541
|
});
|
|
1533
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1542
|
+
return jsxRuntime.jsx(Component, _objectSpread$1m(_objectSpread$1m({}, props), {}, {
|
|
1534
1543
|
dataTablePaginationState: {
|
|
1535
1544
|
page,
|
|
1536
1545
|
perPage,
|
|
@@ -1543,8 +1552,8 @@ const injectDataTablePaginationState = initialValues => Component => {
|
|
|
1543
1552
|
};
|
|
1544
1553
|
var injectDataTablePaginationState$1 = injectDataTablePaginationState;
|
|
1545
1554
|
|
|
1546
|
-
function ownKeys$
|
|
1547
|
-
function _objectSpread$
|
|
1555
|
+
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; }
|
|
1556
|
+
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; }
|
|
1548
1557
|
const injectNotifications = function () {
|
|
1549
1558
|
let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
|
|
1550
1559
|
return Component => {
|
|
@@ -1559,7 +1568,7 @@ const injectNotifications = function () {
|
|
|
1559
1568
|
onActionError,
|
|
1560
1569
|
hideAllPageNotifications
|
|
1561
1570
|
};
|
|
1562
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1571
|
+
return jsxRuntime.jsx(Component, _objectSpread$1l(_objectSpread$1l({}, props), {}, {
|
|
1563
1572
|
[propName]: notifications
|
|
1564
1573
|
}));
|
|
1565
1574
|
};
|
|
@@ -1569,23 +1578,23 @@ const injectNotifications = function () {
|
|
|
1569
1578
|
};
|
|
1570
1579
|
var injectNotifications$1 = injectNotifications;
|
|
1571
1580
|
|
|
1572
|
-
function ownKeys$
|
|
1573
|
-
function _objectSpread$
|
|
1581
|
+
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; }
|
|
1582
|
+
function _objectSpread$1k(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1k(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1574
1583
|
function isPropsMapper(mapProps) {
|
|
1575
1584
|
return typeof mapProps === 'function';
|
|
1576
1585
|
}
|
|
1577
1586
|
const withProps = mapProps => Component => {
|
|
1578
1587
|
const EnhancedWithProps = ownProps => {
|
|
1579
|
-
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$
|
|
1580
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1588
|
+
const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1k(_objectSpread$1k({}, ownProps), mapProps(ownProps)) : _objectSpread$1k(_objectSpread$1k({}, ownProps), mapProps);
|
|
1589
|
+
return jsxRuntime.jsx(Component, _objectSpread$1k({}, enhancedProps));
|
|
1581
1590
|
};
|
|
1582
1591
|
EnhancedWithProps.displayName = wrapDisplayName$1(Component, 'withProps');
|
|
1583
1592
|
return EnhancedWithProps;
|
|
1584
1593
|
};
|
|
1585
1594
|
var withProps$1 = withProps;
|
|
1586
1595
|
|
|
1587
|
-
function ownKeys$
|
|
1588
|
-
function _objectSpread$
|
|
1596
|
+
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; }
|
|
1597
|
+
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; }
|
|
1589
1598
|
const useRedirectEffect = _ref => {
|
|
1590
1599
|
let goTo = _ref.goTo;
|
|
1591
1600
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -1605,31 +1614,31 @@ const defaultOptions$5 = {
|
|
|
1605
1614
|
skip: () => false
|
|
1606
1615
|
};
|
|
1607
1616
|
const withRedirectTo = options => Component => {
|
|
1608
|
-
const mergedOptions = _objectSpread$
|
|
1617
|
+
const mergedOptions = _objectSpread$1j(_objectSpread$1j({}, defaultOptions$5), options);
|
|
1609
1618
|
const WithRedirectTo = props => {
|
|
1610
1619
|
if (!mergedOptions.skip(props)) {
|
|
1611
1620
|
return jsxRuntime.jsx(RedirectTo, {
|
|
1612
1621
|
goTo: options.selectGoTo(props)
|
|
1613
1622
|
});
|
|
1614
1623
|
}
|
|
1615
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1624
|
+
return jsxRuntime.jsx(Component, _objectSpread$1j({}, props));
|
|
1616
1625
|
};
|
|
1617
1626
|
WithRedirectTo.displayName = 'WithFirstStepRedirect';
|
|
1618
1627
|
return WithRedirectTo;
|
|
1619
1628
|
};
|
|
1620
1629
|
var withRedirectTo$1 = withRedirectTo;
|
|
1621
1630
|
|
|
1622
|
-
function ownKeys$
|
|
1623
|
-
function _objectSpread$
|
|
1631
|
+
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; }
|
|
1632
|
+
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; }
|
|
1624
1633
|
const defaultOptions$4 = {
|
|
1625
1634
|
propName: 'modalState',
|
|
1626
1635
|
isInitiallyOpen: false
|
|
1627
1636
|
};
|
|
1628
1637
|
const injectModalState$2 = options => Component => {
|
|
1629
|
-
const mergedOptions = _objectSpread$
|
|
1638
|
+
const mergedOptions = _objectSpread$1i(_objectSpread$1i({}, defaultOptions$4), options);
|
|
1630
1639
|
const WithModalState = props => {
|
|
1631
1640
|
const modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
|
|
1632
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1641
|
+
return jsxRuntime.jsx(Component, _objectSpread$1i(_objectSpread$1i({}, props), {}, {
|
|
1633
1642
|
[mergedOptions.propName]: modalState
|
|
1634
1643
|
}));
|
|
1635
1644
|
};
|
|
@@ -1638,17 +1647,17 @@ const injectModalState$2 = options => Component => {
|
|
|
1638
1647
|
};
|
|
1639
1648
|
var injectModalState$3 = injectModalState$2;
|
|
1640
1649
|
|
|
1641
|
-
function ownKeys$
|
|
1642
|
-
function _objectSpread$
|
|
1650
|
+
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; }
|
|
1651
|
+
function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1h(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1h(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1643
1652
|
const defaultOptions$3 = {
|
|
1644
1653
|
propName: 'toggleState',
|
|
1645
1654
|
isInitiallyOpen: false
|
|
1646
1655
|
};
|
|
1647
1656
|
const injectModalState = options => Component => {
|
|
1648
|
-
const mergedOptions = _objectSpread$
|
|
1657
|
+
const mergedOptions = _objectSpread$1h(_objectSpread$1h({}, defaultOptions$3), options);
|
|
1649
1658
|
const WithToggleState = props => {
|
|
1650
1659
|
const toggleState = uiKit.useToggleState(mergedOptions.isInitiallyOpen);
|
|
1651
|
-
return jsxRuntime.jsx(Component, _objectSpread$
|
|
1660
|
+
return jsxRuntime.jsx(Component, _objectSpread$1h(_objectSpread$1h({}, props), {}, {
|
|
1652
1661
|
[mergedOptions.propName]: toggleState
|
|
1653
1662
|
}));
|
|
1654
1663
|
};
|
|
@@ -1657,8 +1666,8 @@ const injectModalState = options => Component => {
|
|
|
1657
1666
|
};
|
|
1658
1667
|
var injectModalState$1 = injectModalState;
|
|
1659
1668
|
|
|
1660
|
-
function ownKeys$
|
|
1661
|
-
function _objectSpread$
|
|
1669
|
+
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; }
|
|
1670
|
+
function _objectSpread$1g(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$1g(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$1g(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1662
1671
|
const defaultOptions$2 = {
|
|
1663
1672
|
storageType: 'local',
|
|
1664
1673
|
segregateByUser: true
|
|
@@ -1676,7 +1685,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
|
|
|
1676
1685
|
const isNil = value => typeof value === 'undefined' || value === null;
|
|
1677
1686
|
const useStorage = (storageKey, initialStorageValue, options) => {
|
|
1678
1687
|
var _context;
|
|
1679
|
-
const mergedOptions = _objectSpread$
|
|
1688
|
+
const mergedOptions = _objectSpread$1g(_objectSpread$1g({}, defaultOptions$2), options);
|
|
1680
1689
|
const userId = applicationShellConnectors.useApplicationContext(context => context.user?.id);
|
|
1681
1690
|
const scopedStorageKey = _filterInstanceProperty__default["default"](_context = [mergedOptions.segregateByUser && userId, storageKey]).call(_context, Boolean).join('/');
|
|
1682
1691
|
const readFromStorage = React.useCallback(() => {
|
|
@@ -1721,8 +1730,8 @@ const useStorage = (storageKey, initialStorageValue, options) => {
|
|
|
1721
1730
|
};
|
|
1722
1731
|
var useStorage$1 = useStorage;
|
|
1723
1732
|
|
|
1724
|
-
function ownKeys$
|
|
1725
|
-
function _objectSpread$
|
|
1733
|
+
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; }
|
|
1734
|
+
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; }
|
|
1726
1735
|
const defaultOptions$1 = {
|
|
1727
1736
|
propName: 'storage',
|
|
1728
1737
|
storageKey: '',
|
|
@@ -1735,7 +1744,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1735
1744
|
* Options are being merged by spreading as destructuring and defaulting in
|
|
1736
1745
|
* argument position does not allow passing specification of option(s).
|
|
1737
1746
|
*/
|
|
1738
|
-
const mergedOptions = _objectSpread$
|
|
1747
|
+
const mergedOptions = _objectSpread$1f(_objectSpread$1f({}, defaultOptions$1), options);
|
|
1739
1748
|
const WithStorage = props => {
|
|
1740
1749
|
const _useStorage = useStorage$1(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
|
|
1741
1750
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
@@ -1749,7 +1758,7 @@ const injectStorage = options => WrappedComponent => {
|
|
|
1749
1758
|
readFromStorage
|
|
1750
1759
|
}
|
|
1751
1760
|
};
|
|
1752
|
-
return jsxRuntime.jsx(WrappedComponent, _objectSpread$
|
|
1761
|
+
return jsxRuntime.jsx(WrappedComponent, _objectSpread$1f(_objectSpread$1f({}, props), storageProp));
|
|
1753
1762
|
};
|
|
1754
1763
|
WithStorage.displayName = wrapDisplayName$1(WrappedComponent, 'WithStorage');
|
|
1755
1764
|
return WithStorage;
|
|
@@ -1794,8 +1803,8 @@ function useFormatLocalizedFieldToString() {
|
|
|
1794
1803
|
return formatLocalizedFieldToString;
|
|
1795
1804
|
}
|
|
1796
1805
|
|
|
1797
|
-
function ownKeys$
|
|
1798
|
-
function _objectSpread$
|
|
1806
|
+
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; }
|
|
1807
|
+
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; }
|
|
1799
1808
|
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 } } } };
|
|
1800
1809
|
const MC_RESOURCES_WITH_KEYS = {
|
|
1801
1810
|
ASSOCIATE_ROLE: 'ASSOCIATE_ROLE',
|
|
@@ -1870,7 +1879,7 @@ const DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES = {
|
|
|
1870
1879
|
[BASE_SKIP_RESOURCE_TYPES_VARIABLES.ZONE]: true
|
|
1871
1880
|
};
|
|
1872
1881
|
const getSkipVariables = resourceType => {
|
|
1873
|
-
return _objectSpread$
|
|
1882
|
+
return _objectSpread$1e(_objectSpread$1e({}, DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES), {}, {
|
|
1874
1883
|
[BASE_SKIP_RESOURCE_TYPES_VARIABLES[resourceType]]: false
|
|
1875
1884
|
});
|
|
1876
1885
|
};
|
|
@@ -1895,7 +1904,7 @@ const getQueryVariables = _ref2 => {
|
|
|
1895
1904
|
fieldValue,
|
|
1896
1905
|
id
|
|
1897
1906
|
});
|
|
1898
|
-
return _objectSpread$
|
|
1907
|
+
return _objectSpread$1e({
|
|
1899
1908
|
where
|
|
1900
1909
|
}, skipVariables);
|
|
1901
1910
|
};
|
|
@@ -1929,8 +1938,8 @@ const usePrevious = value => {
|
|
|
1929
1938
|
};
|
|
1930
1939
|
var usePrevious$1 = usePrevious;
|
|
1931
1940
|
|
|
1932
|
-
function ownKeys$
|
|
1933
|
-
function _objectSpread$
|
|
1941
|
+
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; }
|
|
1942
|
+
function _objectSpread$1d(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$1d(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$1d(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
1934
1943
|
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 } } } };
|
|
1935
1944
|
const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
1936
1945
|
var _context, _context2;
|
|
@@ -1941,7 +1950,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
1941
1950
|
offset: storesQueryResult.offset,
|
|
1942
1951
|
results: ((_context = storesQueryResult.results) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(store => {
|
|
1943
1952
|
var _context3, _context4;
|
|
1944
|
-
return _objectSpread$
|
|
1953
|
+
return _objectSpread$1d(_objectSpread$1d({}, store), {}, {
|
|
1945
1954
|
productSelections: ((_context3 = store.productSelections) == null ? void 0 : _bindInstanceProperty__default["default"](_context4 = Function.call).call(_context4, _filterInstanceProperty__default["default"](_context3), _context3))?.(productSelectionRef => Boolean(productSelectionRef.productSelection))
|
|
1946
1955
|
});
|
|
1947
1956
|
})
|
|
@@ -1949,7 +1958,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
|
|
|
1949
1958
|
};
|
|
1950
1959
|
const createQueryVariables$6 = ownProps => {
|
|
1951
1960
|
var _context5;
|
|
1952
|
-
return _objectSpread$
|
|
1961
|
+
return _objectSpread$1d(_objectSpread$1d({
|
|
1953
1962
|
limit: ownProps.limit,
|
|
1954
1963
|
offset: ownProps.offset,
|
|
1955
1964
|
sort: _sortInstanceProperty__default["default"](ownProps)
|
|
@@ -2029,36 +2038,8 @@ const useStoreKeysInDataFences = _ref => {
|
|
|
2029
2038
|
};
|
|
2030
2039
|
var useStoreKeysInDataFences$1 = useStoreKeysInDataFences;
|
|
2031
2040
|
|
|
2032
|
-
function
|
|
2033
|
-
|
|
2034
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
2035
|
-
didFormValidationFail = _useState2[0],
|
|
2036
|
-
setDidFormValidationFail = _useState2[1];
|
|
2037
|
-
const _useState3 = React.useState(false),
|
|
2038
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
2039
|
-
wasValidationRequested = _useState4[0],
|
|
2040
|
-
setWasValidationRequested = _useState4[1];
|
|
2041
|
-
const _useFormikContext = formik.useFormikContext(),
|
|
2042
|
-
dirty = _useFormikContext.dirty,
|
|
2043
|
-
isValid = _useFormikContext.isValid,
|
|
2044
|
-
isValidating = _useFormikContext.isValidating;
|
|
2045
|
-
React.useEffect(() => {
|
|
2046
|
-
if (dirty) setWasValidationRequested(false);
|
|
2047
|
-
}, [dirty]);
|
|
2048
|
-
React.useEffect(() => {
|
|
2049
|
-
if (isValidating) setWasValidationRequested(true);
|
|
2050
|
-
}, [isValidating]);
|
|
2051
|
-
React.useEffect(() => {
|
|
2052
|
-
if (wasValidationRequested && !isValid) {
|
|
2053
|
-
setDidFormValidationFail(true);
|
|
2054
|
-
setWasValidationRequested(false);
|
|
2055
|
-
}
|
|
2056
|
-
}, [isValid, setWasValidationRequested, setDidFormValidationFail, wasValidationRequested]);
|
|
2057
|
-
return Boolean(didFormValidationFail);
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
|
-
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; }
|
|
2061
|
-
function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1a(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2041
|
+
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; }
|
|
2042
|
+
function _objectSpread$1c(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1c(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1c(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2062
2043
|
const TEN_MINUTES_IN_MS = 600000;
|
|
2063
2044
|
const defaultOptions = {
|
|
2064
2045
|
reminderInterval: REMINDER_OPTION_1_DAY,
|
|
@@ -2086,7 +2067,7 @@ const useHasReminderExpired = readReminderInterval => {
|
|
|
2086
2067
|
};
|
|
2087
2068
|
const usePersistedReminder = function () {
|
|
2088
2069
|
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2089
|
-
const mergedOptions = _objectSpread$
|
|
2070
|
+
const mergedOptions = _objectSpread$1c(_objectSpread$1c({}, defaultOptions), options);
|
|
2090
2071
|
const _useStorage = useStorage$1(mergedOptions.storageKey, null),
|
|
2091
2072
|
_useStorage2 = _slicedToArray(_useStorage, 3),
|
|
2092
2073
|
initialChosenReminderInterval = _useStorage2[0],
|
|
@@ -2133,7 +2114,7 @@ const usePersistedReminder = function () {
|
|
|
2133
2114
|
};
|
|
2134
2115
|
var usePersistedReminder$1 = usePersistedReminder;
|
|
2135
2116
|
|
|
2136
|
-
var messages$
|
|
2117
|
+
var messages$N = reactIntl.defineMessages({
|
|
2137
2118
|
profileUpdated: {
|
|
2138
2119
|
id: 'NotificationText.profileUpdated',
|
|
2139
2120
|
description: 'Label for the notification header',
|
|
@@ -2151,28 +2132,28 @@ var messages$M = reactIntl.defineMessages({
|
|
|
2151
2132
|
}
|
|
2152
2133
|
});
|
|
2153
2134
|
|
|
2154
|
-
function ownKeys$
|
|
2155
|
-
function _objectSpread$
|
|
2135
|
+
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; }
|
|
2136
|
+
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; }
|
|
2156
2137
|
const LinkToProfile = props => {
|
|
2157
2138
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
2158
2139
|
to: "/account/profile",
|
|
2159
2140
|
children: props.children
|
|
2160
|
-
});
|
|
2141
|
+
}, "link");
|
|
2161
2142
|
};
|
|
2162
2143
|
LinkToProfile.displayName = 'LinkToProfile';
|
|
2163
2144
|
const getLinkToProfile = msg => jsxRuntime.jsx(LinkToProfile, {
|
|
2164
2145
|
children: msg
|
|
2165
|
-
});
|
|
2166
|
-
const getNewLine = () => jsxRuntime.jsx("br", {});
|
|
2146
|
+
}, "linkToProfile");
|
|
2147
|
+
const getNewLine = () => jsxRuntime.jsx("br", {}, crypto.randomUUID());
|
|
2167
2148
|
const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
2168
2149
|
children: [jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
2169
2150
|
scale: "xs",
|
|
2170
2151
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2171
2152
|
as: "p",
|
|
2172
2153
|
isBold: true,
|
|
2173
|
-
intlMessage: messages$
|
|
2154
|
+
intlMessage: messages$N.profileUpdated
|
|
2174
2155
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2175
|
-
intlMessage: _objectSpread$
|
|
2156
|
+
intlMessage: _objectSpread$1b(_objectSpread$1b({}, messages$N.addMoreInformation), {}, {
|
|
2176
2157
|
values: {
|
|
2177
2158
|
newline: getNewLine
|
|
2178
2159
|
}
|
|
@@ -2181,7 +2162,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2181
2162
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2182
2163
|
scale: "xs",
|
|
2183
2164
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2184
|
-
intlMessage: _objectSpread$
|
|
2165
|
+
intlMessage: _objectSpread$1b(_objectSpread$1b({}, messages$N.informationAndProfileLink), {}, {
|
|
2185
2166
|
values: {
|
|
2186
2167
|
newline: getNewLine,
|
|
2187
2168
|
link: getLinkToProfile
|
|
@@ -2264,8 +2245,11 @@ function usePendingRequests() {
|
|
|
2264
2245
|
pendingRequests = _useState2[0],
|
|
2265
2246
|
setPendingRequests = _useState2[1];
|
|
2266
2247
|
const isUnmountedRef = React.useRef(false);
|
|
2267
|
-
React.useEffect(() =>
|
|
2268
|
-
isUnmountedRef.current =
|
|
2248
|
+
React.useEffect(() => {
|
|
2249
|
+
isUnmountedRef.current = false;
|
|
2250
|
+
return () => {
|
|
2251
|
+
isUnmountedRef.current = true;
|
|
2252
|
+
};
|
|
2269
2253
|
}, []);
|
|
2270
2254
|
const change = React.useCallback(delta => {
|
|
2271
2255
|
// FIXME: isMounted is an anti pattern
|
|
@@ -2306,7 +2290,7 @@ const useEventCallback = (fn, dependencies) => {
|
|
|
2306
2290
|
};
|
|
2307
2291
|
var useEventCallback$1 = useEventCallback;
|
|
2308
2292
|
|
|
2309
|
-
var messages$
|
|
2293
|
+
var messages$M = reactIntl.defineMessages({
|
|
2310
2294
|
fallbackHint: {
|
|
2311
2295
|
id: 'KeyFallback.fallbackHint',
|
|
2312
2296
|
description: 'key fallback for a specified resource key (e.g name)',
|
|
@@ -2330,7 +2314,7 @@ const useLocalizedKeyFallback = () => {
|
|
|
2330
2314
|
return values => {
|
|
2331
2315
|
if (!values.resource) return null;
|
|
2332
2316
|
const localizedString = values.resource[values.localizedStringFieldName];
|
|
2333
|
-
const fallbackHintWithKey = intl.formatMessage(messages$
|
|
2317
|
+
const fallbackHintWithKey = intl.formatMessage(messages$M.fallbackHint, {
|
|
2334
2318
|
key: values.resource.key
|
|
2335
2319
|
});
|
|
2336
2320
|
if (!localizedString) return fallbackHintWithKey;
|
|
@@ -2344,8 +2328,8 @@ const useDebouncedPromiseCallback = (promiseCallback, wait) =>
|
|
|
2344
2328
|
React.useCallback(debounce__default["default"](promiseCallback, wait), [promiseCallback]);
|
|
2345
2329
|
var useDebouncedPromiseCallback$1 = useDebouncedPromiseCallback;
|
|
2346
2330
|
|
|
2347
|
-
function ownKeys$
|
|
2348
|
-
function _objectSpread$
|
|
2331
|
+
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; }
|
|
2332
|
+
function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1a(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2349
2333
|
const prepareMutableColumnProps = (columnConfig, mutableColumnProps) => {
|
|
2350
2334
|
const updatedColumnProps = {};
|
|
2351
2335
|
_forEachInstanceProperty__default["default"](mutableColumnProps).call(mutableColumnProps, columnProp => {
|
|
@@ -2365,14 +2349,14 @@ const retrieveColumnsWithCachedConfiguration = _ref => {
|
|
|
2365
2349
|
mutableColumnProps = _ref.mutableColumnProps;
|
|
2366
2350
|
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 => {
|
|
2367
2351
|
const initialColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedConfig.key);
|
|
2368
|
-
return _objectSpread$
|
|
2352
|
+
return _objectSpread$1a(_objectSpread$1a({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
|
|
2369
2353
|
});
|
|
2370
2354
|
};
|
|
2371
2355
|
const handleCacheUpdate = _ref2 => {
|
|
2372
2356
|
let update = _ref2.update,
|
|
2373
2357
|
cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
|
|
2374
2358
|
updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
|
|
2375
|
-
return updateCachedTableConfiguration(_objectSpread$
|
|
2359
|
+
return updateCachedTableConfiguration(_objectSpread$1a(_objectSpread$1a({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
|
|
2376
2360
|
};
|
|
2377
2361
|
|
|
2378
2362
|
// Signature:
|
|
@@ -2401,7 +2385,7 @@ const usePersistedTableConfiguration = props => {
|
|
|
2401
2385
|
return {
|
|
2402
2386
|
columnsConfig: _mapInstanceProperty__default["default"](initialVisibleColumnKeys).call(initialVisibleColumnKeys, visibleColumnKey => {
|
|
2403
2387
|
const visibleColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, columnConfig => columnConfig.key === visibleColumnKey);
|
|
2404
|
-
return _objectSpread$
|
|
2388
|
+
return _objectSpread$1a({
|
|
2405
2389
|
key: visibleColumnKey
|
|
2406
2390
|
}, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
|
|
2407
2391
|
}),
|
|
@@ -2464,21 +2448,21 @@ const useProductSelectionsTotalFetcher = props => {
|
|
|
2464
2448
|
};
|
|
2465
2449
|
var useProductSelectionsTotalFetcher$1 = useProductSelectionsTotalFetcher;
|
|
2466
2450
|
|
|
2467
|
-
function ownKeys$
|
|
2468
|
-
function _objectSpread$
|
|
2451
|
+
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; }
|
|
2452
|
+
function _objectSpread$19(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$19(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$19(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2469
2453
|
|
|
2470
2454
|
// eslint-disable-next-line import/prefer-default-export
|
|
2471
2455
|
const convertProductSelectionsFromGraphQl = productSelections => {
|
|
2472
2456
|
var _context;
|
|
2473
|
-
return productSelections?.results && _objectSpread$
|
|
2474
|
-
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$
|
|
2457
|
+
return productSelections?.results && _objectSpread$19(_objectSpread$19({}, productSelections), {}, {
|
|
2458
|
+
results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$19({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
2475
2459
|
from: 'nameAllLocales',
|
|
2476
2460
|
to: 'name'
|
|
2477
2461
|
}])))
|
|
2478
2462
|
});
|
|
2479
2463
|
};
|
|
2480
2464
|
|
|
2481
|
-
var FetchProductSelections = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductSelections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, defaultValue: { kind: "NullValue" }, 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" } } } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, defaultValue: { kind: "NullValue" }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, 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: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, 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: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastModifiedAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end:
|
|
2465
|
+
var FetchProductSelections = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductSelections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, defaultValue: { kind: "NullValue" }, 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" } } } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, defaultValue: { kind: "NullValue" }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, 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: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, 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: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastModifiedAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 424, source: { body: "query FetchProductSelections(\n $limit: Int = null\n $offset: Int = null\n $sort: [String!] = null\n $where: String = null\n) {\n productSelections(\n limit: $limit\n offset: $offset\n sort: $sort\n where: $where\n ) {\n total\n count\n offset\n results {\n id\n version\n key\n nameAllLocales {\n locale\n value\n }\n createdAt\n lastModifiedAt\n mode\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
2482
2466
|
const createQueryVariables$5 = function () {
|
|
2483
2467
|
let ownProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2484
2468
|
return {
|
|
@@ -2514,841 +2498,244 @@ const useProductSelectionsFetcher = props => {
|
|
|
2514
2498
|
};
|
|
2515
2499
|
var useProductSelectionsFetcher$1 = useProductSelectionsFetcher;
|
|
2516
2500
|
|
|
2517
|
-
const
|
|
2518
|
-
|
|
2519
|
-
|
|
2501
|
+
const setToArray = function () {
|
|
2502
|
+
let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
2503
|
+
return `id in (${_mapInstanceProperty__default["default"](values).call(values, value => `"${value}"`).join(', ')})`;
|
|
2504
|
+
};
|
|
2520
2505
|
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
* { en: 'Hello' } -> true
|
|
2525
|
-
* 'Hello' -> false
|
|
2526
|
-
*/
|
|
2506
|
+
function capitalizeFirst(text) {
|
|
2507
|
+
return text.charAt(0).toUpperCase() + _sliceInstanceProperty__default["default"](text).call(text, 1);
|
|
2508
|
+
}
|
|
2527
2509
|
|
|
2528
|
-
const
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2510
|
+
const PRODUCT_STATUSES = {
|
|
2511
|
+
PUBLISHED: 'published',
|
|
2512
|
+
UNPUBLISHED: 'unpublished',
|
|
2513
|
+
MODIFIED: 'modified'
|
|
2532
2514
|
};
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$16(_objectSpread$16({}, customFields), {}, {
|
|
2542
|
-
[customField.name]: customField.value
|
|
2543
|
-
}), {});
|
|
2515
|
+
const FILTER_TYPES = {
|
|
2516
|
+
lessThan: 'lessThan',
|
|
2517
|
+
moreThan: 'moreThan',
|
|
2518
|
+
equalTo: 'equalTo',
|
|
2519
|
+
range: 'range',
|
|
2520
|
+
missing: 'missing',
|
|
2521
|
+
missingIn: 'missingIn',
|
|
2522
|
+
in: 'in'
|
|
2544
2523
|
};
|
|
2524
|
+
const FIELD_TYPES = {
|
|
2525
|
+
Money: 'Money',
|
|
2526
|
+
LocalizedString: 'LocalizedString',
|
|
2527
|
+
Time: 'Time',
|
|
2528
|
+
DateTime: 'DateTime',
|
|
2529
|
+
Boolean: 'Boolean',
|
|
2530
|
+
String: 'String',
|
|
2531
|
+
Enum: 'Enum',
|
|
2532
|
+
LocalizedEnum: 'LocalizedEnum',
|
|
2533
|
+
Number: 'Number',
|
|
2534
|
+
Date: 'Date',
|
|
2535
|
+
Reference: 'Reference',
|
|
2536
|
+
Set: 'Set'
|
|
2537
|
+
};
|
|
2538
|
+
const PRECISION_TYPES = {
|
|
2539
|
+
highPrecision: 'highPrecision',
|
|
2540
|
+
centPrecision: 'centPrecision'
|
|
2541
|
+
};
|
|
2542
|
+
const ERROR_CODES = {
|
|
2543
|
+
semanticError: 'SemanticError',
|
|
2544
|
+
invalidInput: 'InvalidInput'
|
|
2545
|
+
};
|
|
2546
|
+
const DefaultPageSizes = [20, 50, 100];
|
|
2547
|
+
DefaultPageSizes[0];
|
|
2545
2548
|
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
* `{ id, obj: { id, name } }`
|
|
2555
|
-
*/
|
|
2556
|
-
function transformLocalizedFieldsForCategory(category) {
|
|
2557
|
-
var _context;
|
|
2558
|
-
let transformationOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [{
|
|
2559
|
-
from: 'nameAllLocales',
|
|
2560
|
-
to: 'name'
|
|
2561
|
-
}];
|
|
2562
|
-
const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
|
|
2563
|
-
const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
|
|
2564
|
-
const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
|
|
2565
|
-
return _objectSpread$16(_objectSpread$16(_objectSpread$16({}, transformedData), parent ? {
|
|
2566
|
-
parent
|
|
2567
|
-
} : {}), ancestors ? {
|
|
2568
|
-
ancestors
|
|
2569
|
-
} : {});
|
|
2570
|
-
}
|
|
2571
|
-
function transformLocalizedFieldsForCartDiscount(cartDiscount) {
|
|
2572
|
-
const transformationOptions = [{
|
|
2573
|
-
from: 'nameAllLocales',
|
|
2574
|
-
to: 'name'
|
|
2575
|
-
}];
|
|
2576
|
-
return l10n.applyTransformedLocalizedFields(cartDiscount, transformationOptions);
|
|
2549
|
+
const regexpData = /^data-/;
|
|
2550
|
+
function filterDataAttributes(obj) {
|
|
2551
|
+
var _context, _context2;
|
|
2552
|
+
return _reduceInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](_context2 = _Object$keys__default["default"](obj)).call(_context2, p => regexpData.test(p))).call(_context, (acc, p) => {
|
|
2553
|
+
// eslint-disable-next-line no-param-reassign
|
|
2554
|
+
acc[p] = obj[p];
|
|
2555
|
+
return acc;
|
|
2556
|
+
}, {});
|
|
2577
2557
|
}
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
currencyCode: tier.price.currencyCode
|
|
2584
|
-
} : undefined,
|
|
2585
|
-
minimumCentAmount: tier.minimumCentAmount,
|
|
2586
|
-
value: tier.value || undefined,
|
|
2587
|
-
priceFunction: tier.priceFunction ? {
|
|
2588
|
-
function: tier.priceFunction.function,
|
|
2589
|
-
currencyCode: tier.priceFunction.currencyCode
|
|
2590
|
-
} : undefined,
|
|
2591
|
-
score: tier.score
|
|
2592
|
-
}
|
|
2593
|
-
}], []);
|
|
2558
|
+
|
|
2559
|
+
const invalidValues$1 = [null, undefined, ''];
|
|
2560
|
+
function isEmpty$2(_ref) {
|
|
2561
|
+
let value = _ref.value;
|
|
2562
|
+
return _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value) || _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value.from) && _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value.to);
|
|
2594
2563
|
}
|
|
2595
2564
|
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
* GraphQL or any other plugin/app needs this functionality. Until
|
|
2602
|
-
* then this serves as a collective set of requirements before
|
|
2603
|
-
* prematurely adding a not fully working set of conversions to the
|
|
2604
|
-
* JS SDK.
|
|
2605
|
-
*/
|
|
2565
|
+
const invalidValues = [null, undefined, ''];
|
|
2566
|
+
function validateSingleFilter(_ref) {
|
|
2567
|
+
let value = _ref.value;
|
|
2568
|
+
return _includesInstanceProperty__default["default"](invalidValues).call(invalidValues, value);
|
|
2569
|
+
}
|
|
2606
2570
|
|
|
2607
|
-
const
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
case 'money':
|
|
2622
|
-
case 'number':
|
|
2623
|
-
case 'text':
|
|
2624
|
-
case 'time':
|
|
2625
|
-
return {
|
|
2626
|
-
[attribute.type.name]: {}
|
|
2627
|
-
};
|
|
2628
|
-
case 'enum':
|
|
2629
|
-
case 'lenum':
|
|
2630
|
-
return {
|
|
2631
|
-
[attribute.type.name]: {
|
|
2632
|
-
values: []
|
|
2633
|
-
}
|
|
2634
|
-
};
|
|
2635
|
-
case 'reference':
|
|
2636
|
-
{
|
|
2637
|
-
return {
|
|
2638
|
-
[attribute.type.name]: {
|
|
2639
|
-
referenceTypeId: attribute.type.referenceTypeId
|
|
2640
|
-
}
|
|
2641
|
-
};
|
|
2642
|
-
}
|
|
2643
|
-
default:
|
|
2644
|
-
return attribute.type;
|
|
2571
|
+
const dateFormatDayStart$1 = 'YYYY-MM-DDT00:00:00.000';
|
|
2572
|
+
const dateFormatDayEnd$1 = 'YYYY-MM-DDT23:59:59.999';
|
|
2573
|
+
const getDateTimeInUTC = (date, timezone, format) => {
|
|
2574
|
+
const dateFormat = 'YYYY-MM-DDTHH:mm:ss.SSS';
|
|
2575
|
+
const momentDate = moment__default["default"](date);
|
|
2576
|
+
// check if the date is date only or datetime
|
|
2577
|
+
const noTimeSpecified = momentDate.hours() === 0 && momentDate.minutes() === 0 && momentDate.seconds() === 0;
|
|
2578
|
+
// if it's a date then convert it to UTC datetime based on timezone
|
|
2579
|
+
if (noTimeSpecified) {
|
|
2580
|
+
const offset = moment__default["default"](date).tz(timezone)?.utcOffset() || 0;
|
|
2581
|
+
const formattedDate = momentDate.format(format);
|
|
2582
|
+
const formattedDateWithOffset = moment__default["default"](formattedDate).add(offset, 'minutes').format(dateFormat);
|
|
2583
|
+
// console.log(formattedDateWithOffset);
|
|
2584
|
+
return formattedDateWithOffset;
|
|
2645
2585
|
}
|
|
2586
|
+
// if it's a datetime we assume that it's already in UTC
|
|
2587
|
+
// and just return it
|
|
2588
|
+
return date;
|
|
2646
2589
|
};
|
|
2590
|
+
function dateTransformer$1(filterKey, filters) {
|
|
2591
|
+
let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator$1;
|
|
2592
|
+
const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref => {
|
|
2593
|
+
let type = _ref.type,
|
|
2594
|
+
value = _ref.value,
|
|
2595
|
+
timezone = _ref.timezone;
|
|
2596
|
+
if (!filterValidator({
|
|
2597
|
+
type,
|
|
2598
|
+
value
|
|
2599
|
+
})) return '';
|
|
2600
|
+
switch (type) {
|
|
2601
|
+
case FILTER_TYPES.lessThan:
|
|
2602
|
+
return `${filterKey} < "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"`;
|
|
2603
|
+
case FILTER_TYPES.moreThan:
|
|
2604
|
+
return `${filterKey} > "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}"`;
|
|
2605
|
+
case FILTER_TYPES.equalTo:
|
|
2606
|
+
return oneLine__default["default"]`
|
|
2607
|
+
(${filterKey} >= "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"
|
|
2608
|
+
and ${filterKey} <= "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}")
|
|
2609
|
+
`;
|
|
2610
|
+
case FILTER_TYPES.range:
|
|
2611
|
+
return oneLine__default["default"]`
|
|
2612
|
+
(${filterKey} >= "${getDateTimeInUTC(value.from, timezone, dateFormatDayStart$1)}"
|
|
2613
|
+
and ${filterKey} <= "${getDateTimeInUTC(value.to, timezone, dateFormatDayEnd$1)}")
|
|
2614
|
+
`;
|
|
2615
|
+
default:
|
|
2616
|
+
return '';
|
|
2617
|
+
}
|
|
2618
|
+
});
|
|
2647
2619
|
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2620
|
+
// The separator is and `or` as they are the same filter
|
|
2621
|
+
const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(' or ');
|
|
2622
|
+
|
|
2623
|
+
/* The parenthesis involing the `queryString` are needed since they are all part of the
|
|
2624
|
+
* same filter so we need something to work with
|
|
2625
|
+
* (
|
|
2626
|
+
* (createdAt >= "2018-04-25T00:00:00.000+02:00" and createdAt <= "2018-04-25T23:59:59.999+02:00") o
|
|
2627
|
+
* (createdAt >= "2018-02-15T00:00:00.000+01:00" and createdAt <= "2018-02-15T23:59:59.999+01:00")
|
|
2628
|
+
* ) or some_more_filters
|
|
2629
|
+
*/
|
|
2630
|
+
return queryString === '' ? null : `(${queryString})`;
|
|
2631
|
+
}
|
|
2632
|
+
function defaultFilterValidator$1(_ref2) {
|
|
2633
|
+
let type = _ref2.type,
|
|
2634
|
+
value = _ref2.value;
|
|
2635
|
+
if (type !== 'range' && (validateSingleFilter({
|
|
2636
|
+
value
|
|
2637
|
+
}) || !moment__default["default"](value).isValid())) return false;
|
|
2638
|
+
if (type === 'range' && (isEmpty$2({
|
|
2639
|
+
value
|
|
2640
|
+
}) || !moment__default["default"](value.from).isValid() || !moment__default["default"](value.to).isValid())) return false;
|
|
2641
|
+
return true;
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
var localizedTextTransformer = localizedString => {
|
|
2645
|
+
var _context;
|
|
2646
|
+
return _mapInstanceProperty__default["default"](_context = _Object$keys__default["default"](localizedString)).call(_context, locale => `${locale} = "${localizedString[locale]}"`).join(' and ');
|
|
2647
|
+
};
|
|
2648
|
+
|
|
2649
|
+
const getCentAmountClause = (value, operator, locale) => `centAmount ${operator} ${uiKit.MoneyInput.convertToMoneyValue(value, locale).centAmount}`;
|
|
2650
|
+
function moneyTransformer(value, option, locale) {
|
|
2651
|
+
const clauses = [];
|
|
2652
|
+
if (option === FILTER_TYPES.range) {
|
|
2653
|
+
clauses[0] = `currencyCode = "${value.from.currencyCode}"`;
|
|
2654
|
+
clauses[1] = getCentAmountClause(value.from, '>=', locale);
|
|
2655
|
+
clauses[2] = getCentAmountClause(value.to, '<=', locale);
|
|
2656
|
+
return clauses.join(' and ');
|
|
2657
|
+
}
|
|
2658
|
+
clauses[0] = `currencyCode = "${value.currencyCode}"`;
|
|
2659
|
+
switch (option) {
|
|
2660
|
+
case FILTER_TYPES.lessThan:
|
|
2661
|
+
clauses[1] = getCentAmountClause(value, '<', locale);
|
|
2662
|
+
break;
|
|
2663
|
+
case FILTER_TYPES.moreThan:
|
|
2664
|
+
clauses[1] = getCentAmountClause(value, '>', locale);
|
|
2665
|
+
break;
|
|
2666
|
+
case FILTER_TYPES.equalTo:
|
|
2667
|
+
clauses[1] = getCentAmountClause(value, '=', locale);
|
|
2668
|
+
break;
|
|
2672
2669
|
default:
|
|
2673
|
-
|
|
2670
|
+
return '';
|
|
2674
2671
|
}
|
|
2675
|
-
|
|
2672
|
+
return clauses.join(' and ');
|
|
2673
|
+
}
|
|
2676
2674
|
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2675
|
+
const formatTime = 'HH:mm:ss.SSS';
|
|
2676
|
+
|
|
2677
|
+
/* TimeInput only allows HH:mm:ss and adds the seconds as 00 and
|
|
2678
|
+
* the milliseconds always as 000.
|
|
2679
|
+
* This function returns the same time with the
|
|
2680
2680
|
*/
|
|
2681
|
-
const
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
};
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2681
|
+
const getEndOfSecond = value => moment__default["default"](value, formatTime).endOf('minute').format(formatTime);
|
|
2682
|
+
const defaultFilterValidator = _ref => {
|
|
2683
|
+
let type = _ref.type,
|
|
2684
|
+
value = _ref.value;
|
|
2685
|
+
if (type !== FILTER_TYPES.range && validateSingleFilter({
|
|
2686
|
+
value
|
|
2687
|
+
})) return false;
|
|
2688
|
+
if (type === FILTER_TYPES.range && isEmpty$2({
|
|
2689
|
+
value
|
|
2690
|
+
})) return false;
|
|
2691
|
+
return true;
|
|
2692
|
+
};
|
|
2693
|
+
const timeTransformer = function (filterKey, filters) {
|
|
2694
|
+
let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator;
|
|
2695
|
+
const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref2 => {
|
|
2696
|
+
let type = _ref2.type,
|
|
2697
|
+
value = _ref2.value;
|
|
2698
|
+
if (!filterValidator({
|
|
2699
|
+
type,
|
|
2700
|
+
value
|
|
2701
|
+
})) return '';
|
|
2702
|
+
switch (type) {
|
|
2703
|
+
case FILTER_TYPES.lessThan:
|
|
2704
|
+
return `${filterKey} < "${value}"`;
|
|
2705
|
+
case FILTER_TYPES.moreThan:
|
|
2706
|
+
return `${filterKey} > "${value}"`;
|
|
2707
|
+
case FILTER_TYPES.equalTo:
|
|
2708
|
+
return oneLine__default["default"]`
|
|
2709
|
+
(${filterKey} >= "${value}"
|
|
2710
|
+
and ${filterKey} <= "${getEndOfSecond(value)}")
|
|
2711
|
+
`;
|
|
2712
|
+
case FILTER_TYPES.range:
|
|
2713
|
+
return oneLine__default["default"]`
|
|
2714
|
+
(${filterKey} >= "${value.from}"
|
|
2715
|
+
and ${filterKey} <= "${getEndOfSecond(value.to)}")
|
|
2716
|
+
`;
|
|
2717
|
+
default:
|
|
2718
|
+
return '';
|
|
2702
2719
|
}
|
|
2703
|
-
};
|
|
2720
|
+
});
|
|
2721
|
+
|
|
2722
|
+
// The separator is and `or` as they are the same filter
|
|
2723
|
+
const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(' or ');
|
|
2724
|
+
|
|
2725
|
+
/* The parenthesis involing the `queryString` are needed since they are all part of the
|
|
2726
|
+
* same filter so we need something to work with
|
|
2727
|
+
* (
|
|
2728
|
+
* (pickUpTime >= "12:00" and pickUpTime <= "13:00") o
|
|
2729
|
+
* (pickUpTime >= "14:00" and pickUpTime <= "15:00")
|
|
2730
|
+
* ) or some_more_filters
|
|
2731
|
+
*/
|
|
2732
|
+
return queryString === '' ? null : `(${queryString})`;
|
|
2704
2733
|
};
|
|
2705
2734
|
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
*/
|
|
2711
|
-
const convertAction = (actionName, actionPayload) => {
|
|
2712
|
-
var _context3, _context4, _context5, _context6, _context7;
|
|
2713
|
-
const getNameFromPayload = payload => {
|
|
2714
|
-
// changeName for `Organizations`
|
|
2715
|
-
if (typeof payload.name === 'string') return payload;
|
|
2716
|
-
// changeName for `UserProfile`
|
|
2717
|
-
if (payload.firstName || payload.lastName) return payload;
|
|
2718
|
-
// assume `changeName` for LocalizedString type
|
|
2719
|
-
return {
|
|
2720
|
-
name: l10n.transformLocalizedStringToLocalizedField(payload.name)
|
|
2721
|
-
};
|
|
2722
|
-
};
|
|
2723
|
-
switch (actionName) {
|
|
2724
|
-
case 'changeName':
|
|
2725
|
-
return {
|
|
2726
|
-
[actionName]: getNameFromPayload(actionPayload)
|
|
2727
|
-
};
|
|
2728
|
-
case 'setDescription':
|
|
2729
|
-
case 'changeDescription':
|
|
2730
|
-
return {
|
|
2731
|
-
[actionName]: {
|
|
2732
|
-
description: getIsLocalizedString(actionPayload.description) ? l10n.transformLocalizedStringToLocalizedField(actionPayload.description) : actionPayload.description
|
|
2733
|
-
}
|
|
2734
|
-
};
|
|
2735
|
-
case 'setLocalizedDescription':
|
|
2736
|
-
return {
|
|
2737
|
-
[actionName]: {
|
|
2738
|
-
localizedDescription: l10n.transformLocalizedStringToLocalizedField(actionPayload.localizedDescription)
|
|
2739
|
-
}
|
|
2740
|
-
};
|
|
2741
|
-
case 'setName':
|
|
2742
|
-
return {
|
|
2743
|
-
[actionName]: getNameFromPayload(actionPayload)
|
|
2744
|
-
};
|
|
2745
|
-
case 'setLocalizedName':
|
|
2746
|
-
return {
|
|
2747
|
-
[actionName]: {
|
|
2748
|
-
localizedName: l10n.transformLocalizedStringToLocalizedField(actionPayload.localizedName)
|
|
2749
|
-
}
|
|
2750
|
-
};
|
|
2751
|
-
case 'setLineItemCustomField':
|
|
2752
|
-
return {
|
|
2753
|
-
[actionName]: {
|
|
2754
|
-
lineItemId: actionPayload.lineItemId,
|
|
2755
|
-
name: actionPayload.name,
|
|
2756
|
-
value: _JSON$stringify__default["default"](actionPayload.value)
|
|
2757
|
-
}
|
|
2758
|
-
};
|
|
2759
|
-
case 'setCustomLineItemCustomField':
|
|
2760
|
-
return {
|
|
2761
|
-
[actionName]: {
|
|
2762
|
-
customLineItemId: actionPayload.customLineItemId,
|
|
2763
|
-
name: actionPayload.name,
|
|
2764
|
-
value: _JSON$stringify__default["default"](actionPayload.value)
|
|
2765
|
-
}
|
|
2766
|
-
};
|
|
2767
|
-
case 'setCustomField':
|
|
2768
|
-
return {
|
|
2769
|
-
[actionName]: {
|
|
2770
|
-
name: actionPayload.name,
|
|
2771
|
-
value: _JSON$stringify__default["default"](actionPayload.value)
|
|
2772
|
-
}
|
|
2773
|
-
};
|
|
2774
|
-
case 'setCustomType':
|
|
2775
|
-
return {
|
|
2776
|
-
[actionName]: {
|
|
2777
|
-
typeId: actionPayload.type?.id,
|
|
2778
|
-
fields: actionPayload.fields ? _mapInstanceProperty__default["default"](_context3 = _Object$entries__default["default"](actionPayload.fields)).call(_context3, _ref => {
|
|
2779
|
-
let _ref2 = _slicedToArray(_ref, 2),
|
|
2780
|
-
customField = _ref2[0],
|
|
2781
|
-
value = _ref2[1];
|
|
2782
|
-
return {
|
|
2783
|
-
name: customField,
|
|
2784
|
-
value: _JSON$stringify__default["default"](value)
|
|
2785
|
-
};
|
|
2786
|
-
}) : undefined
|
|
2787
|
-
}
|
|
2788
|
-
};
|
|
2789
|
-
case 'removeLocation':
|
|
2790
|
-
return {
|
|
2791
|
-
[actionName]: {
|
|
2792
|
-
location: {
|
|
2793
|
-
country: actionPayload.location.country
|
|
2794
|
-
}
|
|
2795
|
-
}
|
|
2796
|
-
};
|
|
2797
|
-
case 'addLocation':
|
|
2798
|
-
return {
|
|
2799
|
-
[actionName]: {
|
|
2800
|
-
location: {
|
|
2801
|
-
country: actionPayload.location.country
|
|
2802
|
-
}
|
|
2803
|
-
}
|
|
2804
|
-
};
|
|
2805
|
-
case 'setGeoLocation':
|
|
2806
|
-
return {
|
|
2807
|
-
[actionName]: actionPayload?.geoLocation ? {
|
|
2808
|
-
geoLocation: {
|
|
2809
|
-
type: 'Point',
|
|
2810
|
-
coordinates: [_parseFloat__default["default"](actionPayload.geoLocation?.longitude), _parseFloat__default["default"](actionPayload.geoLocation?.latitude)]
|
|
2811
|
-
}
|
|
2812
|
-
} : {
|
|
2813
|
-
undefined
|
|
2814
|
-
}
|
|
2815
|
-
};
|
|
2816
|
-
case 'changeLabel':
|
|
2817
|
-
return {
|
|
2818
|
-
changeLabel: {
|
|
2819
|
-
attributeName: actionPayload.attributeName,
|
|
2820
|
-
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.label)
|
|
2821
|
-
}
|
|
2822
|
-
};
|
|
2823
|
-
case 'setInputTip':
|
|
2824
|
-
return {
|
|
2825
|
-
setInputTip: {
|
|
2826
|
-
attributeName: actionPayload.attributeName,
|
|
2827
|
-
inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.inputTip)
|
|
2828
|
-
}
|
|
2829
|
-
};
|
|
2830
|
-
case 'addAttributeDefinition':
|
|
2831
|
-
return {
|
|
2832
|
-
[actionName]: {
|
|
2833
|
-
attributeDefinition: _objectSpread$16(_objectSpread$16({}, actionPayload.attribute), {}, {
|
|
2834
|
-
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
|
|
2835
|
-
inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
|
|
2836
|
-
type: createAttributeTypeValue(actionPayload.attribute)
|
|
2837
|
-
})
|
|
2838
|
-
}
|
|
2839
|
-
};
|
|
2840
|
-
case 'replaceTaxRate':
|
|
2841
|
-
return {
|
|
2842
|
-
[actionName]: {
|
|
2843
|
-
taxRate: {
|
|
2844
|
-
name: actionPayload.taxRate.name,
|
|
2845
|
-
country: actionPayload.taxRate.country,
|
|
2846
|
-
includedInPrice: actionPayload.taxRate.includedInPrice,
|
|
2847
|
-
amount: actionPayload.taxRate.amount,
|
|
2848
|
-
state: actionPayload.taxRate.state,
|
|
2849
|
-
key: actionPayload.taxRate.key,
|
|
2850
|
-
subRates: actionPayload.taxRate.subRates
|
|
2851
|
-
},
|
|
2852
|
-
taxRateId: actionPayload.taxRateId
|
|
2853
|
-
}
|
|
2854
|
-
};
|
|
2855
|
-
case 'addZone':
|
|
2856
|
-
return {
|
|
2857
|
-
[actionName]: {
|
|
2858
|
-
zone: {
|
|
2859
|
-
id: actionPayload.zone.id,
|
|
2860
|
-
typeId: actionPayload.zone.typeId
|
|
2861
|
-
}
|
|
2862
|
-
}
|
|
2863
|
-
};
|
|
2864
|
-
case 'removeZone':
|
|
2865
|
-
return {
|
|
2866
|
-
[actionName]: {
|
|
2867
|
-
zone: {
|
|
2868
|
-
id: actionPayload.zone.id,
|
|
2869
|
-
typeId: actionPayload.zone.typeId
|
|
2870
|
-
}
|
|
2871
|
-
}
|
|
2872
|
-
};
|
|
2873
|
-
case 'changeTaxCategory':
|
|
2874
|
-
return {
|
|
2875
|
-
[actionName]: {
|
|
2876
|
-
taxCategory: {
|
|
2877
|
-
id: actionPayload.taxCategory.id,
|
|
2878
|
-
typeId: actionPayload.taxCategory.typeId
|
|
2879
|
-
}
|
|
2880
|
-
}
|
|
2881
|
-
};
|
|
2882
|
-
case 'addShippingRate':
|
|
2883
|
-
return {
|
|
2884
|
-
[actionName]: {
|
|
2885
|
-
zone: {
|
|
2886
|
-
id: actionPayload.zone.id,
|
|
2887
|
-
typeId: actionPayload.zone.typeId
|
|
2888
|
-
},
|
|
2889
|
-
shippingRate: {
|
|
2890
|
-
price: {
|
|
2891
|
-
centAmount: actionPayload.shippingRate.price.centAmount,
|
|
2892
|
-
currencyCode: actionPayload.shippingRate.price.currencyCode
|
|
2893
|
-
},
|
|
2894
|
-
freeAbove: actionPayload.shippingRate.freeAbove ? {
|
|
2895
|
-
centAmount: actionPayload.shippingRate.freeAbove.centAmount,
|
|
2896
|
-
currencyCode: actionPayload.shippingRate.freeAbove.currencyCode
|
|
2897
|
-
} : undefined,
|
|
2898
|
-
tiers: actionPayload.shippingRate.tiers ? mapShippingRateTierToGraphQL(actionPayload.shippingRate.tiers) : undefined
|
|
2899
|
-
}
|
|
2900
|
-
}
|
|
2901
|
-
};
|
|
2902
|
-
case 'removeShippingRate':
|
|
2903
|
-
return {
|
|
2904
|
-
[actionName]: {
|
|
2905
|
-
zone: {
|
|
2906
|
-
id: actionPayload.zone.id,
|
|
2907
|
-
typeId: actionPayload.zone.typeId
|
|
2908
|
-
},
|
|
2909
|
-
shippingRate: {
|
|
2910
|
-
price: {
|
|
2911
|
-
centAmount: actionPayload.shippingRate.price.centAmount,
|
|
2912
|
-
currencyCode: actionPayload.shippingRate.price.currencyCode
|
|
2913
|
-
},
|
|
2914
|
-
freeAbove: actionPayload.shippingRate.freeAbove ? {
|
|
2915
|
-
centAmount: actionPayload.shippingRate.freeAbove.centAmount,
|
|
2916
|
-
currencyCode: actionPayload.shippingRate.freeAbove.currencyCode
|
|
2917
|
-
} : undefined,
|
|
2918
|
-
tiers: actionPayload.shippingRate.tiers ? mapShippingRateTierToGraphQL(actionPayload.shippingRate.tiers) : undefined
|
|
2919
|
-
}
|
|
2920
|
-
}
|
|
2921
|
-
};
|
|
2922
|
-
case 'changeValue':
|
|
2923
|
-
return convertChangeValueAction(actionPayload);
|
|
2924
|
-
// product-types -> attributes -> enum
|
|
2925
|
-
case 'addLocalizedEnumValue':
|
|
2926
|
-
return {
|
|
2927
|
-
[actionName]: {
|
|
2928
|
-
attributeName: actionPayload.attributeName,
|
|
2929
|
-
value: _objectSpread$16(_objectSpread$16({}, actionPayload.value), {}, {
|
|
2930
|
-
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
|
|
2931
|
-
})
|
|
2932
|
-
}
|
|
2933
|
-
};
|
|
2934
|
-
case 'changeLocalizedEnumValueLabel':
|
|
2935
|
-
return {
|
|
2936
|
-
[actionName]: {
|
|
2937
|
-
attributeName: actionPayload.attributeName,
|
|
2938
|
-
newValue: _objectSpread$16(_objectSpread$16({}, actionPayload.newValue), {}, {
|
|
2939
|
-
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
|
|
2940
|
-
})
|
|
2941
|
-
}
|
|
2942
|
-
};
|
|
2943
|
-
case 'setShippingRateInputType':
|
|
2944
|
-
return {
|
|
2945
|
-
[actionName]: {
|
|
2946
|
-
shippingRateInputType: actionPayload.shippingRateInputType?.type ? {
|
|
2947
|
-
[actionPayload.shippingRateInputType.type]: {
|
|
2948
|
-
values: actionPayload.shippingRateInputType.type === 'CartClassification' ? _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](actionPayload.shippingRateInputType)).call(_context4, value => ({
|
|
2949
|
-
key: value.key,
|
|
2950
|
-
label: value.allLocaleLabels
|
|
2951
|
-
})) : undefined
|
|
2952
|
-
}
|
|
2953
|
-
} : undefined
|
|
2954
|
-
}
|
|
2955
|
-
};
|
|
2956
|
-
case 'addCustomLineItem':
|
|
2957
|
-
{
|
|
2958
|
-
return {
|
|
2959
|
-
[actionName]: {
|
|
2960
|
-
slug: actionPayload.slug,
|
|
2961
|
-
quantity: actionPayload.quantity,
|
|
2962
|
-
name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
|
|
2963
|
-
taxCategory: actionPayload.taxCategory,
|
|
2964
|
-
money: {
|
|
2965
|
-
[actionPayload.money.type]: _objectSpread$16({
|
|
2966
|
-
centAmount: actionPayload.money.centAmount,
|
|
2967
|
-
currencyCode: actionPayload.money.currencyCode
|
|
2968
|
-
}, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
|
|
2969
|
-
preciseAmount: actionPayload.money.preciseAmount,
|
|
2970
|
-
fractionDigits: actionPayload.money.fractionDigits
|
|
2971
|
-
})
|
|
2972
|
-
}
|
|
2973
|
-
}
|
|
2974
|
-
};
|
|
2975
|
-
}
|
|
2976
|
-
case 'setDataFences':
|
|
2977
|
-
return {
|
|
2978
|
-
[actionName]: {
|
|
2979
|
-
dataFences: _reduceInstanceProperty__default["default"](_context5 = actionPayload.dataFences).call(_context5, (nextDataFences, dataFence) => {
|
|
2980
|
-
if (dataFence.type.toLowerCase() === 'store') return [...nextDataFences, {
|
|
2981
|
-
[dataFence.type.toLowerCase()]: {
|
|
2982
|
-
storeKeys: dataFence.storeKeys
|
|
2983
|
-
}
|
|
2984
|
-
}];
|
|
2985
|
-
return nextDataFences;
|
|
2986
|
-
}, [])
|
|
2987
|
-
}
|
|
2988
|
-
};
|
|
2989
|
-
case 'changeTarget':
|
|
2990
|
-
return {
|
|
2991
|
-
[actionName]: {
|
|
2992
|
-
target: {
|
|
2993
|
-
[actionPayload.target.type]: _objectSpread$16(_objectSpread$16(_objectSpread$16({}, omit__default["default"](actionPayload.target, ['type', '__typename'])), actionPayload.target.triggerPattern && {
|
|
2994
|
-
triggerPattern: _mapInstanceProperty__default["default"](_context6 = actionPayload.target.triggerPattern).call(_context6, pattern => ({
|
|
2995
|
-
[pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
|
|
2996
|
-
}))
|
|
2997
|
-
}), actionPayload.target.targetPattern && {
|
|
2998
|
-
targetPattern: _mapInstanceProperty__default["default"](_context7 = actionPayload.target.targetPattern).call(_context7, pattern => ({
|
|
2999
|
-
[pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
|
|
3000
|
-
}))
|
|
3001
|
-
})
|
|
3002
|
-
}
|
|
3003
|
-
}
|
|
3004
|
-
};
|
|
3005
|
-
case 'addAddress':
|
|
3006
|
-
case 'changeAddress':
|
|
3007
|
-
{
|
|
3008
|
-
var _context8;
|
|
3009
|
-
const _ref3 = actionPayload.address?.custom || {},
|
|
3010
|
-
_ref3$fields = _ref3.fields,
|
|
3011
|
-
fields = _ref3$fields === void 0 ? {} : _ref3$fields;
|
|
3012
|
-
const customFields = isEmpty__default["default"](fields) ? null : _mapInstanceProperty__default["default"](_context8 = _Object$entries__default["default"](fields)).call(_context8, _ref4 => {
|
|
3013
|
-
let _ref5 = _slicedToArray(_ref4, 2),
|
|
3014
|
-
name = _ref5[0],
|
|
3015
|
-
value = _ref5[1];
|
|
3016
|
-
return {
|
|
3017
|
-
name,
|
|
3018
|
-
value: _JSON$stringify__default["default"](value)
|
|
3019
|
-
};
|
|
3020
|
-
});
|
|
3021
|
-
const custom = actionPayload.address?.custom?.type?.id ? {
|
|
3022
|
-
type: {
|
|
3023
|
-
id: actionPayload.address.custom.type.id
|
|
3024
|
-
},
|
|
3025
|
-
fields: customFields
|
|
3026
|
-
} : null;
|
|
3027
|
-
return {
|
|
3028
|
-
[actionName]: _objectSpread$16(_objectSpread$16({}, actionPayload), {}, {
|
|
3029
|
-
address: _objectSpread$16(_objectSpread$16({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
|
|
3030
|
-
custom
|
|
3031
|
-
})
|
|
3032
|
-
})
|
|
3033
|
-
};
|
|
3034
|
-
}
|
|
3035
|
-
case 'setAddressCustomType':
|
|
3036
|
-
{
|
|
3037
|
-
var _context9;
|
|
3038
|
-
const _ref6 = actionPayload || {},
|
|
3039
|
-
addressId = _ref6.addressId,
|
|
3040
|
-
_ref6$fields = _ref6.fields,
|
|
3041
|
-
fields = _ref6$fields === void 0 ? {} : _ref6$fields,
|
|
3042
|
-
type = _ref6.type;
|
|
3043
|
-
const customFields = isEmpty__default["default"](fields) ? null : _mapInstanceProperty__default["default"](_context9 = _Object$entries__default["default"](fields)).call(_context9, _ref7 => {
|
|
3044
|
-
let _ref8 = _slicedToArray(_ref7, 2),
|
|
3045
|
-
name = _ref8[0],
|
|
3046
|
-
value = _ref8[1];
|
|
3047
|
-
return {
|
|
3048
|
-
name,
|
|
3049
|
-
value: _JSON$stringify__default["default"](value)
|
|
3050
|
-
};
|
|
3051
|
-
});
|
|
3052
|
-
const customType = type?.id ? {
|
|
3053
|
-
id: type.id
|
|
3054
|
-
} : null;
|
|
3055
|
-
return {
|
|
3056
|
-
[actionName]: {
|
|
3057
|
-
addressId,
|
|
3058
|
-
fields: customFields,
|
|
3059
|
-
type: customType
|
|
3060
|
-
}
|
|
3061
|
-
};
|
|
3062
|
-
}
|
|
3063
|
-
default:
|
|
3064
|
-
return {
|
|
3065
|
-
[actionName]: actionPayload
|
|
3066
|
-
};
|
|
3067
|
-
}
|
|
3068
|
-
};
|
|
3069
|
-
const createGraphQlUpdateActions = actions => _reduceInstanceProperty__default["default"](actions).call(actions, (previousActions, _ref9) => {
|
|
3070
|
-
let actionName = _ref9.action,
|
|
3071
|
-
actionPayload = _objectWithoutProperties(_ref9, _excluded$d);
|
|
3072
|
-
return [...previousActions, convertAction(actionName, actionPayload)];
|
|
3073
|
-
}, []);
|
|
3074
|
-
const extractErrorFromGraphQlResponse = graphQlResponse => {
|
|
3075
|
-
if (graphQlResponse.networkError?.result?.errors?.length > 0) {
|
|
3076
|
-
return graphQlResponse.networkError.result.errors;
|
|
3077
|
-
}
|
|
3078
|
-
if (graphQlResponse.graphQLErrors?.length > 0) {
|
|
3079
|
-
return graphQlResponse.graphQLErrors;
|
|
3080
|
-
}
|
|
3081
|
-
return graphQlResponse;
|
|
3082
|
-
};
|
|
3083
|
-
|
|
3084
|
-
var FetchRecurrencePolicies = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchRecurrencePolicies" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "recurrencePolicies" }, 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: "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: 160, source: { body: "query FetchRecurrencePolicies {\n recurrencePolicies {\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 } } } };
|
|
3085
|
-
const isRecurringOrdersDisabledError = error => {
|
|
3086
|
-
var _context;
|
|
3087
|
-
return error.extensions?.code === '403' && _includesInstanceProperty__default["default"](_context = error.message).call(_context, "The feature 'recurring-orders' is not enabled for this project. Please contact commercetools support.");
|
|
3088
|
-
};
|
|
3089
|
-
const useRecurrenceIntervals = () => {
|
|
3090
|
-
const _useQuery = client.useQuery(FetchRecurrencePolicies, {
|
|
3091
|
-
context: {
|
|
3092
|
-
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
3093
|
-
},
|
|
3094
|
-
fetchPolicy: 'cache-and-network'
|
|
3095
|
-
}),
|
|
3096
|
-
data = _useQuery.data,
|
|
3097
|
-
loading = _useQuery.loading,
|
|
3098
|
-
rawError = _useQuery.error;
|
|
3099
|
-
|
|
3100
|
-
// @TODO: Remove these error checks when the feature is enabled by default
|
|
3101
|
-
const extractedErrors = rawError ? extractErrorFromGraphQlResponse(rawError) : [];
|
|
3102
|
-
const isRecurringOrdersDisabled = extractedErrors.length > 0 &&
|
|
3103
|
-
// If the only error is a 403 with the specific message, we assume the feature is disabled
|
|
3104
|
-
_everyInstanceProperty__default["default"](extractedErrors).call(extractedErrors, isRecurringOrdersDisabledError);
|
|
3105
|
-
const error = isRecurringOrdersDisabled ? undefined : rawError;
|
|
3106
|
-
return {
|
|
3107
|
-
recurrencePolicies: data?.recurrencePolicies?.results ?? [],
|
|
3108
|
-
loading,
|
|
3109
|
-
error,
|
|
3110
|
-
isRecurringOrdersDisabled
|
|
3111
|
-
};
|
|
3112
|
-
};
|
|
3113
|
-
|
|
3114
|
-
const setToArray = function () {
|
|
3115
|
-
let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
3116
|
-
return `id in (${_mapInstanceProperty__default["default"](values).call(values, value => `"${value}"`).join(', ')})`;
|
|
3117
|
-
};
|
|
3118
|
-
|
|
3119
|
-
function capitalizeFirst(text) {
|
|
3120
|
-
return text.charAt(0).toUpperCase() + _sliceInstanceProperty__default["default"](text).call(text, 1);
|
|
3121
|
-
}
|
|
3122
|
-
|
|
3123
|
-
const PRODUCT_STATUSES = {
|
|
3124
|
-
PUBLISHED: 'published',
|
|
3125
|
-
UNPUBLISHED: 'unpublished',
|
|
3126
|
-
MODIFIED: 'modified'
|
|
3127
|
-
};
|
|
3128
|
-
const FILTER_TYPES = {
|
|
3129
|
-
lessThan: 'lessThan',
|
|
3130
|
-
moreThan: 'moreThan',
|
|
3131
|
-
equalTo: 'equalTo',
|
|
3132
|
-
range: 'range',
|
|
3133
|
-
missing: 'missing',
|
|
3134
|
-
missingIn: 'missingIn',
|
|
3135
|
-
in: 'in'
|
|
3136
|
-
};
|
|
3137
|
-
const FIELD_TYPES = {
|
|
3138
|
-
Money: 'Money',
|
|
3139
|
-
LocalizedString: 'LocalizedString',
|
|
3140
|
-
Time: 'Time',
|
|
3141
|
-
DateTime: 'DateTime',
|
|
3142
|
-
Boolean: 'Boolean',
|
|
3143
|
-
String: 'String',
|
|
3144
|
-
Enum: 'Enum',
|
|
3145
|
-
LocalizedEnum: 'LocalizedEnum',
|
|
3146
|
-
Number: 'Number',
|
|
3147
|
-
Date: 'Date',
|
|
3148
|
-
Reference: 'Reference',
|
|
3149
|
-
Set: 'Set'
|
|
3150
|
-
};
|
|
3151
|
-
const PRECISION_TYPES = {
|
|
3152
|
-
highPrecision: 'highPrecision',
|
|
3153
|
-
centPrecision: 'centPrecision'
|
|
3154
|
-
};
|
|
3155
|
-
const ERROR_CODES = {
|
|
3156
|
-
semanticError: 'SemanticError',
|
|
3157
|
-
invalidInput: 'InvalidInput'
|
|
3158
|
-
};
|
|
3159
|
-
const DefaultPageSizes = [20, 50, 100];
|
|
3160
|
-
DefaultPageSizes[0];
|
|
3161
|
-
|
|
3162
|
-
const regexpData = /^data-/;
|
|
3163
|
-
function filterDataAttributes(obj) {
|
|
3164
|
-
var _context, _context2;
|
|
3165
|
-
return _reduceInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](_context2 = _Object$keys__default["default"](obj)).call(_context2, p => regexpData.test(p))).call(_context, (acc, p) => {
|
|
3166
|
-
// eslint-disable-next-line no-param-reassign
|
|
3167
|
-
acc[p] = obj[p];
|
|
3168
|
-
return acc;
|
|
3169
|
-
}, {});
|
|
3170
|
-
}
|
|
3171
|
-
|
|
3172
|
-
const invalidValues$1 = [null, undefined, ''];
|
|
3173
|
-
function isEmpty$2(_ref) {
|
|
3174
|
-
let value = _ref.value;
|
|
3175
|
-
return _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value) || _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value.from) && _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value.to);
|
|
3176
|
-
}
|
|
3177
|
-
|
|
3178
|
-
const invalidValues = [null, undefined, ''];
|
|
3179
|
-
function validateSingleFilter(_ref) {
|
|
3180
|
-
let value = _ref.value;
|
|
3181
|
-
return _includesInstanceProperty__default["default"](invalidValues).call(invalidValues, value);
|
|
3182
|
-
}
|
|
3183
|
-
|
|
3184
|
-
const dateFormatDayStart$1 = 'YYYY-MM-DDT00:00:00.000';
|
|
3185
|
-
const dateFormatDayEnd$1 = 'YYYY-MM-DDT23:59:59.999';
|
|
3186
|
-
const getDateTimeInUTC = (date, timezone, format) => {
|
|
3187
|
-
const dateFormat = 'YYYY-MM-DDTHH:mm:ss.SSS';
|
|
3188
|
-
const momentDate = moment__default["default"](date);
|
|
3189
|
-
// check if the date is date only or datetime
|
|
3190
|
-
const noTimeSpecified = momentDate.hours() === 0 && momentDate.minutes() === 0 && momentDate.seconds() === 0;
|
|
3191
|
-
// if it's a date then convert it to UTC datetime based on timezone
|
|
3192
|
-
if (noTimeSpecified) {
|
|
3193
|
-
const offset = moment__default["default"](date).tz(timezone)?.utcOffset() || 0;
|
|
3194
|
-
const formattedDate = momentDate.format(format);
|
|
3195
|
-
const formattedDateWithOffset = moment__default["default"](formattedDate).add(offset, 'minutes').format(dateFormat);
|
|
3196
|
-
// console.log(formattedDateWithOffset);
|
|
3197
|
-
return formattedDateWithOffset;
|
|
3198
|
-
}
|
|
3199
|
-
// if it's a datetime we assume that it's already in UTC
|
|
3200
|
-
// and just return it
|
|
3201
|
-
return date;
|
|
3202
|
-
};
|
|
3203
|
-
function dateTransformer$1(filterKey, filters) {
|
|
3204
|
-
let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator$1;
|
|
3205
|
-
const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref => {
|
|
3206
|
-
let type = _ref.type,
|
|
3207
|
-
value = _ref.value,
|
|
3208
|
-
timezone = _ref.timezone;
|
|
3209
|
-
if (!filterValidator({
|
|
3210
|
-
type,
|
|
3211
|
-
value
|
|
3212
|
-
})) return '';
|
|
3213
|
-
switch (type) {
|
|
3214
|
-
case FILTER_TYPES.lessThan:
|
|
3215
|
-
return `${filterKey} < "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"`;
|
|
3216
|
-
case FILTER_TYPES.moreThan:
|
|
3217
|
-
return `${filterKey} > "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}"`;
|
|
3218
|
-
case FILTER_TYPES.equalTo:
|
|
3219
|
-
return oneLine__default["default"]`
|
|
3220
|
-
(${filterKey} >= "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"
|
|
3221
|
-
and ${filterKey} <= "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}")
|
|
3222
|
-
`;
|
|
3223
|
-
case FILTER_TYPES.range:
|
|
3224
|
-
return oneLine__default["default"]`
|
|
3225
|
-
(${filterKey} >= "${getDateTimeInUTC(value.from, timezone, dateFormatDayStart$1)}"
|
|
3226
|
-
and ${filterKey} <= "${getDateTimeInUTC(value.to, timezone, dateFormatDayEnd$1)}")
|
|
3227
|
-
`;
|
|
3228
|
-
default:
|
|
3229
|
-
return '';
|
|
3230
|
-
}
|
|
3231
|
-
});
|
|
3232
|
-
|
|
3233
|
-
// The separator is and `or` as they are the same filter
|
|
3234
|
-
const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(' or ');
|
|
3235
|
-
|
|
3236
|
-
/* The parenthesis involing the `queryString` are needed since they are all part of the
|
|
3237
|
-
* same filter so we need something to work with
|
|
3238
|
-
* (
|
|
3239
|
-
* (createdAt >= "2018-04-25T00:00:00.000+02:00" and createdAt <= "2018-04-25T23:59:59.999+02:00") o
|
|
3240
|
-
* (createdAt >= "2018-02-15T00:00:00.000+01:00" and createdAt <= "2018-02-15T23:59:59.999+01:00")
|
|
3241
|
-
* ) or some_more_filters
|
|
3242
|
-
*/
|
|
3243
|
-
return queryString === '' ? null : `(${queryString})`;
|
|
3244
|
-
}
|
|
3245
|
-
function defaultFilterValidator$1(_ref2) {
|
|
3246
|
-
let type = _ref2.type,
|
|
3247
|
-
value = _ref2.value;
|
|
3248
|
-
if (type !== 'range' && (validateSingleFilter({
|
|
3249
|
-
value
|
|
3250
|
-
}) || !moment__default["default"](value).isValid())) return false;
|
|
3251
|
-
if (type === 'range' && (isEmpty$2({
|
|
3252
|
-
value
|
|
3253
|
-
}) || !moment__default["default"](value.from).isValid() || !moment__default["default"](value.to).isValid())) return false;
|
|
3254
|
-
return true;
|
|
3255
|
-
}
|
|
3256
|
-
|
|
3257
|
-
var localizedTextTransformer = localizedString => {
|
|
3258
|
-
var _context;
|
|
3259
|
-
return _mapInstanceProperty__default["default"](_context = _Object$keys__default["default"](localizedString)).call(_context, locale => `${locale} = "${localizedString[locale]}"`).join(' and ');
|
|
3260
|
-
};
|
|
3261
|
-
|
|
3262
|
-
const getCentAmountClause = (value, operator, locale) => `centAmount ${operator} ${uiKit.MoneyInput.convertToMoneyValue(value, locale).centAmount}`;
|
|
3263
|
-
function moneyTransformer(value, option, locale) {
|
|
3264
|
-
const clauses = [];
|
|
3265
|
-
if (option === FILTER_TYPES.range) {
|
|
3266
|
-
clauses[0] = `currencyCode = "${value.from.currencyCode}"`;
|
|
3267
|
-
clauses[1] = getCentAmountClause(value.from, '>=', locale);
|
|
3268
|
-
clauses[2] = getCentAmountClause(value.to, '<=', locale);
|
|
3269
|
-
return clauses.join(' and ');
|
|
3270
|
-
}
|
|
3271
|
-
clauses[0] = `currencyCode = "${value.currencyCode}"`;
|
|
3272
|
-
switch (option) {
|
|
3273
|
-
case FILTER_TYPES.lessThan:
|
|
3274
|
-
clauses[1] = getCentAmountClause(value, '<', locale);
|
|
3275
|
-
break;
|
|
3276
|
-
case FILTER_TYPES.moreThan:
|
|
3277
|
-
clauses[1] = getCentAmountClause(value, '>', locale);
|
|
3278
|
-
break;
|
|
3279
|
-
case FILTER_TYPES.equalTo:
|
|
3280
|
-
clauses[1] = getCentAmountClause(value, '=', locale);
|
|
3281
|
-
break;
|
|
3282
|
-
default:
|
|
3283
|
-
return '';
|
|
3284
|
-
}
|
|
3285
|
-
return clauses.join(' and ');
|
|
3286
|
-
}
|
|
3287
|
-
|
|
3288
|
-
const formatTime = 'HH:mm:ss.SSS';
|
|
3289
|
-
|
|
3290
|
-
/* TimeInput only allows HH:mm:ss and adds the seconds as 00 and
|
|
3291
|
-
* the milliseconds always as 000.
|
|
3292
|
-
* This function returns the same time with the
|
|
3293
|
-
*/
|
|
3294
|
-
const getEndOfSecond = value => moment__default["default"](value, formatTime).endOf('minute').format(formatTime);
|
|
3295
|
-
const defaultFilterValidator = _ref => {
|
|
3296
|
-
let type = _ref.type,
|
|
3297
|
-
value = _ref.value;
|
|
3298
|
-
if (type !== FILTER_TYPES.range && validateSingleFilter({
|
|
3299
|
-
value
|
|
3300
|
-
})) return false;
|
|
3301
|
-
if (type === FILTER_TYPES.range && isEmpty$2({
|
|
3302
|
-
value
|
|
3303
|
-
})) return false;
|
|
3304
|
-
return true;
|
|
3305
|
-
};
|
|
3306
|
-
const timeTransformer = function (filterKey, filters) {
|
|
3307
|
-
let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator;
|
|
3308
|
-
const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref2 => {
|
|
3309
|
-
let type = _ref2.type,
|
|
3310
|
-
value = _ref2.value;
|
|
3311
|
-
if (!filterValidator({
|
|
3312
|
-
type,
|
|
3313
|
-
value
|
|
3314
|
-
})) return '';
|
|
3315
|
-
switch (type) {
|
|
3316
|
-
case FILTER_TYPES.lessThan:
|
|
3317
|
-
return `${filterKey} < "${value}"`;
|
|
3318
|
-
case FILTER_TYPES.moreThan:
|
|
3319
|
-
return `${filterKey} > "${value}"`;
|
|
3320
|
-
case FILTER_TYPES.equalTo:
|
|
3321
|
-
return oneLine__default["default"]`
|
|
3322
|
-
(${filterKey} >= "${value}"
|
|
3323
|
-
and ${filterKey} <= "${getEndOfSecond(value)}")
|
|
3324
|
-
`;
|
|
3325
|
-
case FILTER_TYPES.range:
|
|
3326
|
-
return oneLine__default["default"]`
|
|
3327
|
-
(${filterKey} >= "${value.from}"
|
|
3328
|
-
and ${filterKey} <= "${getEndOfSecond(value.to)}")
|
|
3329
|
-
`;
|
|
3330
|
-
default:
|
|
3331
|
-
return '';
|
|
3332
|
-
}
|
|
3333
|
-
});
|
|
3334
|
-
|
|
3335
|
-
// The separator is and `or` as they are the same filter
|
|
3336
|
-
const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(' or ');
|
|
3337
|
-
|
|
3338
|
-
/* The parenthesis involing the `queryString` are needed since they are all part of the
|
|
3339
|
-
* same filter so we need something to work with
|
|
3340
|
-
* (
|
|
3341
|
-
* (pickUpTime >= "12:00" and pickUpTime <= "13:00") o
|
|
3342
|
-
* (pickUpTime >= "14:00" and pickUpTime <= "15:00")
|
|
3343
|
-
* ) or some_more_filters
|
|
3344
|
-
*/
|
|
3345
|
-
return queryString === '' ? null : `(${queryString})`;
|
|
3346
|
-
};
|
|
3347
|
-
|
|
3348
|
-
function formatDateRangeValue(value, type) {
|
|
3349
|
-
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
3350
|
-
locale: 'en',
|
|
3351
|
-
timeZone: moment__default$1["default"].tz.guess()
|
|
2735
|
+
function formatDateRangeValue(value, type) {
|
|
2736
|
+
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
2737
|
+
locale: 'en',
|
|
2738
|
+
timeZone: moment__default$1["default"].tz.guess()
|
|
3352
2739
|
};
|
|
3353
2740
|
if (value.from === value.to) return formatDateTime$1(type, value.from, options);
|
|
3354
2741
|
if (value.from && value.to) return oneLine__default["default"]`
|
|
@@ -4553,8 +3940,8 @@ const getData = (code, field) => {
|
|
|
4553
3940
|
};
|
|
4554
3941
|
const getFractionDigit = code => getData(code, 'fractionDigit');
|
|
4555
3942
|
|
|
4556
|
-
function ownKeys$
|
|
4557
|
-
function _objectSpread$
|
|
3943
|
+
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; }
|
|
3944
|
+
function _objectSpread$18(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$18(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$18(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4558
3945
|
function formatMoneyRangeValue(value, intl) {
|
|
4559
3946
|
if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
|
|
4560
3947
|
if (value.from && value.to) return `${formatMoneyValue(value.from, value.currency, intl)} -
|
|
@@ -4564,7 +3951,7 @@ function formatMoneyRangeValue(value, intl) {
|
|
|
4564
3951
|
return '';
|
|
4565
3952
|
}
|
|
4566
3953
|
function formatMoneyValue(amount, currency, intl) {
|
|
4567
|
-
return formatMoney$
|
|
3954
|
+
return formatMoney$2(_objectSpread$18({
|
|
4568
3955
|
centAmount: amount,
|
|
4569
3956
|
fractionDigits: getFractionDigit(currency)
|
|
4570
3957
|
}, currency ? {
|
|
@@ -4579,15 +3966,15 @@ function getFractionedAmount(moneyValue) {
|
|
|
4579
3966
|
const amount = moneyValue.type === PRECISION_TYPES.highPrecision ? moneyValue.preciseAmount : moneyValue.centAmount;
|
|
4580
3967
|
return amount / 10 ** fractionDigits;
|
|
4581
3968
|
}
|
|
4582
|
-
function formatMoney$
|
|
4583
|
-
return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$
|
|
3969
|
+
function formatMoney$2(moneyValue, intl, options) {
|
|
3970
|
+
return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$18({
|
|
4584
3971
|
style: 'currency',
|
|
4585
3972
|
currency: moneyValue.currencyCode,
|
|
4586
3973
|
minimumFractionDigits: moneyValue.fractionDigits
|
|
4587
3974
|
}, options));
|
|
4588
3975
|
}
|
|
4589
3976
|
|
|
4590
|
-
var messages$
|
|
3977
|
+
var messages$L = reactIntl.defineMessages({
|
|
4591
3978
|
booleanYes: {
|
|
4592
3979
|
id: 'AttributeTypeFormats.boolean.yes',
|
|
4593
3980
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -4627,10 +4014,10 @@ const formatLtext = _ref3 => {
|
|
|
4627
4014
|
locale: language
|
|
4628
4015
|
});
|
|
4629
4016
|
};
|
|
4630
|
-
const formatMoney = _ref4 => {
|
|
4017
|
+
const formatMoney$1 = _ref4 => {
|
|
4631
4018
|
let value = _ref4.value,
|
|
4632
4019
|
intl = _ref4.intl;
|
|
4633
|
-
return formatMoney$
|
|
4020
|
+
return formatMoney$2(value, intl);
|
|
4634
4021
|
};
|
|
4635
4022
|
const formatReference = _ref5 => {
|
|
4636
4023
|
let value = _ref5.value;
|
|
@@ -4669,7 +4056,7 @@ const formatDateTime = _ref7 => {
|
|
|
4669
4056
|
const formatBoolean = _ref8 => {
|
|
4670
4057
|
let value = _ref8.value,
|
|
4671
4058
|
intl = _ref8.intl;
|
|
4672
|
-
return value ? intl.formatMessage(messages$
|
|
4059
|
+
return value ? intl.formatMessage(messages$L.booleanYes) : intl.formatMessage(messages$L.booleanNo);
|
|
4673
4060
|
};
|
|
4674
4061
|
const formatNilType = _ref9 => {
|
|
4675
4062
|
let value = _ref9.value,
|
|
@@ -4720,7 +4107,7 @@ const doNotFormat = _ref11 => {
|
|
|
4720
4107
|
return value;
|
|
4721
4108
|
};
|
|
4722
4109
|
const getFormatter = type => {
|
|
4723
|
-
if (isNil__default["default"](type)) return formatNilType;else if (type.name === 'nested') return formatNested;else if (type.name === 'set') return formatSet;else if (type.name === 'enum') return formatEnum;else if (type.name === 'lenum') return formatLenum;else if (type.name === 'ltext') return formatLtext;else if (type.name === 'money') return formatMoney;else if (type.name === 'reference') return formatReference;else if (type.name === 'date') return formatDate;else if (type.name === 'time') return doNotFormat;else if (type.name === 'datetime') return formatDateTime;else if (type.name === 'boolean') return formatBoolean;else if (type.name === 'text') return doNotFormat;else if (type.name === 'number') return doNotFormat;else return formatUnknown;
|
|
4110
|
+
if (isNil__default["default"](type)) return formatNilType;else if (type.name === 'nested') return formatNested;else if (type.name === 'set') return formatSet;else if (type.name === 'enum') return formatEnum;else if (type.name === 'lenum') return formatLenum;else if (type.name === 'ltext') return formatLtext;else if (type.name === 'money') return formatMoney$1;else if (type.name === 'reference') return formatReference;else if (type.name === 'date') return formatDate;else if (type.name === 'time') return doNotFormat;else if (type.name === 'datetime') return formatDateTime;else if (type.name === 'boolean') return formatBoolean;else if (type.name === 'text') return doNotFormat;else if (type.name === 'number') return doNotFormat;else return formatUnknown;
|
|
4724
4111
|
};
|
|
4725
4112
|
function formatAttribute(_ref12) {
|
|
4726
4113
|
let type = _ref12.type,
|
|
@@ -4734,101 +4121,674 @@ function formatAttribute(_ref12) {
|
|
|
4734
4121
|
if (isNil__default["default"](value)) {
|
|
4735
4122
|
return fallbackValue;
|
|
4736
4123
|
}
|
|
4737
|
-
const formatter = getFormatter(type);
|
|
4738
|
-
return formatter({
|
|
4739
|
-
type,
|
|
4740
|
-
value,
|
|
4741
|
-
intl,
|
|
4742
|
-
language,
|
|
4743
|
-
languages,
|
|
4744
|
-
userTimeZone,
|
|
4745
|
-
fallbackValue
|
|
4746
|
-
});
|
|
4747
|
-
}
|
|
4124
|
+
const formatter = getFormatter(type);
|
|
4125
|
+
return formatter({
|
|
4126
|
+
type,
|
|
4127
|
+
value,
|
|
4128
|
+
intl,
|
|
4129
|
+
language,
|
|
4130
|
+
languages,
|
|
4131
|
+
userTimeZone,
|
|
4132
|
+
fallbackValue
|
|
4133
|
+
});
|
|
4134
|
+
}
|
|
4135
|
+
|
|
4136
|
+
const attributeTypeNames = {
|
|
4137
|
+
Boolean: 'boolean',
|
|
4138
|
+
Date: 'date',
|
|
4139
|
+
DateTime: 'datetime',
|
|
4140
|
+
Enum: 'enum',
|
|
4141
|
+
LocalizedEnum: 'lenum',
|
|
4142
|
+
LocalizedString: 'ltext',
|
|
4143
|
+
Money: 'money',
|
|
4144
|
+
Nested: 'nested',
|
|
4145
|
+
Reference: 'reference',
|
|
4146
|
+
Set: 'set',
|
|
4147
|
+
String: 'text',
|
|
4148
|
+
Time: 'time',
|
|
4149
|
+
Number: 'number'
|
|
4150
|
+
};
|
|
4151
|
+
const convertToAttributeType = customFieldType => {
|
|
4152
|
+
if (isNil__default["default"](customFieldType)) return customFieldType;
|
|
4153
|
+
const attributeTypeName = attributeTypeNames[customFieldType.name];
|
|
4154
|
+
const elementTypeName = attributeTypeNames[customFieldType.elementType?.name];
|
|
4155
|
+
return {
|
|
4156
|
+
name: attributeTypeName,
|
|
4157
|
+
elementType: {
|
|
4158
|
+
name: elementTypeName
|
|
4159
|
+
}
|
|
4160
|
+
};
|
|
4161
|
+
};
|
|
4162
|
+
const inlineEnumValues = (type, value) => {
|
|
4163
|
+
if (isNil__default["default"](type)) return value;
|
|
4164
|
+
if (type.name === 'Set') {
|
|
4165
|
+
return _mapInstanceProperty__default["default"](value).call(value, setValue => inlineEnumValues(type.elementType, setValue));
|
|
4166
|
+
}
|
|
4167
|
+
if (type.name === 'Enum' || type.name === 'LocalizedEnum') {
|
|
4168
|
+
var _context;
|
|
4169
|
+
return _findInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](type)).call(_context, enumValue => enumValue.key === value);
|
|
4170
|
+
}
|
|
4171
|
+
return value;
|
|
4172
|
+
};
|
|
4173
|
+
|
|
4174
|
+
/**
|
|
4175
|
+
* Formats `Custom Fields`: https://docs.commercetools.com/api/projects/custom-fields
|
|
4176
|
+
* Despite having different names, most of `Custom Field` maps one-to-one with an appropriate
|
|
4177
|
+
* `Product Attribute Type`, hence we can reuse product attributes formatting logic.
|
|
4178
|
+
*
|
|
4179
|
+
* The only exception is `Enum` and `LEnum` types. Unlike when dealing with `Product Attribute Types`,
|
|
4180
|
+
* value in `Custom Fields` contains a key of an `Enum` entry, and not an entry itself.
|
|
4181
|
+
* Therefore, before passing value to attributes formatter we need to replace value with Enum entry.
|
|
4182
|
+
*/
|
|
4183
|
+
function formatCustomField(_ref) {
|
|
4184
|
+
let type = _ref.type,
|
|
4185
|
+
value = _ref.value,
|
|
4186
|
+
intl = _ref.intl,
|
|
4187
|
+
language = _ref.language,
|
|
4188
|
+
languages = _ref.languages,
|
|
4189
|
+
userTimeZone = _ref.userTimeZone;
|
|
4190
|
+
const attributeType = convertToAttributeType(type);
|
|
4191
|
+
return formatAttribute({
|
|
4192
|
+
type: attributeType,
|
|
4193
|
+
value: inlineEnumValues(type, value),
|
|
4194
|
+
intl,
|
|
4195
|
+
language,
|
|
4196
|
+
languages,
|
|
4197
|
+
userTimeZone
|
|
4198
|
+
});
|
|
4199
|
+
}
|
|
4200
|
+
|
|
4201
|
+
// FIXME: delete once prefix search is supported in ctp api
|
|
4202
|
+
|
|
4203
|
+
// Currently prefix search of products in the ctp is not supported.
|
|
4204
|
+
// This is a temporary hack which should be deleted once the feature is
|
|
4205
|
+
// supported in ctp.
|
|
4206
|
+
// It mimics the prefix search feature by computing lower and upper bounds
|
|
4207
|
+
// related to the provided `input`.
|
|
4208
|
+
// usage:
|
|
4209
|
+
// If I want to do a prefix search of term 'F', I get first the bounds
|
|
4210
|
+
// const [lowerBound, upperBound] = getPrefixSearch('F');
|
|
4211
|
+
// and then use them in the search
|
|
4212
|
+
// e.g
|
|
4213
|
+
// where: `masterData(current(name(en >= "${lowerBound}" and en < "${upperBound}")))`
|
|
4214
|
+
const getPrefixSearchBounds = input => {
|
|
4215
|
+
const getNextCharacter = character => String.fromCharCode(character.charCodeAt() + 1);
|
|
4216
|
+
return [input, `${_sliceInstanceProperty__default["default"](input).call(input, 0, input.length - 1)}${getNextCharacter(_sliceInstanceProperty__default["default"](input).call(input, input.length - 1))}`];
|
|
4217
|
+
};
|
|
4218
|
+
var getPrefixSearchBounds$1 = getPrefixSearchBounds;
|
|
4219
|
+
|
|
4220
|
+
const _excluded$f = ["action"];
|
|
4221
|
+
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; }
|
|
4222
|
+
function _objectSpread$17(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$17(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$17(Object(t))).call(_context1, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4223
|
+
|
|
4224
|
+
/**
|
|
4225
|
+
* Checks if a value is a LocalizedString
|
|
4226
|
+
*
|
|
4227
|
+
* { en: 'Hello' } -> true
|
|
4228
|
+
* 'Hello' -> false
|
|
4229
|
+
*/
|
|
4230
|
+
|
|
4231
|
+
const getIsLocalizedString = maybeLocalizedString => {
|
|
4232
|
+
if (typeof maybeLocalizedString === 'string') return false;
|
|
4233
|
+
if (!maybeLocalizedString || typeof maybeLocalizedString === 'object' && _Object$keys__default["default"](maybeLocalizedString).length === 0) return false;
|
|
4234
|
+
return true;
|
|
4235
|
+
};
|
|
4236
|
+
|
|
4237
|
+
/**
|
|
4238
|
+
* Transforms a list of `CustomField` into a `CustomField` object
|
|
4239
|
+
*
|
|
4240
|
+
* [{ name: 'fieldA', value: 'Hello' }] -> { fieldA: 'Hello' }
|
|
4241
|
+
*/
|
|
4242
|
+
const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
|
|
4243
|
+
if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
|
|
4244
|
+
return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$17(_objectSpread$17({}, customFields), {}, {
|
|
4245
|
+
[customField.name]: customField.value
|
|
4246
|
+
}), {});
|
|
4247
|
+
};
|
|
4248
|
+
|
|
4249
|
+
// --- Types mapping ---
|
|
4250
|
+
|
|
4251
|
+
/**
|
|
4252
|
+
* Map category GraphQL shape with nameAllLocales to reference shape
|
|
4253
|
+
* Includes ancestors and parent
|
|
4254
|
+
*
|
|
4255
|
+
* @param {Object} category - A category result object from graphql
|
|
4256
|
+
* @return {Object} Category (as a REST API representation):
|
|
4257
|
+
* `{ id, obj: { id, name } }`
|
|
4258
|
+
*/
|
|
4259
|
+
function transformLocalizedFieldsForCategory(category) {
|
|
4260
|
+
var _context;
|
|
4261
|
+
let transformationOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [{
|
|
4262
|
+
from: 'nameAllLocales',
|
|
4263
|
+
to: 'name'
|
|
4264
|
+
}];
|
|
4265
|
+
const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
|
|
4266
|
+
const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
|
|
4267
|
+
const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
|
|
4268
|
+
return _objectSpread$17(_objectSpread$17(_objectSpread$17({}, transformedData), parent ? {
|
|
4269
|
+
parent
|
|
4270
|
+
} : {}), ancestors ? {
|
|
4271
|
+
ancestors
|
|
4272
|
+
} : {});
|
|
4273
|
+
}
|
|
4274
|
+
function transformLocalizedFieldsForCartDiscount(cartDiscount) {
|
|
4275
|
+
const transformationOptions = [{
|
|
4276
|
+
from: 'nameAllLocales',
|
|
4277
|
+
to: 'name'
|
|
4278
|
+
}];
|
|
4279
|
+
return l10n.applyTransformedLocalizedFields(cartDiscount, transformationOptions);
|
|
4280
|
+
}
|
|
4281
|
+
function mapShippingRateTierToGraphQL(tiers) {
|
|
4282
|
+
return _reduceInstanceProperty__default["default"](tiers).call(tiers, (graphQlTiers, tier) => [...graphQlTiers, {
|
|
4283
|
+
[tier.type]: {
|
|
4284
|
+
price: tier.price ? {
|
|
4285
|
+
centAmount: tier.price.centAmount,
|
|
4286
|
+
currencyCode: tier.price.currencyCode
|
|
4287
|
+
} : undefined,
|
|
4288
|
+
minimumCentAmount: tier.minimumCentAmount,
|
|
4289
|
+
value: tier.value || undefined,
|
|
4290
|
+
priceFunction: tier.priceFunction ? {
|
|
4291
|
+
function: tier.priceFunction.function,
|
|
4292
|
+
currencyCode: tier.priceFunction.currencyCode
|
|
4293
|
+
} : undefined,
|
|
4294
|
+
score: tier.score
|
|
4295
|
+
}
|
|
4296
|
+
}], []);
|
|
4297
|
+
}
|
|
4298
|
+
|
|
4299
|
+
/**
|
|
4300
|
+
* NOTE:
|
|
4301
|
+
* This module massages update actions produced by the JS SDK
|
|
4302
|
+
* to be compatible with CTP GraphQL mutations. This logic should be
|
|
4303
|
+
* moved into the JS SDK once discounts is fully 100% migrated to
|
|
4304
|
+
* GraphQL or any other plugin/app needs this functionality. Until
|
|
4305
|
+
* then this serves as a collective set of requirements before
|
|
4306
|
+
* prematurely adding a not fully working set of conversions to the
|
|
4307
|
+
* JS SDK.
|
|
4308
|
+
*/
|
|
4309
|
+
|
|
4310
|
+
const createAttributeTypeValue = attribute => {
|
|
4311
|
+
switch (attribute.type.name) {
|
|
4312
|
+
case 'set':
|
|
4313
|
+
return {
|
|
4314
|
+
set: {
|
|
4315
|
+
elementType: createAttributeTypeValue({
|
|
4316
|
+
type: attribute.type.elementType
|
|
4317
|
+
})
|
|
4318
|
+
}
|
|
4319
|
+
};
|
|
4320
|
+
case 'boolean':
|
|
4321
|
+
case 'date':
|
|
4322
|
+
case 'datetime':
|
|
4323
|
+
case 'ltext':
|
|
4324
|
+
case 'money':
|
|
4325
|
+
case 'number':
|
|
4326
|
+
case 'text':
|
|
4327
|
+
case 'time':
|
|
4328
|
+
return {
|
|
4329
|
+
[attribute.type.name]: {}
|
|
4330
|
+
};
|
|
4331
|
+
case 'enum':
|
|
4332
|
+
case 'lenum':
|
|
4333
|
+
return {
|
|
4334
|
+
[attribute.type.name]: {
|
|
4335
|
+
values: []
|
|
4336
|
+
}
|
|
4337
|
+
};
|
|
4338
|
+
case 'reference':
|
|
4339
|
+
{
|
|
4340
|
+
return {
|
|
4341
|
+
[attribute.type.name]: {
|
|
4342
|
+
referenceTypeId: attribute.type.referenceTypeId
|
|
4343
|
+
}
|
|
4344
|
+
};
|
|
4345
|
+
}
|
|
4346
|
+
default:
|
|
4347
|
+
return attribute.type;
|
|
4348
|
+
}
|
|
4349
|
+
};
|
|
4748
4350
|
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4351
|
+
/*
|
|
4352
|
+
* Fixed price supports high precision. Action format is nested with the
|
|
4353
|
+
* the type of the money. Absolute discount only works with cent precision,
|
|
4354
|
+
* hence the action structure is flat.
|
|
4355
|
+
*/
|
|
4356
|
+
const formatMoney = valueType => money => {
|
|
4357
|
+
switch (valueType) {
|
|
4358
|
+
case 'fixed':
|
|
4359
|
+
case 'fixedCart':
|
|
4360
|
+
return {
|
|
4361
|
+
[money.type]: _objectSpread$17({
|
|
4362
|
+
centAmount: money.centAmount,
|
|
4363
|
+
currencyCode: money.currencyCode
|
|
4364
|
+
}, money.type === PRECISION_TYPES.highPrecision && {
|
|
4365
|
+
preciseAmount: money.preciseAmount,
|
|
4366
|
+
fractionDigits: money.fractionDigits
|
|
4367
|
+
})
|
|
4368
|
+
};
|
|
4369
|
+
case 'absolute':
|
|
4370
|
+
case 'absoluteCart':
|
|
4371
|
+
return {
|
|
4372
|
+
centAmount: money.centAmount,
|
|
4373
|
+
currencyCode: money.currencyCode
|
|
4374
|
+
};
|
|
4375
|
+
default:
|
|
4376
|
+
throw new Error('Unexpected value type for money.');
|
|
4377
|
+
}
|
|
4763
4378
|
};
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4379
|
+
|
|
4380
|
+
/**
|
|
4381
|
+
* converts the `changeValue` action to GraphQL actions variable
|
|
4382
|
+
* @param {Object} actionPayload
|
|
4383
|
+
*/
|
|
4384
|
+
const convertChangeValueAction = actionPayload => {
|
|
4385
|
+
const valueType = actionPayload.value.type;
|
|
4386
|
+
const possibleTypeKeys = {
|
|
4387
|
+
relative: ['permyriad'],
|
|
4388
|
+
absolute: ['money'],
|
|
4389
|
+
absoluteCart: ['money', 'applicationMode'],
|
|
4390
|
+
fixed: ['money'],
|
|
4391
|
+
fixedCart: ['money', 'applicationMode'],
|
|
4392
|
+
giftLineItem: ['product', 'variantId', 'distributionChannel', 'supplyChannel', 'ResourceIdentifierInput']
|
|
4393
|
+
};
|
|
4394
|
+
const filteredValue = pick__default["default"](actionPayload.value, possibleTypeKeys[valueType]);
|
|
4395
|
+
if (filteredValue.money) {
|
|
4396
|
+
var _context2;
|
|
4397
|
+
const moneyFormatter = formatMoney(valueType);
|
|
4398
|
+
filteredValue.money = _mapInstanceProperty__default["default"](_context2 = filteredValue.money).call(_context2, moneyFormatter);
|
|
4399
|
+
}
|
|
4768
4400
|
return {
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4401
|
+
changeValue: {
|
|
4402
|
+
value: {
|
|
4403
|
+
[valueType]: filteredValue
|
|
4404
|
+
}
|
|
4772
4405
|
}
|
|
4773
4406
|
};
|
|
4774
4407
|
};
|
|
4775
|
-
const inlineEnumValues = (type, value) => {
|
|
4776
|
-
if (isNil__default["default"](type)) return value;
|
|
4777
|
-
if (type.name === 'Set') {
|
|
4778
|
-
return _mapInstanceProperty__default["default"](value).call(value, setValue => inlineEnumValues(type.elementType, setValue));
|
|
4779
|
-
}
|
|
4780
|
-
if (type.name === 'Enum' || type.name === 'LocalizedEnum') {
|
|
4781
|
-
var _context;
|
|
4782
|
-
return _findInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](type)).call(_context, enumValue => enumValue.key === value);
|
|
4783
|
-
}
|
|
4784
|
-
return value;
|
|
4785
|
-
};
|
|
4786
4408
|
|
|
4787
4409
|
/**
|
|
4788
|
-
*
|
|
4789
|
-
*
|
|
4790
|
-
*
|
|
4791
|
-
*
|
|
4792
|
-
* The only exception is `Enum` and `LEnum` types. Unlike when dealing with `Product Attribute Types`,
|
|
4793
|
-
* value in `Custom Fields` contains a key of an `Enum` entry, and not an entry itself.
|
|
4794
|
-
* Therefore, before passing value to attributes formatter we need to replace value with Enum entry.
|
|
4410
|
+
* This function changes any payload after the actions have been computed.
|
|
4411
|
+
* Currently we only need to change the `setCustomField` action payload
|
|
4412
|
+
* as its dynamic content can not be typed in SDL for the mutation.
|
|
4795
4413
|
*/
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
}
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4414
|
+
const convertAction = (actionName, actionPayload) => {
|
|
4415
|
+
var _context3, _context4, _context5, _context6, _context7;
|
|
4416
|
+
const getNameFromPayload = payload => {
|
|
4417
|
+
// changeName for `Organizations`
|
|
4418
|
+
if (typeof payload.name === 'string') return payload;
|
|
4419
|
+
// changeName for `UserProfile`
|
|
4420
|
+
if (payload.firstName || payload.lastName) return payload;
|
|
4421
|
+
// assume `changeName` for LocalizedString type
|
|
4422
|
+
return {
|
|
4423
|
+
name: l10n.transformLocalizedStringToLocalizedField(payload.name)
|
|
4424
|
+
};
|
|
4425
|
+
};
|
|
4426
|
+
switch (actionName) {
|
|
4427
|
+
case 'changeName':
|
|
4428
|
+
return {
|
|
4429
|
+
[actionName]: getNameFromPayload(actionPayload)
|
|
4430
|
+
};
|
|
4431
|
+
case 'setDescription':
|
|
4432
|
+
case 'changeDescription':
|
|
4433
|
+
return {
|
|
4434
|
+
[actionName]: {
|
|
4435
|
+
description: getIsLocalizedString(actionPayload.description) ? l10n.transformLocalizedStringToLocalizedField(actionPayload.description) : actionPayload.description
|
|
4436
|
+
}
|
|
4437
|
+
};
|
|
4438
|
+
case 'setLocalizedDescription':
|
|
4439
|
+
return {
|
|
4440
|
+
[actionName]: {
|
|
4441
|
+
localizedDescription: l10n.transformLocalizedStringToLocalizedField(actionPayload.localizedDescription)
|
|
4442
|
+
}
|
|
4443
|
+
};
|
|
4444
|
+
case 'setName':
|
|
4445
|
+
return {
|
|
4446
|
+
[actionName]: getNameFromPayload(actionPayload)
|
|
4447
|
+
};
|
|
4448
|
+
case 'setLocalizedName':
|
|
4449
|
+
return {
|
|
4450
|
+
[actionName]: {
|
|
4451
|
+
localizedName: l10n.transformLocalizedStringToLocalizedField(actionPayload.localizedName)
|
|
4452
|
+
}
|
|
4453
|
+
};
|
|
4454
|
+
case 'setSlug':
|
|
4455
|
+
return {
|
|
4456
|
+
[actionName]: {
|
|
4457
|
+
slug: l10n.transformLocalizedStringToLocalizedField(actionPayload.slug)
|
|
4458
|
+
}
|
|
4459
|
+
};
|
|
4460
|
+
case 'setLineItemCustomField':
|
|
4461
|
+
return {
|
|
4462
|
+
[actionName]: {
|
|
4463
|
+
lineItemId: actionPayload.lineItemId,
|
|
4464
|
+
name: actionPayload.name,
|
|
4465
|
+
value: _JSON$stringify__default["default"](actionPayload.value)
|
|
4466
|
+
}
|
|
4467
|
+
};
|
|
4468
|
+
case 'setCustomLineItemCustomField':
|
|
4469
|
+
return {
|
|
4470
|
+
[actionName]: {
|
|
4471
|
+
customLineItemId: actionPayload.customLineItemId,
|
|
4472
|
+
name: actionPayload.name,
|
|
4473
|
+
value: _JSON$stringify__default["default"](actionPayload.value)
|
|
4474
|
+
}
|
|
4475
|
+
};
|
|
4476
|
+
case 'setCustomField':
|
|
4477
|
+
return {
|
|
4478
|
+
[actionName]: {
|
|
4479
|
+
name: actionPayload.name,
|
|
4480
|
+
value: _JSON$stringify__default["default"](actionPayload.value)
|
|
4481
|
+
}
|
|
4482
|
+
};
|
|
4483
|
+
case 'setCustomType':
|
|
4484
|
+
return {
|
|
4485
|
+
[actionName]: {
|
|
4486
|
+
typeId: actionPayload.type?.id,
|
|
4487
|
+
fields: actionPayload.fields ? _mapInstanceProperty__default["default"](_context3 = _Object$entries__default["default"](actionPayload.fields)).call(_context3, _ref => {
|
|
4488
|
+
let _ref2 = _slicedToArray(_ref, 2),
|
|
4489
|
+
customField = _ref2[0],
|
|
4490
|
+
value = _ref2[1];
|
|
4491
|
+
return {
|
|
4492
|
+
name: customField,
|
|
4493
|
+
value: _JSON$stringify__default["default"](value)
|
|
4494
|
+
};
|
|
4495
|
+
}) : undefined
|
|
4496
|
+
}
|
|
4497
|
+
};
|
|
4498
|
+
case 'removeLocation':
|
|
4499
|
+
return {
|
|
4500
|
+
[actionName]: {
|
|
4501
|
+
location: {
|
|
4502
|
+
country: actionPayload.location.country
|
|
4503
|
+
}
|
|
4504
|
+
}
|
|
4505
|
+
};
|
|
4506
|
+
case 'addLocation':
|
|
4507
|
+
return {
|
|
4508
|
+
[actionName]: {
|
|
4509
|
+
location: {
|
|
4510
|
+
country: actionPayload.location.country
|
|
4511
|
+
}
|
|
4512
|
+
}
|
|
4513
|
+
};
|
|
4514
|
+
case 'setGeoLocation':
|
|
4515
|
+
return {
|
|
4516
|
+
[actionName]: actionPayload?.geoLocation ? {
|
|
4517
|
+
geoLocation: {
|
|
4518
|
+
type: 'Point',
|
|
4519
|
+
coordinates: [_parseFloat__default["default"](actionPayload.geoLocation?.longitude), _parseFloat__default["default"](actionPayload.geoLocation?.latitude)]
|
|
4520
|
+
}
|
|
4521
|
+
} : {
|
|
4522
|
+
undefined
|
|
4523
|
+
}
|
|
4524
|
+
};
|
|
4525
|
+
case 'changeLabel':
|
|
4526
|
+
return {
|
|
4527
|
+
changeLabel: {
|
|
4528
|
+
attributeName: actionPayload.attributeName,
|
|
4529
|
+
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.label)
|
|
4530
|
+
}
|
|
4531
|
+
};
|
|
4532
|
+
case 'setInputTip':
|
|
4533
|
+
return {
|
|
4534
|
+
setInputTip: {
|
|
4535
|
+
attributeName: actionPayload.attributeName,
|
|
4536
|
+
inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.inputTip)
|
|
4537
|
+
}
|
|
4538
|
+
};
|
|
4539
|
+
case 'addAttributeDefinition':
|
|
4540
|
+
return {
|
|
4541
|
+
[actionName]: {
|
|
4542
|
+
attributeDefinition: _objectSpread$17(_objectSpread$17({}, actionPayload.attribute), {}, {
|
|
4543
|
+
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
|
|
4544
|
+
inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
|
|
4545
|
+
type: createAttributeTypeValue(actionPayload.attribute)
|
|
4546
|
+
})
|
|
4547
|
+
}
|
|
4548
|
+
};
|
|
4549
|
+
case 'replaceTaxRate':
|
|
4550
|
+
return {
|
|
4551
|
+
[actionName]: {
|
|
4552
|
+
taxRate: {
|
|
4553
|
+
name: actionPayload.taxRate.name,
|
|
4554
|
+
country: actionPayload.taxRate.country,
|
|
4555
|
+
includedInPrice: actionPayload.taxRate.includedInPrice,
|
|
4556
|
+
amount: actionPayload.taxRate.amount,
|
|
4557
|
+
state: actionPayload.taxRate.state,
|
|
4558
|
+
key: actionPayload.taxRate.key,
|
|
4559
|
+
subRates: actionPayload.taxRate.subRates
|
|
4560
|
+
},
|
|
4561
|
+
taxRateId: actionPayload.taxRateId
|
|
4562
|
+
}
|
|
4563
|
+
};
|
|
4564
|
+
case 'addZone':
|
|
4565
|
+
return {
|
|
4566
|
+
[actionName]: {
|
|
4567
|
+
zone: {
|
|
4568
|
+
id: actionPayload.zone.id,
|
|
4569
|
+
typeId: actionPayload.zone.typeId
|
|
4570
|
+
}
|
|
4571
|
+
}
|
|
4572
|
+
};
|
|
4573
|
+
case 'removeZone':
|
|
4574
|
+
return {
|
|
4575
|
+
[actionName]: {
|
|
4576
|
+
zone: {
|
|
4577
|
+
id: actionPayload.zone.id,
|
|
4578
|
+
typeId: actionPayload.zone.typeId
|
|
4579
|
+
}
|
|
4580
|
+
}
|
|
4581
|
+
};
|
|
4582
|
+
case 'changeTaxCategory':
|
|
4583
|
+
return {
|
|
4584
|
+
[actionName]: {
|
|
4585
|
+
taxCategory: {
|
|
4586
|
+
id: actionPayload.taxCategory.id,
|
|
4587
|
+
typeId: actionPayload.taxCategory.typeId
|
|
4588
|
+
}
|
|
4589
|
+
}
|
|
4590
|
+
};
|
|
4591
|
+
case 'addShippingRate':
|
|
4592
|
+
return {
|
|
4593
|
+
[actionName]: {
|
|
4594
|
+
zone: {
|
|
4595
|
+
id: actionPayload.zone.id,
|
|
4596
|
+
typeId: actionPayload.zone.typeId
|
|
4597
|
+
},
|
|
4598
|
+
shippingRate: {
|
|
4599
|
+
price: {
|
|
4600
|
+
centAmount: actionPayload.shippingRate.price.centAmount,
|
|
4601
|
+
currencyCode: actionPayload.shippingRate.price.currencyCode
|
|
4602
|
+
},
|
|
4603
|
+
freeAbove: actionPayload.shippingRate.freeAbove ? {
|
|
4604
|
+
centAmount: actionPayload.shippingRate.freeAbove.centAmount,
|
|
4605
|
+
currencyCode: actionPayload.shippingRate.freeAbove.currencyCode
|
|
4606
|
+
} : undefined,
|
|
4607
|
+
tiers: actionPayload.shippingRate.tiers ? mapShippingRateTierToGraphQL(actionPayload.shippingRate.tiers) : undefined
|
|
4608
|
+
}
|
|
4609
|
+
}
|
|
4610
|
+
};
|
|
4611
|
+
case 'removeShippingRate':
|
|
4612
|
+
return {
|
|
4613
|
+
[actionName]: {
|
|
4614
|
+
zone: {
|
|
4615
|
+
id: actionPayload.zone.id,
|
|
4616
|
+
typeId: actionPayload.zone.typeId
|
|
4617
|
+
},
|
|
4618
|
+
shippingRate: {
|
|
4619
|
+
price: {
|
|
4620
|
+
centAmount: actionPayload.shippingRate.price.centAmount,
|
|
4621
|
+
currencyCode: actionPayload.shippingRate.price.currencyCode
|
|
4622
|
+
},
|
|
4623
|
+
freeAbove: actionPayload.shippingRate.freeAbove ? {
|
|
4624
|
+
centAmount: actionPayload.shippingRate.freeAbove.centAmount,
|
|
4625
|
+
currencyCode: actionPayload.shippingRate.freeAbove.currencyCode
|
|
4626
|
+
} : undefined,
|
|
4627
|
+
tiers: actionPayload.shippingRate.tiers ? mapShippingRateTierToGraphQL(actionPayload.shippingRate.tiers) : undefined
|
|
4628
|
+
}
|
|
4629
|
+
}
|
|
4630
|
+
};
|
|
4631
|
+
case 'changeValue':
|
|
4632
|
+
return convertChangeValueAction(actionPayload);
|
|
4633
|
+
// product-types -> attributes -> enum
|
|
4634
|
+
case 'addLocalizedEnumValue':
|
|
4635
|
+
return {
|
|
4636
|
+
[actionName]: {
|
|
4637
|
+
attributeName: actionPayload.attributeName,
|
|
4638
|
+
value: _objectSpread$17(_objectSpread$17({}, actionPayload.value), {}, {
|
|
4639
|
+
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
|
|
4640
|
+
})
|
|
4641
|
+
}
|
|
4642
|
+
};
|
|
4643
|
+
case 'changeLocalizedEnumValueLabel':
|
|
4644
|
+
return {
|
|
4645
|
+
[actionName]: {
|
|
4646
|
+
attributeName: actionPayload.attributeName,
|
|
4647
|
+
newValue: _objectSpread$17(_objectSpread$17({}, actionPayload.newValue), {}, {
|
|
4648
|
+
label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
|
|
4649
|
+
})
|
|
4650
|
+
}
|
|
4651
|
+
};
|
|
4652
|
+
case 'setShippingRateInputType':
|
|
4653
|
+
return {
|
|
4654
|
+
[actionName]: {
|
|
4655
|
+
shippingRateInputType: actionPayload.shippingRateInputType?.type ? {
|
|
4656
|
+
[actionPayload.shippingRateInputType.type]: {
|
|
4657
|
+
values: actionPayload.shippingRateInputType.type === 'CartClassification' ? _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](actionPayload.shippingRateInputType)).call(_context4, value => ({
|
|
4658
|
+
key: value.key,
|
|
4659
|
+
label: value.allLocaleLabels
|
|
4660
|
+
})) : undefined
|
|
4661
|
+
}
|
|
4662
|
+
} : undefined
|
|
4663
|
+
}
|
|
4664
|
+
};
|
|
4665
|
+
case 'addCustomLineItem':
|
|
4666
|
+
{
|
|
4667
|
+
return {
|
|
4668
|
+
[actionName]: {
|
|
4669
|
+
slug: actionPayload.slug,
|
|
4670
|
+
quantity: actionPayload.quantity,
|
|
4671
|
+
name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
|
|
4672
|
+
taxCategory: actionPayload.taxCategory,
|
|
4673
|
+
money: {
|
|
4674
|
+
[actionPayload.money.type]: _objectSpread$17({
|
|
4675
|
+
centAmount: actionPayload.money.centAmount,
|
|
4676
|
+
currencyCode: actionPayload.money.currencyCode
|
|
4677
|
+
}, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
|
|
4678
|
+
preciseAmount: actionPayload.money.preciseAmount,
|
|
4679
|
+
fractionDigits: actionPayload.money.fractionDigits
|
|
4680
|
+
})
|
|
4681
|
+
}
|
|
4682
|
+
}
|
|
4683
|
+
};
|
|
4684
|
+
}
|
|
4685
|
+
case 'setDataFences':
|
|
4686
|
+
return {
|
|
4687
|
+
[actionName]: {
|
|
4688
|
+
dataFences: _reduceInstanceProperty__default["default"](_context5 = actionPayload.dataFences).call(_context5, (nextDataFences, dataFence) => {
|
|
4689
|
+
if (dataFence.type.toLowerCase() === 'store') return [...nextDataFences, {
|
|
4690
|
+
[dataFence.type.toLowerCase()]: {
|
|
4691
|
+
storeKeys: dataFence.storeKeys
|
|
4692
|
+
}
|
|
4693
|
+
}];
|
|
4694
|
+
return nextDataFences;
|
|
4695
|
+
}, [])
|
|
4696
|
+
}
|
|
4697
|
+
};
|
|
4698
|
+
case 'changeTarget':
|
|
4699
|
+
return {
|
|
4700
|
+
[actionName]: {
|
|
4701
|
+
target: {
|
|
4702
|
+
[actionPayload.target.type]: _objectSpread$17(_objectSpread$17(_objectSpread$17({}, omit__default["default"](actionPayload.target, ['type', '__typename'])), actionPayload.target.triggerPattern && {
|
|
4703
|
+
triggerPattern: _mapInstanceProperty__default["default"](_context6 = actionPayload.target.triggerPattern).call(_context6, pattern => ({
|
|
4704
|
+
[pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
|
|
4705
|
+
}))
|
|
4706
|
+
}), actionPayload.target.targetPattern && {
|
|
4707
|
+
targetPattern: _mapInstanceProperty__default["default"](_context7 = actionPayload.target.targetPattern).call(_context7, pattern => ({
|
|
4708
|
+
[pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
|
|
4709
|
+
}))
|
|
4710
|
+
})
|
|
4711
|
+
}
|
|
4712
|
+
}
|
|
4713
|
+
};
|
|
4714
|
+
case 'addAddress':
|
|
4715
|
+
case 'changeAddress':
|
|
4716
|
+
{
|
|
4717
|
+
var _context8;
|
|
4718
|
+
const _ref3 = actionPayload.address?.custom || {},
|
|
4719
|
+
_ref3$fields = _ref3.fields,
|
|
4720
|
+
fields = _ref3$fields === void 0 ? {} : _ref3$fields;
|
|
4721
|
+
const customFields = isEmpty__default["default"](fields) ? null : _mapInstanceProperty__default["default"](_context8 = _Object$entries__default["default"](fields)).call(_context8, _ref4 => {
|
|
4722
|
+
let _ref5 = _slicedToArray(_ref4, 2),
|
|
4723
|
+
name = _ref5[0],
|
|
4724
|
+
value = _ref5[1];
|
|
4725
|
+
return {
|
|
4726
|
+
name,
|
|
4727
|
+
value: _JSON$stringify__default["default"](value)
|
|
4728
|
+
};
|
|
4729
|
+
});
|
|
4730
|
+
const custom = actionPayload.address?.custom?.type?.id ? {
|
|
4731
|
+
type: {
|
|
4732
|
+
id: actionPayload.address.custom.type.id
|
|
4733
|
+
},
|
|
4734
|
+
fields: customFields
|
|
4735
|
+
} : null;
|
|
4736
|
+
return {
|
|
4737
|
+
[actionName]: _objectSpread$17(_objectSpread$17({}, actionPayload), {}, {
|
|
4738
|
+
address: _objectSpread$17(_objectSpread$17({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
|
|
4739
|
+
custom
|
|
4740
|
+
})
|
|
4741
|
+
})
|
|
4742
|
+
};
|
|
4743
|
+
}
|
|
4744
|
+
case 'setAddressCustomType':
|
|
4745
|
+
{
|
|
4746
|
+
var _context9;
|
|
4747
|
+
const _ref6 = actionPayload || {},
|
|
4748
|
+
addressId = _ref6.addressId,
|
|
4749
|
+
_ref6$fields = _ref6.fields,
|
|
4750
|
+
fields = _ref6$fields === void 0 ? {} : _ref6$fields,
|
|
4751
|
+
type = _ref6.type;
|
|
4752
|
+
const customFields = isEmpty__default["default"](fields) ? null : _mapInstanceProperty__default["default"](_context9 = _Object$entries__default["default"](fields)).call(_context9, _ref7 => {
|
|
4753
|
+
let _ref8 = _slicedToArray(_ref7, 2),
|
|
4754
|
+
name = _ref8[0],
|
|
4755
|
+
value = _ref8[1];
|
|
4756
|
+
return {
|
|
4757
|
+
name,
|
|
4758
|
+
value: _JSON$stringify__default["default"](value)
|
|
4759
|
+
};
|
|
4760
|
+
});
|
|
4761
|
+
const customType = type?.id ? {
|
|
4762
|
+
id: type.id
|
|
4763
|
+
} : null;
|
|
4764
|
+
return {
|
|
4765
|
+
[actionName]: {
|
|
4766
|
+
addressId,
|
|
4767
|
+
fields: customFields,
|
|
4768
|
+
type: customType
|
|
4769
|
+
}
|
|
4770
|
+
};
|
|
4771
|
+
}
|
|
4772
|
+
default:
|
|
4773
|
+
return {
|
|
4774
|
+
[actionName]: actionPayload
|
|
4775
|
+
};
|
|
4776
|
+
}
|
|
4777
|
+
};
|
|
4778
|
+
const createGraphQlUpdateActions = actions => _reduceInstanceProperty__default["default"](actions).call(actions, (previousActions, _ref9) => {
|
|
4779
|
+
let actionName = _ref9.action,
|
|
4780
|
+
actionPayload = _objectWithoutProperties(_ref9, _excluded$f);
|
|
4781
|
+
return [...previousActions, convertAction(actionName, actionPayload)];
|
|
4782
|
+
}, []);
|
|
4783
|
+
const extractErrorFromGraphQlResponse = graphQlResponse => {
|
|
4784
|
+
if (graphQlResponse.networkError?.result?.errors?.length > 0) {
|
|
4785
|
+
return graphQlResponse.networkError.result.errors;
|
|
4786
|
+
}
|
|
4787
|
+
if (graphQlResponse.graphQLErrors?.length > 0) {
|
|
4788
|
+
return graphQlResponse.graphQLErrors;
|
|
4789
|
+
}
|
|
4790
|
+
return graphQlResponse;
|
|
4830
4791
|
};
|
|
4831
|
-
var getPrefixSearchBounds$1 = getPrefixSearchBounds;
|
|
4832
4792
|
|
|
4833
4793
|
const isUUID = string => /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(string);
|
|
4834
4794
|
var isUUID$1 = isUUID;
|
|
@@ -4883,8 +4843,8 @@ function omitDeep(obj, fieldsToOmit) {
|
|
|
4883
4843
|
return originalOmitDeep__default["default"](obj, fieldsToOmit);
|
|
4884
4844
|
}
|
|
4885
4845
|
|
|
4886
|
-
function ownKeys$
|
|
4887
|
-
function _objectSpread$
|
|
4846
|
+
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; }
|
|
4847
|
+
function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$16(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$16(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4888
4848
|
function getPriceChannelName(price) {
|
|
4889
4849
|
return price.channel?.name ?? price.channel?.key ?? null;
|
|
4890
4850
|
}
|
|
@@ -4896,11 +4856,11 @@ function getDiscountValue(price) {
|
|
|
4896
4856
|
} else if (price.value?.type === PRECISION_TYPES.highPrecision && price.discounted?.value?.type === PRECISION_TYPES.centPrecision) {
|
|
4897
4857
|
fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
|
|
4898
4858
|
}
|
|
4899
|
-
return price.discounted ? _objectSpread$
|
|
4859
|
+
return price.discounted ? _objectSpread$16(_objectSpread$16({}, price.value), {}, {
|
|
4900
4860
|
fractionedAmount,
|
|
4901
4861
|
centAmount: price.value.centAmount - price.discounted.value.centAmount,
|
|
4902
4862
|
preciseAmount
|
|
4903
|
-
}) : _objectSpread$
|
|
4863
|
+
}) : _objectSpread$16(_objectSpread$16({}, price.value), {}, {
|
|
4904
4864
|
centAmount: 0
|
|
4905
4865
|
});
|
|
4906
4866
|
}
|
|
@@ -4931,7 +4891,7 @@ function getNetUnitPrice(_ref) {
|
|
|
4931
4891
|
}
|
|
4932
4892
|
let preciseAmount;
|
|
4933
4893
|
if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + taxRate.amount);
|
|
4934
|
-
return _objectSpread$
|
|
4894
|
+
return _objectSpread$16(_objectSpread$16({}, price.value), {}, {
|
|
4935
4895
|
centAmount,
|
|
4936
4896
|
preciseAmount
|
|
4937
4897
|
});
|
|
@@ -4947,7 +4907,7 @@ function getNetUnitPrice(_ref) {
|
|
|
4947
4907
|
}
|
|
4948
4908
|
let preciseAmount;
|
|
4949
4909
|
if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + lineItem.taxRate.amount);
|
|
4950
|
-
return _objectSpread$
|
|
4910
|
+
return _objectSpread$16(_objectSpread$16({}, price.value), {}, {
|
|
4951
4911
|
centAmount,
|
|
4952
4912
|
preciseAmount
|
|
4953
4913
|
});
|
|
@@ -4959,7 +4919,7 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4959
4919
|
const currencyCode = price.value.currencyCode;
|
|
4960
4920
|
const fractionedAmount = getFractionedAmount(price.value);
|
|
4961
4921
|
if (currencyCode && !isNil__default["default"](fractionedAmount)) {
|
|
4962
|
-
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$
|
|
4922
|
+
if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$16(_objectSpread$16({}, minPrices), {}, {
|
|
4963
4923
|
[currencyCode]: price.value
|
|
4964
4924
|
});
|
|
4965
4925
|
}
|
|
@@ -4968,8 +4928,8 @@ function getMinimumPricesByCurrencyCode(prices) {
|
|
|
4968
4928
|
return _Object$values__default["default"](minPricesByCurrency);
|
|
4969
4929
|
}
|
|
4970
4930
|
|
|
4971
|
-
function ownKeys$
|
|
4972
|
-
function _objectSpread$
|
|
4931
|
+
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; }
|
|
4932
|
+
function _objectSpread$15(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$15(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$15(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4973
4933
|
const transformCustomFieldFromGraphQLResponse = resource => {
|
|
4974
4934
|
var _context, _context4;
|
|
4975
4935
|
return {
|
|
@@ -4984,14 +4944,14 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
4984
4944
|
return {
|
|
4985
4945
|
name: fieldDefinition.name,
|
|
4986
4946
|
required: fieldDefinition.required,
|
|
4987
|
-
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$
|
|
4988
|
-
elementType: _objectSpread$
|
|
4947
|
+
type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$15(_objectSpread$15({}, fieldDefinition.type), {}, {
|
|
4948
|
+
elementType: _objectSpread$15(_objectSpread$15({}, fieldDefinition.type.elementType), {}, {
|
|
4989
4949
|
values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
|
|
4990
4950
|
key: value.key,
|
|
4991
4951
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
4992
4952
|
}))
|
|
4993
4953
|
})
|
|
4994
|
-
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$
|
|
4954
|
+
}) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$15(_objectSpread$15({}, fieldDefinition.type), {}, {
|
|
4995
4955
|
values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
|
|
4996
4956
|
key: value.key,
|
|
4997
4957
|
label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
|
|
@@ -5002,7 +4962,7 @@ const transformCustomFieldFromGraphQLResponse = resource => {
|
|
|
5002
4962
|
})
|
|
5003
4963
|
}
|
|
5004
4964
|
},
|
|
5005
|
-
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$
|
|
4965
|
+
fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$15(_objectSpread$15({}, fields), {}, {
|
|
5006
4966
|
[customField.name]: customField.value
|
|
5007
4967
|
}), {})
|
|
5008
4968
|
};
|
|
@@ -5014,7 +4974,7 @@ const convertProductSelectionFromGraphQl = productSelection => {
|
|
|
5014
4974
|
// Incase the product selection is not missing or if the current project dose not yet have access to the feature,
|
|
5015
4975
|
// in either case we return null
|
|
5016
4976
|
if (!productSelection) return null;
|
|
5017
|
-
return _objectSpread$
|
|
4977
|
+
return _objectSpread$15(_objectSpread$15({}, l10n.applyTransformedLocalizedFields(productSelection, [{
|
|
5018
4978
|
from: 'nameAllLocales',
|
|
5019
4979
|
to: 'name'
|
|
5020
4980
|
}])), {}, {
|
|
@@ -5037,8 +4997,8 @@ const transformAllToProperNounCase = text => {
|
|
|
5037
4997
|
return _mapInstanceProperty__default["default"](_context = text.split(' ')).call(_context, term => transformToProperNounCase(term)).join(' ');
|
|
5038
4998
|
};
|
|
5039
4999
|
|
|
5040
|
-
function ownKeys$
|
|
5041
|
-
function _objectSpread$
|
|
5000
|
+
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; }
|
|
5001
|
+
function _objectSpread$14(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$14(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$14(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5042
5002
|
const REGEX_ISO8601 = /(\d{4}-\d{2}-\d{2}[T]\d{2}:\d{2}:\d{2}(\.\d{3}[Z]?))/;
|
|
5043
5003
|
const REGEX_TIME = /\d{2}:\d{2}/;
|
|
5044
5004
|
const REGEX_DATE = /\d{4}-\d{2}-\d{2}/;
|
|
@@ -5055,7 +5015,7 @@ function filterCustomTypeUpdateActionValues() {
|
|
|
5055
5015
|
if (updateAction.action === 'setCustomField' && _Array$isArray__default["default"](updateAction.value)) {
|
|
5056
5016
|
const definition = _findInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, field => field.name === updateAction.name);
|
|
5057
5017
|
const definitionName = definition.type.elementType.name;
|
|
5058
|
-
return _objectSpread$
|
|
5018
|
+
return _objectSpread$14(_objectSpread$14({}, updateAction), {}, {
|
|
5059
5019
|
value: filterNotDefinedValues(updateAction.value, definitionName)
|
|
5060
5020
|
});
|
|
5061
5021
|
}
|
|
@@ -5228,7 +5188,7 @@ function uniqueObjects(items) {
|
|
|
5228
5188
|
|
|
5229
5189
|
*/
|
|
5230
5190
|
|
|
5231
|
-
const messages$
|
|
5191
|
+
const messages$K = reactIntl.defineMessages({
|
|
5232
5192
|
unique: {
|
|
5233
5193
|
id: 'Validation.unique',
|
|
5234
5194
|
description: 'An error message to show if the field must be unique',
|
|
@@ -5270,7 +5230,7 @@ const messages$J = reactIntl.defineMessages({
|
|
|
5270
5230
|
defaultMessage: 'Invalid ID format. Please enter a valid ID.'
|
|
5271
5231
|
}
|
|
5272
5232
|
});
|
|
5273
|
-
var validationMessages = messages$
|
|
5233
|
+
var validationMessages = messages$K;
|
|
5274
5234
|
|
|
5275
5235
|
function getIndexesOfInvalidValues(values) {
|
|
5276
5236
|
let invalidValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
@@ -5529,7 +5489,7 @@ function ReferenceSearch(props) {
|
|
|
5529
5489
|
});
|
|
5530
5490
|
}
|
|
5531
5491
|
|
|
5532
|
-
const messages$
|
|
5492
|
+
const messages$I = reactIntl.defineMessages({
|
|
5533
5493
|
placeholder: {
|
|
5534
5494
|
id: 'CartDiscountReferenceSearch.placeholder',
|
|
5535
5495
|
description: 'Placeholder for search for a cart discount',
|
|
@@ -5556,10 +5516,10 @@ const messages$H = reactIntl.defineMessages({
|
|
|
5556
5516
|
defaultMessage: 'Enter search term'
|
|
5557
5517
|
}
|
|
5558
5518
|
});
|
|
5559
|
-
var messages$
|
|
5519
|
+
var messages$J = messages$I;
|
|
5560
5520
|
|
|
5561
|
-
function ownKeys$
|
|
5562
|
-
function _objectSpread$
|
|
5521
|
+
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; }
|
|
5522
|
+
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; }
|
|
5563
5523
|
function Option$1(props) {
|
|
5564
5524
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
5565
5525
|
language: applicationContext.dataLocale,
|
|
@@ -5570,7 +5530,7 @@ function Option$1(props) {
|
|
|
5570
5530
|
const _useIntl = reactIntl.useIntl(),
|
|
5571
5531
|
formatMessage = _useIntl.formatMessage;
|
|
5572
5532
|
const cartDiscount = props.data;
|
|
5573
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$
|
|
5533
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$13(_objectSpread$13({}, props), {}, {
|
|
5574
5534
|
children: jsxRuntime.jsxs("div", {
|
|
5575
5535
|
"data-testid": "cart-discount-option",
|
|
5576
5536
|
children: [jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
@@ -5581,14 +5541,14 @@ function Option$1(props) {
|
|
|
5581
5541
|
fallbackOrder: languages
|
|
5582
5542
|
})
|
|
5583
5543
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
5584
|
-
children: [formatMessage(messages$
|
|
5544
|
+
children: [formatMessage(messages$J.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
|
|
5585
5545
|
})]
|
|
5586
5546
|
})
|
|
5587
5547
|
}));
|
|
5588
5548
|
}
|
|
5589
5549
|
|
|
5590
|
-
function ownKeys$
|
|
5591
|
-
function _objectSpread$
|
|
5550
|
+
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; }
|
|
5551
|
+
function _objectSpread$12(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$12(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$12(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5592
5552
|
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 } } } };
|
|
5593
5553
|
const returnNullIfEmpty = value => value && value.id === '' ? null : value;
|
|
5594
5554
|
const filterOption$1 = (option, text) => {
|
|
@@ -5614,7 +5574,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5614
5574
|
})),
|
|
5615
5575
|
language = _useApplicationContex.language,
|
|
5616
5576
|
languages = _useApplicationContex.languages;
|
|
5617
|
-
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$
|
|
5577
|
+
const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$12(_objectSpread$12({}, cartDiscount), {}, {
|
|
5618
5578
|
value: cartDiscount.id,
|
|
5619
5579
|
key: cartDiscount.key,
|
|
5620
5580
|
label: l10n.formatLocalizedString(cartDiscount, {
|
|
@@ -5657,10 +5617,10 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5657
5617
|
onBlur: props.onBlur,
|
|
5658
5618
|
onChange: props.onChange,
|
|
5659
5619
|
value: returnNullIfEmpty(props.value),
|
|
5660
|
-
placeholderLabel: formatMessage(messages$
|
|
5661
|
-
searchPromptLabel: formatMessage(messages$
|
|
5662
|
-
noResultsLabel: formatMessage(messages$
|
|
5663
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5620
|
+
placeholderLabel: formatMessage(messages$J.placeholder),
|
|
5621
|
+
searchPromptLabel: formatMessage(messages$J.searchPrompt),
|
|
5622
|
+
noResultsLabel: formatMessage(messages$J.noResults),
|
|
5623
|
+
referenceIsMissingLabel: formatMessage(messages$J.isMissing),
|
|
5664
5624
|
mapItemToOption: mapItemToOption,
|
|
5665
5625
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5666
5626
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5670,7 +5630,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5670
5630
|
});
|
|
5671
5631
|
}
|
|
5672
5632
|
|
|
5673
|
-
const messages$
|
|
5633
|
+
const messages$G = reactIntl.defineMessages({
|
|
5674
5634
|
placeholder: {
|
|
5675
5635
|
id: 'CategoryReferenceSearch.placeholder',
|
|
5676
5636
|
description: 'Placeholder for search for a category',
|
|
@@ -5702,10 +5662,10 @@ const messages$F = reactIntl.defineMessages({
|
|
|
5702
5662
|
defaultMessage: 'Parent Category'
|
|
5703
5663
|
}
|
|
5704
5664
|
});
|
|
5705
|
-
var messages$
|
|
5665
|
+
var messages$H = messages$G;
|
|
5706
5666
|
|
|
5707
|
-
function ownKeys
|
|
5708
|
-
function _objectSpread
|
|
5667
|
+
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; }
|
|
5668
|
+
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; }
|
|
5709
5669
|
function Option(props) {
|
|
5710
5670
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
5711
5671
|
language: applicationContext.dataLocale,
|
|
@@ -5716,7 +5676,7 @@ function Option(props) {
|
|
|
5716
5676
|
const _useIntl = reactIntl.useIntl(),
|
|
5717
5677
|
formatMessage = _useIntl.formatMessage;
|
|
5718
5678
|
const category = props.data;
|
|
5719
|
-
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread
|
|
5679
|
+
return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$11(_objectSpread$11({}, props), {}, {
|
|
5720
5680
|
children: jsxRuntime.jsxs("div", {
|
|
5721
5681
|
"data-testid": "category-option",
|
|
5722
5682
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
@@ -5727,7 +5687,7 @@ function Option(props) {
|
|
|
5727
5687
|
fallbackOrder: languages
|
|
5728
5688
|
})
|
|
5729
5689
|
}), category.parent && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5730
|
-
children: `${formatMessage(messages$
|
|
5690
|
+
children: `${formatMessage(messages$H.parentCategory)}: ${l10n.formatLocalizedString(category.parent, {
|
|
5731
5691
|
key: 'name',
|
|
5732
5692
|
locale: language,
|
|
5733
5693
|
fallbackOrder: languages
|
|
@@ -5739,14 +5699,14 @@ function Option(props) {
|
|
|
5739
5699
|
fallbackOrder: languages
|
|
5740
5700
|
})}`
|
|
5741
5701
|
}), category.externalId && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5742
|
-
children: `${formatMessage(messages$
|
|
5702
|
+
children: `${formatMessage(messages$H.externalId)}: ${category.externalId || constants.NO_VALUE_FALLBACK}`
|
|
5743
5703
|
})]
|
|
5744
5704
|
})
|
|
5745
5705
|
}));
|
|
5746
5706
|
}
|
|
5747
5707
|
|
|
5748
|
-
function ownKeys$
|
|
5749
|
-
function _objectSpread$
|
|
5708
|
+
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; }
|
|
5709
|
+
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; }
|
|
5750
5710
|
const filterOption = () => true;
|
|
5751
5711
|
function CategoryReferenceSearch(props) {
|
|
5752
5712
|
const _useIntl = reactIntl.useIntl(),
|
|
@@ -5758,7 +5718,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5758
5718
|
})),
|
|
5759
5719
|
language = _useApplicationContex.language,
|
|
5760
5720
|
languages = _useApplicationContex.languages;
|
|
5761
|
-
const mapItemToOption = React.useCallback(category => _objectSpread$
|
|
5721
|
+
const mapItemToOption = React.useCallback(category => _objectSpread$10(_objectSpread$10({}, category), {}, {
|
|
5762
5722
|
value: category.id,
|
|
5763
5723
|
label: l10n.formatLocalizedString(category, {
|
|
5764
5724
|
key: 'name',
|
|
@@ -5776,7 +5736,7 @@ function CategoryReferenceSearch(props) {
|
|
|
5776
5736
|
}), [apolloClient]);
|
|
5777
5737
|
return jsxRuntime.jsx(ReferenceSearch, {
|
|
5778
5738
|
id: props.id,
|
|
5779
|
-
components: _objectSpread$
|
|
5739
|
+
components: _objectSpread$10({
|
|
5780
5740
|
Option
|
|
5781
5741
|
}, props.components),
|
|
5782
5742
|
isClearable: props.isClearable,
|
|
@@ -5787,10 +5747,10 @@ function CategoryReferenceSearch(props) {
|
|
|
5787
5747
|
onBlur: props.onBlur,
|
|
5788
5748
|
onChange: props.onChange,
|
|
5789
5749
|
value: props.value,
|
|
5790
|
-
placeholderLabel: formatMessage(messages$
|
|
5791
|
-
searchPromptLabel: formatMessage(messages$
|
|
5792
|
-
noResultsLabel: formatMessage(messages$
|
|
5793
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5750
|
+
placeholderLabel: formatMessage(messages$H.placeholder),
|
|
5751
|
+
searchPromptLabel: formatMessage(messages$H.searchPrompt),
|
|
5752
|
+
noResultsLabel: formatMessage(messages$H.noResults),
|
|
5753
|
+
referenceIsMissingLabel: formatMessage(messages$H.isMissing),
|
|
5794
5754
|
mapItemToOption: mapItemToOption,
|
|
5795
5755
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5796
5756
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5815,9 +5775,9 @@ function useCachedCategoryOptions(ids) {
|
|
|
5815
5775
|
}]));
|
|
5816
5776
|
}
|
|
5817
5777
|
|
|
5818
|
-
const _excluded$
|
|
5819
|
-
function ownKeys
|
|
5820
|
-
function _objectSpread
|
|
5778
|
+
const _excluded$e = ["type"];
|
|
5779
|
+
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; }
|
|
5780
|
+
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; }
|
|
5821
5781
|
var styles$g = {
|
|
5822
5782
|
"button": "button-module__button___1OzVf",
|
|
5823
5783
|
"cancel": "button-module__cancel___1-jYL button-module__button___1OzVf",
|
|
@@ -5846,7 +5806,7 @@ var styles$g = {
|
|
|
5846
5806
|
const Button = _ref => {
|
|
5847
5807
|
let _ref$type = _ref.type,
|
|
5848
5808
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
5849
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5809
|
+
props = _objectWithoutProperties(_ref, _excluded$e);
|
|
5850
5810
|
const className = props.className,
|
|
5851
5811
|
onClick = props.onClick,
|
|
5852
5812
|
isDisabled = props.isDisabled,
|
|
@@ -5854,7 +5814,7 @@ const Button = _ref => {
|
|
|
5854
5814
|
|
|
5855
5815
|
// Pass only `data-*` props
|
|
5856
5816
|
const dataProps = filterDataAttributes(props);
|
|
5857
|
-
return jsxRuntime.jsx("button", _objectSpread
|
|
5817
|
+
return jsxRuntime.jsx("button", _objectSpread$$(_objectSpread$$({
|
|
5858
5818
|
onClick: isDisabled ? null : onClick,
|
|
5859
5819
|
type: type,
|
|
5860
5820
|
className: classnames__default["default"](styles$g.button, isDisabled ? styles$g.disabled : null, className),
|
|
@@ -5867,7 +5827,7 @@ const Button = _ref => {
|
|
|
5867
5827
|
Button.displayName = 'Button';
|
|
5868
5828
|
var Button$1 = Button;
|
|
5869
5829
|
|
|
5870
|
-
var messages$
|
|
5830
|
+
var messages$F = reactIntl.defineMessages({
|
|
5871
5831
|
chooseFile: {
|
|
5872
5832
|
id: 'ButtonFileInput.chooseFile',
|
|
5873
5833
|
description: 'The label text of the field for upload local file',
|
|
@@ -5875,21 +5835,21 @@ var messages$E = reactIntl.defineMessages({
|
|
|
5875
5835
|
}
|
|
5876
5836
|
});
|
|
5877
5837
|
|
|
5878
|
-
const _excluded$
|
|
5879
|
-
function ownKeys$
|
|
5880
|
-
function _objectSpread$
|
|
5838
|
+
const _excluded$d = ["children", "allowMultiple", "acceptTypes"];
|
|
5839
|
+
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; }
|
|
5840
|
+
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; }
|
|
5881
5841
|
var styles$f = {
|
|
5882
5842
|
"button": "file-input-module__button___2KypN",
|
|
5883
5843
|
"input": "file-input-module__input___3MP4D"
|
|
5884
5844
|
};
|
|
5885
5845
|
const FileInput = _ref => {
|
|
5886
5846
|
let _ref$children = _ref.children,
|
|
5887
|
-
children = _ref$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$
|
|
5847
|
+
children = _ref$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$_({}, messages$F.chooseFile)) : _ref$children,
|
|
5888
5848
|
_ref$allowMultiple = _ref.allowMultiple,
|
|
5889
5849
|
allowMultiple = _ref$allowMultiple === void 0 ? false : _ref$allowMultiple,
|
|
5890
5850
|
_ref$acceptTypes = _ref.acceptTypes,
|
|
5891
5851
|
acceptTypes = _ref$acceptTypes === void 0 ? 'image/png,image/jpeg,image/gif' : _ref$acceptTypes,
|
|
5892
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
5852
|
+
props = _objectWithoutProperties(_ref, _excluded$d);
|
|
5893
5853
|
return jsxRuntime.jsx("label", {
|
|
5894
5854
|
children: jsxRuntime.jsxs("span", {
|
|
5895
5855
|
className: styles$f.button,
|
|
@@ -5907,7 +5867,227 @@ const FileInput = _ref => {
|
|
|
5907
5867
|
FileInput.displayName = 'FileInput';
|
|
5908
5868
|
var FileInput$1 = FileInput;
|
|
5909
5869
|
|
|
5910
|
-
|
|
5870
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__$3() { 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)."; }
|
|
5871
|
+
|
|
5872
|
+
// Start with a button "css reset"
|
|
5873
|
+
const baseButtonStyles = process.env.NODE_ENV === "production" ? {
|
|
5874
|
+
name: "it1691",
|
|
5875
|
+
styles: "color:inherit;padding:0;font:inherit;cursor:pointer;outline:inherit;border:none;background:none"
|
|
5876
|
+
} : {
|
|
5877
|
+
name: "byohn2-baseButtonStyles",
|
|
5878
|
+
styles: "color:inherit;padding:0;font:inherit;cursor:pointer;outline:inherit;border:none;background:none;label:baseButtonStyles;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHbUMiLCJmaWxlIjoic3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vLyBTdGFydCB3aXRoIGEgYnV0dG9uIFwiY3NzIHJlc2V0XCJcbmV4cG9ydCBjb25zdCBiYXNlQnV0dG9uU3R5bGVzID0gY3NzYFxuICBjb2xvcjogaW5oZXJpdDtcbiAgcGFkZGluZzogMDtcbiAgZm9udDogaW5oZXJpdDtcbiAgY3Vyc29yOiBwb2ludGVyO1xuICBvdXRsaW5lOiBpbmhlcml0O1xuICBib3JkZXI6IG5vbmU7XG4gIGJhY2tncm91bmQ6IG5vbmU7XG5gO1xuIl19 */",
|
|
5879
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$3
|
|
5880
|
+
};
|
|
5881
|
+
|
|
5882
|
+
const _excluded$c = ["animationOrientation", "children", "onClick"];
|
|
5883
|
+
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; }
|
|
5884
|
+
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; }
|
|
5885
|
+
const ICON_COLOR$1 = '#6359ff';
|
|
5886
|
+
const PaginationIconButton = _ref => {
|
|
5887
|
+
let animationOrientation = _ref.animationOrientation,
|
|
5888
|
+
children = _ref.children,
|
|
5889
|
+
onClick = _ref.onClick,
|
|
5890
|
+
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
5891
|
+
return jsxRuntime.jsx("button", _objectSpread$Z(_objectSpread$Z({
|
|
5892
|
+
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24taWNvbi1idXR0b24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCUyIsImZpbGUiOiJwYWdpbmF0aW9uLWljb24tYnV0dG9uLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgUmVhY3RFbGVtZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgY3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cbiAgICAgICAgfVxuICAgICAgICAvLyBDb21wZW5zYXRlIGZvciBmb2N1cyBib3JkZXJcbiAgICAgICAgcGFkZGluZy1sZWZ0OiAxcHg7XG4gICAgICAgIHBhZGRpbmctcmlnaHQ6IDFweDtcbiAgICAgICAgOmZvY3VzIHtcbiAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCAke0lDT05fQ09MT1J9O1xuICAgICAgICAgIGJvcmRlci1yYWRpdXM6ICR7ZGVzaWduVG9rZW5zLmJvcmRlclJhZGl1czF9O1xuICAgICAgICAgIHBhZGRpbmctbGVmdDogMHB4O1xuICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IDBweDtcbiAgICAgICAgfVxuICAgICAgYCxcbiAgICBdfVxuICAgIG9uQ2xpY2s9e29uQ2xpY2t9XG4gICAgey4uLnJlc3R9XG4gID5cbiAgICB7Y2hpbGRyZW59XG4gIDwvYnV0dG9uPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvbkljb25CdXR0b247XG4iXX0= */"), process.env.NODE_ENV === "production" ? "" : ";label:PaginationIconButton;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24taWNvbi1idXR0b24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1CSSIsImZpbGUiOiJwYWdpbmF0aW9uLWljb24tYnV0dG9uLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgUmVhY3RFbGVtZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgZGVzaWduVG9rZW5zIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvdWkta2l0JztcbmltcG9ydCB7IGJhc2VCdXR0b25TdHlsZXMgfSBmcm9tIC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ICAgICBib3JkZXI6IDFweCBzb2xpZCAke0lDT05fQ09MT1J9O1xuICAgICAgICAgIGJvcmRlci1yYWRpdXM6ICR7ZGVzaWduVG9rZW5zLmJvcmRlclJhZGl1czF9O1xuICAgICAgICAgIHBhZGRpbmctbGVmdDogMHB4O1xuICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IDBweDtcbiAgICAgICAgfVxuICAgICAgYCxcbiAgICBdfVxuICAgIG9uQ2xpY2s9e29uQ2xpY2t9XG4gICAgey4uLnJlc3R9XG4gID5cbiAgICB7Y2hpbGRyZW59XG4gIDwvYnV0dG9uPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvbkljb25CdXR0b247XG4iXX0= */"],
|
|
5893
|
+
onClick: onClick
|
|
5894
|
+
}, rest), {}, {
|
|
5895
|
+
children: children
|
|
5896
|
+
}));
|
|
5897
|
+
};
|
|
5898
|
+
var PaginationIconButton$1 = PaginationIconButton;
|
|
5899
|
+
|
|
5900
|
+
const _excluded$b = ["isFilled", "onClick"];
|
|
5901
|
+
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; }
|
|
5902
|
+
function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Y(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Y(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5903
|
+
const ICON_HEIGHT = '10px';
|
|
5904
|
+
const ICON_WIDTH = ICON_HEIGHT;
|
|
5905
|
+
// TODO: Integrate design tokens when redesign is complete
|
|
5906
|
+
const ICON_COLOR = '#6359FF';
|
|
5907
|
+
const ICON_HOVER_COLOR = '#B1ACFF';
|
|
5908
|
+
const PaginationSelectionButton = _ref => {
|
|
5909
|
+
let _ref$isFilled = _ref.isFilled,
|
|
5910
|
+
isFilled = _ref$isFilled === void 0 ? false : _ref$isFilled,
|
|
5911
|
+
onClick = _ref.onClick,
|
|
5912
|
+
rest = _objectWithoutProperties(_ref, _excluded$b);
|
|
5913
|
+
return jsxRuntime.jsx("button", _objectSpread$Y({
|
|
5914
|
+
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcUJTIiwiZmlsZSI6InBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBkZXNpZ25Ub2tlbnMgfSBmcm9tICdAY29tb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zaXRpb25TdGFuZGFyZH07XG4gICAgICAgIDpob3ZlciB7XG4gICAgICAgICAgYmFja2dyb3VuZDogJHtpc0ZpbGxlZCA/IHVuZGVmaW5lZCA6IElDT05fSE9WRVJfQ09MT1J9O1xuICAgICAgICB9XG4gICAgICAgIDpmb2N1cyB7XG4gICAgICAgICAgYm9yZGVyOiAke2Rlc2lnblRva2Vucy5ib3JkZXJXaWR0aDF9IHNvbGlkICR7SUNPTl9DT0xPUn07XG4gICAgICAgIH1cbiAgICAgIGAsXG4gICAgXX1cbiAgICBvbkNsaWNrPXtvbkNsaWNrfVxuICAgIHsuLi5yZXN0fVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvblNlbGVjdGlvbkJ1dHRvbjtcbiJdfQ== */"), process.env.NODE_ENV === "production" ? "" : ";label:PaginationSelectionButton;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUJJIiwiZmlsZSI6InBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBkZXNpZ25Ub2tlbnMgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC91aS1raXQnO1xuaW1wb3J0IHsgYmFzZUJ1dHRvblN0eWxlcyB9IGZyb20gJy4vc2hhcmVkL3N0eWxlcyc7XG5cbmNvbnN0IElDT05fSEVJR0hUID0gJzEwcHgnO1xuY29uc3QgSUNPTl9XSURUSCA9IElDT05fSEVJR0hUO1xuLy8gVE9ETzogSW50ZWdyYXRlIGRlc2lnbiB0b2tlbnMgd2hlbiByZWRlc2lnbiB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G4gICAgICAgIH1cbiAgICAgIGAsXG4gICAgXX1cbiAgICBvbkNsaWNrPXtvbkNsaWNrfVxuICAgIHsuLi5yZXN0fVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvblNlbGVjdGlvbkJ1dHRvbjtcbiJdfQ== */"],
|
|
5915
|
+
onClick: onClick
|
|
5916
|
+
}, rest));
|
|
5917
|
+
};
|
|
5918
|
+
var PaginationSelectionButton$1 = PaginationSelectionButton;
|
|
5919
|
+
|
|
5920
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__$2() { 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)."; }
|
|
5921
|
+
const CAROUSEL_WIDTH = 384;
|
|
5922
|
+
const PAGINATION_CONTROL_HEIGHT = 26;
|
|
5923
|
+
const IMAGE_AREA_HEIGHT = 200;
|
|
5924
|
+
const BaseCarousel = _ref2 => {
|
|
5925
|
+
let items = _ref2.items,
|
|
5926
|
+
renderItem = _ref2.renderItem;
|
|
5927
|
+
// Randomize input array and cache across rerenders
|
|
5928
|
+
const _useState = React.useState(shuffle__default["default"](items)),
|
|
5929
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
5930
|
+
shuffledItems = _useState2[0],
|
|
5931
|
+
setShuffledItems = _useState2[1];
|
|
5932
|
+
const _useApplicationContex = applicationShellConnectors.useApplicationContext(context => ({
|
|
5933
|
+
projectKey: context.project?.key
|
|
5934
|
+
})),
|
|
5935
|
+
projectKey = _useApplicationContex.projectKey;
|
|
5936
|
+
const handleFilterItemsWhenFlagDisabled = idx => {
|
|
5937
|
+
const newItems = _filterInstanceProperty__default["default"](shuffledItems).call(shuffledItems, (_, idx1) => idx !== idx1);
|
|
5938
|
+
setShuffledItems(newItems);
|
|
5939
|
+
};
|
|
5940
|
+
const _useSnapCarousel = reactSnapCarousel.useSnapCarousel(),
|
|
5941
|
+
scrollRef = _useSnapCarousel.scrollRef,
|
|
5942
|
+
pages = _useSnapCarousel.pages,
|
|
5943
|
+
activePageIndex = _useSnapCarousel.activePageIndex,
|
|
5944
|
+
prev = _useSnapCarousel.prev,
|
|
5945
|
+
next = _useSnapCarousel.next,
|
|
5946
|
+
goTo = _useSnapCarousel.goTo;
|
|
5947
|
+
const handlePrev = () => {
|
|
5948
|
+
if (activePageIndex === 0) {
|
|
5949
|
+
goTo(pages.length - 1);
|
|
5950
|
+
} else {
|
|
5951
|
+
prev();
|
|
5952
|
+
}
|
|
5953
|
+
};
|
|
5954
|
+
const handleNext = () => {
|
|
5955
|
+
if (activePageIndex === pages.length - 1) {
|
|
5956
|
+
goTo(0);
|
|
5957
|
+
} else {
|
|
5958
|
+
next();
|
|
5959
|
+
}
|
|
5960
|
+
};
|
|
5961
|
+
const getLinkTo = activeItem => {
|
|
5962
|
+
return activeItem.isExternal ? activeItem.linkTo() : activeItem.linkTo(projectKey);
|
|
5963
|
+
};
|
|
5964
|
+
|
|
5965
|
+
// Get the current item safely
|
|
5966
|
+
const currentItem = shuffledItems[activePageIndex];
|
|
5967
|
+
|
|
5968
|
+
// Don't render if there's no current item
|
|
5969
|
+
if (!currentItem) {
|
|
5970
|
+
return null;
|
|
5971
|
+
}
|
|
5972
|
+
return jsxRuntime.jsxs("div", {
|
|
5973
|
+
css: /*#__PURE__*/react$1.css("width:", CAROUSEL_WIDTH, "px;position:relative;" + (process.env.NODE_ENV === "production" ? "" : ";label:BaseCarousel;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhcm91c2VsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5R2MiLCJmaWxlIjoiY2Fyb3VzZWwudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdHlwZSBSZWFjdEVsZW1lbnQsIHVzZVN0YXRlLCB1c2VFZmZlY3Qg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aWRkZW47XG4gICAgICAgICAgICAgIG1hcmdpbjogMDtcbiAgICAgICAgICAgICAgcGFkZGluZy1ib3R0b206ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmc2MH07XG4gICAgICAgICAgICBgfVxuICAgICAgICAgICAgcmVmPXtzY3JvbGxSZWZ9XG4gICAgICAgICAgPlxuICAgICAgICAgICAge3NodWZmbGVkSXRlbXMubWFwKChpdGVtLCBpZHgpID0+XG4gICAgICAgICAgICAgIHJlbmRlckl0ZW0oeyBpdGVtIH0sIGhhbmRsZUZpbHRlckl0ZW1zV2hlbkZsYWdEaXNhYmxlZCwgaWR4KVxuICAgICAgICAgICAgKX1cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9DYXJkPlxuICAgICAgPC9hPlxuXG4gICAgICA8ZGl2XG4gICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICAgICAgICBib3R0b206ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmdNfTtcbiAgICAgICAgICBsZWZ0OiA1MCU7XG4gICAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgICAgIGB9XG4gICAgICA+XG4gICAgICAgIDxkaXZcbiAgICAgICAgICBjc3M9e2Nzc2BcbiAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICAgICAgICAgIGxlZnQ6IC01MCU7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAke2Rlc2lnblRva2Vucy5jb2xvclN1cmZhY2V9O1xuICAgICAgICAgICAgcG9pbnRlci1ldmVudHM6IGF1dG87XG4gICAgICAgICAgICBoZWlnaHQ6ICR7UEFHSU5BVElPTl9DT05UUk9MX0hFSUdIVH1weDtcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6ICR7ZGVzaWduVG9rZW5zLmJvcmRlclJhZGl1czR9O1xuICAgICAgICAgICAgcGFkZGluZy1sZWZ0OiAke2Rlc2lnblRva2Vucy5zcGFjaW5nMjV9O1xuICAgICAgICAgICAgcGFkZGluZy1yaWdodDogJHtkZXNpZ25Ub2tlbnMuc3BhY2luZzI1fTtcbiAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICAgIGB9XG4gICAgICAgID5cbiAgICAgICAgICA8U3BhY2luZ3MuSW5saW5lXG4gICAgICAgICAgICBzY2FsZT1cIm1cIlxuICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ9XCJjZW50ZXJcIlxuICAgICAgICAgICAgYWxpZ25JdGVtcz1cImNlbnRlclwiXG4gICAgICAgICAgPlxuICAgICAgICAgICAgPFBhZ2luYXRpb25JY29uQnV0dG9uXG4gICAgICAgICAgICAgIGFuaW1hdGlvbk9yaWVudGF0aW9uPVwibGVmdFwiXG4gICAgICAgICAgICAgIG9uQ2xpY2s9e2hhbmRsZVByZXZ9XG4gICAgICAgICAgICAgIGFyaWEtbGFiZWw9XCJnbyB0byBwcmV2aW91cyBzbGlkZVwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxBbmdsZUxlZnRJY29uIHNpemU9XCJzbWFsbFwiIC8+XG4gICAgICAgICAgICA8L1BhZ2luYXRpb25JY29uQnV0dG9uPlxuICAgICAgICAgICAge3BhZ2VzLm1hcCgoXywgaSkgPT4gKFxuICAgICAgICAgICAgICA8UGFnaW5hdGlvblNlbGVjdGlvbkJ1dHRvblxuICAgICAgICAgICAgICAgIGtleT17aX1cbiAgICAgICAgICAgICAgICBpc0ZpbGxlZD17YWN0aXZlUGFnZUluZGV4ID09PSBpfVxuICAgICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IGdvVG8oaSl9XG4gICAgICAgICAgICAgICAgYXJpYS1sYWJlbD17YGdvIHRvIHNsaWRlICR7aSArIDF9YH1cbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICkpfVxuICAgICAgICAgICA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GRpdj5cbiAgICAgICAgICAgICAgPFN0YW1wXG4gICAgICAgICAgICAgICAgdG9uZT17aXRlbS5zdGFtcFRvbmV9XG4gICAgICAgICAgICAgICAgaXNDb25kZW5zZWRcbiAgICAgICAgICAgICAgICBsYWJlbD17aW50bC5mb3JtYXRNZXNzYWdlKGl0ZW0uc3RhbXBMYWJlbCl9XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxUZXh0LkJvZHkgaW50bE1lc3NhZ2U9e2l0ZW0udGV4dENvbnRlbnR9IC8+XG4gICAgICAgICAgPC9TcGFjaW5ncy5TdGFjaz5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L1NwYWNpbmdzLlN0YWNrPlxuICAgIDwvZGl2PlxuICApO1xufTtcblxuY29uc3QgQ2Fyb3VzZWwgPSAoeyBpdGVtcyB9OiBDYXJvdXNlbFByb3BzKSA9PiB7XG4gIHJldHVybiAoXG4gICAgPEJhc2VDYXJvdXNlbFxuICAgICAgaXRlbXM9e2l0ZW1zfVxuICAgICAgcmVuZGVySXRlbT17KHsgaXRlbSB9LCBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQsIGlkeCkgPT4gKFxuICAgICAgICA8Q2Fyb3VzZWxDb250ZW50XG4gICAgICAgICAga2V5PXtpdGVtLmlkfVxuICAgICAgICAgIGhhbmRsZUZpbHRlckl0ZW1zV2hlbkZsYWdEaXNhYmxlZD17aGFuZGxlRmlsdGVySXRlbXNXaGVuRmxhZ0Rpc2FibGVkfVxuICAgICAgICAgIGl0ZW09e2l0ZW19XG4gICAgICAgICAgaWR4PXtpZHh9XG4gICAgICAgIC8+XG4gICAgICApfVxuICAgIC8+XG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBDYXJvdXNlbDtcbiJdfQ== */"),
|
|
5974
|
+
role: "region",
|
|
5975
|
+
"aria-roledescription": "carousel",
|
|
5976
|
+
"aria-label": "rotunda",
|
|
5977
|
+
children: [jsxRuntime.jsx("a", {
|
|
5978
|
+
href: getLinkTo(currentItem),
|
|
5979
|
+
target: currentItem.isExternal ? '_blank' : '_self',
|
|
5980
|
+
rel: "noopener noreferrer",
|
|
5981
|
+
children: jsxRuntime.jsx(uiKit.Card, {
|
|
5982
|
+
insetScale: "none",
|
|
5983
|
+
onClick: () => {},
|
|
5984
|
+
children: jsxRuntime.jsx("div", {
|
|
5985
|
+
css: /*#__PURE__*/react$1.css("position:relative;display:flex;scroll-snap-type:x mandatory;overflow:hidden;margin:0;padding-bottom:", uiKit.designTokens.spacing60, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:BaseCarousel;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhcm91c2VsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4SG9CIiwiZmlsZSI6ImNhcm91c2VsLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgUmVhY3RFbGVtZW50LCB1c2VTdGF0ZSwgdXNlRWZmZWN0IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHNodWZmbGUgZnJvbSAnbG9kYXNoL3NodWZmbGUnO1xuaW1wb3J0IHsgdXNlSW50bCwgdHlwZSBNZXNzYWdlRGVzY3JpcHRvciB9IGZyb20gJ3JlYWN0LWludGwnO1xuaW1wb3J0IHsgdXNlU25hcENhcm91c2VsIH0gZnJvbSAncmVhY3Qtc25hcC1jYXJvdXNlbCc7XG5pbXBvcnQgeyB1c2VGZWF0dXJlVG9nZ2xlIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvYXBwbGljYXRpb24tc2hlbGwnO1xuaW1wb3J0IHsgdXNlQXBwbGljYXRpb25Db250ZXh0IH0gZn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sIGR1ZSB0byB0aGUgZGlmZmVyZW5jZXMgYmV0d2VlbiBjYXJvdXNlbCBzbGlkZXMgdGhhdFxuICAgICAgICAgIGhhdmUgZXh0ZXJuYWwgbGlua3MgYW5kIHRob3NlIHRoYXQgZG9uJ3QuXG4gICAgICAgKi99XG5cbiAgICAgIDxhXG4gICAgICAgIGhyZWY9e2dldExpbmtUbyhjdXJyZW50SXRlbSl9XG4gICAgICAgIHRhcmdldD17Y3VycmVudEl0ZW0uaXNFeHRlcm5hbCA/ICdfYmxhbmsnIDogJ19zZWxmJ31cbiAgICAgICAgcmVsPVwibm9vcGVuZXIgbm9yZWZlcnJlclwiXG4gICAgICA+XG4gICAgICAgIDxDYXJkIGluc2V0U2NhbGU9XCJub25lXCIgb25DbGljaz17KCkgPT4ge319PlxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICAgIHNjcm9sbC1zbmFwLXR5cGU6IHggbWFuZGF0b3J5O1xuICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgICAgICAgICAgICBtYXJnaW46IDA7XG4gICAgICAgICAgICAgIHBhZGRpbmctYm90dG9tOiAke2Rlc2lnblRva2Vucy5zcGFjaW5nNjB9O1xuICAgICAgICAgICAgYH1cbiAgICAgICAgICAgIHJlZj17c2Nyb2xsUmVmfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHtzaHVmZmxlZEl0ZW1zLm1hcCgoaXRlbSwgaWR4KSA9PlxuICAgICAgICAgICAgICByZW5kZXJJdGVtKHsgaXRlbSB9LCBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQsIGlkeClcbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvQ2FyZD5cbiAgICAgIDwvYT5cblxuICAgICAgPGRpdlxuICAgICAgICBjc3M9e2Nzc2BcbiAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgICAgYm90dG9tOiAke2Rlc2lnblRva2Vucy5zcGFjaW5nTX07XG4gICAgICAgICAgbGVmdDogNTAlO1xuICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lO1xuICAgICAgICBgfVxuICAgICAgPlxuICAgICAgICA8ZGl2XG4gICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICAgICBsZWZ0OiAtNTAlO1xuICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJHtkZXNpZ25Ub2tlbnMuY29sb3JTdXJmYWNlfTtcbiAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBhdXRvO1xuICAgICAgICAgICAgaGVpZ2h0OiAke1BBR0lOQVRJT05fQ09OVFJPTF9IRUlHSFR9cHg7XG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiAke2Rlc2lnblRva2Vucy5ib3JkZXJSYWRpdXM0fTtcbiAgICAgICAgICAgIHBhZGRpbmctbGVmdDogJHtkZXNpZ25Ub2tlbnMuc3BhY2luZzI1fTtcbiAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmcyNX07XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgICBgfVxuICAgICAgICA+XG4gICAgICAgICAgPFNwYWNpbmdzLklubGluZVxuICAgICAgICAgICAgc2NhbGU9XCJtXCJcbiAgICAgICAgICAgIGp1c3RpZnlDb250ZW50PVwiY2VudGVyXCJcbiAgICAgICAgICAgIGFsaWduSXRlbXM9XCJjZW50ZXJcIlxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxQYWdpbmF0aW9uSWNvbkJ1dHRvblxuICAgICAgICAgICAgICBhbmltYXRpb25PcmllbnRhdGlvbj1cImxlZnRcIlxuICAgICAgICAgICAgICBvbkNsaWNrPXtoYW5kbGVQcmV2fVxuICAgICAgICAgICAgICBhcmlhLWxhYmVsPVwiZ28gdG8gcHJldmlvdXMgc2xpZGVcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QW5nbGVMZWZ0SWNvbiBzaXplPVwic21hbGxcIiAvPlxuICAgICAgICAgICAgPC9QYWdpbmF0aW9uSWNvbkJ1dHRvbj5cbiAgICAgICAgICAgIHtwYWdlcy5tYXAoKF8sIGkpID0+IChcbiAgICAgICAgICAgICAgPFBhZ2luYXRpb25TZWxlY3Rpb25CdXR0b25cbiAgICAgICAgICAgICAgICBrZXk9e2l9XG4gICAgICAgICAgICAgICAgaXNGaWxsZWQ9e2FjdGl2ZVBhZ2VJbmRleCA9PT0gaX1cbiAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBnb1RvKGkpfVxuICAgICAgICAgICAgICAgIGFyaWEtbGFiZWw9e2BnbyB0byBzbGlkZSAke2kgKyAxfWB9XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApKX1cbiAgICAgICAgICAgIDxQYWdpbmF0aW9uSWNvbkJ1dHRvblxuICAgICAgICAgICAgICBhbmltYXRpb25PcmllbnRhdGlvbj1cInJpZ2h0XCJcbiAgICAgICAgICAgICAgb25DbGljaz17aGFuZGxlTmV4dH1cbiAgICAgICAgICAgICAgYXJpYS1sYWJlbD1cImdvIHRvIG5leHQgc2xpZGVcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QW5nbGVSaWdodEljb24gc2l6ZT1cInNtYWxsXCIgLz5cbiAgICAgICAgICAgIDwvUGFnaW5hdGlvbkljb25CdXR0b24+XG4gICAgICAgICAgPC9TcGFjaW5ncy5JbmxpbmU+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG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xleC1zaHJpbms6IDA7XG4gICAgICAgIHNjcm9sbC1zbmFwLWFsaWduOiBzdGFydDtcbiAgICAgIGB9XG4gICAgPlxuICAgICAgPFNwYWNpbmdzLlN0YWNrPlxuICAgICAgICA8aW1nXG4gICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgICAgICAgIGhlaWdodDogJHtJTUFHRV9BUkVBX0hFSUdIVH1weDtcbiAgICAgICAgICBgfVxuICAgICAgICAgIHNyYz17aXRlbS5pbWdTcmN9XG4gICAgICAgICAgYWx0PXtpbnRsLmZvcm1hdE1lc3NhZ2UoaXRlbS5pbWdBbHQpfVxuICAgICAgICAvPlxuICAgICAgICA8ZGl2XG4gICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICBwYWRkaW5nOiAwICR7ZGVzaWduVG9rZW5zLnNwYWNpbmdMfSAwICR7ZGVzaWduVG9rZW5zLnNwYWNpbmdMfTtcbiAgICAgICAgICBgfVxuICAgICAgICA+XG4gICAgICAgICAgPFNwYWNpbmdzLlN0YWNrIHNjYWxlPVwieHNcIj5cbiAgICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICAgIDxTdGFtcFxuICAgICAgICAgICAgICAgIHRvbmU9e2l0ZW0uc3RhbXBUb25lfVxuICAgICAgICAgICAgICAgIGlzQ29uZGVuc2VkXG4gICAgICAgICAgICAgICAgbGFiZWw9e2ludGwuZm9ybWF0TWVzc2FnZShpdGVtLnN0YW1wTGFiZWwpfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8VGV4dC5Cb2R5IGludGxNZXNzYWdlPXtpdGVtLnRleHRDb250ZW50fSAvPlxuICAgICAgICAgIDwvU3BhY2luZ3MuU3RhY2s+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9TcGFjaW5ncy5TdGFjaz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbmNvbnN0IENhcm91c2VsID0gKHsgaXRlbXMgfTogQ2Fyb3VzZWxQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxCYXNlQ2Fyb3VzZWxcbiAgICAgIGl0ZW1zPXtpdGVtc31cbiAgICAgIHJlbmRlckl0ZW09eyh7IGl0ZW0gfSwgaGFuZGxlRmlsdGVySXRlbXNXaGVuRmxhZ0Rpc2FibGVkLCBpZHgpID0+IChcbiAgICAgICAgPENhcm91c2VsQ29udGVudFxuICAgICAgICAgIGtleT17aXRlbS5pZH1cbiAgICAgICAgICBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQ9e2hhbmRsZUZpbHRlckl0ZW1zV2hlbkZsYWdEaXNhYmxlZH1cbiAgICAgICAgICBpdGVtPXtpdGVtfVxuICAgICAgICAgIGlkeD17aWR4fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAvPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ2Fyb3VzZWw7XG4iXX0= */"),
|
|
5986
|
+
ref: scrollRef,
|
|
5987
|
+
children: _mapInstanceProperty__default["default"](shuffledItems).call(shuffledItems, (item, idx) => renderItem({
|
|
5988
|
+
item
|
|
5989
|
+
}, handleFilterItemsWhenFlagDisabled, idx))
|
|
5990
|
+
})
|
|
5991
|
+
})
|
|
5992
|
+
}), jsxRuntime.jsx("div", {
|
|
5993
|
+
css: /*#__PURE__*/react$1.css("position:absolute;bottom:", uiKit.designTokens.spacingM, ";left:50%;pointer-events:none;" + (process.env.NODE_ENV === "production" ? "" : ";label:BaseCarousel;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhcm91c2VsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnSmdCIiwiZmlsZSI6ImNhcm91c2VsLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgUmV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mFwLXR5cGU6IHggbWFuZGF0b3J5O1xuICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgICAgICAgICAgICBtYXJnaW46IDA7XG4gICAgICAgICAgICAgIHBhZGRpbmctYm90dG9tOiAke2Rlc2lnblRva2Vucy5zcGFjaW5nNjB9O1xuICAgICAgICAgICAgYH1cbiAgICAgICAgICAgIHJlZj17c2Nyb2xsUmVmfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHtzaHVmZmxlZEl0ZW1zLm1hcCgoaXRlbSwgaWR4KSA9PlxuICAgICAgICAgICAgICByZW5kZXJJdGVtKHsgaXRlbSB9LCBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQsIGlkeClcbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvQ2FyZD5cbiAgICAgIDwvYT5cblxuICAgICAgPGRpdlxuICAgICAgICBjc3M9e2Nzc2BcbiAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgICAgYm90dG9tOiAke2Rlc2lnblRva2Vucy5zcGFjaW5nTX07XG4gICAgICAgICAgbGVmdDogNTAlO1xuICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lO1xuICAgICAgICBgfVxuICAgICAgPlxuICAgICAgICA8ZGl2XG4gICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICAgICBsZWZ0OiAtNTAlO1xuICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJHtkZXNpZ25Ub2tlbnMuY29sb3JTdXJmYWNlfTtcbiAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBhdXRvO1xuICAgICAgICAgICAgaGVpZ2h0OiAke1BBR0lOQVRJT05fQ09OVFJPTF9IRUlHSFR9cHg7XG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiAke2Rlc2lnblRva2Vucy5ib3JkZXJSYWRpdXM0fTtcbiAgICAgICAgICAgIHBhZGRpbmctbGVmdDogJHtkZXNpZ25Ub2tlbnMuc3BhY2luZzI1fTtcbiAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmcyNX07XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgICBgfVxuICAgICAgICA+XG4gICAgICAgICAgPFNwYWNpbmdzLklubGluZVxuICAgICAgICAgICAgc2NhbGU9XCJtXCJcbiAgICAgICAgICAgIGp1c3RpZnlDb250ZW50PVwiY2VudGVyXCJcbiAgICAgICAgICAgIGFsaWduSXRlbXM9XCJjZW50ZXJcIlxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxQYWdpbmF0aW9uSWNvbkJ1dHRvblxuICAgICAgICAgICAgICBhbmltYXRpb25PcmllbnRhdGlvbj1cImxlZnRcIlxuICAgICAgICAgICAgICBvbkNsaWNrPXtoYW5kbGVQcmV2fVxuICAgICAgICAgICAgICBhcmlhLWxhYmVsPVwiZ28gdG8gcHJldmlvdXMgc2xpZGVcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QW5nbGVMZWZ0SWNvbiBzaXplPVwic21hbGxcIiAvPlxuICAgICAgICAgICAgPC9QYWdpbmF0aW9uSWNvbkJ1dHRvbj5cbiAgICAgICAgICAgIHtwYWdlcy5tYXAoKF8sIGkpID0+IChcbiAgICAgICAgICAgICAgPFBhZ2luYXRpb25TZWxlY3Rpb25CdXR0b25cbiAgICAgICAgICAgICAgICBrZXk9e2l9XG4gICAgICAgICAgICAgICAgaXNGaWxsZWQ9e2FjdGl2ZVBhZ2VJbmRleCA9PT0gaX1cbiAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBnb1RvKGkpfVxuICAgICAgICAgICAgICAgIGFyaWEtbGFiZWw9e2BnbyB0byBzbGlkZSAke2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NjYWxlPVwieHNcIj5cbiAgICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICAgIDxTdGFtcFxuICAgICAgICAgICAgICAgIHRvbmU9e2l0ZW0uc3RhbXBUb25lfVxuICAgICAgICAgICAgICAgIGlzQ29uZGVuc2VkXG4gICAgICAgICAgICAgICAgbGFiZWw9e2ludGwuZm9ybWF0TWVzc2FnZShpdGVtLnN0YW1wTGFiZWwpfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8VGV4dC5Cb2R5IGludGxNZXNzYWdlPXtpdGVtLnRleHRDb250ZW50fSAvPlxuICAgICAgICAgIDwvU3BhY2luZ3MuU3RhY2s+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9TcGFjaW5ncy5TdGFjaz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbmNvbnN0IENhcm91c2VsID0gKHsgaXRlbXMgfTogQ2Fyb3VzZWxQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxCYXNlQ2Fyb3VzZWxcbiAgICAgIGl0ZW1zPXtpdGVtc31cbiAgICAgIHJlbmRlckl0ZW09eyh7IGl0ZW0gfSwgaGFuZGxlRmlsdGVySXRlbXNXaGVuRmxhZ0Rpc2FibGVkLCBpZHgpID0+IChcbiAgICAgICAgPENhcm91c2VsQ29udGVudFxuICAgICAgICAgIGtleT17aXRlbS5pZH1cbiAgICAgICAgICBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQ9e2hhbmRsZUZpbHRlckl0ZW1zV2hlbkZsYWdEaXNhYmxlZH1cbiAgICAgICAgICBpdGVtPXtpdGVtfVxuICAgICAgICAgIGlkeD17aWR4fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAvPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ2Fyb3VzZWw7XG4iXX0= */"),
|
|
5994
|
+
children: jsxRuntime.jsx("div", {
|
|
5995
|
+
css: /*#__PURE__*/react$1.css("position:relative;left:-50%;background-color:", uiKit.designTokens.colorSurface, ";pointer-events:auto;height:", PAGINATION_CONTROL_HEIGHT, "px;border-radius:", uiKit.designTokens.borderRadius4, ";padding-left:", uiKit.designTokens.spacing25, ";padding-right:", uiKit.designTokens.spacing25, ";display:flex;align-items:center;" + (process.env.NODE_ENV === "production" ? "" : ";label:BaseCarousel;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhcm91c2VsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3SmtCIiwiZmlsZSI6ImNhcm91c2VsLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgUmVhY3RFbGVtZW50LCB1c2VTdGF0ZSwgdXNlRWZmZWN0IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHNodWZmbGUgZnJvbSAnbG9kYXNoL3NodWZmbGUnO1xuaW1wb3J0IHsgdXNlSW50bCwgdHlwZSBNZXNzYWdlRGVzY3JpcHRvciB9IGZyb20gJ3JlYWN0LWludGwnO1xuaW1wb3J0IHsgdXNlU25hcENhcm91c2VsIH0gZnJvbSAncmVhY3Qtc25hcC1jYXJvdXNlbCc7XG5pbXBvcnQgeyB1c2VGZWF0dXJlVG9nZ2xlIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvYXBwbGljYXRpb24tc2hlbGwnO1xuaW1wb3J0IHsgdXNlQXBwbGljYXRpb25Db250ZXh0IH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvYXBwbGljYXRpb24tc2hlbGwtY29ubmVjdG9ycyc7XG5pbXBvcnQge1xuICBDYXJkLFxuICBTcGFjaW5ncyxcbiAgU3RhbXAsXG4gIFRleHQsXG4g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ICAgICAgKi99XG5cbiAgICAgIDxhXG4gICAgICAgIGhyZWY9e2dldExpbmtUbyhjdXJyZW50SXRlbSl9XG4gICAgICAgIHRhcmdldD17Y3VycmVudEl0ZW0uaXNFeHRlcm5hbCA/ICdfYmxhbmsnIDogJ19zZWxmJ31cbiAgICAgICAgcmVsPVwibm9vcGVuZXIgbm9yZWZlcnJlclwiXG4gICAgICA+XG4gICAgICAgIDxDYXJkIGluc2V0U2NhbGU9XCJub25lXCIgb25DbGljaz17KCkgPT4ge319PlxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICAgIHNjcm9sbC1zbmFwLXR5cGU6IHggbWFuZGF0b3J5O1xuICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgICAgICAgICAgICBtYXJnaW46IDA7XG4gICAgICAgICAgICAgIHBhZGRpbmctYm90dG9tOiAke2Rlc2lnblRva2Vucy5zcGFjaW5nNjB9O1xuICAgICAgICAgICAgYH1cbiAgICAgICAgICAgIHJlZj17c2Nyb2xsUmVmfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHtzaHVmZmxlZEl0ZW1zLm1hcCgoaXRlbSwgaWR4KSA9PlxuICAgICAgICAgICAgICByZW5kZXJJdGVtKHsgaXRlbSB9LCBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQsIGlkeClcbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvQ2FyZD5cbiAgICAgIDwvYT5cblxuICAgICAgPGRpdlxuICAgICAgICBjc3M9e2Nzc2BcbiAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgICAgYm90dG9tOiAke2Rlc2lnblRva2Vucy5zcGFjaW5nTX07XG4gICAgICAgICAgbGVmdDogNTAlO1xuICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lO1xuICAgICAgICBgfVxuICAgICAgPlxuICAgICAgICA8ZGl2XG4gICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICAgICBsZWZ0OiAtNTAlO1xuICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJHtkZXNpZ25Ub2tlbnMuY29sb3JTdXJmYWNlfTtcbiAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBhdXRvO1xuICAgICAgICAgICAgaGVpZ2h0OiAke1BBR0lOQVRJT05fQ09OVFJPTF9IRUlHSFR9cHg7XG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiAke2Rlc2lnblRva2Vucy5ib3JkZXJSYWRpdXM0fTtcbiAgICAgICAgICAgIHBhZGRpbmctbGVmdDogJHtkZXNpZ25Ub2tlbnMuc3BhY2luZzI1fTtcbiAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmcyNX07XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgICBgfVxuICAgICAgICA+XG4gICAgICAgICAgPFNwYWNpbmdzLklubGluZVxuICAgICAgICAgICAgc2NhbGU9XCJtXCJcbiAgICAgICAgICAgIGp1c3RpZnlDb250ZW50PVwiY2VudGVyXCJcbiAgICAgICAgICAgIGFsaWduSXRlbXM9XCJjZW50ZXJcIlxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxQYWdpbmF0aW9uSWNvbkJ1dHRvblxuICAgICAgICAgICAgICBhbmltYXRpb25PcmllbnRhdGlvbj1cImxlZnRcIlxuICAgICAgICAgICAgICBvbkNsaWNrPXtoYW5kbGVQcmV2fVxuICAgICAgICAgICAgICBhcmlhLWxhYmVsPVwiZ28gdG8gcHJldmlvdXMgc2xpZGVcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QW5nbGVMZWZ0SWNvbiBzaXplPVwic21hbGxcIiAvPlxuICAgICAgICAgICAgPC9QYWdpbmF0aW9uSWNvbkJ1dHRvbj5cbiAgICAgICAgICAgIHtwYWdlcy5tYXAoKF8sIGkpID0+IChcbiAgICAgICAgICAgICAgPFBhZ2luYXRpb25TZWxlY3Rpb25CdXR0b25cbiAgICAgICAgICAgICAgICBrZXk9e2l9XG4gICAgICAgICAgICAgICAgaXNGaWxsZWQ9e2FjdGl2ZVBhZ2VJbmRleCA9PT0gaX1cbiAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBnb1RvKGkpfVxuICAgICAgICAgICAgICAgIGFyaWEtbGFiZWw9e2BnbyB0byBzbGlkZSAke2kgKyAxfWB9XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApKX1cbiAgICAgICAgICAgIDxQYWdpbmF0aW9uSWNvbkJ1dHRvblxuICAgICAgICAgICAgICBhbmltYXRpb25PcmllbnRhdGlvbj1cInJpZ2h0XCJcbiAgICAgICAgICAgICAgb25DbGljaz17aGFuZGxlTmV4dH1cbiAgICAgICAgICAgICAgYXJpYS1sYWJlbD1cImdvIHRvIG5leHQgc2xpZGVcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QW5nbGVSaWdodEljb24gc2l6ZT1cInNtYWxsXCIgLz5cbiAgICAgICAgICAgIDwvUGFnaW5hdGlvbkljb25CdXR0b24+XG4gICAgICAgICAgPC9TcGFjaW5ncy5JbmxpbmU+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9kaXY+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG50eXBlIENhcm91c2VsUHJvcHMgPSB7XG4gIGl0ZW1zOiBDYXJvdXNlbEl0ZW1bXTtcbn07XG5cbnR5cGUgQ2Fyb3VzZWxDb250ZW50UHJvcHMgPSB7XG4gIGl0ZW06IENhcm91c2VsSXRlbTtc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IGl0ZW0gfSwgaGFuZGxlRmlsdGVySXRlbXNXaGVuRmxhZ0Rpc2FibGVkLCBpZHgpID0+IChcbiAgICAgICAgPENhcm91c2VsQ29udGVudFxuICAgICAgICAgIGtleT17aXRlbS5pZH1cbiAgICAgICAgICBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQ9e2hhbmRsZUZpbHRlckl0ZW1zV2hlbkZsYWdEaXNhYmxlZH1cbiAgICAgICAgICBpdGVtPXtpdGVtfVxuICAgICAgICAgIGlkeD17aWR4fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAvPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ2Fyb3VzZWw7XG4iXX0= */"),
|
|
5996
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
5997
|
+
scale: "m",
|
|
5998
|
+
justifyContent: "center",
|
|
5999
|
+
alignItems: "center",
|
|
6000
|
+
children: [jsxRuntime.jsx(PaginationIconButton$1, {
|
|
6001
|
+
animationOrientation: "left",
|
|
6002
|
+
onClick: handlePrev,
|
|
6003
|
+
"aria-label": "go to previous slide",
|
|
6004
|
+
children: jsxRuntime.jsx(uiKit.AngleLeftIcon, {
|
|
6005
|
+
size: "small"
|
|
6006
|
+
})
|
|
6007
|
+
}), _mapInstanceProperty__default["default"](pages).call(pages, (_, i) => jsxRuntime.jsx(PaginationSelectionButton$1, {
|
|
6008
|
+
isFilled: activePageIndex === i,
|
|
6009
|
+
onClick: () => goTo(i),
|
|
6010
|
+
"aria-label": `go to slide ${i + 1}`
|
|
6011
|
+
}, i)), jsxRuntime.jsx(PaginationIconButton$1, {
|
|
6012
|
+
animationOrientation: "right",
|
|
6013
|
+
onClick: handleNext,
|
|
6014
|
+
"aria-label": "go to next slide",
|
|
6015
|
+
children: jsxRuntime.jsx(uiKit.AngleRightIcon, {
|
|
6016
|
+
size: "small"
|
|
6017
|
+
})
|
|
6018
|
+
})]
|
|
6019
|
+
})
|
|
6020
|
+
})
|
|
6021
|
+
})]
|
|
6022
|
+
});
|
|
6023
|
+
};
|
|
6024
|
+
var _ref$2 = process.env.NODE_ENV === "production" ? {
|
|
6025
|
+
name: "97rk2e",
|
|
6026
|
+
styles: "width:100%;height:100%;flex-shrink:0;scroll-snap-align:start"
|
|
6027
|
+
} : {
|
|
6028
|
+
name: "9drgo8-CarouselContent",
|
|
6029
|
+
styles: "width:100%;height:100%;flex-shrink:0;scroll-snap-align:start;label:CarouselContent;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhcm91c2VsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3T2MiLCJmaWxlIjoiY2Fyb3VzZWwudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdHlwZSBSZWFjdEVsZW1lbnQsIHVzZVN0YXRlLCB1c2VFZmZlY3QgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc2h1ZmZsZSBmcm9tICdsb2Rhc2gvc2h1ZmZsZSc7XG5pbXBvcnQgeyB1c2VJbnRsLCB0eXBlIE1lc3NhZ2VEZXNjcmlwdG9yIH0gZnJvbSAncmVhY3QtaW50bCc7XG5pbXBvcnQgeyB1c2VTbmFwQ2Fyb3VzZWwgfSBmcm9tICdyZWFjdC1zbmFwLWNhcm91c2VsJztcbmltcG9ydCB7IHVzZUZlYXR1cmVUb2dnbGUgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9hcHBsaWNhdGlvbi1zaGVsbCc7XG5pbXBvcnQgeyB1c2VBcHBsaWNhdGlvbkNvbnRleHQgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9hcHBsaWNhdGlvbi1zaGVsbC1jb25uZWN0b3JzJztcbmltcG9ydCB7XG4gIENhcmQsXG4gIFNwYWNpbmd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24ndC5cbiAgICAgICAqL31cblxuICAgICAgPGFcbiAgICAgICAgaHJlZj17Z2V0TGlua1RvKGN1cnJlbnRJdGVtKX1cbiAgICAgICAgdGFyZ2V0PXtjdXJyZW50SXRlbS5pc0V4dGVybmFsID8gJ19ibGFuaycgOiAnX3NlbGYnfVxuICAgICAgICByZWw9XCJub29wZW5lciBub3JlZmVycmVyXCJcbiAgICAgID5cbiAgICAgICAgPENhcmQgaW5zZXRTY2FsZT1cIm5vbmVcIiBvbkNsaWNrPXsoKSA9PiB7fX0+XG4gICAgICAgICAgPGRpdlxuICAgICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICAgICAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgICAgICAgc2Nyb2xsLXNuYXAtdHlwZTogeCBtYW5kYXRvcnk7XG4gICAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgICAgICAgICAgIG1hcmdpbjogMDtcbiAgICAgICAgICAgICAgcGFkZGluZy1ib3R0b206ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmc2MH07XG4gICAgICAgICAgICBgfVxuICAgICAgICAgICAgcmVmPXtzY3JvbGxSZWZ9XG4gICAgICAgICAgPlxuICAgICAgICAgICAge3NodWZmbGVkSXRlbXMubWFwKChpdGVtLCBpZHgpID0+XG4gICAgICAgICAgICAgIHJlbmRlckl0ZW0oeyBpdGVtIH0sIGhhbmRsZUZpbHRlckl0ZW1zV2hlbkZsYWdEaXNhYmxlZCwgaWR4KVxuICAgICAgICAgICAgKX1cbiAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9DYXJkPlxuICAgICAgPC9hPlxuXG4gICAgICA8ZGl2XG4gICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICAgICAgICBib3R0b206ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmdNfTtcbiAgICAgICAgICBsZWZ0OiA1MCU7XG4gICAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgICAgIGB9XG4gICAgICA+XG4gICAgICAgIDxkaXZcbiAgICAgICAgICBjc3M9e2Nzc2BcbiAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICAgICAgICAgIGxlZnQ6IC01MCU7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAke2Rlc2lnblRva2Vucy5jb2xvclN1cmZhY2V9O1xuICAgICAgICAgICAgcG9pbnRlci1ldmVudHM6IGF1dG87XG4gICAgICAgICAgICBoZWlnaHQ6ICR7UEFHSU5BVElPTl9DT05UUk9MX0hFSUdIVH1weDtcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6ICR7ZGVzaWduVG9rZW5zLmJvcmRlclJhZGl1czR9O1xuICAgICAgICAgICAgcGFkZGluZy1sZWZ0OiAke2Rlc2lnblRva2Vucy5zcGFjaW5nMjV9O1xuICAgICAgICAgICAgcGFkZGluZy1yaWdodDogJHtkZXNpZ25Ub2tlbnMuc3BhY2luZzI1fTtcbiAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICAgIGB9XG4gICAgICAgID5cbiAgICAgICAgICA8U3BhY2luZ3MuSW5saW5lXG4gICAgICAgICAgICBzY2FsZT1cIm1cIlxuICAgICAgICAgICAganVzdGlmeUNvbnRlbnQ9XCJjZW50ZXJcIlxuICAgICAgICAgICAgYWxpZ25JdGVtcz1cImNlbnRlclwiXG4gICAgICAgICAgPlxuICAgICAgICAgICAgPFBhZ2luYXRpb25JY29uQnV0dG9uXG4gICAgICAgICAgICAgIGFuaW1hdGlvbk9yaWVudGF0aW9uPVwibGVmdFwiXG4gICAgICAgICAgICAgIG9uQ2xpY2s9e2hhbmRsZVByZXZ9XG4gICAgICAgICAgICAgIGFyaWEtbGFiZWw9XCJnbyB0byBwcmV2aW91cyBzbGlkZVwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxBbmdsZUxlZnRJY29uIHNpemU9XCJzbWFsbFwiIC8+XG4gICAgICAgICAgICA8L1BhZ2luYXRpb25JY29uQnV0dG9uPlxuICAgICAgICAgICAge3BhZ2VzLm1hcCgoXywgaSkgPT4gKFxuICAgICAgICAgICAgICA8UGFnaW5hdGlvblNlbGVjdGlvbkJ1dHRvblxuICAgICAgICAgICAgICAgIGtleT17aX1cbiAgICAgICAgICAgICAgICBpc0ZpbGxlZD17YWN0aXZlUGFnZUluZGV4ID09PSBpfVxuICAgICAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IGdvVG8oaSl9XG4gICAgICAgICAgICAgICAgYXJpYS1sYWJlbD17YGdvIHRvIHNsaWRlICR7aSArIDF9YH1cbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICkpfVxuICAgICAgICAgICAgPFBhZ2luYXRpb25JY29uQnV0dG9uXG4gICAgICAgICAgICAgIGFuaW1hdGlvbk9yaWVudGF0aW9uPVwicmlnaHRcIlxuICAgICAgICAgICAgICBvbkNsaWNrPXtoYW5kbGVOZXh0fVxuICAgICAgICAgICAgICBhcmlhLWxhYmVsPVwiZ28gdG8gbmV4dCBzbGlkZVwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxBbmdsZVJpZ2h0SWNvbiBzaXplPVwic21hbGxcIiAvPlxuICAgICAgICAgICAgPC9QYWdpbmF0aW9uSWNvbkJ1dHRvbj5cbiAgICAgICAgICA8L1NwYWNpbmdzLklubGluZT5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbnR5cGUgQ2Fyb3VzZWxQcm9wcyA9IHtcbiAgaXRlbXM6IENhcm91c2VsSXRlbVtdO1xufTtcblxudHlwZSBDYXJvdXNlbENvbnRlbnRQcm9wcyA9IHtcbiAgaXRlbTogQ2Fy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e2l0ZW1zfVxuICAgICAgcmVuZGVySXRlbT17KHsgaXRlbSB9LCBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQsIGlkeCkgPT4gKFxuICAgICAgICA8Q2Fyb3VzZWxDb250ZW50XG4gICAgICAgICAga2V5PXtpdGVtLmlkfVxuICAgICAgICAgIGhhbmRsZUZpbHRlckl0ZW1zV2hlbkZsYWdEaXNhYmxlZD17aGFuZGxlRmlsdGVySXRlbXNXaGVuRmxhZ0Rpc2FibGVkfVxuICAgICAgICAgIGl0ZW09e2l0ZW19XG4gICAgICAgICAgaWR4PXtpZHh9XG4gICAgICAgIC8+XG4gICAgICApfVxuICAgIC8+XG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBDYXJvdXNlbDtcbiJdfQ== */",
|
|
6030
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
6031
|
+
};
|
|
6032
|
+
const CarouselContent = _ref3 => {
|
|
6033
|
+
let item = _ref3.item,
|
|
6034
|
+
handleFilterItemsWhenFlagDisabled = _ref3.handleFilterItemsWhenFlagDisabled,
|
|
6035
|
+
idx = _ref3.idx;
|
|
6036
|
+
const isEnabled = applicationShell.useFeatureToggle(item.flag || '');
|
|
6037
|
+
const intl = reactIntl.useIntl();
|
|
6038
|
+
React.useEffect(() => {
|
|
6039
|
+
if (item.flag && !isEnabled) {
|
|
6040
|
+
handleFilterItemsWhenFlagDisabled(idx);
|
|
6041
|
+
}
|
|
6042
|
+
}, [isEnabled, handleFilterItemsWhenFlagDisabled, idx, item]);
|
|
6043
|
+
if (item.flag && !isEnabled) {
|
|
6044
|
+
return null;
|
|
6045
|
+
}
|
|
6046
|
+
return jsxRuntime.jsx("div", {
|
|
6047
|
+
role: "group",
|
|
6048
|
+
"aria-roledescription": "slide",
|
|
6049
|
+
"aria-label": `slide-${idx + 1}`,
|
|
6050
|
+
css: _ref$2,
|
|
6051
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
6052
|
+
children: [jsxRuntime.jsx("img", {
|
|
6053
|
+
css: /*#__PURE__*/react$1.css("width:100%;height:", IMAGE_AREA_HEIGHT, "px;" + (process.env.NODE_ENV === "production" ? "" : ";label:CarouselContent;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhcm91c2VsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpUGtCIiwiZmlsZSI6ImNhcm91c2VsLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgUmVhY3RFbGVtZW50LCB1c2VTdGF0ZSwgdXNlRWZmZWN0IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHNodWZmbGUgZnJvbSAnbG9kYXNoL3NodWZmbGUnO1xuaW1wb3J0IHsgdXNlSW50bCwgdHlwZSBNZXNzYWdlRGVzY3JpcHRvciB9IGZyb20gJ3JlYWN0LWludGwnO1xuaW1wb3J0IHsgdXNlU25hcENhcm91c2VsIH0gZnJvbSAncmVhY3Qtc25hcC1jYXJvdXNlbCc7XG5pbXBvcnQgeyB1c2VGZWF0dXJlVG9nZ2xlIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvYXBwbGljYXRpb24tc2hlbGwnO1xuaW1wb3J0IHsgdXNlQXBwbGljYXRpb25Db250ZXh0IH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvYXBwbGljYXRpb24tc2hlbGwtY29ubmVjdG9ycyc7XG5pbXBvcnQge1xuICBDYXJkLFxuICBTcGFjaW5ncyxcbiAgU3RhbXAsXG4gIFRleHQsXG4gIEFuZ2xlTGVmdEljb24sXG4gIEFuZ2xlUmlnaHRJY29uLFxuICBkZXNpZ25Ub2tlbnMsXG59IGZyb20gJ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AgIHRhcmdldD17Y3VycmVudEl0ZW0uaXNFeHRlcm5hbCA/ICdfYmxhbmsnIDogJ19zZWxmJ31cbiAgICAgICAgcmVsPVwibm9vcGVuZXIgbm9yZWZlcnJlclwiXG4gICAgICA+XG4gICAgICAgIDxDYXJkIGluc2V0U2NhbGU9XCJub25lXCIgb25DbGljaz17KCkgPT4ge319PlxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICAgIHNjcm9sbC1zbmFwLXR5cGU6IHggbWFuZGF0b3J5O1xuICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgICAgICAgICAgICBtYXJnaW46IDA7XG4gICAgICAgICAgICAgIHBhZGRpbmctYm90dG9tOiAke2Rlc2lnblRva2Vucy5zcGFjaW5nNjB9O1xuICAgICAgICAgICAgYH1cbiAgICAgICAgICAgIHJlZj17c2Nyb2xsUmVmfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHtzaHVmZmxlZEl0ZW1zLm1hcCgoaXRlbSwgaWR4KSA9PlxuICAgICAgICAgICAgICByZW5kZXJJdGVtKHsgaXRlbSB9LCBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQsIGlkeClcbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvQ2FyZD5cbiAgICAgIDwvYT5cblxuICAgICAgPGRpdlxuICAgICAgICBjc3M9e2Nzc2BcbiAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgICAgYm90dG9tOiAke2Rlc2lnblRva2Vucy5zcGFjaW5nTX07XG4gICAgICAgICAgbGVmdDogNTAlO1xuICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lO1xuICAgICAgICBgfVxuICAgICAgPlxuICAgICAgICA8ZGl2XG4gICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICAgICBsZWZ0OiAtNTAlO1xuICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJHtkZXNpZ25Ub2tlbnMuY29sb3JTdXJmYWNlfTtcbiAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBhdXRvO1xuICAgICAgICAgICAgaGVpZ2h0OiAke1BBR0lOQVRJT05fQ09OVFJPTF9IRUlHSFR9cHg7XG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiAke2Rlc2lnblRva2Vucy5ib3JkZXJSYWRpdXM0fTtcbiAgICAgICAgICAgIHBhZGRpbmctbGVmdDogJHtkZXNpZ25Ub2tlbnMuc3BhY2luZzI1fTtcbiAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmcyNX07XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgICBgfVxuICAgICAgICA+XG4gICAgICAgICAgPFNwYWNpbmdzLklubGluZVxuICAgICAgICAgICAgc2NhbGU9XCJtXCJcbiAgICAgICAgICAgIGp1c3RpZnlDb250ZW50PVwiY2VudGVyXCJcbiAgICAgICAgICAgIGFsaWduSXRlbXM9XCJjZW50ZXJcIlxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxQYWdpbmF0aW9uSWNvbkJ1dHRvblxuICAgICAgICAgICAgICBhbmltYXRpb25PcmllbnRhdGlvbj1cImxlZnRcIlxuICAgICAgICAgICAgICBvbkNsaWNrPXtoYW5kbGVQcmV2fVxuICAgICAgICAgICAgICBhcmlhLWxhYmVsPVwiZ28gdG8gcHJldmlvdXMgc2xpZGVcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QW5nbGVMZWZ0SWNvbiBzaXplPVwic21hbGxc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AgPENhcm91c2VsQ29udGVudFxuICAgICAgICAgIGtleT17aXRlbS5pZH1cbiAgICAgICAgICBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQ9e2hhbmRsZUZpbHRlckl0ZW1zV2hlbkZsYWdEaXNhYmxlZH1cbiAgICAgICAgICBpdGVtPXtpdGVtfVxuICAgICAgICAgIGlkeD17aWR4fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAvPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ2Fyb3VzZWw7XG4iXX0= */"),
|
|
6054
|
+
src: item.imgSrc,
|
|
6055
|
+
alt: intl.formatMessage(item.imgAlt)
|
|
6056
|
+
}), jsxRuntime.jsx("div", {
|
|
6057
|
+
css: /*#__PURE__*/react$1.css("padding:0 ", uiKit.designTokens.spacingL, " 0 ", uiKit.designTokens.spacingL, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:CarouselContent;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhcm91c2VsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF5UGtCIiwiZmlsZSI6ImNhcm91c2VsLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgUmVhY3RFbGVtZW50LCB1c2VTdGF0ZSwgdXNlRWZmZWN0IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHNodWZmbGUgZnJvbSAnbG9kYXNoL3NodWZmbGUnO1xuaW1wb3J0IHsgdXNlSW50bCwgdHlwZSBNZXNzYWdlRGVzY3JpcHRvciB9IGZyb20gJ3JlYWN0LWludGwnO1xuaW1wb3J0IHsgdXNlU25hcENhcm91c2VsIH0gZnJvbSAncmVhY3Qtc25hcC1jYXJvdXNlbCc7XG5p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YXQgb2NjdXIgd2hlbiB0aGUgQ2FyZCBpcyByZS1yZW5kZXJlZCBhcyBhbiBhbmNob3IgdGFnIHdoZW4gaXQgd2FzIGluaXRpYWxseVxuICAgICAgICAgIHJlbmRlcmVkIGFzIGEgTGluayBjb21wb25lbnQsIGR1ZSB0byB0aGUgZGlmZmVyZW5jZXMgYmV0d2VlbiBjYXJvdXNlbCBzbGlkZXMgdGhhdFxuICAgICAgICAgIGhhdmUgZXh0ZXJuYWwgbGlua3MgYW5kIHRob3NlIHRoYXQgZG9uJ3QuXG4gICAgICAgKi99XG5cbiAgICAgIDxhXG4gICAgICAgIGhyZWY9e2dldExpbmtUbyhjdXJyZW50SXRlbSl9XG4gICAgICAgIHRhcmdldD17Y3VycmVudEl0ZW0uaXNFeHRlcm5hbCA/ICdfYmxhbmsnIDogJ19zZWxmJ31cbiAgICAgICAgcmVsPVwibm9vcGVuZXIgbm9yZWZlcnJlclwiXG4gICAgICA+XG4gICAgICAgIDxDYXJkIGluc2V0U2NhbGU9XCJub25lXCIgb25DbGljaz17KCkgPT4ge319PlxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICAgIHNjcm9sbC1zbmFwLXR5cGU6IHggbWFuZGF0b3J5O1xuICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgICAgICAgICAgICBtYXJnaW46IDA7XG4gICAgICAgICAgICAgIHBhZGRpbmctYm90dG9tOiAke2Rlc2lnblRva2Vucy5zcGFjaW5nNjB9O1xuICAgICAgICAgICAgYH1cbiAgICAgICAgICAgIHJlZj17c2Nyb2xsUmVmfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHtzaHVmZmxlZEl0ZW1zLm1hcCgoaXRlbSwgaWR4KSA9PlxuICAgICAgICAgICAgICByZW5kZXJJdGVtKHsgaXRlbSB9LCBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQsIGlkeClcbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvQ2FyZD5cbiAgICAgIDwvYT5cblxuICAgICAgPGRpdlxuICAgICAgICBjc3M9e2Nzc2BcbiAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgICAgYm90dG9tOiAke2Rlc2lnblRva2Vucy5zcGFjaW5nTX07XG4gICAgICAgICAgbGVmdDogNTAlO1xuICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lO1xuICAgICAgICBgfVxuICAgICAgPlxuICAgICAgICA8ZGl2XG4gICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICAgICBsZWZ0OiAtNTAlO1xuICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogJHtkZXNpZ25Ub2tlbnMuY29sb3JTdXJmYWNlfTtcbiAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBhdXRvO1xuICAgICAgICAgICAgaGVpZ2h0OiAke1BBR0lOQVRJT05fQ09OVFJPTF9IRUlHSFR9cHg7XG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiAke2Rlc2lnblRva2Vucy5ib3JkZXJSYWRpdXM0fTtcbiAgICAgICAgICAgIHBhZGRpbmctbGVmdDogJHtkZXNpZ25Ub2tlbnMuc3BhY2luZzI1fTtcbiAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmcyNX07XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgICBgfVxuICAgICAgICA+XG4gICAgICAgICAgPFNwYWNpbmdzLklubGluZVxuICAgICAgICAgICAgc2NhbGU9XCJtXCJcbiAgICAgICAgICAgIGp1c3RpZnlDb250ZW50PVwiY2VudGVyXCJcbiAgICAgICAgICAgIGFsaWduSXRlbXM9XCJjZW50ZXJcIlxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxQYWdpbmF0aW9uSWNvbkJ1dHRvblxuICAgICAgICAgICAgICBhbmltYXRpb25PcmllbnRhdGlvbj1cImxlZnRcIlxuICAgICAgICAgICAgICBvbkNsaWNrPXtoYW5kbGVQcmV2fVxuICAgICAgICAgICAgICBhcmlhLWxhYmVsPVwiZ28gdG8gcHJldmlvdXMgc2xpZGVcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QW5nbGVMZWZ0SWNvbiBzaXplPVwic21hbGxcIiAvPlxuICAgICAgICAgICAgPC9QYWdpbmF0aW9uSWNvbkJ1dHRvbj5cbiAgICAgICAgICAgIHtwYWdlcy5tYXAoKF8sIGkpID0+IChcbiAgICAgICAgICAgICAgPFBhZ2luYXRpb25TZWxlY3Rpb25CdXR0b25cbiAgICAgICAgICAgICAgICBrZXk9e2l9XG4gICAgICAgICAgICAgICAgaXNGaWxsZWQ9e2FjdGl2ZVBhZ2VJbmRleCA9PT0gaX1cbiAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBnb1RvKGkpfVxuICAgICAgICAgICAgICAgIGFyaWEtbGFiZWw9e2BnbyB0byBzbGlkZSAke2kgKyAxfWB9XG4gICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICApKX1cbiAgICAgICAgICAgIDxQYWdpbmF0aW9uSWNvbkJ1dHRvblxuICAgICAgICAgICAgICBhbmltYXRpb25PcmllbnRhdGlvbj1cInJpZ2h0XCJcbiAgICAgICAgICAgICAgb25DbGljaz17aGFuZGxlTmV4dH1cbiAgICAgICAgICAgICAgYXJpYS1sYWJlbD1cImdvIHRvIG5leHQgc2xpZGVcIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QW5nbGVSaWdodEljb24gc2l6ZT1cInNtYWxsXCIgLz5cb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GlkZVwiXG4gICAgICBhcmlhLWxhYmVsPXtgc2xpZGUtJHtpZHggKyAxfWB9XG4gICAgICBjc3M9e2Nzc2BcbiAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgIGhlaWdodDogMTAwJTtcbiAgICAgICAgZmxleC1zaHJpbms6IDA7XG4gICAgICAgIHNjcm9sbC1zbmFwLWFsaWduOiBzdGFydDtcbiAgICAgIGB9XG4gICAgPlxuICAgICAgPFNwYWNpbmdzLlN0YWNrPlxuICAgICAgICA8aW1nXG4gICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgICAgICAgIGhlaWdodDogJHtJTUFHRV9BUkVBX0hFSUdIVH1weDtcbiAgICAgICAgICBgfVxuICAgICAgICAgIHNyYz17aXRlbS5pbWdTcmN9XG4gICAgICAgICAgYWx0PXtpbnRsLmZvcm1hdE1lc3NhZ2UoaXRlbS5pbWdBbHQpfVxuICAgICAgICAvPlxuICAgICAgICA8ZGl2XG4gICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICBwYWRkaW5nOiAwICR7ZGVzaWduVG9rZW5zLnNwYWNpbmdMfSAwICR7ZGVzaWduVG9rZW5zLnNwYWNpbmdMfTtcbiAgICAgICAgICBgfVxuICAgICAgICA+XG4gICAgICAgICAgPFNwYWNpbmdzLlN0YWNrIHNjYWxlPVwieHNcIj5cbiAgICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICAgIDxTdGFtcFxuICAgICAgICAgICAgICAgIHRvbmU9e2l0ZW0uc3RhbXBUb25lfVxuICAgICAgICAgICAgICAgIGlzQ29uZGVuc2VkXG4gICAgICAgICAgICAgICAgbGFiZWw9e2ludGwuZm9ybWF0TWVzc2FnZShpdGVtLnN0YW1wTGFiZWwpfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8VGV4dC5Cb2R5IGludGxNZXNzYWdlPXtpdGVtLnRleHRDb250ZW50fSAvPlxuICAgICAgICAgIDwvU3BhY2luZ3MuU3RhY2s+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9TcGFjaW5ncy5TdGFjaz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbmNvbnN0IENhcm91c2VsID0gKHsgaXRlbXMgfTogQ2Fyb3VzZWxQcm9wcykgPT4ge1xuICByZXR1cm4gKFxuICAgIDxCYXNlQ2Fyb3VzZWxcbiAgICAgIGl0ZW1zPXtpdGVtc31cbiAgICAgIHJlbmRlckl0ZW09eyh7IGl0ZW0gfSwgaGFuZGxlRmlsdGVySXRlbXNXaGVuRmxhZ0Rpc2FibGVkLCBpZHgpID0+IChcbiAgICAgICAgPENhcm91c2VsQ29udGVudFxuICAgICAgICAgIGtleT17aXRlbS5pZH1cbiAgICAgICAgICBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQ9e2hhbmRsZUZpbHRlckl0ZW1zV2hlbkZsYWdEaXNhYmxlZH1cbiAgICAgICAgICBpdGVtPXtpdGVtfVxuICAgICAgICAgIGlkeD17aWR4fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAvPlxuICApO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgQ2Fyb3VzZWw7XG4iXX0= */"),
|
|
6058
|
+
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
6059
|
+
scale: "xs",
|
|
6060
|
+
children: [jsxRuntime.jsx("div", {
|
|
6061
|
+
children: jsxRuntime.jsx(uiKit.Stamp, {
|
|
6062
|
+
tone: item.stampTone,
|
|
6063
|
+
isCondensed: true,
|
|
6064
|
+
label: intl.formatMessage(item.stampLabel)
|
|
6065
|
+
})
|
|
6066
|
+
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6067
|
+
intlMessage: item.textContent
|
|
6068
|
+
})]
|
|
6069
|
+
})
|
|
6070
|
+
})]
|
|
6071
|
+
})
|
|
6072
|
+
});
|
|
6073
|
+
};
|
|
6074
|
+
const Carousel = _ref4 => {
|
|
6075
|
+
let items = _ref4.items;
|
|
6076
|
+
return jsxRuntime.jsx(BaseCarousel, {
|
|
6077
|
+
items: items,
|
|
6078
|
+
renderItem: (_ref5, handleFilterItemsWhenFlagDisabled, idx) => {
|
|
6079
|
+
let item = _ref5.item;
|
|
6080
|
+
return jsxRuntime.jsx(CarouselContent, {
|
|
6081
|
+
handleFilterItemsWhenFlagDisabled: handleFilterItemsWhenFlagDisabled,
|
|
6082
|
+
item: item,
|
|
6083
|
+
idx: idx
|
|
6084
|
+
}, item.id);
|
|
6085
|
+
}
|
|
6086
|
+
});
|
|
6087
|
+
};
|
|
6088
|
+
var Carousel$1 = Carousel;
|
|
6089
|
+
|
|
6090
|
+
var messages$E = reactIntl.defineMessages({
|
|
5911
6091
|
countriesBasicSelectPlaceholder: {
|
|
5912
6092
|
id: 'CountriesPicker.countriesBasicSelectPlaceholder',
|
|
5913
6093
|
description: 'Placeholder of the basic field for countries',
|
|
@@ -5928,7 +6108,7 @@ var messages$D = reactIntl.defineMessages({
|
|
|
5928
6108
|
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; }
|
|
5929
6109
|
function _objectSpread$X(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$X(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$X(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5930
6110
|
const emptyCountryOption = intl => [{
|
|
5931
|
-
label: intl.formatMessage(messages$
|
|
6111
|
+
label: intl.formatMessage(messages$E.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
5932
6112
|
value: undefined,
|
|
5933
6113
|
isDisabled: true
|
|
5934
6114
|
}];
|
|
@@ -5971,7 +6151,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
5971
6151
|
var _context7;
|
|
5972
6152
|
return _findInstanceProperty__default["default"](_context7 = props.options).call(_context7, country => country.value === countryCode);
|
|
5973
6153
|
}),
|
|
5974
|
-
placeholder: intl.formatMessage(messages$
|
|
6154
|
+
placeholder: intl.formatMessage(messages$E.countriesAsyncSelectPlaceholder),
|
|
5975
6155
|
loadOptions: handleLoadOptions,
|
|
5976
6156
|
onChange: onOptionChange,
|
|
5977
6157
|
isDisabled: props.isDisabled,
|
|
@@ -5991,7 +6171,7 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
5991
6171
|
value: props.value,
|
|
5992
6172
|
isRequired: props.isRequired,
|
|
5993
6173
|
description: props.description,
|
|
5994
|
-
placeholder: intl.formatMessage(messages$
|
|
6174
|
+
placeholder: intl.formatMessage(messages$E.countriesBasicSelectPlaceholder),
|
|
5995
6175
|
options: props.options,
|
|
5996
6176
|
onChange: props.onChange,
|
|
5997
6177
|
isDisabled: props.isDisabled,
|
|
@@ -6027,7 +6207,7 @@ function CountriesPicker(_ref) {
|
|
|
6027
6207
|
});
|
|
6028
6208
|
}
|
|
6029
6209
|
|
|
6030
|
-
var messages$
|
|
6210
|
+
var messages$D = reactIntl.defineMessages({
|
|
6031
6211
|
noCustomerGroupsFound: {
|
|
6032
6212
|
id: 'Prices.CustomerGroupPickerInput.noCustomerGroupsFound',
|
|
6033
6213
|
description: 'The message to display when no customer groups were found',
|
|
@@ -6117,7 +6297,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
6117
6297
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
6118
6298
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
6119
6299
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
6120
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
6300
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$D.noCustomerGroupsFound), [loadingError, formatMessage]);
|
|
6121
6301
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
6122
6302
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
6123
6303
|
max: "scale",
|
|
@@ -6128,7 +6308,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
6128
6308
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
6129
6309
|
id: name,
|
|
6130
6310
|
name: name,
|
|
6131
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
6311
|
+
placeholder: placeholder ?? formatMessage(messages$D.placeholder),
|
|
6132
6312
|
loadOptions: loadOptionsDebounced,
|
|
6133
6313
|
defaultOptions: true,
|
|
6134
6314
|
showOptionGroupDivider: true,
|
|
@@ -6147,7 +6327,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
6147
6327
|
})
|
|
6148
6328
|
}), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6149
6329
|
tone: "negative",
|
|
6150
|
-
intlMessage:
|
|
6330
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
6151
6331
|
})]
|
|
6152
6332
|
})
|
|
6153
6333
|
});
|
|
@@ -6163,7 +6343,8 @@ var styles$e = {
|
|
|
6163
6343
|
"divider-dashed": "divider-module__divider-dashed___2Em8A divider-module__divider___4-vdy"
|
|
6164
6344
|
};
|
|
6165
6345
|
function Divider(_ref) {
|
|
6166
|
-
let isDashed = _ref.isDashed,
|
|
6346
|
+
let _ref$isDashed = _ref.isDashed,
|
|
6347
|
+
isDashed = _ref$isDashed === void 0 ? false : _ref$isDashed,
|
|
6167
6348
|
_ref$orientation = _ref.orientation,
|
|
6168
6349
|
orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation;
|
|
6169
6350
|
return jsxRuntime.jsx("hr", {
|
|
@@ -6234,12 +6415,13 @@ const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"
|
|
|
6234
6415
|
const CustomFieldErrors = props => {
|
|
6235
6416
|
// We want to highlight fields with errors not only after a form submission,
|
|
6236
6417
|
// but also after manually triggered form validation.
|
|
6237
|
-
const
|
|
6418
|
+
const _useFormikContext = formik.useFormikContext(),
|
|
6419
|
+
isFormValid = _useFormikContext.isValid;
|
|
6238
6420
|
const errors = _Array$isArray__default["default"](props.errors) ? mergeSetItemsErrors(props.errors) : props.errors;
|
|
6239
6421
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
6240
|
-
children: [props.isTouched ||
|
|
6422
|
+
children: [props.isTouched || !isFormValid && errors?.missing && jsxRuntime.jsx(_.ErrorMessage, {
|
|
6241
6423
|
intlMessage: validationMessages.required
|
|
6242
|
-
}), props.isTouched ||
|
|
6424
|
+
}), props.isTouched || !isFormValid && errors?.duplicated && jsxRuntime.jsx(_.ErrorMessage, {
|
|
6243
6425
|
intlMessage: validationMessages.unique
|
|
6244
6426
|
})]
|
|
6245
6427
|
});
|
|
@@ -6264,7 +6446,7 @@ const makeChangeHandler = setValue => event => {
|
|
|
6264
6446
|
// attributes.
|
|
6265
6447
|
const omitUnknownValues = (valuesAsMap, fieldDefinitionsAsMap) => omitBy__default["default"](valuesAsMap, (value, key) => isNil__default["default"](fieldDefinitionsAsMap[key]));
|
|
6266
6448
|
|
|
6267
|
-
var messages$
|
|
6449
|
+
var messages$C = reactIntl.defineMessages({
|
|
6268
6450
|
booleanSetInputYesLabel: {
|
|
6269
6451
|
id: 'CustomBooleanInputSet.booleanSetInputYesLabel',
|
|
6270
6452
|
description: 'Custom boolean input set Yes label',
|
|
@@ -6306,13 +6488,13 @@ function CustomBooleanInputSet(props) {
|
|
|
6306
6488
|
formatMessage = _useIntl.formatMessage;
|
|
6307
6489
|
const options = React.useMemo(() => [{
|
|
6308
6490
|
value: 'true',
|
|
6309
|
-
label: formatMessage(messages$
|
|
6491
|
+
label: formatMessage(messages$C.booleanSetInputYesLabel)
|
|
6310
6492
|
}, {
|
|
6311
6493
|
value: 'false',
|
|
6312
|
-
label: formatMessage(messages$
|
|
6494
|
+
label: formatMessage(messages$C.booleanSetInputNoLabel)
|
|
6313
6495
|
}, {
|
|
6314
6496
|
value: 'all',
|
|
6315
|
-
label: formatMessage(messages$
|
|
6497
|
+
label: formatMessage(messages$C.booleanSetInputAllLabel)
|
|
6316
6498
|
}], [formatMessage]);
|
|
6317
6499
|
const handleChange = makeChangeHandler(rawValue => {
|
|
6318
6500
|
const nullifiedIfNeeded = !rawValue ? undefined : valueToBooleanSet(rawValue);
|
|
@@ -6896,7 +7078,7 @@ const NestingLevelContext = /*#__PURE__*/React.createContext(0);
|
|
|
6896
7078
|
var NestingLevelContext$1 = NestingLevelContext;
|
|
6897
7079
|
|
|
6898
7080
|
// eslint-disable-next-line import/prefer-default-export
|
|
6899
|
-
const messages$
|
|
7081
|
+
const messages$B = reactIntl.defineMessages({
|
|
6900
7082
|
aboveFifthLevelWarning: {
|
|
6901
7083
|
id: 'attributeInputByType.nestedAttributes.aboveFifthLevelWarning',
|
|
6902
7084
|
description: 'Warning message shown when nested attribute are above the fifth level',
|
|
@@ -6908,9 +7090,9 @@ const messages$A = reactIntl.defineMessages({
|
|
|
6908
7090
|
defaultMessage: 'Empty'
|
|
6909
7091
|
}
|
|
6910
7092
|
});
|
|
6911
|
-
var customFieldsMessages = messages$
|
|
7093
|
+
var customFieldsMessages = messages$B;
|
|
6912
7094
|
|
|
6913
|
-
var messages$
|
|
7095
|
+
var messages$A = reactIntl.defineMessages({
|
|
6914
7096
|
updateButton: {
|
|
6915
7097
|
id: 'NestedAttributes.Details.updateButton',
|
|
6916
7098
|
description: 'Update button label',
|
|
@@ -6995,7 +7177,7 @@ const EditButton = props => {
|
|
|
6995
7177
|
formatMessage = _useIntl.formatMessage;
|
|
6996
7178
|
return jsxRuntime.jsx(uiKit.Tooltip, {
|
|
6997
7179
|
placement: "top",
|
|
6998
|
-
title: formatMessage(messages$
|
|
7180
|
+
title: formatMessage(messages$A.editTooltip),
|
|
6999
7181
|
children: jsxRuntime.jsx(uiKit.IconButton, {
|
|
7000
7182
|
label: "Edit",
|
|
7001
7183
|
isDisabled: props.isDisabled,
|
|
@@ -7011,12 +7193,12 @@ const DropChangesConfirmation = props => {
|
|
|
7011
7193
|
formatMessage = _useIntl2.formatMessage;
|
|
7012
7194
|
return jsxRuntime.jsx(applicationComponents.ConfirmationDialog, {
|
|
7013
7195
|
isOpen: props.isOpen || false,
|
|
7014
|
-
title: formatMessage(messages$
|
|
7015
|
-
labelPrimary: formatMessage(messages$
|
|
7196
|
+
title: formatMessage(messages$A.confirmationDialogTitle),
|
|
7197
|
+
labelPrimary: formatMessage(messages$A.nestedAttributesConfirmLabel),
|
|
7016
7198
|
onConfirm: props.onConfirm,
|
|
7017
7199
|
onCancel: props.onCancel,
|
|
7018
7200
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
7019
|
-
intlMessage: messages$
|
|
7201
|
+
intlMessage: messages$A.confirmationDialogBody
|
|
7020
7202
|
})
|
|
7021
7203
|
});
|
|
7022
7204
|
};
|
|
@@ -7041,11 +7223,11 @@ const NestedAttributeModalPage = props => {
|
|
|
7041
7223
|
children: [jsxRuntime.jsx(uiKit.SecondaryButton, {
|
|
7042
7224
|
isDisabled: !formik$1.dirty,
|
|
7043
7225
|
iconLeft: jsxRuntime.jsx(uiKit.RevertIcon, {}),
|
|
7044
|
-
label: formatMessage(messages$
|
|
7226
|
+
label: formatMessage(messages$A.cancelButton),
|
|
7045
7227
|
onClick: formik$1.resetForm
|
|
7046
7228
|
}), jsxRuntime.jsx(applicationComponents.CustomFormModalPage.FormPrimaryButton, {
|
|
7047
7229
|
isDisabled: !formik$1.dirty,
|
|
7048
|
-
label: formatMessage(messages$
|
|
7230
|
+
label: formatMessage(messages$A.updateButton),
|
|
7049
7231
|
onClick: formik$1.handleSubmit
|
|
7050
7232
|
})]
|
|
7051
7233
|
}),
|
|
@@ -7087,7 +7269,7 @@ const NestedInputControls = props => {
|
|
|
7087
7269
|
if (nextNestingLevel >= 6) return jsxRuntime.jsx(MaxNestingLevelReached, {});
|
|
7088
7270
|
const hasAttributes = props.productType.attributeDefinitions.length > 0;
|
|
7089
7271
|
if (!hasAttributes) return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
7090
|
-
intlMessage: messages$
|
|
7272
|
+
intlMessage: messages$A.emptyProductType,
|
|
7091
7273
|
tone: "secondary"
|
|
7092
7274
|
});
|
|
7093
7275
|
return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
@@ -7163,7 +7345,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
7163
7345
|
if (nestingLevel !== 0) parentFormik.submitForm();else showNotification({
|
|
7164
7346
|
kind: 'success',
|
|
7165
7347
|
domain: constants.DOMAINS.SIDE,
|
|
7166
|
-
text: formatMessage(messages$
|
|
7348
|
+
text: formatMessage(messages$A.attributeUpdateSucceeded)
|
|
7167
7349
|
});
|
|
7168
7350
|
setSubmitting(false);
|
|
7169
7351
|
},
|
|
@@ -7282,7 +7464,7 @@ function CustomChannelReferenceInput(props) {
|
|
|
7282
7464
|
}
|
|
7283
7465
|
CustomChannelReferenceInput.displayName = 'CustomChannelReferenceInput';
|
|
7284
7466
|
|
|
7285
|
-
var messages$
|
|
7467
|
+
var messages$z = reactIntl.defineMessages({
|
|
7286
7468
|
noProductsFound: {
|
|
7287
7469
|
id: 'Shared.ProductPickerInput.noProductsFound',
|
|
7288
7470
|
description: 'The message to display when no products were found',
|
|
@@ -7380,7 +7562,7 @@ const ProductPickerInput = _ref => {
|
|
|
7380
7562
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
7381
7563
|
id: name,
|
|
7382
7564
|
name: name,
|
|
7383
|
-
placeholder: formatMessage(messages$
|
|
7565
|
+
placeholder: formatMessage(messages$z.placeholder),
|
|
7384
7566
|
loadOptions: loadOptionsDebounced,
|
|
7385
7567
|
defaultOptions: [],
|
|
7386
7568
|
isClearable: isClearable,
|
|
@@ -7394,7 +7576,7 @@ const ProductPickerInput = _ref => {
|
|
|
7394
7576
|
onInputChange: handleInputChange,
|
|
7395
7577
|
onBlur: onBlur,
|
|
7396
7578
|
value: currentOption.data,
|
|
7397
|
-
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$
|
|
7579
|
+
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$z.noProductsFound),
|
|
7398
7580
|
hasError: hasError || isLoadingFailed,
|
|
7399
7581
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
7400
7582
|
menuPortalTarget: document.body,
|
|
@@ -7402,7 +7584,7 @@ const ProductPickerInput = _ref => {
|
|
|
7402
7584
|
})
|
|
7403
7585
|
}), isLoadingFailed && showLoadingErrorMessage && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
7404
7586
|
tone: "negative",
|
|
7405
|
-
intlMessage:
|
|
7587
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
7406
7588
|
})]
|
|
7407
7589
|
})
|
|
7408
7590
|
});
|
|
@@ -7634,7 +7816,7 @@ const CustomFieldInput = /*#__PURE__*/React.memo(props => {
|
|
|
7634
7816
|
CustomFieldInput.displayName = 'CustomFieldInput';
|
|
7635
7817
|
var CustomFieldInput$1 = CustomFieldInput;
|
|
7636
7818
|
|
|
7637
|
-
var messages$
|
|
7819
|
+
var messages$y = reactIntl.defineMessages({
|
|
7638
7820
|
productReferenceLabel: {
|
|
7639
7821
|
id: 'CustomFieldsLabel.productReferenceLabel',
|
|
7640
7822
|
description: 'Label shown above the product picker input.',
|
|
@@ -7703,7 +7885,7 @@ const CustomFieldsLabelHint = _ref2 => {
|
|
|
7703
7885
|
children: [jsxRuntime.jsx(uiKit.WarningIcon, {
|
|
7704
7886
|
size: "medium",
|
|
7705
7887
|
color: "warning"
|
|
7706
|
-
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$P({}, messages$
|
|
7888
|
+
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$P({}, messages$y.cartDiscountMoreThan500))]
|
|
7707
7889
|
});
|
|
7708
7890
|
}
|
|
7709
7891
|
return l10n.formatLocalizedString(fieldDefinition, {
|
|
@@ -7717,8 +7899,8 @@ function CustomFieldsProductTypeReferenceSubtitle() {
|
|
|
7717
7899
|
formatMessage = _useIntl.formatMessage;
|
|
7718
7900
|
const _usePimStatus = usePimStatus(),
|
|
7719
7901
|
isProjectIndexed = _usePimStatus.isProjectIndexed;
|
|
7720
|
-
if (isProjectIndexed) return formatMessage(messages$
|
|
7721
|
-
return formatMessage(messages$
|
|
7902
|
+
if (isProjectIndexed) return formatMessage(messages$y.productTypeReferenceLabelI);
|
|
7903
|
+
return formatMessage(messages$y.productTypeReferenceLabel);
|
|
7722
7904
|
}
|
|
7723
7905
|
|
|
7724
7906
|
// TODO(pa3): this logic may be misplaced and probably
|
|
@@ -7735,13 +7917,13 @@ function CustomFieldsLabelSubtitle(_ref3) {
|
|
|
7735
7917
|
const referenceTypeName = capitalizeFirst(referenceTypeId);
|
|
7736
7918
|
if (_includesInstanceProperty__default["default"](_context = [SEARCHABLE_REFERENCES.category, SEARCHABLE_REFERENCES.cartDiscount]).call(_context, referenceTypeId)) return referenceTypeName;
|
|
7737
7919
|
if (referenceTypeId === SEARCHABLE_REFERENCES.product) {
|
|
7738
|
-
return formatMessage(messages$
|
|
7920
|
+
return formatMessage(messages$y.productReferenceLabel);
|
|
7739
7921
|
} else if (referenceTypeId === SEARCHABLE_REFERENCES.productType) {
|
|
7740
7922
|
return jsxRuntime.jsx(CustomFieldsProductTypeReferenceSubtitle, {});
|
|
7741
7923
|
} else if (referenceTypeId === SEARCHABLE_REFERENCES.channel) {
|
|
7742
|
-
return formatMessage(messages$
|
|
7924
|
+
return formatMessage(messages$y.channelReferenceLabel);
|
|
7743
7925
|
} else if (referenceTypeId === SEARCHABLE_REFERENCES.state) {
|
|
7744
|
-
return formatMessage(messages$
|
|
7926
|
+
return formatMessage(messages$y.stateReferenceLabel);
|
|
7745
7927
|
} else {
|
|
7746
7928
|
return `${referenceTypeName} ID`;
|
|
7747
7929
|
}
|
|
@@ -7761,7 +7943,7 @@ function CustomFieldsCountIndicator(_ref4) {
|
|
|
7761
7943
|
const _useIntl3 = reactIntl.useIntl(),
|
|
7762
7944
|
formatMessage = _useIntl3.formatMessage;
|
|
7763
7945
|
return assignedAttributeGroups?.length > 1 ? jsxRuntime.jsx(uiKit.Tooltip, {
|
|
7764
|
-
title: formatMessage(messages$
|
|
7946
|
+
title: formatMessage(messages$y.attributeGroupCountTooltip, {
|
|
7765
7947
|
attributeGroups: _mapInstanceProperty__default["default"](assignedAttributeGroups).call(assignedAttributeGroups, assignedAttributeGroup => formatLocalizedField(assignedAttributeGroup.nameAllLocales)).join(', '),
|
|
7766
7948
|
count: assignedAttributeGroups.length
|
|
7767
7949
|
}),
|
|
@@ -7818,7 +8000,7 @@ const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref5 => {
|
|
|
7818
8000
|
CustomFieldsLabel.displayName = 'CustomFieldsTitle';
|
|
7819
8001
|
var CustomFieldsLabel$1 = CustomFieldsLabel;
|
|
7820
8002
|
|
|
7821
|
-
var messages$
|
|
8003
|
+
var messages$x = reactIntl.defineMessages({
|
|
7822
8004
|
referencedProductType: {
|
|
7823
8005
|
id: 'NestedAttributes.referencedProductType',
|
|
7824
8006
|
description: 'Product type referenced hint',
|
|
@@ -7829,7 +8011,7 @@ var messages$w = reactIntl.defineMessages({
|
|
|
7829
8011
|
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; }
|
|
7830
8012
|
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; }
|
|
7831
8013
|
function ProductTypeReference(props) {
|
|
7832
|
-
const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$
|
|
8014
|
+
const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$x.referencedProductType), {}, {
|
|
7833
8015
|
values: {
|
|
7834
8016
|
productTypeName: props.productType.name
|
|
7835
8017
|
}
|
|
@@ -7853,7 +8035,7 @@ function CustomNestedFieldInput(props) {
|
|
|
7853
8035
|
color: "error"
|
|
7854
8036
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
7855
8037
|
tone: "negative",
|
|
7856
|
-
intlMessage:
|
|
8038
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
7857
8039
|
})]
|
|
7858
8040
|
});
|
|
7859
8041
|
if (!productType) return null;
|
|
@@ -7899,7 +8081,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
7899
8081
|
styles: "z-index:100000!important"
|
|
7900
8082
|
} : {
|
|
7901
8083
|
name: "4jor1w-child",
|
|
7902
|
-
styles: "z-index:100000!important;label:child;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
8084
|
+
styles: "z-index:100000!important;label:child;/*# sourceMappingURL=data:application/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TION_STRINGIFIED_CSS_ERROR__
|
|
7904
8086
|
};
|
|
7905
8087
|
const DraggableWrapper = _ref2 => {
|
|
@@ -7923,7 +8105,7 @@ const DraggableWrapper = _ref2 => {
|
|
|
7923
8105
|
return children;
|
|
7924
8106
|
}
|
|
7925
8107
|
};
|
|
7926
|
-
return jsxRuntime.jsx(
|
|
8108
|
+
return jsxRuntime.jsx(dnd.Draggable, {
|
|
7927
8109
|
draggableId: draggableId,
|
|
7928
8110
|
index: index,
|
|
7929
8111
|
children: (provided, snapshot) => {
|
|
@@ -7962,9 +8144,9 @@ function _objectSpread$L(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
7962
8144
|
const DroppableWrapper = _ref => {
|
|
7963
8145
|
let children = _ref.children,
|
|
7964
8146
|
onDragEnd = _ref.onDragEnd;
|
|
7965
|
-
return jsxRuntime.jsx(
|
|
8147
|
+
return jsxRuntime.jsx(dnd.DragDropContext, {
|
|
7966
8148
|
onDragEnd: onDragEnd,
|
|
7967
|
-
children: jsxRuntime.jsx(
|
|
8149
|
+
children: jsxRuntime.jsx(dnd.Droppable, {
|
|
7968
8150
|
droppableId: "droppable",
|
|
7969
8151
|
children: provided => jsxRuntime.jsxs("div", _objectSpread$L(_objectSpread$L({
|
|
7970
8152
|
ref: provided.innerRef
|
|
@@ -8059,7 +8241,8 @@ const CustomFieldsInternal = _ref => {
|
|
|
8059
8241
|
touched = _useFormikContext.touched,
|
|
8060
8242
|
values = _valuesInstanceProperty__default["default"](_useFormikContext),
|
|
8061
8243
|
handleBlur = _useFormikContext.handleBlur,
|
|
8062
|
-
status = _useFormikContext.status
|
|
8244
|
+
status = _useFormikContext.status,
|
|
8245
|
+
isFormValid = _useFormikContext.isValid;
|
|
8063
8246
|
const _useIntl = reactIntl.useIntl(),
|
|
8064
8247
|
locale = _useIntl.locale;
|
|
8065
8248
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -8071,7 +8254,6 @@ const CustomFieldsInternal = _ref => {
|
|
|
8071
8254
|
const isTailoringAttributesEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES);
|
|
8072
8255
|
const isTailoringAttributeForOtherTypes = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT);
|
|
8073
8256
|
const isTailoringFallbackEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES);
|
|
8074
|
-
const didFormValidationFail = useDidFormValidationFail();
|
|
8075
8257
|
const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
|
|
8076
8258
|
const _useDnDContext = useDnDContext(),
|
|
8077
8259
|
DroppableWrapper = _useDnDContext.DroppableWrapper,
|
|
@@ -8093,7 +8275,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
8093
8275
|
|
|
8094
8276
|
// We want to highlight fields with errors not only after a form submission,
|
|
8095
8277
|
// but also after manually triggered form validation.
|
|
8096
|
-
const hasError = Boolean(fieldErrors) && (isTouched ||
|
|
8278
|
+
const hasError = Boolean(fieldErrors) && (isTouched || !isFormValid);
|
|
8097
8279
|
const validate = value => {
|
|
8098
8280
|
if (fieldDefinition.required && isNil__default["default"](value)) return {
|
|
8099
8281
|
missing: true
|
|
@@ -8798,6 +8980,146 @@ function ProductSelectionsPicker(_ref) {
|
|
|
8798
8980
|
});
|
|
8799
8981
|
}
|
|
8800
8982
|
|
|
8983
|
+
var messages$w = reactIntl.defineMessages({
|
|
8984
|
+
placeholder: {
|
|
8985
|
+
id: 'RecurrentIntervalPicker.placeholder',
|
|
8986
|
+
description: 'The placeholder of the input',
|
|
8987
|
+
defaultMessage: 'Not restricted to any recurrent interval'
|
|
8988
|
+
},
|
|
8989
|
+
missingOptionLabel: {
|
|
8990
|
+
id: 'RecurrentIntervalPicker.missingOptionLabel',
|
|
8991
|
+
description: 'The label of the option when the recurrent interval is not found',
|
|
8992
|
+
defaultMessage: 'Unknown recurrent interval ({value})'
|
|
8993
|
+
},
|
|
8994
|
+
missingSelectedWarning: {
|
|
8995
|
+
id: 'RecurrentIntervalPicker.missingSelectedWarning',
|
|
8996
|
+
description: 'The warning message shown below the input when the selected recurrent interval is not found in the options',
|
|
8997
|
+
defaultMessage: 'The selected recurrent interval could not be retrieved. Please check your recurrence policy configuration.'
|
|
8998
|
+
},
|
|
8999
|
+
noRecurrentIntervalsConfigured: {
|
|
9000
|
+
id: 'RecurrentIntervalPicker.noRecurrentIntervalsConfigured',
|
|
9001
|
+
description: 'Banner warning message shown when no recurrent intervals are configured in the project',
|
|
9002
|
+
defaultMessage: 'No recurrent intervals configured. Please check your recurrence policy configuration'
|
|
9003
|
+
}
|
|
9004
|
+
});
|
|
9005
|
+
|
|
9006
|
+
var FetchRecurrencePolicies = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchRecurrencePolicies" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "recurrencePolicies" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 191, source: { body: "query FetchRecurrencePolicies($where: String) {\n recurrencePolicies(where: $where) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
9007
|
+
const isRecurringOrdersDisabledError = error => {
|
|
9008
|
+
var _context;
|
|
9009
|
+
return error.extensions?.code === '403' && _includesInstanceProperty__default["default"](_context = error.message).call(_context, "The feature 'recurring-orders' is not enabled for this project. Please contact commercetools support.");
|
|
9010
|
+
};
|
|
9011
|
+
// @TODO: Remove these error checks when the feature is enabled by default
|
|
9012
|
+
const useRecurrenceIntervals = _ref => {
|
|
9013
|
+
let where = _ref.where,
|
|
9014
|
+
_ref$skip = _ref.skip,
|
|
9015
|
+
skip = _ref$skip === void 0 ? false : _ref$skip;
|
|
9016
|
+
const _useQuery = client.useQuery(FetchRecurrencePolicies, {
|
|
9017
|
+
context: {
|
|
9018
|
+
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
9019
|
+
},
|
|
9020
|
+
fetchPolicy: 'cache-and-network',
|
|
9021
|
+
variables: where ? {
|
|
9022
|
+
where
|
|
9023
|
+
} : undefined,
|
|
9024
|
+
skip
|
|
9025
|
+
}),
|
|
9026
|
+
data = _useQuery.data,
|
|
9027
|
+
loading = _useQuery.loading,
|
|
9028
|
+
rawError = _useQuery.error;
|
|
9029
|
+
const extractedErrors = rawError ? extractErrorFromGraphQlResponse(rawError) : [];
|
|
9030
|
+
const isRecurringOrdersDisabled = extractedErrors.length > 0 &&
|
|
9031
|
+
// If the only error is a 403 with the specific message, we assume the feature is disabled.
|
|
9032
|
+
_everyInstanceProperty__default["default"](extractedErrors).call(extractedErrors, isRecurringOrdersDisabledError);
|
|
9033
|
+
const error = isRecurringOrdersDisabled ? undefined : rawError;
|
|
9034
|
+
return {
|
|
9035
|
+
recurrencePolicies: data?.recurrencePolicies?.results ?? [],
|
|
9036
|
+
loading,
|
|
9037
|
+
error,
|
|
9038
|
+
isRecurringOrdersDisabled
|
|
9039
|
+
};
|
|
9040
|
+
};
|
|
9041
|
+
|
|
9042
|
+
const RecurrentIntervalPicker = _ref => {
|
|
9043
|
+
let name = _ref.name,
|
|
9044
|
+
value = _ref.value,
|
|
9045
|
+
onChange = _ref.onChange,
|
|
9046
|
+
onBlur = _ref.onBlur,
|
|
9047
|
+
onError = _ref.onError,
|
|
9048
|
+
_ref$isClearable = _ref.isClearable,
|
|
9049
|
+
isClearable = _ref$isClearable === void 0 ? true : _ref$isClearable,
|
|
9050
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
9051
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
9052
|
+
_ref$isReadOnly = _ref.isReadOnly,
|
|
9053
|
+
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly;
|
|
9054
|
+
const _useIntl = reactIntl.useIntl(),
|
|
9055
|
+
formatMessage = _useIntl.formatMessage;
|
|
9056
|
+
const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
|
|
9057
|
+
const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
|
|
9058
|
+
const skip = isReadOnly && !value;
|
|
9059
|
+
const where = isReadOnly && value ? `id="${value}"` : undefined;
|
|
9060
|
+
const _useRecurrenceInterva = useRecurrenceIntervals({
|
|
9061
|
+
where,
|
|
9062
|
+
skip
|
|
9063
|
+
}),
|
|
9064
|
+
recurrencePolicies = _useRecurrenceInterva.recurrencePolicies,
|
|
9065
|
+
loading = _useRecurrenceInterva.loading,
|
|
9066
|
+
error = _useRecurrenceInterva.error;
|
|
9067
|
+
const selectedIsMissingInData = Boolean(value) && !_someInstanceProperty__default["default"](recurrencePolicies).call(recurrencePolicies, policy => policy.id === value);
|
|
9068
|
+
const options = React.useMemo(() => {
|
|
9069
|
+
if (loading) return [];
|
|
9070
|
+
const mapped = _mapInstanceProperty__default["default"](recurrencePolicies).call(recurrencePolicies, policy => ({
|
|
9071
|
+
value: policy.id,
|
|
9072
|
+
label: formatLocalizedFieldToString(policy.nameAllLocales, policy.key)
|
|
9073
|
+
}));
|
|
9074
|
+
|
|
9075
|
+
// If the selected value cannot be loaded, add it as a missing option
|
|
9076
|
+
if (selectedIsMissingInData && value) {
|
|
9077
|
+
const label = formatMessage(messages$w.missingOptionLabel, {
|
|
9078
|
+
value
|
|
9079
|
+
});
|
|
9080
|
+
return [{
|
|
9081
|
+
value,
|
|
9082
|
+
label
|
|
9083
|
+
}, ...mapped];
|
|
9084
|
+
}
|
|
9085
|
+
return mapped;
|
|
9086
|
+
}, [recurrencePolicies, selectedIsMissingInData, value, dataLocale, formatMessage, formatLocalizedFieldToString, loading]);
|
|
9087
|
+
const noRecurrentIntervalsConfigured = !loading && recurrencePolicies.length === 0;
|
|
9088
|
+
React.useEffect(() => {
|
|
9089
|
+
if (error && onError) {
|
|
9090
|
+
onError(error);
|
|
9091
|
+
}
|
|
9092
|
+
}, [error, onError]);
|
|
9093
|
+
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
9094
|
+
scale: "s",
|
|
9095
|
+
children: [jsxRuntime.jsx(uiKit.SelectInput, {
|
|
9096
|
+
id: name,
|
|
9097
|
+
name: name,
|
|
9098
|
+
value: value,
|
|
9099
|
+
placeholder: messages$w.placeholder.defaultMessage,
|
|
9100
|
+
options: options,
|
|
9101
|
+
isClearable: isClearable,
|
|
9102
|
+
isReadOnly: isReadOnly,
|
|
9103
|
+
isDisabled: isDisabled || loading || noRecurrentIntervalsConfigured,
|
|
9104
|
+
onChange: onChange,
|
|
9105
|
+
onBlur: onBlur,
|
|
9106
|
+
hasError: !loading && !error && selectedIsMissingInData
|
|
9107
|
+
}), error ? jsxRuntime.jsx(uiKit.Text.Body, {
|
|
9108
|
+
tone: "negative",
|
|
9109
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
9110
|
+
}) : selectedIsMissingInData ? jsxRuntime.jsx(uiKit.Text.Body, {
|
|
9111
|
+
tone: "negative",
|
|
9112
|
+
intlMessage: messages$w.missingSelectedWarning
|
|
9113
|
+
}) : null, !error && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
9114
|
+
type: "warning",
|
|
9115
|
+
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
9116
|
+
intlMessage: messages$w.noRecurrentIntervalsConfigured
|
|
9117
|
+
})
|
|
9118
|
+
})]
|
|
9119
|
+
});
|
|
9120
|
+
};
|
|
9121
|
+
var RecurrentIntervalPicker$1 = RecurrentIntervalPicker;
|
|
9122
|
+
|
|
8801
9123
|
// NOTE: this component is duplicated in `app-shell/from-core`.
|
|
8802
9124
|
var styles$b = {
|
|
8803
9125
|
"colored": "required-indicator-module__colored____YUFm",
|
|
@@ -8954,9 +9276,6 @@ var messages$u = reactIntl.defineMessages({
|
|
|
8954
9276
|
}
|
|
8955
9277
|
});
|
|
8956
9278
|
|
|
8957
|
-
const LOWER_STORES_LIMIT = 60;
|
|
8958
|
-
const UPPER_STORES_LIMIT = 500;
|
|
8959
|
-
|
|
8960
9279
|
// map store to options
|
|
8961
9280
|
const mapStoresToOptions = _ref => {
|
|
8962
9281
|
var _context, _context2;
|
|
@@ -10937,9 +11256,9 @@ const createQueryVariables = platformLimit => _reduceInstanceProperty__default["
|
|
|
10937
11256
|
}, previousIncludedLimits), {});
|
|
10938
11257
|
var createPlatformLimitsQueryVariables = createQueryVariables;
|
|
10939
11258
|
|
|
10940
|
-
var PlatformLimitsFetcherQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "PlatformLimitsFetcherQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limits" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "lineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "textLineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActive" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActiveWithoutDiscountCodes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventorySupplyChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDistributionChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "maxDivisions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxDepthLimit" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociateRoles" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 2107, source: { body: "query PlatformLimitsFetcherQuery(\n $shouldIncludeShoppingLists: Boolean!\n $shouldIncludeProductDiscounts: Boolean!\n $shouldIncludeCartDiscounts: Boolean!\n $shouldIncludeStores: Boolean!\n $shouldIncludeCustomers: Boolean!\n $shouldIncludeCustomerGroups: Boolean!\n $shouldIncludeZones: Boolean!\n $shouldIncludeTaxCategories: Boolean!\n $shouldIncludeShippingMethods: Boolean!\n $shouldIncludeCarts: Boolean!\n $shouldIncludeBusinessUnits: Boolean!\n) {\n limits {\n shoppingLists @include(if: $shouldIncludeShoppingLists) {\n total {\n limit\n current\n }\n lineItems {\n limit\n }\n textLineItems {\n limit\n }\n }\n productDiscounts @include(if: $shouldIncludeProductDiscounts) {\n totalActive {\n limit\n current\n }\n }\n cartDiscounts @include(if: $shouldIncludeCartDiscounts) {\n totalActiveWithoutDiscountCodes {\n limit\n current\n }\n }\n stores @include(if: $shouldIncludeStores) {\n total {\n limit\n current\n }\n inventorySupplyChannels {\n limit\n }\n productDistributionChannels {\n limit\n }\n }\n customers @include(if: $shouldIncludeCustomers) {\n total {\n limit\n current\n }\n }\n customerGroups @include(if: $shouldIncludeCustomerGroups) {\n total {\n limit\n current\n }\n }\n zones @include(if: $shouldIncludeZones) {\n total {\n limit\n current\n }\n }\n taxCategories @include(if: $shouldIncludeTaxCategories) {\n total {\n limit\n current\n }\n }\n shippingMethods @include(if: $shouldIncludeShippingMethods) {\n total {\n limit\n current\n }\n }\n carts @include(if: $shouldIncludeCarts) {\n total {\n limit\n current\n }\n }\n businessUnits @include(if: $shouldIncludeBusinessUnits) {\n maxDivisions {\n limit\n }\n maxDepthLimit {\n limit\n }\n maxAssociates {\n limit\n }\n maxAssociateRoles {\n limit\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
11259
|
+
var PlatformLimitsFetcherQuery$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "PlatformLimitsFetcherQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limits" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "lineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "textLineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActive" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActiveWithoutDiscountCodes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventorySupplyChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDistributionChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxGroupsPerCustomer" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "maxDivisions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxDepthLimit" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociateRoles" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 2158, source: { body: "query PlatformLimitsFetcherQuery(\n $shouldIncludeShoppingLists: Boolean!\n $shouldIncludeProductDiscounts: Boolean!\n $shouldIncludeCartDiscounts: Boolean!\n $shouldIncludeStores: Boolean!\n $shouldIncludeCustomers: Boolean!\n $shouldIncludeCustomerGroups: Boolean!\n $shouldIncludeZones: Boolean!\n $shouldIncludeTaxCategories: Boolean!\n $shouldIncludeShippingMethods: Boolean!\n $shouldIncludeCarts: Boolean!\n $shouldIncludeBusinessUnits: Boolean!\n) {\n limits {\n shoppingLists @include(if: $shouldIncludeShoppingLists) {\n total {\n limit\n current\n }\n lineItems {\n limit\n }\n textLineItems {\n limit\n }\n }\n productDiscounts @include(if: $shouldIncludeProductDiscounts) {\n totalActive {\n limit\n current\n }\n }\n cartDiscounts @include(if: $shouldIncludeCartDiscounts) {\n totalActiveWithoutDiscountCodes {\n limit\n current\n }\n }\n stores @include(if: $shouldIncludeStores) {\n total {\n limit\n current\n }\n inventorySupplyChannels {\n limit\n }\n productDistributionChannels {\n limit\n }\n }\n customers @include(if: $shouldIncludeCustomers) {\n total {\n limit\n current\n }\n maxGroupsPerCustomer {\n limit\n }\n }\n customerGroups @include(if: $shouldIncludeCustomerGroups) {\n total {\n limit\n current\n }\n }\n zones @include(if: $shouldIncludeZones) {\n total {\n limit\n current\n }\n }\n taxCategories @include(if: $shouldIncludeTaxCategories) {\n total {\n limit\n current\n }\n }\n shippingMethods @include(if: $shouldIncludeShippingMethods) {\n total {\n limit\n current\n }\n }\n carts @include(if: $shouldIncludeCarts) {\n total {\n limit\n current\n }\n }\n businessUnits @include(if: $shouldIncludeBusinessUnits) {\n maxDivisions {\n limit\n }\n maxDepthLimit {\n limit\n }\n maxAssociates {\n limit\n }\n maxAssociateRoles {\n limit\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10941
11260
|
const usePlatformLimitsFetcher = platformLimit => {
|
|
10942
|
-
const _useQuery = react.useQuery(PlatformLimitsFetcherQuery, {
|
|
11261
|
+
const _useQuery = react.useQuery(PlatformLimitsFetcherQuery$1, {
|
|
10943
11262
|
variables: createPlatformLimitsQueryVariables(platformLimit),
|
|
10944
11263
|
context: {
|
|
10945
11264
|
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
@@ -10960,6 +11279,8 @@ const usePlatformLimitsFetcher = platformLimit => {
|
|
|
10960
11279
|
};
|
|
10961
11280
|
var usePlatformLimitsFetcher$1 = usePlatformLimitsFetcher;
|
|
10962
11281
|
|
|
11282
|
+
var PlatformLimitsFetcherQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "PlatformLimitsFetcherQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limits" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "lineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "textLineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActive" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActiveWithoutDiscountCodes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventorySupplyChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDistributionChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxGroupsPerCustomer" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "maxDivisions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxDepthLimit" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociateRoles" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 2158, source: { body: "query PlatformLimitsFetcherQuery(\n $shouldIncludeShoppingLists: Boolean!\n $shouldIncludeProductDiscounts: Boolean!\n $shouldIncludeCartDiscounts: Boolean!\n $shouldIncludeStores: Boolean!\n $shouldIncludeCustomers: Boolean!\n $shouldIncludeCustomerGroups: Boolean!\n $shouldIncludeZones: Boolean!\n $shouldIncludeTaxCategories: Boolean!\n $shouldIncludeShippingMethods: Boolean!\n $shouldIncludeCarts: Boolean!\n $shouldIncludeBusinessUnits: Boolean!\n) {\n limits {\n shoppingLists @include(if: $shouldIncludeShoppingLists) {\n total {\n limit\n current\n }\n lineItems {\n limit\n }\n textLineItems {\n limit\n }\n }\n productDiscounts @include(if: $shouldIncludeProductDiscounts) {\n totalActive {\n limit\n current\n }\n }\n cartDiscounts @include(if: $shouldIncludeCartDiscounts) {\n totalActiveWithoutDiscountCodes {\n limit\n current\n }\n }\n stores @include(if: $shouldIncludeStores) {\n total {\n limit\n current\n }\n inventorySupplyChannels {\n limit\n }\n productDistributionChannels {\n limit\n }\n }\n customers @include(if: $shouldIncludeCustomers) {\n total {\n limit\n current\n }\n maxGroupsPerCustomer {\n limit\n }\n }\n customerGroups @include(if: $shouldIncludeCustomerGroups) {\n total {\n limit\n current\n }\n }\n zones @include(if: $shouldIncludeZones) {\n total {\n limit\n current\n }\n }\n taxCategories @include(if: $shouldIncludeTaxCategories) {\n total {\n limit\n current\n }\n }\n shippingMethods @include(if: $shouldIncludeShippingMethods) {\n total {\n limit\n current\n }\n }\n carts @include(if: $shouldIncludeCarts) {\n total {\n limit\n current\n }\n }\n businessUnits @include(if: $shouldIncludeBusinessUnits) {\n maxDivisions {\n limit\n }\n maxDepthLimit {\n limit\n }\n maxAssociates {\n limit\n }\n maxAssociateRoles {\n limit\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
11283
|
+
|
|
10963
11284
|
const useLimitsModalState = function () {
|
|
10964
11285
|
let isInitiallyOpen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
10965
11286
|
const _useState = React.useState(isInitiallyOpen),
|
|
@@ -11086,7 +11407,7 @@ const getCustomerSupportLink = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
|
11086
11407
|
isExternal: true,
|
|
11087
11408
|
to: constants.SUPPORT_PORTAL_URL,
|
|
11088
11409
|
children: msg
|
|
11089
|
-
});
|
|
11410
|
+
}, `msg-${msg}`);
|
|
11090
11411
|
const PlatformLimitWarningNotification = _ref => {
|
|
11091
11412
|
let resource = _ref.resource,
|
|
11092
11413
|
limit = _ref.limit;
|
|
@@ -11924,11 +12245,13 @@ var CustomersCombined = PlatformLimitsCustomersCombined;
|
|
|
11924
12245
|
|
|
11925
12246
|
const useCustomersPlatformLimits = () => {
|
|
11926
12247
|
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
12248
|
+
platformLimits = _useCustomersPlatform.platformLimits,
|
|
11927
12249
|
refetch = _useCustomersPlatform.refetch;
|
|
11928
12250
|
const _useCustomersPlatform2 = useCustomersPlatformLimitsStatus(),
|
|
11929
12251
|
hasReachedCustomersWarningLimit = _useCustomersPlatform2.hasReachedCustomersWarningLimit,
|
|
11930
12252
|
hasReachedCustomersErrorLimit = _useCustomersPlatform2.hasReachedCustomersErrorLimit;
|
|
11931
12253
|
const interceptNavigation = useInterceptNavigation$1(hasReachedCustomersErrorLimit);
|
|
12254
|
+
const maxGroupsPerCustomerLimit = platformLimits?.customers?.maxGroupsPerCustomer?.limit;
|
|
11932
12255
|
return {
|
|
11933
12256
|
CustomersLimits: {
|
|
11934
12257
|
Notifications: CustomersNotification,
|
|
@@ -11938,6 +12261,7 @@ const useCustomersPlatformLimits = () => {
|
|
|
11938
12261
|
ErrorModal: CustomersErrorModal
|
|
11939
12262
|
},
|
|
11940
12263
|
refetchCustomersPlatformLimits: refetch,
|
|
12264
|
+
maxGroupsPerCustomerLimit,
|
|
11941
12265
|
interceptNavigation,
|
|
11942
12266
|
status: {
|
|
11943
12267
|
hasReachedCustomersWarningLimit,
|
|
@@ -11962,6 +12286,38 @@ const injectCustomersPlatformLimits = () => WrappedComponent => {
|
|
|
11962
12286
|
};
|
|
11963
12287
|
var injectCustomersPlatformLimits$1 = injectCustomersPlatformLimits;
|
|
11964
12288
|
|
|
12289
|
+
const useBusinessUnitsPlatformLimitsFetcher = () => {
|
|
12290
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.businessUnits),
|
|
12291
|
+
isLoading = _usePlatformLimitsFet.isLoading,
|
|
12292
|
+
error = _usePlatformLimitsFet.error,
|
|
12293
|
+
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
12294
|
+
refetch = _usePlatformLimitsFet.refetch;
|
|
12295
|
+
const formattedPlatformLimits = {
|
|
12296
|
+
businessUnitsMaxDivisionsLimit: platformLimits.businessUnits?.maxDivisions.limit,
|
|
12297
|
+
businessUnitsMaxDepthLimit: platformLimits.businessUnits?.maxDepthLimit.limit,
|
|
12298
|
+
businessUnitsMaxAssociatesLimit: platformLimits.businessUnits?.maxAssociates.limit,
|
|
12299
|
+
businessUnitsMaxAssociateRolesLimit: platformLimits.businessUnits?.maxAssociateRoles.limit
|
|
12300
|
+
};
|
|
12301
|
+
return {
|
|
12302
|
+
isLoading,
|
|
12303
|
+
error,
|
|
12304
|
+
platformLimits: formattedPlatformLimits,
|
|
12305
|
+
refetch
|
|
12306
|
+
};
|
|
12307
|
+
};
|
|
12308
|
+
var useBusinessUnitsPlatformLimitsFetcher$1 = useBusinessUnitsPlatformLimitsFetcher;
|
|
12309
|
+
|
|
12310
|
+
const useBusinessUnitsLimits = () => {
|
|
12311
|
+
const _useBusinessUnitsPlat = useBusinessUnitsPlatformLimitsFetcher$1(),
|
|
12312
|
+
refetch = _useBusinessUnitsPlat.refetch,
|
|
12313
|
+
platformLimits = _useBusinessUnitsPlat.platformLimits;
|
|
12314
|
+
return {
|
|
12315
|
+
BusinessUnitsLimits: platformLimits,
|
|
12316
|
+
refetchBusinessUnitsPlatformLimits: refetch
|
|
12317
|
+
};
|
|
12318
|
+
};
|
|
12319
|
+
var useBusinessUnitsLimits$1 = useBusinessUnitsLimits;
|
|
12320
|
+
|
|
11965
12321
|
const useCustomerGroupsPlatformLimitsFetcher = () => {
|
|
11966
12322
|
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.customerGroups),
|
|
11967
12323
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
@@ -12309,6 +12665,72 @@ const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
|
|
|
12309
12665
|
};
|
|
12310
12666
|
var injectCustomerGroupsPlatformLimits$1 = injectCustomerGroupsPlatformLimits;
|
|
12311
12667
|
|
|
12668
|
+
const useStoresPlatformLimitsFetcher = () => {
|
|
12669
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.stores),
|
|
12670
|
+
isLoading = _usePlatformLimitsFet.isLoading,
|
|
12671
|
+
error = _usePlatformLimitsFet.error,
|
|
12672
|
+
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
12673
|
+
refetch = _usePlatformLimitsFet.refetch;
|
|
12674
|
+
const formattedPlatformLimits = {
|
|
12675
|
+
total: platformLimits.stores?.total.limit,
|
|
12676
|
+
storeLimit: platformLimits.stores?.total.limit,
|
|
12677
|
+
storeCurrent: platformLimits.stores?.total.current,
|
|
12678
|
+
inventorySupplyChannels: platformLimits.stores?.inventorySupplyChannels.limit,
|
|
12679
|
+
productDistributionChannels: platformLimits.stores?.productDistributionChannels.limit
|
|
12680
|
+
};
|
|
12681
|
+
return {
|
|
12682
|
+
isLoading,
|
|
12683
|
+
error,
|
|
12684
|
+
platformLimits: formattedPlatformLimits,
|
|
12685
|
+
refetch
|
|
12686
|
+
};
|
|
12687
|
+
};
|
|
12688
|
+
var useStoresPlatformLimitsFetcher$1 = useStoresPlatformLimitsFetcher;
|
|
12689
|
+
|
|
12690
|
+
const useStoresPlatformLimits = () => {
|
|
12691
|
+
const _useStoresPlatformLim = useStoresPlatformLimitsFetcher$1(),
|
|
12692
|
+
platformLimits = _useStoresPlatformLim.platformLimits;
|
|
12693
|
+
if (!platformLimits?.total) {
|
|
12694
|
+
return {
|
|
12695
|
+
hasReachedStoresWarningLimit: false,
|
|
12696
|
+
hasReachedStoresErrorLimit: false
|
|
12697
|
+
};
|
|
12698
|
+
}
|
|
12699
|
+
const storeLimit = platformLimits.storeLimit,
|
|
12700
|
+
storeCurrent = platformLimits.storeCurrent;
|
|
12701
|
+
const hasReachedStoresWarningLimit = getHasExceededWarningThreshold({
|
|
12702
|
+
limit: storeLimit,
|
|
12703
|
+
current: storeCurrent
|
|
12704
|
+
});
|
|
12705
|
+
const hasReachedStoresErrorLimit = getHasExceededLimit({
|
|
12706
|
+
limit: storeLimit,
|
|
12707
|
+
current: storeCurrent
|
|
12708
|
+
});
|
|
12709
|
+
return {
|
|
12710
|
+
hasReachedStoresWarningLimit,
|
|
12711
|
+
hasReachedStoresErrorLimit
|
|
12712
|
+
};
|
|
12713
|
+
};
|
|
12714
|
+
var useStoresPlatformLimitsStatus = useStoresPlatformLimits;
|
|
12715
|
+
|
|
12716
|
+
const useStoresLimits = () => {
|
|
12717
|
+
const _useStoresPlatformLim = useStoresPlatformLimitsFetcher$1(),
|
|
12718
|
+
refetch = _useStoresPlatformLim.refetch,
|
|
12719
|
+
platformLimits = _useStoresPlatformLim.platformLimits;
|
|
12720
|
+
const _useStoresPlatformLim2 = useStoresPlatformLimitsStatus(),
|
|
12721
|
+
hasReachedStoresWarningLimit = _useStoresPlatformLim2.hasReachedStoresWarningLimit,
|
|
12722
|
+
hasReachedStoresErrorLimit = _useStoresPlatformLim2.hasReachedStoresErrorLimit;
|
|
12723
|
+
return {
|
|
12724
|
+
StoreLimits: platformLimits,
|
|
12725
|
+
refetchStoresPlatformLimits: refetch,
|
|
12726
|
+
status: {
|
|
12727
|
+
hasReachedStoresWarningLimit,
|
|
12728
|
+
hasReachedStoresErrorLimit
|
|
12729
|
+
}
|
|
12730
|
+
};
|
|
12731
|
+
};
|
|
12732
|
+
var useStoresLimits$1 = useStoresLimits;
|
|
12733
|
+
|
|
12312
12734
|
var messages$c = reactIntl.defineMessages({
|
|
12313
12735
|
yes: {
|
|
12314
12736
|
id: 'BooleanField.yes',
|
|
@@ -13604,7 +14026,7 @@ function formatDiscount(discount, currencyCode, intl) {
|
|
|
13604
14026
|
if (discount.type === 'relative') return `${discount.permyriad / 100}%`;
|
|
13605
14027
|
if (!discount.money) return null;
|
|
13606
14028
|
const moneyForCurrencyCode = _findInstanceProperty__default["default"](_context = discount.money).call(_context, discountMoney => discountMoney.currencyCode === currencyCode);
|
|
13607
|
-
return moneyForCurrencyCode ? formatMoney$
|
|
14029
|
+
return moneyForCurrencyCode ? formatMoney$2(moneyForCurrencyCode, intl) : null;
|
|
13608
14030
|
}
|
|
13609
14031
|
|
|
13610
14032
|
function formatPercentage(percentage) {
|
|
@@ -13750,6 +14172,9 @@ function resolveStatusType(product) {
|
|
|
13750
14172
|
if (published && !hasStagedChanges) return PRODUCT_STATUSES.PUBLISHED;
|
|
13751
14173
|
return PRODUCT_STATUSES.UNPUBLISHED;
|
|
13752
14174
|
}
|
|
14175
|
+
function getStampToneByPublishState(statusCode) {
|
|
14176
|
+
if (statusCode === PRODUCT_STATUSES.UNPUBLISHED) return 'secondary';else if (statusCode === PRODUCT_STATUSES.PUBLISHED) return 'positive';else if (statusCode === PRODUCT_STATUSES.MODIFIED) return 'warning';
|
|
14177
|
+
}
|
|
13753
14178
|
const computedProperties = {
|
|
13754
14179
|
// TODO: show relative time as tooltip
|
|
13755
14180
|
// `intl.formatRelative(<DATETIME>)`
|
|
@@ -13781,7 +14206,7 @@ const computedProperties = {
|
|
|
13781
14206
|
intl = _ref4.intl;
|
|
13782
14207
|
const allVariants = _concatInstanceProperty__default["default"](_context2 = product.variants).call(_context2, product.masterVariant);
|
|
13783
14208
|
const variantPrices = flatMap__default["default"](allVariants, variant => variant.prices);
|
|
13784
|
-
return _mapInstanceProperty__default["default"](_context3 = getMinimumPricesByCurrencyCode(variantPrices)).call(_context3, price => formatMoney$
|
|
14209
|
+
return _mapInstanceProperty__default["default"](_context3 = getMinimumPricesByCurrencyCode(variantPrices)).call(_context3, price => formatMoney$2(price, intl)).join(', ') || constants.NO_VALUE_FALLBACK;
|
|
13785
14210
|
},
|
|
13786
14211
|
sku(_ref5) {
|
|
13787
14212
|
var _context4, _context5;
|
|
@@ -14073,6 +14498,8 @@ var CategorySearchPickerOptionFragment = { kind: "Document", definitions: [{ kin
|
|
|
14073
14498
|
|
|
14074
14499
|
exports.BooleanField = booleanField;
|
|
14075
14500
|
exports.Button = Button$1;
|
|
14501
|
+
exports.CUSTOM_FIELD_TYPES = CUSTOM_FIELD_TYPES;
|
|
14502
|
+
exports.Carousel = Carousel$1;
|
|
14076
14503
|
exports.CartDiscountReferenceSearch = CartDiscountReferenceSearch;
|
|
14077
14504
|
exports.CategoryReferenceSearch = CategoryReferenceSearch;
|
|
14078
14505
|
exports.CategorySearchPickerOptionFragment = CategorySearchPickerOptionFragment;
|
|
@@ -14080,6 +14507,7 @@ exports.CenteredLoadingSpinner = CenteredLoadingSpinner$1;
|
|
|
14080
14507
|
exports.ChannelPickerInput = ChannelPickerInput$1;
|
|
14081
14508
|
exports.CountriesPicker = CountriesPicker;
|
|
14082
14509
|
exports.CustomFieldDefinitionsConnector = customFieldDefinitionsConnector;
|
|
14510
|
+
exports.CustomFieldInput = CustomFieldInput$1;
|
|
14083
14511
|
exports.CustomFieldTooltip = CustomFieldTooltip$1;
|
|
14084
14512
|
exports.CustomFieldTypeDefinitionsConnector = CustomFieldTypeDefinitionsConnector$1;
|
|
14085
14513
|
exports.CustomFields = CustomFields$1;
|
|
@@ -14092,6 +14520,7 @@ exports.EMAIL_REGEX = EMAIL_REGEX;
|
|
|
14092
14520
|
exports.FileInput = FileInput$1;
|
|
14093
14521
|
exports.FormattedDateTime = FormattedDateTime$1;
|
|
14094
14522
|
exports.FormattedLocalizedString = FormattedLocalizedString;
|
|
14523
|
+
exports.LOWER_STORES_LIMIT = LOWER_STORES_LIMIT;
|
|
14095
14524
|
exports.LabelRange = LabelRange$1;
|
|
14096
14525
|
exports.MC_RESOURCES_WITH_KEYS = MC_RESOURCES_WITH_KEYS;
|
|
14097
14526
|
exports.MissingValueField = MissingValueField$1;
|
|
@@ -14100,11 +14529,15 @@ exports.NumericFormatInput = numericFormatInput;
|
|
|
14100
14529
|
exports.Option = Option$2;
|
|
14101
14530
|
exports.PRECISION_TYPES = PRECISION_TYPES;
|
|
14102
14531
|
exports.PimIndexerProvider = pimIndexerProvider;
|
|
14532
|
+
exports.PlatformLimitsFetcherQuery = PlatformLimitsFetcherQuery;
|
|
14103
14533
|
exports.ProductAttributeInput = ProductAttributeInput;
|
|
14104
14534
|
exports.ProductAttributes = ProductAttributes;
|
|
14105
14535
|
exports.ProductPickerInput = ProductPickerInput$1;
|
|
14106
14536
|
exports.ProductSelectionPicker = ProductSelectionsPicker;
|
|
14107
14537
|
exports.QUERY_LIMIT = QUERY_LIMIT;
|
|
14538
|
+
exports.QUERY_MAX_LIMIT = QUERY_MAX_LIMIT;
|
|
14539
|
+
exports.RESOURCES_WITH_PLATFORM_LIMITS = RESOURCES_WITH_PLATFORM_LIMITS;
|
|
14540
|
+
exports.RecurrentIntervalPicker = RecurrentIntervalPicker$1;
|
|
14108
14541
|
exports.RequestCache = RequestCache$1;
|
|
14109
14542
|
exports.RequiredIndicator = RequiredIndicator$1;
|
|
14110
14543
|
exports.ScrollToFieldError = ScrollToFieldError$1;
|
|
@@ -14113,12 +14546,14 @@ exports.SelectableFieldSearchInput = SelectableFieldSearchInput$1;
|
|
|
14113
14546
|
exports.StoreSelectField = StoreSelectField$1;
|
|
14114
14547
|
exports.StoreSelectInput = StoreSelectInput$1;
|
|
14115
14548
|
exports.ThrottledField = ThrottledField$1;
|
|
14549
|
+
exports.UPPER_STORES_LIMIT = UPPER_STORES_LIMIT;
|
|
14116
14550
|
exports.VALIDATOR_INTEGER = VALIDATOR_INTEGER;
|
|
14117
14551
|
exports.VALIDATOR_NUMERIC = VALIDATOR_NUMERIC;
|
|
14118
14552
|
exports.VALIDATOR_REQUIRED = VALIDATOR_REQUIRED;
|
|
14119
14553
|
exports.WithPimIndexer = WithPimIndexer$1;
|
|
14120
14554
|
exports.allowedProperties = allowedProperties;
|
|
14121
14555
|
exports.and = and;
|
|
14556
|
+
exports.attributeToCustomField = attributeToCustomField;
|
|
14122
14557
|
exports.attributesMapToNameValuePairs = attributesMapToNameValuePairs;
|
|
14123
14558
|
exports.base64ToString = base64ToString;
|
|
14124
14559
|
exports.booleanMessages = messages$c;
|
|
@@ -14136,6 +14571,7 @@ exports.convertProductSelectionFromGraphQl = convertProductSelectionFromGraphQl;
|
|
|
14136
14571
|
exports.convertRatioToPercentage = convertRatioToPercentage;
|
|
14137
14572
|
exports.createGraphQlUpdateActions = createGraphQlUpdateActions;
|
|
14138
14573
|
exports.createNextSortDefinition = createNextSortDefinition$1;
|
|
14574
|
+
exports.createPlatformLimitsQueryVariables = createPlatformLimitsQueryVariables;
|
|
14139
14575
|
exports.createReducer = createReducer;
|
|
14140
14576
|
exports.createResourceReducer = createResourceReducer;
|
|
14141
14577
|
exports.customFieldsTransformer = customFields;
|
|
@@ -14152,7 +14588,7 @@ exports.formatCustomerName = formatCustomerName;
|
|
|
14152
14588
|
exports.formatDateRangeValue = formatDateRangeValue;
|
|
14153
14589
|
exports.formatDateTime = formatDateTime$1;
|
|
14154
14590
|
exports.formatDiscount = formatDiscount;
|
|
14155
|
-
exports.formatMoney = formatMoney$
|
|
14591
|
+
exports.formatMoney = formatMoney$2;
|
|
14156
14592
|
exports.formatMoneyRangeValue = formatMoneyRangeValue;
|
|
14157
14593
|
exports.formatMoneyValue = formatMoneyValue;
|
|
14158
14594
|
exports.formatPercentage = formatPercentage;
|
|
@@ -14175,6 +14611,7 @@ exports.getPrefixSearchBounds = getPrefixSearchBounds$1;
|
|
|
14175
14611
|
exports.getPriceChannelName = getPriceChannelName;
|
|
14176
14612
|
exports.getReferenceTypeId = getReferenceTypeId;
|
|
14177
14613
|
exports.getSelectedPrice = getSelectedPrice;
|
|
14614
|
+
exports.getStampToneByPublishState = getStampToneByPublishState;
|
|
14178
14615
|
exports.getTimeZoneId = getTimeZoneId;
|
|
14179
14616
|
exports.getTimeZoneLabel = getTimeZoneLabel;
|
|
14180
14617
|
exports.getTypeNameOfType = getTypeNameOfType;
|
|
@@ -14206,6 +14643,7 @@ exports.isValidISODate = isValidISODate;
|
|
|
14206
14643
|
exports.isValidISODateTime = isValidISODateTime;
|
|
14207
14644
|
exports.isValidISOTime = isValidISOTime;
|
|
14208
14645
|
exports.keepDisplayName = keepDisplayName$1;
|
|
14646
|
+
exports.mapShippingRateTierToGraphQL = mapShippingRateTierToGraphQL;
|
|
14209
14647
|
exports.mapStoresToOptions = mapStoresToOptions;
|
|
14210
14648
|
exports.mapTimeZonesToOptions = mapTimeZonesToOptions;
|
|
14211
14649
|
exports.minusify = minusify;
|
|
@@ -14216,14 +14654,14 @@ exports.not = not;
|
|
|
14216
14654
|
exports.omitDeep = omitDeep;
|
|
14217
14655
|
exports.omitSetsOfSets = omitSetsOfSets;
|
|
14218
14656
|
exports.or = or;
|
|
14219
|
-
exports.pickerMessages =
|
|
14657
|
+
exports.pickerMessages = commonPickerMessages;
|
|
14220
14658
|
exports.range = range;
|
|
14221
14659
|
exports.reorderArrayItems = reorderArrayItems;
|
|
14222
14660
|
exports.resolveStatusType = resolveStatusType;
|
|
14223
14661
|
exports.safelyAddFallback = safelyAddFallback;
|
|
14224
14662
|
exports.sanitize = sanitize;
|
|
14225
14663
|
exports.searchCategories = searchCategories;
|
|
14226
|
-
exports.searchInputMessages = messages$
|
|
14664
|
+
exports.searchInputMessages = messages$O;
|
|
14227
14665
|
exports.setDisplayName = setDisplayName$1;
|
|
14228
14666
|
exports.setToArray = setToArray;
|
|
14229
14667
|
exports.shallowEqual = shallowEqual;
|
|
@@ -14240,6 +14678,7 @@ exports.transformLocalizedFieldsForCategory = transformLocalizedFieldsForCategor
|
|
|
14240
14678
|
exports.truncate = truncate;
|
|
14241
14679
|
exports.unique = unique;
|
|
14242
14680
|
exports.uniqueObjects = uniqueObjects;
|
|
14681
|
+
exports.useBusinessUnitsPlatformLimits = useBusinessUnitsLimits$1;
|
|
14243
14682
|
exports.useCachedCategoryOptions = useCachedCategoryOptions;
|
|
14244
14683
|
exports.useCurrentOption = useCurrentOption;
|
|
14245
14684
|
exports.useCustomFieldsDnDContext = useDnDContext;
|
|
@@ -14263,6 +14702,7 @@ exports.useShippingMethodsPlatformLimits = useShippingMethodsPlatformLimits;
|
|
|
14263
14702
|
exports.useStorage = useStorage$1;
|
|
14264
14703
|
exports.useStoreKeysInDataFences = useStoreKeysInDataFences$1;
|
|
14265
14704
|
exports.useStoresListFetcher = useStoresListFetcher$1;
|
|
14705
|
+
exports.useStoresPlatformLimits = useStoresLimits$1;
|
|
14266
14706
|
exports.useTaxCategoriesPlatformLimits = useTaxCategoriesPlatformLimits;
|
|
14267
14707
|
exports.useTotalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1;
|
|
14268
14708
|
exports.validateCustomField = validateFilter$2;
|