@commercetools-frontend/experimental-components 7.1.0 → 7.2.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.
@@ -4197,6 +4197,29 @@ function formatCustomField(_ref) {
4197
4197
  userTimeZone
4198
4198
  });
4199
4199
  }
4200
+ function useFormatCustomField() {
4201
+ const intl = reactIntl.useIntl();
4202
+ const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
4203
+ language: applicationContext.dataLocale,
4204
+ languages: applicationContext.project?.languages,
4205
+ userTimeZone: applicationContext.user?.timeZone
4206
+ })),
4207
+ language = _useApplicationContex.language,
4208
+ languages = _useApplicationContex.languages,
4209
+ userTimeZone = _useApplicationContex.userTimeZone;
4210
+ return React.useCallback(_ref2 => {
4211
+ let type = _ref2.type,
4212
+ value = _ref2.value;
4213
+ return formatCustomField({
4214
+ type,
4215
+ value,
4216
+ intl,
4217
+ language,
4218
+ languages,
4219
+ userTimeZone
4220
+ });
4221
+ }, [intl, language, languages, userTimeZone]);
4222
+ }
4200
4223
 
4201
4224
  // FIXME: delete once prefix search is supported in ctp api
4202
4225
 
@@ -9110,7 +9133,7 @@ const RecurrentIntervalPicker = _ref => {
9110
9133
  }) : selectedIsMissingInData ? jsxRuntime.jsx(uiKit.Text.Body, {
9111
9134
  tone: "negative",
9112
9135
  intlMessage: messages$w.missingSelectedWarning
9113
- }) : null, !error && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
9136
+ }) : null, !error && !skip && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
9114
9137
  type: "warning",
9115
9138
  children: jsxRuntime.jsx(uiKit.Text.Detail, {
9116
9139
  intlMessage: messages$w.noRecurrentIntervalsConfigured
@@ -14685,6 +14708,7 @@ exports.useCustomFieldsDnDContext = useDnDContext;
14685
14708
  exports.useCustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits$1;
14686
14709
  exports.useCustomersPlatformLimits = useCustomersPlatformLimits$1;
14687
14710
  exports.useDebouncedPromiseCallback = useDebouncedPromiseCallback$1;
14711
+ exports.useFormatCustomField = useFormatCustomField;
14688
14712
  exports.useFormatLocalizedFieldToString = useFormatLocalizedFieldToString;
14689
14713
  exports.useFormatLocalizedString = useFormatLocalizedString;
14690
14714
  exports.useIsFieldDuplicated = useIsFieldDuplicated$1;
@@ -4196,6 +4196,29 @@ function formatCustomField(_ref) {
4196
4196
  userTimeZone
4197
4197
  });
4198
4198
  }
4199
+ function useFormatCustomField() {
4200
+ const intl = reactIntl.useIntl();
4201
+ const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
4202
+ language: applicationContext.dataLocale,
4203
+ languages: applicationContext.project?.languages,
4204
+ userTimeZone: applicationContext.user?.timeZone
4205
+ })),
4206
+ language = _useApplicationContex.language,
4207
+ languages = _useApplicationContex.languages,
4208
+ userTimeZone = _useApplicationContex.userTimeZone;
4209
+ return React.useCallback(_ref2 => {
4210
+ let type = _ref2.type,
4211
+ value = _ref2.value;
4212
+ return formatCustomField({
4213
+ type,
4214
+ value,
4215
+ intl,
4216
+ language,
4217
+ languages,
4218
+ userTimeZone
4219
+ });
4220
+ }, [intl, language, languages, userTimeZone]);
4221
+ }
4199
4222
 
4200
4223
  // FIXME: delete once prefix search is supported in ctp api
4201
4224
 
@@ -9088,7 +9111,7 @@ const RecurrentIntervalPicker = _ref => {
9088
9111
  }) : selectedIsMissingInData ? jsxRuntime.jsx(uiKit.Text.Body, {
9089
9112
  tone: "negative",
9090
9113
  intlMessage: messages$w.missingSelectedWarning
9091
- }) : null, !error && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
9114
+ }) : null, !error && !skip && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
9092
9115
  type: "warning",
9093
9116
  children: jsxRuntime.jsx(uiKit.Text.Detail, {
9094
9117
  intlMessage: messages$w.noRecurrentIntervalsConfigured
@@ -14655,6 +14678,7 @@ exports.useCustomFieldsDnDContext = useDnDContext;
14655
14678
  exports.useCustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits$1;
14656
14679
  exports.useCustomersPlatformLimits = useCustomersPlatformLimits$1;
14657
14680
  exports.useDebouncedPromiseCallback = useDebouncedPromiseCallback$1;
14681
+ exports.useFormatCustomField = useFormatCustomField;
14658
14682
  exports.useFormatLocalizedFieldToString = useFormatLocalizedFieldToString;
14659
14683
  exports.useFormatLocalizedString = useFormatLocalizedString;
14660
14684
  exports.useIsFieldDuplicated = useIsFieldDuplicated$1;
@@ -4095,6 +4095,29 @@ function formatCustomField(_ref) {
4095
4095
  userTimeZone
4096
4096
  });
4097
4097
  }
4098
+ function useFormatCustomField() {
4099
+ const intl = useIntl();
4100
+ const _useApplicationContex = useApplicationContext(applicationContext => ({
4101
+ language: applicationContext.dataLocale,
4102
+ languages: applicationContext.project?.languages,
4103
+ userTimeZone: applicationContext.user?.timeZone
4104
+ })),
4105
+ language = _useApplicationContex.language,
4106
+ languages = _useApplicationContex.languages,
4107
+ userTimeZone = _useApplicationContex.userTimeZone;
4108
+ return useCallback(_ref2 => {
4109
+ let type = _ref2.type,
4110
+ value = _ref2.value;
4111
+ return formatCustomField({
4112
+ type,
4113
+ value,
4114
+ intl,
4115
+ language,
4116
+ languages,
4117
+ userTimeZone
4118
+ });
4119
+ }, [intl, language, languages, userTimeZone]);
4120
+ }
4098
4121
 
4099
4122
  // FIXME: delete once prefix search is supported in ctp api
4100
4123
 
@@ -9008,7 +9031,7 @@ const RecurrentIntervalPicker = _ref => {
9008
9031
  }) : selectedIsMissingInData ? jsx(Text.Body, {
9009
9032
  tone: "negative",
9010
9033
  intlMessage: messages$w.missingSelectedWarning
9011
- }) : null, !error && noRecurrentIntervalsConfigured && jsx(ContentNotification, {
9034
+ }) : null, !error && !skip && noRecurrentIntervalsConfigured && jsx(ContentNotification, {
9012
9035
  type: "warning",
9013
9036
  children: jsx(Text.Detail, {
9014
9037
  intlMessage: messages$w.noRecurrentIntervalsConfigured
@@ -14394,4 +14417,4 @@ function withPendingRequests() {
14394
14417
 
14395
14418
  var CategorySearchPickerOptionFragment = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "CategorySearchPickerOptionFragment" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CategorySearch" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "externalId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "slugAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "parent" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "ancestors" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 685, source: { body: "query SearchCategoryReference($locale: Locale!, $text: String!) {\n categories: categoryAutocomplete(locale: $locale, text: $text) {\n results {\n ...CategorySearchPickerOptionFragment\n }\n }\n}\n\nquery FetchCategoriesByIds($where: String!) {\n categories(where: $where) {\n results {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nfragment CategorySearchPickerOptionFragment on CategorySearch {\n id\n externalId\n nameAllLocales {\n locale\n value\n }\n slugAllLocales {\n locale\n value\n }\n parent {\n nameAllLocales {\n locale\n value\n }\n }\n ancestors {\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
14396
14419
 
14397
- export { booleanField as BooleanField, Button$1 as Button, CUSTOM_FIELD_TYPES, Carousel$1 as Carousel, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner$1 as CenteredLoadingSpinner, ChannelPickerInput$1 as ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldInput$1 as CustomFieldInput, CustomFieldTooltip$1 as CustomFieldTooltip, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields$1 as CustomFields, CustomFieldsErrorTextNotification$1 as CustomFieldsErrorTextNotification, CustomFieldsFormField$1 as CustomFieldsFormField, CustomerGroupPickerInput$1 as CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FileInput$1 as FileInput, FormattedDateTime$1 as FormattedDateTime, FormattedLocalizedString, LOWER_STORES_LIMIT, LabelRange$1 as LabelRange, MC_RESOURCES_WITH_KEYS, MissingValueField$1 as MissingValueField, MultiValueSearchInput$1 as MultiValueSearchInput, numericFormatInput as NumericFormatInput, Option$2 as Option, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, PlatformLimitsFetcherQuery, ProductAttributeInput, ProductAttributes, ProductPickerInput$1 as ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, QUERY_LIMIT, QUERY_MAX_LIMIT, RESOURCES_WITH_PLATFORM_LIMITS, RecurrentIntervalPicker$1 as RecurrentIntervalPicker, RequestCache$1 as RequestCache, RequiredIndicator$1 as RequiredIndicator, ScrollToFieldError$1 as ScrollToFieldError, searchInput as SearchInput, SelectableFieldSearchInput$1 as SelectableFieldSearchInput, StoreSelectField$1 as StoreSelectField, StoreSelectInput$1 as StoreSelectInput, ThrottledField$1 as ThrottledField, UPPER_STORES_LIMIT, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer$1 as WithPimIndexer, allowedProperties, and, attributeToCustomField, attributesMapToNameValuePairs, base64ToString, messages$c as booleanMessages, buildSearchQuery$1 as buildSearchQuery, businessRoleConstants$1 as businessRoleConstants, messages$7 as businessRoleMessages, businessRoleKeys$1 as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition$1 as createNextSortDefinition, createPlatformLimitsQueryVariables, createReducer, createResourceReducer, customFields as customFieldsTransformer, dateTransformer$1 as dateTransformer, exact, exists, extractErrorFromGraphQlResponse, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomField, formatCustomerAddress, formatCustomerName, formatDateRangeValue, formatDateTime$1 as formatDateTime, formatDiscount, formatMoney$2 as formatMoney, formatMoneyRangeValue, formatMoneyValue, formatPercentage, formatAttribute as formatProductAttribute, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName$1 as getDisplayName, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds$1 as getPrefixSearchBounds, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getStampToneByPublishState, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, dateTransformer as graphqlDateTransformer, missingLocaleTransformer as graphqlMissingLocaleTransformer, missingTransformer as graphqlMissingTransformer, numberTransformer as graphqlNumberTransformer, graphqlQueryBuilder, referenceTransformer as graphqlReferenceTransformer, textTransformer as graphqlTextTransformer, hasInvalidInputError$1 as hasInvalidInputError, hasSemanticError$1 as hasSemanticError, injectCustomerGroupsPlatformLimits$1 as injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits$1 as injectCustomersPlatformLimits, injectDataTablePaginationState$1 as injectDataTablePaginationState, injectModalState$3 as injectModalState, injectNotifications$1 as injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits$1 as injectShippingMethodsPlatformLimits, injectStorage$1 as injectStorage, injectTaxCategoriesPlatformLimits$1 as injectTaxCategoriesPlatformLimits, injectModalState$1 as injectToggleState, injectZonesPlatformLimits$1 as injectZonesPlatformLimits, isEmptyFilter as isEmpty, isEmptyValue, isUUID$1 as isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName$1 as keepDisplayName, mapShippingRateTierToGraphQL, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$9 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, commonPickerMessages as pickerMessages, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$O as searchInputMessages, setDisplayName$1 as setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useBusinessUnitsLimits$1 as useBusinessUnitsPlatformLimits, useCachedCategoryOptions, useCurrentOption, useDnDContext as useCustomFieldsDnDContext, useCustomerGroupsPlatformLimits$1 as useCustomerGroupsPlatformLimits, useCustomersPlatformLimits$1 as useCustomersPlatformLimits, useDebouncedPromiseCallback$1 as useDebouncedPromiseCallback, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated$1 as useIsFieldDuplicated, useLoadOptions$1 as useLoadOptions, useLocalizedKeyFallback$1 as useLocalizedKeyFallback, usePendingRequests, usePersistedTableConfiguration$1 as usePersistedTableConfiguration, usePimIndexer, usePrevious$1 as usePrevious, useProductSelectionsFetcher$1 as useProductSelectionsFetcher, useProductSelectionsTotalFetcher$1 as useProductSelectionsTotalFetcher, useRecurrenceIntervals, useRoleNotificationEffect$1 as useRoleNotificationEffect, useShippingMethodsPlatformLimits, useStorage$1 as useStorage, useStoreKeysInDataFences$1 as useStoreKeysInDataFences, useStoresListFetcher$1 as useStoresListFetcher, useStoresLimits$1 as useStoresPlatformLimits, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher$1 as useTotalNumberOfStoresFetcher, validateFilter$2 as validateCustomField, validations as validateCustomFields, validateFilter$1 as validateDate, validateMultiOptionEnum, validateFilter as validateNumber, validateSingleOptionEnum, validateText, validatedInput, validationMessages, withPendingRequests, withProps$1 as withProps, withRedirectTo$1 as withRedirectTo, withoutEmptyErrorsByField$1 as withoutEmptyErrorsByField, wrapDisplayName$1 as wrapDisplayName };
14420
+ export { booleanField as BooleanField, Button$1 as Button, CUSTOM_FIELD_TYPES, Carousel$1 as Carousel, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner$1 as CenteredLoadingSpinner, ChannelPickerInput$1 as ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldInput$1 as CustomFieldInput, CustomFieldTooltip$1 as CustomFieldTooltip, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields$1 as CustomFields, CustomFieldsErrorTextNotification$1 as CustomFieldsErrorTextNotification, CustomFieldsFormField$1 as CustomFieldsFormField, CustomerGroupPickerInput$1 as CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FileInput$1 as FileInput, FormattedDateTime$1 as FormattedDateTime, FormattedLocalizedString, LOWER_STORES_LIMIT, LabelRange$1 as LabelRange, MC_RESOURCES_WITH_KEYS, MissingValueField$1 as MissingValueField, MultiValueSearchInput$1 as MultiValueSearchInput, numericFormatInput as NumericFormatInput, Option$2 as Option, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, PlatformLimitsFetcherQuery, ProductAttributeInput, ProductAttributes, ProductPickerInput$1 as ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, QUERY_LIMIT, QUERY_MAX_LIMIT, RESOURCES_WITH_PLATFORM_LIMITS, RecurrentIntervalPicker$1 as RecurrentIntervalPicker, RequestCache$1 as RequestCache, RequiredIndicator$1 as RequiredIndicator, ScrollToFieldError$1 as ScrollToFieldError, searchInput as SearchInput, SelectableFieldSearchInput$1 as SelectableFieldSearchInput, StoreSelectField$1 as StoreSelectField, StoreSelectInput$1 as StoreSelectInput, ThrottledField$1 as ThrottledField, UPPER_STORES_LIMIT, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer$1 as WithPimIndexer, allowedProperties, and, attributeToCustomField, attributesMapToNameValuePairs, base64ToString, messages$c as booleanMessages, buildSearchQuery$1 as buildSearchQuery, businessRoleConstants$1 as businessRoleConstants, messages$7 as businessRoleMessages, businessRoleKeys$1 as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition$1 as createNextSortDefinition, createPlatformLimitsQueryVariables, createReducer, createResourceReducer, customFields as customFieldsTransformer, dateTransformer$1 as dateTransformer, exact, exists, extractErrorFromGraphQlResponse, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomField, formatCustomerAddress, formatCustomerName, formatDateRangeValue, formatDateTime$1 as formatDateTime, formatDiscount, formatMoney$2 as formatMoney, formatMoneyRangeValue, formatMoneyValue, formatPercentage, formatAttribute as formatProductAttribute, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName$1 as getDisplayName, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds$1 as getPrefixSearchBounds, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getStampToneByPublishState, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, dateTransformer as graphqlDateTransformer, missingLocaleTransformer as graphqlMissingLocaleTransformer, missingTransformer as graphqlMissingTransformer, numberTransformer as graphqlNumberTransformer, graphqlQueryBuilder, referenceTransformer as graphqlReferenceTransformer, textTransformer as graphqlTextTransformer, hasInvalidInputError$1 as hasInvalidInputError, hasSemanticError$1 as hasSemanticError, injectCustomerGroupsPlatformLimits$1 as injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits$1 as injectCustomersPlatformLimits, injectDataTablePaginationState$1 as injectDataTablePaginationState, injectModalState$3 as injectModalState, injectNotifications$1 as injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits$1 as injectShippingMethodsPlatformLimits, injectStorage$1 as injectStorage, injectTaxCategoriesPlatformLimits$1 as injectTaxCategoriesPlatformLimits, injectModalState$1 as injectToggleState, injectZonesPlatformLimits$1 as injectZonesPlatformLimits, isEmptyFilter as isEmpty, isEmptyValue, isUUID$1 as isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName$1 as keepDisplayName, mapShippingRateTierToGraphQL, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$9 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, commonPickerMessages as pickerMessages, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$O as searchInputMessages, setDisplayName$1 as setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useBusinessUnitsLimits$1 as useBusinessUnitsPlatformLimits, useCachedCategoryOptions, useCurrentOption, useDnDContext as useCustomFieldsDnDContext, useCustomerGroupsPlatformLimits$1 as useCustomerGroupsPlatformLimits, useCustomersPlatformLimits$1 as useCustomersPlatformLimits, useDebouncedPromiseCallback$1 as useDebouncedPromiseCallback, useFormatCustomField, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated$1 as useIsFieldDuplicated, useLoadOptions$1 as useLoadOptions, useLocalizedKeyFallback$1 as useLocalizedKeyFallback, usePendingRequests, usePersistedTableConfiguration$1 as usePersistedTableConfiguration, usePimIndexer, usePrevious$1 as usePrevious, useProductSelectionsFetcher$1 as useProductSelectionsFetcher, useProductSelectionsTotalFetcher$1 as useProductSelectionsTotalFetcher, useRecurrenceIntervals, useRoleNotificationEffect$1 as useRoleNotificationEffect, useShippingMethodsPlatformLimits, useStorage$1 as useStorage, useStoreKeysInDataFences$1 as useStoreKeysInDataFences, useStoresListFetcher$1 as useStoresListFetcher, useStoresLimits$1 as useStoresPlatformLimits, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher$1 as useTotalNumberOfStoresFetcher, validateFilter$2 as validateCustomField, validations as validateCustomFields, validateFilter$1 as validateDate, validateMultiOptionEnum, validateFilter as validateNumber, validateSingleOptionEnum, validateText, validatedInput, validationMessages, withPendingRequests, withProps$1 as withProps, withRedirectTo$1 as withRedirectTo, withoutEmptyErrorsByField$1 as withoutEmptyErrorsByField, wrapDisplayName$1 as wrapDisplayName };
@@ -0,0 +1,7 @@
1
+ import { TRecurrencePolicyQueryResult } from '../../../../../../types/src/generated/ctp';
2
+ declare const handlers: {
3
+ FetchRecurrencePolicies: {
4
+ all: (policies?: TRecurrencePolicyQueryResult['results']) => import("msw").GraphQLHandler<import("msw").GraphQLRequest<import("msw").GraphQLVariables>>;
5
+ };
6
+ };
7
+ export default handlers;
@@ -0,0 +1,2 @@
1
+ import handlers from "./handlers.js";
2
+ export { handlers };
@@ -85,7 +85,7 @@ import validateDate from "./utils/filters/validation/date/index.js";
85
85
  import { validateSingleOptionEnum, validateMultiOptionEnum } from "./utils/filters/validation/enum/enum.js";
86
86
  import validateNumber from "./utils/filters/validation/number/index.js";
87
87
  import { validateText } from "./utils/filters/validation/text/text.js";
88
- import { formatDateTime, formatDateRangeValue, formatMoney, formatMoneyValue, formatMoneyRangeValue, formatProductAttribute, formatCustomField } from "./utils/formats/index.js";
88
+ import { formatDateTime, formatDateRangeValue, formatMoney, formatMoneyValue, formatMoneyRangeValue, formatProductAttribute, formatCustomField, useFormatCustomField } from "./utils/formats/index.js";
89
89
  import formatDiscount from "./utils/formats/discount/discount.js";
90
90
  import { getFractionedAmount } from "./utils/formats/money/money.js";
91
91
  import { formatPercentage, convertRatioToPercentage } from "./utils/formats/percentage/percentage.js";
@@ -116,4 +116,4 @@ import getIndexesOfInvalidValues from "./utils/validation/get-indexes-of-invalid
116
116
  import withoutEmptyErrorsByField from "./utils/validation/without-empty-errors-by-field.js";
117
117
  import withPendingRequests from "./utils/with-pending-requests/with-pending-requests.jsx";
118
118
  export { QUERY_LIMIT, QUERY_MAX_LIMIT, LOWER_STORES_LIMIT, UPPER_STORES_LIMIT, } from "./constants/index.js";
119
- export { allowedProperties, and, attributesMapToNameValuePairs, attributeToCustomField, base64ToString, BooleanField, booleanMessages, buildSearchQuery, Button, businessRoles, businessRoleConstants, businessRoleMessages, capitalizeFirst, Carousel, type CarouselItem, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner, ChannelPickerInput, CustomerGroupPickerInput, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, CountriesPicker, createGraphQlUpdateActions, createNextSortDefinition, createPlatformLimitsQueryVariables, createReducer, createResourceReducer, CustomFieldDefinitionsConnector, CustomFieldTypeDefinitionsConnector, CustomFields, useDnDContext as useCustomFieldsDnDContext, CustomFieldsErrorTextNotification, CustomFieldsFormField, CustomFieldInput, customFieldsTransformer, CustomFieldTooltip, dateTransformer, DefaultPageSizes, Divider, EMAIL_REGEX, exact, exists, extractErrorFromGraphQlResponse, FileInput, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomerAddress, formatCustomerName, formatCustomField, formatDateTime, formatDateRangeValue, formatDiscount, formatMoneyRangeValue, formatMoney, formatMoneyValue, formatPercentage, formatProductAttribute, FormattedDateTime, FormattedLocalizedString, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getStampToneByPublishState, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, graphqlDateTransformer, graphqlMissingLocaleTransformer, graphqlMissingTransformer, graphqlNumberTransformer, graphqlQueryBuilder, graphqlReferenceTransformer, graphqlTextTransformer, hasInvalidInputError, hasSemanticError, injectCustomerGroupsPlatformLimits, useBusinessUnitsPlatformLimits, injectCustomersPlatformLimits, injectDataTablePaginationState, injectModalState, injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits, injectStorage, injectTaxCategoriesPlatformLimits, injectToggleState, injectZonesPlatformLimits, isEmpty, isEmptyValue, isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName, LabelRange, mapShippingRateTierToGraphQL, mapTimeZonesToOptions, mapStoresToOptions, MC_RESOURCES_WITH_KEYS, minusify, MissingValueField, missingValueMessages, MultiValueSearchInput, nameValuePairsToMap, normalizeProductSettings, not, NumericFormatInput, omitDeep, omitSetsOfSets, or, Option, pickerMessages, PimIndexerProvider, PlatformLimitsFetcherQuery, PRECISION_TYPES, ProductAttributeInput, ProductAttributes, ProductPickerInput, ProductSelectionPicker, range, RecurrentIntervalPicker, reorderArrayItems, RequestCache, RequiredIndicator, resolveStatusType, RESOURCES_WITH_PLATFORM_LIMITS, safelyAddFallback, sanitize, ScrollToFieldError, searchCategories, SearchInput, searchInputMessages, SelectableFieldSearchInput, setToArray, setDisplayName, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, StoreSelectField, StoreSelectInput, stringToBase64, swapArrayItems, ThrottledField, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useCurrentOption, useCustomersPlatformLimits, useCustomerGroupsPlatformLimits, useDebouncedPromiseCallback, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated, useLocalizedKeyFallback, useLoadOptions, usePendingRequests, usePersistedTableConfiguration, usePimIndexer, usePrevious, useProductSelectionsFetcher, useProductSelectionsTotalFetcher, useRecurrenceIntervals, useRoleNotificationEffect, useStorage, type UseStorageOptions, useStoreKeysInDataFences, useStoresListFetcher, useStoresPlatformLimits, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher, useShippingMethodsPlatformLimits, validatedInput, validateCustomField, validateCustomFields, CUSTOM_FIELD_TYPES, validateDate, validateMultiOptionEnum, validateSingleOptionEnum, validateText, validateNumber, validationMessages, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, withProps, withoutEmptyErrorsByField, withPendingRequests, WithPimIndexer, withRedirectTo, wrapDisplayName, };
119
+ export { allowedProperties, and, attributesMapToNameValuePairs, attributeToCustomField, base64ToString, BooleanField, booleanMessages, buildSearchQuery, Button, businessRoles, businessRoleConstants, businessRoleMessages, capitalizeFirst, Carousel, type CarouselItem, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner, ChannelPickerInput, CustomerGroupPickerInput, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, CountriesPicker, createGraphQlUpdateActions, createNextSortDefinition, createPlatformLimitsQueryVariables, createReducer, createResourceReducer, CustomFieldDefinitionsConnector, CustomFieldTypeDefinitionsConnector, CustomFields, useDnDContext as useCustomFieldsDnDContext, CustomFieldsErrorTextNotification, CustomFieldsFormField, CustomFieldInput, customFieldsTransformer, CustomFieldTooltip, dateTransformer, DefaultPageSizes, Divider, EMAIL_REGEX, exact, exists, extractErrorFromGraphQlResponse, FileInput, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomerAddress, formatCustomerName, formatCustomField, formatDateTime, formatDateRangeValue, formatDiscount, formatMoneyRangeValue, formatMoney, formatMoneyValue, formatPercentage, formatProductAttribute, FormattedDateTime, FormattedLocalizedString, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getStampToneByPublishState, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, graphqlDateTransformer, graphqlMissingLocaleTransformer, graphqlMissingTransformer, graphqlNumberTransformer, graphqlQueryBuilder, graphqlReferenceTransformer, graphqlTextTransformer, hasInvalidInputError, hasSemanticError, injectCustomerGroupsPlatformLimits, useBusinessUnitsPlatformLimits, injectCustomersPlatformLimits, injectDataTablePaginationState, injectModalState, injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits, injectStorage, injectTaxCategoriesPlatformLimits, injectToggleState, injectZonesPlatformLimits, isEmpty, isEmptyValue, isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName, LabelRange, mapShippingRateTierToGraphQL, mapTimeZonesToOptions, mapStoresToOptions, MC_RESOURCES_WITH_KEYS, minusify, MissingValueField, missingValueMessages, MultiValueSearchInput, nameValuePairsToMap, normalizeProductSettings, not, NumericFormatInput, omitDeep, omitSetsOfSets, or, Option, pickerMessages, PimIndexerProvider, PlatformLimitsFetcherQuery, PRECISION_TYPES, ProductAttributeInput, ProductAttributes, ProductPickerInput, ProductSelectionPicker, range, RecurrentIntervalPicker, reorderArrayItems, RequestCache, RequiredIndicator, resolveStatusType, RESOURCES_WITH_PLATFORM_LIMITS, safelyAddFallback, sanitize, ScrollToFieldError, searchCategories, SearchInput, searchInputMessages, SelectableFieldSearchInput, setToArray, setDisplayName, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, StoreSelectField, StoreSelectInput, stringToBase64, swapArrayItems, ThrottledField, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useCurrentOption, useCustomersPlatformLimits, useCustomerGroupsPlatformLimits, useDebouncedPromiseCallback, useFormatCustomField, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated, useLocalizedKeyFallback, useLoadOptions, usePendingRequests, usePersistedTableConfiguration, usePimIndexer, usePrevious, useProductSelectionsFetcher, useProductSelectionsTotalFetcher, useRecurrenceIntervals, useRoleNotificationEffect, useStorage, type UseStorageOptions, useStoreKeysInDataFences, useStoresListFetcher, useStoresPlatformLimits, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher, useShippingMethodsPlatformLimits, validatedInput, validateCustomField, validateCustomFields, CUSTOM_FIELD_TYPES, validateDate, validateMultiOptionEnum, validateSingleOptionEnum, validateText, validateNumber, validationMessages, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, withProps, withoutEmptyErrorsByField, withPendingRequests, WithPimIndexer, withRedirectTo, wrapDisplayName, };
@@ -8,3 +8,4 @@ export { handlers as useStoreByFieldFetcherHandlers } from "./components/store-s
8
8
  export { handlers as useStoresByWherePredicateFetcherHandlers } from "./components/store-select-input/components/stores-search-select-input/mocks/index.js";
9
9
  export { handlers as platformLimitsMockHandlers } from "./features/platform-limits/shared/hooks/use-platform-limits-fetcher/mocks/index.js";
10
10
  export { createFetchStoreDistributionChannelsQueryMock } from "./hooks/use-role-based-channels-fetcher/test-utils.js";
11
+ export { handlers as recurrenceIntervalsMockHandlers } from "./components/recurrent-interval-picker/use-recurrence-intervals/mocks/index.js";
@@ -7,7 +7,7 @@
7
7
  * value in `Custom Fields` contains a key of an `Enum` entry, and not an entry itself.
8
8
  * Therefore, before passing value to attributes formatter we need to replace value with Enum entry.
9
9
  */
10
- export default function formatCustomField({ type, value, intl, language, languages, userTimeZone, }: {
10
+ export function formatCustomField({ type, value, intl, language, languages, userTimeZone, }: {
11
11
  type: any;
12
12
  value: any;
13
13
  intl: any;
@@ -15,3 +15,7 @@ export default function formatCustomField({ type, value, intl, language, languag
15
15
  languages: any;
16
16
  userTimeZone: any;
17
17
  }): any;
18
+ export function useFormatCustomField(): ({ type, value }: {
19
+ type: any;
20
+ value: any;
21
+ }) => any;
@@ -1 +1 @@
1
- export { default } from "./custom-field.js";
1
+ export { formatCustomField, useFormatCustomField } from "./custom-field.js";
@@ -1,4 +1,4 @@
1
1
  export { default as formatProductAttribute } from "./product-attribute/index.js";
2
- export { default as formatCustomField } from "./custom-field/index.js";
3
2
  export { formatDateTime, formatDateRangeValue, formatUTCOffset } from "./date/index.js";
4
3
  export { formatMoney, formatMoneyValue, formatMoneyRangeValue } from "./money/index.js";
4
+ export { formatCustomField, useFormatCustomField } from "./custom-field/index.js";
package/dist/styles.css CHANGED
@@ -40,12 +40,6 @@
40
40
  .validated-input-module__container___3L2KB {
41
41
  display: inline;
42
42
  }
43
- /* imported from label-range.module.css */
44
-
45
- .label-range-module__label___3Tb0p {
46
- font-size: 0.9rem;
47
- font-weight: bold;
48
- }
49
43
  /* imported from multi-value-search-input.module.css */
50
44
 
51
45
  .multi-value-search-input-module__container___2u64d {
@@ -92,17 +86,11 @@
92
86
  border-bottom-left-radius: var(--border-radius-for-input);
93
87
  border-bottom-right-radius: var(--border-radius-for-input);
94
88
  }
95
- /* imported from numeric-format-input.module.css */
96
-
97
- .numeric-format-input-module__invalid___3LcyE {
98
- /* this needs !important because react-select has a :focus style that
99
- stops the border colour being set unless the element is blurred */
100
- border-color: var(--color-error) !important;
101
- border: 1px solid;
102
- }
89
+ /* imported from label-range.module.css */
103
90
 
104
- .numeric-format-input-module__disabled___hb6h4 {
105
- cursor: not-allowed;
91
+ .label-range-module__label___3Tb0p {
92
+ font-size: 0.9rem;
93
+ font-weight: bold;
106
94
  }
107
95
  /* imported from search-input.module.css */
108
96
 
@@ -194,6 +182,18 @@
194
182
  flex-shrink: 1;
195
183
  margin-left: var(--spacing-s);
196
184
  }
185
+ /* imported from numeric-format-input.module.css */
186
+
187
+ .numeric-format-input-module__invalid___3LcyE {
188
+ /* this needs !important because react-select has a :focus style that
189
+ stops the border colour being set unless the element is blurred */
190
+ border-color: var(--color-error) !important;
191
+ border: 1px solid;
192
+ }
193
+
194
+ .numeric-format-input-module__disabled___hb6h4 {
195
+ cursor: not-allowed;
196
+ }
197
197
  /* imported from throttled-field.module.css */
198
198
 
199
199
  .throttled-field-module__size___324jx {
@@ -600,13 +600,13 @@
600
600
  .platform-limits-customers-combined-module__combined___OszDd {
601
601
  margin-bottom: var(--spacing-s);
602
602
  }
603
- /* imported from platform-limits-customer-groups-status.module.css */
604
-
605
- .platform-limits-customer-groups-status-module__status___6099G {
606
- min-width: max-content;
607
- }
608
603
  /* imported from platform-limits-customer-groups-combined.module.css */
609
604
 
610
605
  .platform-limits-customer-groups-combined-module__combined___WjRoI {
611
606
  margin-bottom: var(--spacing-s);
612
607
  }
608
+ /* imported from platform-limits-customer-groups-status.module.css */
609
+
610
+ .platform-limits-customer-groups-status-module__status___6099G {
611
+ min-width: max-content;
612
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/experimental-components",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,14 +25,14 @@
25
25
  "dependencies": {
26
26
  "@babel/core": "^7.22.11",
27
27
  "@babel/runtime-corejs3": "^7.21.0",
28
- "@commercetools-frontend/actions-global": "24.0.0",
29
- "@commercetools-frontend/application-components": "24.0.0",
30
- "@commercetools-frontend/application-shell": "24.0.0",
31
- "@commercetools-frontend/application-shell-connectors": "24.0.0",
32
- "@commercetools-frontend/constants": "24.0.0",
33
- "@commercetools-frontend/l10n": "24.0.0",
34
- "@commercetools-frontend/sdk": "24.0.0",
35
- "@commercetools-frontend/sentry": "24.0.0",
28
+ "@commercetools-frontend/actions-global": "24.1.0",
29
+ "@commercetools-frontend/application-components": "24.1.0",
30
+ "@commercetools-frontend/application-shell": "24.1.0",
31
+ "@commercetools-frontend/application-shell-connectors": "24.1.0",
32
+ "@commercetools-frontend/constants": "24.1.0",
33
+ "@commercetools-frontend/l10n": "24.1.0",
34
+ "@commercetools-frontend/sdk": "24.1.0",
35
+ "@commercetools-frontend/sentry": "24.1.0",
36
36
  "@commercetools-frontend/ui-kit": "20.0.0",
37
37
  "@commercetools-uikit/design-system": "20.0.0",
38
38
  "@commercetools-uikit/select-utils": "20.0.0",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "devDependencies": {
63
63
  "@apollo/client": "3.12.4",
64
- "@commercetools/composable-commerce-test-data": "11.1.1",
64
+ "@commercetools/composable-commerce-test-data": "11.2.1",
65
65
  "@testing-library/react": "16.1.0",
66
66
  "@types/debounce-promise": "3.1.9",
67
67
  "@types/jest": "^29.5.2",
@@ -80,8 +80,8 @@
80
80
  "react-test-renderer": "17.0.2",
81
81
  "redux": "4.2.1",
82
82
  "typescript": "5.2.2",
83
- "@commercetools-local/test-data": "1.2.19",
84
- "@commercetools-local/test-utils": "1.2.20"
83
+ "@commercetools-local/test-data": "1.2.20",
84
+ "@commercetools-local/test-utils": "1.2.21"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "@apollo/client": "3.x",
@@ -28,7 +28,7 @@ var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defin
28
28
  var _lastIndexOfInstanceProperty__default = /*#__PURE__*/_interopDefault(_lastIndexOfInstanceProperty);
29
29
  var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
30
30
 
31
- const handlers$g = {
31
+ const handlers$i = {
32
32
  TotalNumberOfStores: {
33
33
  all: total => msw.graphql.query('TotalNumberOfStores', (req, res, ctx) => {
34
34
  return res(ctx.data({
@@ -39,16 +39,16 @@ const handlers$g = {
39
39
  })
40
40
  }
41
41
  };
42
- var handlers$h = handlers$g;
42
+ var handlers$j = handlers$i;
43
43
 
44
- const handlers$e = {
44
+ const handlers$g = {
45
45
  TypeDefinitions: {
46
46
  all: typeDefinitions => msw.graphql.query('FetchTypeDefinitionsQuery', (req, res, ctx) => res(ctx.data({
47
47
  typeDefinitions
48
48
  })))
49
49
  }
50
50
  };
51
- var handlers$f = handlers$e;
51
+ var handlers$h = handlers$g;
52
52
 
53
53
  const graphqlQueries = {
54
54
  ASSOCIATE_ROLE: 'associateRoles',
@@ -74,7 +74,7 @@ const graphqlQueries = {
74
74
  TAX_CATEGORY: 'taxCategories',
75
75
  ZONE: 'zones'
76
76
  };
77
- const handlers$c = {
77
+ const handlers$e = {
78
78
  DuplicatedField: {
79
79
  total: (total, resourceType) => msw.graphql.query('FetchResourceTypeDuplicatedField', (req, res, ctx) => {
80
80
  if (!graphqlQueries[resourceType]) return res(ctx.data({}));
@@ -86,18 +86,18 @@ const handlers$c = {
86
86
  })
87
87
  }
88
88
  };
89
- var handlers$d = handlers$c;
89
+ var handlers$f = handlers$e;
90
90
 
91
- const handlers$a = {
91
+ const handlers$c = {
92
92
  ProductSelections: {
93
93
  all: productSelections => msw.graphql.query('FetchProductSelections', (req, res, ctx) => res(ctx.data({
94
94
  productSelections
95
95
  })))
96
96
  }
97
97
  };
98
- var handlers$b = handlers$a;
98
+ var handlers$d = handlers$c;
99
99
 
100
- const handlers$8 = {
100
+ const handlers$a = {
101
101
  ProductSelections: {
102
102
  total: total => msw.graphql.query('FetchProductSelectionsTotal', (req, res, ctx) => res(ctx.data({
103
103
  productSelections: {
@@ -107,13 +107,13 @@ const handlers$8 = {
107
107
  })))
108
108
  }
109
109
  };
110
- var handlers$9 = handlers$8;
110
+ var handlers$b = handlers$a;
111
111
 
112
112
  const extractKeysFromWherePredicateClause = function () {
113
113
  let whereClause = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
114
114
  return whereClause.substring(_lastIndexOfInstanceProperty__default["default"](whereClause).call(whereClause, '("') + 1, _lastIndexOfInstanceProperty__default["default"](whereClause).call(whereClause, '")')).replace(/["]/g, '').split(', ');
115
115
  };
116
- const handlers$6 = {
116
+ const handlers$8 = {
117
117
  StoresList: {
118
118
  all: stores => msw.graphql.query('FetchStoresQuery', (req, res, ctx) => {
119
119
  // GIVEN req.variables.where is specified
@@ -161,9 +161,9 @@ const handlers$6 = {
161
161
  })
162
162
  }
163
163
  };
164
- var handlers$7 = handlers$6;
164
+ var handlers$9 = handlers$8;
165
165
 
166
- const handlers$4 = {
166
+ const handlers$6 = {
167
167
  FetchStoresByField: {
168
168
  all: stores => msw.graphql.query('FetchStoresByField', (req, res, ctx) => {
169
169
  return res(ctx.data({
@@ -172,9 +172,9 @@ const handlers$4 = {
172
172
  })
173
173
  }
174
174
  };
175
- var handlers$5 = handlers$4;
175
+ var handlers$7 = handlers$6;
176
176
 
177
- const handlers$2 = {
177
+ const handlers$4 = {
178
178
  FetchStoresByWherePredicate: {
179
179
  all: stores => msw.graphql.query('FetchStoresByWherePredicate', (req, res, ctx) => {
180
180
  return res(ctx.data({
@@ -186,16 +186,16 @@ const handlers$2 = {
186
186
  })
187
187
  }
188
188
  };
189
- var handlers$3 = handlers$2;
189
+ var handlers$5 = handlers$4;
190
190
 
191
- const handlers = {
191
+ const handlers$2 = {
192
192
  PlatformLimits: {
193
193
  all: platformLimiits => msw.graphql.query('PlatformLimitsFetcherQuery', (req, res, ctx) => res(ctx.data({
194
194
  limits: platformLimiits
195
195
  })))
196
196
  }
197
197
  };
198
- var handlers$1 = handlers;
198
+ var handlers$3 = handlers$2;
199
199
 
200
200
  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; }
201
201
  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; }
@@ -217,13 +217,32 @@ const createFetchStoreDistributionChannelsQueryMock = custom => _objectSpread({
217
217
  }
218
218
  }, custom);
219
219
 
220
+ const handlers = {
221
+ FetchRecurrencePolicies: {
222
+ all: function () {
223
+ let policies = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
224
+ return msw.graphql.query('FetchRecurrencePolicies', (_, res, ctx) => {
225
+ return res(ctx.data({
226
+ recurrencePolicies: {
227
+ __typename: 'RecurrencePolicyQueryResult',
228
+ results: policies,
229
+ total: policies.length
230
+ }
231
+ }));
232
+ });
233
+ }
234
+ }
235
+ };
236
+ var handlers$1 = handlers;
237
+
220
238
  exports.createFetchStoreDistributionChannelsQueryMock = createFetchStoreDistributionChannelsQueryMock;
221
- exports.customFieldDefinitionsMockHanders = handlers$f;
222
- exports.isFieldDuplicatedMockHandlers = handlers$d;
223
- exports.platformLimitsMockHandlers = handlers$1;
224
- exports.productSelectionsFetcherMockHandler = handlers$b;
225
- exports.productSelectionsTotalFetcherMockHandler = handlers$9;
226
- exports.storesListConnectorMockHandlers = handlers$7;
227
- exports.useStoreByFieldFetcherHandlers = handlers$5;
228
- exports.useStoresByWherePredicateFetcherHandlers = handlers$3;
229
- exports.useTotalNumberOfStoresFetcherHandlers = handlers$h;
239
+ exports.customFieldDefinitionsMockHanders = handlers$h;
240
+ exports.isFieldDuplicatedMockHandlers = handlers$f;
241
+ exports.platformLimitsMockHandlers = handlers$3;
242
+ exports.productSelectionsFetcherMockHandler = handlers$d;
243
+ exports.productSelectionsTotalFetcherMockHandler = handlers$b;
244
+ exports.recurrenceIntervalsMockHandlers = handlers$1;
245
+ exports.storesListConnectorMockHandlers = handlers$9;
246
+ exports.useStoreByFieldFetcherHandlers = handlers$7;
247
+ exports.useStoresByWherePredicateFetcherHandlers = handlers$5;
248
+ exports.useTotalNumberOfStoresFetcherHandlers = handlers$j;
@@ -28,7 +28,7 @@ var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defin
28
28
  var _lastIndexOfInstanceProperty__default = /*#__PURE__*/_interopDefault(_lastIndexOfInstanceProperty);
29
29
  var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
30
30
 
31
- const handlers$g = {
31
+ const handlers$i = {
32
32
  TotalNumberOfStores: {
33
33
  all: total => msw.graphql.query('TotalNumberOfStores', (req, res, ctx) => {
34
34
  return res(ctx.data({
@@ -39,16 +39,16 @@ const handlers$g = {
39
39
  })
40
40
  }
41
41
  };
42
- var handlers$h = handlers$g;
42
+ var handlers$j = handlers$i;
43
43
 
44
- const handlers$e = {
44
+ const handlers$g = {
45
45
  TypeDefinitions: {
46
46
  all: typeDefinitions => msw.graphql.query('FetchTypeDefinitionsQuery', (req, res, ctx) => res(ctx.data({
47
47
  typeDefinitions
48
48
  })))
49
49
  }
50
50
  };
51
- var handlers$f = handlers$e;
51
+ var handlers$h = handlers$g;
52
52
 
53
53
  const graphqlQueries = {
54
54
  ASSOCIATE_ROLE: 'associateRoles',
@@ -74,7 +74,7 @@ const graphqlQueries = {
74
74
  TAX_CATEGORY: 'taxCategories',
75
75
  ZONE: 'zones'
76
76
  };
77
- const handlers$c = {
77
+ const handlers$e = {
78
78
  DuplicatedField: {
79
79
  total: (total, resourceType) => msw.graphql.query('FetchResourceTypeDuplicatedField', (req, res, ctx) => {
80
80
  if (!graphqlQueries[resourceType]) return res(ctx.data({}));
@@ -86,18 +86,18 @@ const handlers$c = {
86
86
  })
87
87
  }
88
88
  };
89
- var handlers$d = handlers$c;
89
+ var handlers$f = handlers$e;
90
90
 
91
- const handlers$a = {
91
+ const handlers$c = {
92
92
  ProductSelections: {
93
93
  all: productSelections => msw.graphql.query('FetchProductSelections', (req, res, ctx) => res(ctx.data({
94
94
  productSelections
95
95
  })))
96
96
  }
97
97
  };
98
- var handlers$b = handlers$a;
98
+ var handlers$d = handlers$c;
99
99
 
100
- const handlers$8 = {
100
+ const handlers$a = {
101
101
  ProductSelections: {
102
102
  total: total => msw.graphql.query('FetchProductSelectionsTotal', (req, res, ctx) => res(ctx.data({
103
103
  productSelections: {
@@ -107,13 +107,13 @@ const handlers$8 = {
107
107
  })))
108
108
  }
109
109
  };
110
- var handlers$9 = handlers$8;
110
+ var handlers$b = handlers$a;
111
111
 
112
112
  const extractKeysFromWherePredicateClause = function () {
113
113
  let whereClause = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
114
114
  return whereClause.substring(_lastIndexOfInstanceProperty__default["default"](whereClause).call(whereClause, '("') + 1, _lastIndexOfInstanceProperty__default["default"](whereClause).call(whereClause, '")')).replace(/["]/g, '').split(', ');
115
115
  };
116
- const handlers$6 = {
116
+ const handlers$8 = {
117
117
  StoresList: {
118
118
  all: stores => msw.graphql.query('FetchStoresQuery', (req, res, ctx) => {
119
119
  // GIVEN req.variables.where is specified
@@ -161,9 +161,9 @@ const handlers$6 = {
161
161
  })
162
162
  }
163
163
  };
164
- var handlers$7 = handlers$6;
164
+ var handlers$9 = handlers$8;
165
165
 
166
- const handlers$4 = {
166
+ const handlers$6 = {
167
167
  FetchStoresByField: {
168
168
  all: stores => msw.graphql.query('FetchStoresByField', (req, res, ctx) => {
169
169
  return res(ctx.data({
@@ -172,9 +172,9 @@ const handlers$4 = {
172
172
  })
173
173
  }
174
174
  };
175
- var handlers$5 = handlers$4;
175
+ var handlers$7 = handlers$6;
176
176
 
177
- const handlers$2 = {
177
+ const handlers$4 = {
178
178
  FetchStoresByWherePredicate: {
179
179
  all: stores => msw.graphql.query('FetchStoresByWherePredicate', (req, res, ctx) => {
180
180
  return res(ctx.data({
@@ -186,16 +186,16 @@ const handlers$2 = {
186
186
  })
187
187
  }
188
188
  };
189
- var handlers$3 = handlers$2;
189
+ var handlers$5 = handlers$4;
190
190
 
191
- const handlers = {
191
+ const handlers$2 = {
192
192
  PlatformLimits: {
193
193
  all: platformLimiits => msw.graphql.query('PlatformLimitsFetcherQuery', (req, res, ctx) => res(ctx.data({
194
194
  limits: platformLimiits
195
195
  })))
196
196
  }
197
197
  };
198
- var handlers$1 = handlers;
198
+ var handlers$3 = handlers$2;
199
199
 
200
200
  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; }
201
201
  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; }
@@ -217,13 +217,32 @@ const createFetchStoreDistributionChannelsQueryMock = custom => _objectSpread({
217
217
  }
218
218
  }, custom);
219
219
 
220
+ const handlers = {
221
+ FetchRecurrencePolicies: {
222
+ all: function () {
223
+ let policies = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
224
+ return msw.graphql.query('FetchRecurrencePolicies', (_, res, ctx) => {
225
+ return res(ctx.data({
226
+ recurrencePolicies: {
227
+ __typename: 'RecurrencePolicyQueryResult',
228
+ results: policies,
229
+ total: policies.length
230
+ }
231
+ }));
232
+ });
233
+ }
234
+ }
235
+ };
236
+ var handlers$1 = handlers;
237
+
220
238
  exports.createFetchStoreDistributionChannelsQueryMock = createFetchStoreDistributionChannelsQueryMock;
221
- exports.customFieldDefinitionsMockHanders = handlers$f;
222
- exports.isFieldDuplicatedMockHandlers = handlers$d;
223
- exports.platformLimitsMockHandlers = handlers$1;
224
- exports.productSelectionsFetcherMockHandler = handlers$b;
225
- exports.productSelectionsTotalFetcherMockHandler = handlers$9;
226
- exports.storesListConnectorMockHandlers = handlers$7;
227
- exports.useStoreByFieldFetcherHandlers = handlers$5;
228
- exports.useStoresByWherePredicateFetcherHandlers = handlers$3;
229
- exports.useTotalNumberOfStoresFetcherHandlers = handlers$h;
239
+ exports.customFieldDefinitionsMockHanders = handlers$h;
240
+ exports.isFieldDuplicatedMockHandlers = handlers$f;
241
+ exports.platformLimitsMockHandlers = handlers$3;
242
+ exports.productSelectionsFetcherMockHandler = handlers$d;
243
+ exports.productSelectionsTotalFetcherMockHandler = handlers$b;
244
+ exports.recurrenceIntervalsMockHandlers = handlers$1;
245
+ exports.storesListConnectorMockHandlers = handlers$9;
246
+ exports.useStoreByFieldFetcherHandlers = handlers$7;
247
+ exports.useStoresByWherePredicateFetcherHandlers = handlers$5;
248
+ exports.useTotalNumberOfStoresFetcherHandlers = handlers$j;
@@ -11,7 +11,7 @@ import { graphql } from 'msw';
11
11
  import _lastIndexOfInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/last-index-of';
12
12
  import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
13
13
 
14
- const handlers$g = {
14
+ const handlers$i = {
15
15
  TotalNumberOfStores: {
16
16
  all: total => graphql.query('TotalNumberOfStores', (req, res, ctx) => {
17
17
  return res(ctx.data({
@@ -22,16 +22,16 @@ const handlers$g = {
22
22
  })
23
23
  }
24
24
  };
25
- var handlers$h = handlers$g;
25
+ var handlers$j = handlers$i;
26
26
 
27
- const handlers$e = {
27
+ const handlers$g = {
28
28
  TypeDefinitions: {
29
29
  all: typeDefinitions => graphql.query('FetchTypeDefinitionsQuery', (req, res, ctx) => res(ctx.data({
30
30
  typeDefinitions
31
31
  })))
32
32
  }
33
33
  };
34
- var handlers$f = handlers$e;
34
+ var handlers$h = handlers$g;
35
35
 
36
36
  const graphqlQueries = {
37
37
  ASSOCIATE_ROLE: 'associateRoles',
@@ -57,7 +57,7 @@ const graphqlQueries = {
57
57
  TAX_CATEGORY: 'taxCategories',
58
58
  ZONE: 'zones'
59
59
  };
60
- const handlers$c = {
60
+ const handlers$e = {
61
61
  DuplicatedField: {
62
62
  total: (total, resourceType) => graphql.query('FetchResourceTypeDuplicatedField', (req, res, ctx) => {
63
63
  if (!graphqlQueries[resourceType]) return res(ctx.data({}));
@@ -69,18 +69,18 @@ const handlers$c = {
69
69
  })
70
70
  }
71
71
  };
72
- var handlers$d = handlers$c;
72
+ var handlers$f = handlers$e;
73
73
 
74
- const handlers$a = {
74
+ const handlers$c = {
75
75
  ProductSelections: {
76
76
  all: productSelections => graphql.query('FetchProductSelections', (req, res, ctx) => res(ctx.data({
77
77
  productSelections
78
78
  })))
79
79
  }
80
80
  };
81
- var handlers$b = handlers$a;
81
+ var handlers$d = handlers$c;
82
82
 
83
- const handlers$8 = {
83
+ const handlers$a = {
84
84
  ProductSelections: {
85
85
  total: total => graphql.query('FetchProductSelectionsTotal', (req, res, ctx) => res(ctx.data({
86
86
  productSelections: {
@@ -90,13 +90,13 @@ const handlers$8 = {
90
90
  })))
91
91
  }
92
92
  };
93
- var handlers$9 = handlers$8;
93
+ var handlers$b = handlers$a;
94
94
 
95
95
  const extractKeysFromWherePredicateClause = function () {
96
96
  let whereClause = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
97
97
  return whereClause.substring(_lastIndexOfInstanceProperty(whereClause).call(whereClause, '("') + 1, _lastIndexOfInstanceProperty(whereClause).call(whereClause, '")')).replace(/["]/g, '').split(', ');
98
98
  };
99
- const handlers$6 = {
99
+ const handlers$8 = {
100
100
  StoresList: {
101
101
  all: stores => graphql.query('FetchStoresQuery', (req, res, ctx) => {
102
102
  // GIVEN req.variables.where is specified
@@ -144,9 +144,9 @@ const handlers$6 = {
144
144
  })
145
145
  }
146
146
  };
147
- var handlers$7 = handlers$6;
147
+ var handlers$9 = handlers$8;
148
148
 
149
- const handlers$4 = {
149
+ const handlers$6 = {
150
150
  FetchStoresByField: {
151
151
  all: stores => graphql.query('FetchStoresByField', (req, res, ctx) => {
152
152
  return res(ctx.data({
@@ -155,9 +155,9 @@ const handlers$4 = {
155
155
  })
156
156
  }
157
157
  };
158
- var handlers$5 = handlers$4;
158
+ var handlers$7 = handlers$6;
159
159
 
160
- const handlers$2 = {
160
+ const handlers$4 = {
161
161
  FetchStoresByWherePredicate: {
162
162
  all: stores => graphql.query('FetchStoresByWherePredicate', (req, res, ctx) => {
163
163
  return res(ctx.data({
@@ -169,16 +169,16 @@ const handlers$2 = {
169
169
  })
170
170
  }
171
171
  };
172
- var handlers$3 = handlers$2;
172
+ var handlers$5 = handlers$4;
173
173
 
174
- const handlers = {
174
+ const handlers$2 = {
175
175
  PlatformLimits: {
176
176
  all: platformLimiits => graphql.query('PlatformLimitsFetcherQuery', (req, res, ctx) => res(ctx.data({
177
177
  limits: platformLimiits
178
178
  })))
179
179
  }
180
180
  };
181
- var handlers$1 = handlers;
181
+ var handlers$3 = handlers$2;
182
182
 
183
183
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
184
184
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -200,4 +200,22 @@ const createFetchStoreDistributionChannelsQueryMock = custom => _objectSpread({
200
200
  }
201
201
  }, custom);
202
202
 
203
- export { createFetchStoreDistributionChannelsQueryMock, handlers$f as customFieldDefinitionsMockHanders, handlers$d as isFieldDuplicatedMockHandlers, handlers$1 as platformLimitsMockHandlers, handlers$b as productSelectionsFetcherMockHandler, handlers$9 as productSelectionsTotalFetcherMockHandler, handlers$7 as storesListConnectorMockHandlers, handlers$5 as useStoreByFieldFetcherHandlers, handlers$3 as useStoresByWherePredicateFetcherHandlers, handlers$h as useTotalNumberOfStoresFetcherHandlers };
203
+ const handlers = {
204
+ FetchRecurrencePolicies: {
205
+ all: function () {
206
+ let policies = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
207
+ return graphql.query('FetchRecurrencePolicies', (_, res, ctx) => {
208
+ return res(ctx.data({
209
+ recurrencePolicies: {
210
+ __typename: 'RecurrencePolicyQueryResult',
211
+ results: policies,
212
+ total: policies.length
213
+ }
214
+ }));
215
+ });
216
+ }
217
+ }
218
+ };
219
+ var handlers$1 = handlers;
220
+
221
+ export { createFetchStoreDistributionChannelsQueryMock, handlers$h as customFieldDefinitionsMockHanders, handlers$f as isFieldDuplicatedMockHandlers, handlers$3 as platformLimitsMockHandlers, handlers$d as productSelectionsFetcherMockHandler, handlers$b as productSelectionsTotalFetcherMockHandler, handlers$1 as recurrenceIntervalsMockHandlers, handlers$9 as storesListConnectorMockHandlers, handlers$7 as useStoreByFieldFetcherHandlers, handlers$5 as useStoresByWherePredicateFetcherHandlers, handlers$j as useTotalNumberOfStoresFetcherHandlers };