@commercetools-frontend/experimental-components 7.0.0 → 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.
@@ -0,0 +1,28 @@
1
+ /// <reference types="react" />
2
+ import { type MessageDescriptor } from 'react-intl';
3
+ import { Stamp } from '@commercetools-frontend/ui-kit';
4
+ export type CarouselItem = {
5
+ /** An identifier used to create keys */
6
+ id: string;
7
+ /** The source URL for the main image content. Should be 384px x 200px. */
8
+ imgSrc: string;
9
+ /** An alt message for image accessibility */
10
+ imgAlt: MessageDescriptor;
11
+ /** The label of the header stamp */
12
+ stampLabel: MessageDescriptor;
13
+ /** UI-Kit-compatible color for the header stamp */
14
+ stampTone: React.ComponentProps<typeof Stamp>['tone'];
15
+ /** Text of the carousel slide. Shouldn't exceed ~70 characters. */
16
+ textContent: MessageDescriptor;
17
+ /** Where the content should redirect to on user click */
18
+ linkTo: (projectKey?: string) => string;
19
+ /** Governs whether the redirection happens outside of the Merchant Center. */
20
+ isExternal: boolean;
21
+ /** Feature flag to control visibility of the item */
22
+ flag?: string;
23
+ };
24
+ type CarouselProps = {
25
+ items: CarouselItem[];
26
+ };
27
+ declare const Carousel: ({ items }: CarouselProps) => import("@emotion/react/jsx-runtime").JSX.Element;
28
+ export default Carousel;
@@ -0,0 +1,2 @@
1
+ export { default } from "./carousel.js";
2
+ export type { CarouselItem } from "./carousel.js";
@@ -5,6 +5,7 @@ import CategoryReferenceSearch from "./components/attribute-definitions/referenc
5
5
  import useCachedCategoryOptions from "./components/attribute-definitions/reference-search/category-reference-search/use-cached-category-options.js";
6
6
  import Button from "./components/buttons/button/button.jsx";
7
7
  import FileInput from "./components/buttons/file-input/file-input.jsx";
8
+ import Carousel, { type CarouselItem } from "./components/carousel/index.js";
8
9
  import CenteredLoadingSpinner from "./components/centered-loading-spinner/index.js";
9
10
  import ChannelPickerInput from "./components/channel-picker-input/index.js";
10
11
  import CountriesPicker from "./components/country-picker/index.js";
@@ -115,4 +116,4 @@ import getIndexesOfInvalidValues from "./utils/validation/get-indexes-of-invalid
115
116
  import withoutEmptyErrorsByField from "./utils/validation/without-empty-errors-by-field.js";
116
117
  import withPendingRequests from "./utils/with-pending-requests/with-pending-requests.jsx";
117
118
  export { QUERY_LIMIT, QUERY_MAX_LIMIT, LOWER_STORES_LIMIT, UPPER_STORES_LIMIT, } from "./constants/index.js";
118
- export { allowedProperties, and, attributesMapToNameValuePairs, attributeToCustomField, base64ToString, BooleanField, booleanMessages, buildSearchQuery, Button, businessRoles, businessRoleConstants, businessRoleMessages, capitalizeFirst, 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, 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, };
package/dist/styles.css CHANGED
@@ -92,6 +92,18 @@
92
92
  border-bottom-left-radius: var(--border-radius-for-input);
93
93
  border-bottom-right-radius: var(--border-radius-for-input);
94
94
  }
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
+ }
103
+
104
+ .numeric-format-input-module__disabled___hb6h4 {
105
+ cursor: not-allowed;
106
+ }
95
107
  /* imported from search-input.module.css */
96
108
 
97
109
  .search-input-module__block___1uM-y {
@@ -182,18 +194,6 @@
182
194
  flex-shrink: 1;
183
195
  margin-left: var(--spacing-s);
184
196
  }
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 {
@@ -510,21 +510,6 @@
510
510
  .custom-money-input-module__container___1fdO2 {
511
511
  width: 100%;
512
512
  }
513
- /* imported from reference-search.module.css */
514
-
515
- .reference-search-module__container___3-iK3 {
516
- width: 100%;
517
- }
518
-
519
- .reference-search-module__container___3-iK3 > div {
520
- width: 100%;
521
- }
522
-
523
- .reference-search-module__missing-label___az9AO {
524
- color: var(--color-warning);
525
- font-size: 0.9rem;
526
- margin-left: var(--spacing-xs);
527
- }
528
513
  /* imported from centered-loading-spinner.module.css */
529
514
 
530
515
  .centered-loading-spinner-module__loading-container___3_9-h {
@@ -561,6 +546,21 @@
561
546
  .divider-module__divider-dashed___2Em8A {
562
547
  border-style: dashed;
563
548
  }
549
+ /* imported from reference-search.module.css */
550
+
551
+ .reference-search-module__container___3-iK3 {
552
+ width: 100%;
553
+ }
554
+
555
+ .reference-search-module__container___3-iK3 > div {
556
+ width: 100%;
557
+ }
558
+
559
+ .reference-search-module__missing-label___az9AO {
560
+ color: var(--color-warning);
561
+ font-size: 0.9rem;
562
+ margin-left: var(--spacing-xs);
563
+ }
564
564
  /* imported from set-buttons.module.css */
565
565
 
566
566
  .set-buttons-module__topAlign___3AZwc {
@@ -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-combined.module.css */
604
-
605
- .platform-limits-customer-groups-combined-module__combined___WjRoI {
606
- margin-bottom: var(--spacing-s);
607
- }
608
603
  /* imported from platform-limits-customer-groups-status.module.css */
609
604
 
610
605
  .platform-limits-customer-groups-status-module__status___6099G {
611
606
  min-width: max-content;
612
607
  }
608
+ /* imported from platform-limits-customer-groups-combined.module.css */
609
+
610
+ .platform-limits-customer-groups-combined-module__combined___WjRoI {
611
+ margin-bottom: var(--spacing-s);
612
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/experimental-components",
3
- "version": "7.0.0",
3
+ "version": "7.1.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,18 +25,18 @@
25
25
  "dependencies": {
26
26
  "@babel/core": "^7.22.11",
27
27
  "@babel/runtime-corejs3": "^7.21.0",
28
- "@commercetools-frontend/actions-global": "fec-156-react19",
29
- "@commercetools-frontend/application-components": "fec-156-react19",
30
- "@commercetools-frontend/application-shell": "fec-156-react19",
31
- "@commercetools-frontend/application-shell-connectors": "fec-156-react19",
32
- "@commercetools-frontend/constants": "fec-156-react19",
33
- "@commercetools-frontend/l10n": "fec-156-react19",
34
- "@commercetools-frontend/sdk": "fec-156-react19",
35
- "@commercetools-frontend/sentry": "fec-156-react19",
36
- "@commercetools-frontend/ui-kit": "fec-155-react-19",
37
- "@commercetools-uikit/design-system": "fec-155-react-19",
38
- "@commercetools-uikit/select-utils": "fec-155-react-19",
39
- "@commercetools-uikit/utils": "fec-155-react-19",
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",
36
+ "@commercetools-frontend/ui-kit": "20.0.0",
37
+ "@commercetools-uikit/design-system": "20.0.0",
38
+ "@commercetools-uikit/select-utils": "20.0.0",
39
+ "@commercetools-uikit/utils": "20.0.0",
40
40
  "@emotion/react": "11.14.0",
41
41
  "@hello-pangea/dnd": "^18.0.1",
42
42
  "classnames": "2.5.1",
@@ -52,6 +52,7 @@
52
52
  "omit-deep": "0.3.0",
53
53
  "omit-empty-es": "1.2.0",
54
54
  "prop-types": "15.8.1",
55
+ "react-snap-carousel": "^0.5.1",
55
56
  "react-textarea-autosize": "8.5.4",
56
57
  "reselect": "4.1.8",
57
58
  "tiny-invariant": "1.3.3",
@@ -60,7 +61,7 @@
60
61
  },
61
62
  "devDependencies": {
62
63
  "@apollo/client": "3.12.4",
63
- "@commercetools/composable-commerce-test-data": "11.1.0",
64
+ "@commercetools/composable-commerce-test-data": "11.1.1",
64
65
  "@testing-library/react": "16.1.0",
65
66
  "@types/debounce-promise": "3.1.9",
66
67
  "@types/jest": "^29.5.2",