@sonic-equipment/ui 0.0.67 → 0.0.69

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/index.d.ts CHANGED
@@ -5,13 +5,13 @@ import { LinkProps as LinkProps$2, PressEvent } from 'react-aria-components';
5
5
  import { Hit } from '@algolia/client-search';
6
6
  import * as algoliasearch from 'algoliasearch';
7
7
  import { SearchClient } from 'algoliasearch';
8
- import { RouterProps } from 'instantsearch.js/es/middlewares/createRouterMiddleware';
9
- import { UiState } from 'instantsearch.js/es/types';
10
8
  import { AutocompleteApi, AutocompleteState as AutocompleteState$1, AutocompleteCollection, InternalAutocompleteSource, BaseItem } from '@algolia/autocomplete-core';
11
9
 
12
10
  declare const environments = ['sandbox', 'production', 'local'] as const
13
11
  type Environment = (typeof environments)[number]
14
12
 
13
+ declare const environment = getEnvironment()
14
+
15
15
  interface Config {
16
16
  ALGOLIA_API_KEY: string;
17
17
  ALGOLIA_APP_ID: string;
@@ -4672,8 +4672,7 @@ interface SidebarProviderProps {
4672
4672
  declare function SidebarDetectBreakpoint(): null;
4673
4673
  declare function SidebarProvider({ children }: SidebarProviderProps): react_jsx_runtime.JSX.Element;
4674
4674
 
4675
- declare const userTokenEventEmitter: EventEmitter<string | undefined>;
4676
- declare let userToken: string | undefined;
4675
+ declare let userToken: string;
4677
4676
 
4678
4677
  declare function AlgoliaActiveCategories(): react_jsx_runtime.JSX.Element | null;
4679
4678
 
@@ -4731,7 +4730,6 @@ declare const createSonicSearchClient: ({ apiKey, appId, host, }: {
4731
4730
  interface AlgoliaInsightsProviderGlobalState {
4732
4731
  index?: string | undefined;
4733
4732
  queryId?: string | undefined;
4734
- userToken?: string;
4735
4733
  }
4736
4734
 
4737
4735
  interface AlgoliaInsightsProviderState extends AlgoliaInsightsProviderGlobalState {
@@ -4752,10 +4750,9 @@ interface AlgoliaProviderProps {
4752
4750
  offlineSearchClient?: SearchClient;
4753
4751
  online?: boolean;
4754
4752
  query?: string;
4755
- routing?: boolean | RouterProps<UiState, UiState> | undefined;
4756
4753
  searchClient: SearchClient;
4757
4754
  }
4758
- declare function AlgoliaProvider({ categoryPages, children, hierarchicalCategories, languageCode, offlineSearchClient, online: _online, query, routing, searchClient, }: AlgoliaProviderProps): react_jsx_runtime.JSX.Element;
4755
+ declare function AlgoliaProvider({ categoryPages, children, hierarchicalCategories, languageCode, offlineSearchClient, online: _online, query, searchClient, }: AlgoliaProviderProps): react_jsx_runtime.JSX.Element;
4759
4756
  declare function useAlgolia(): {
4760
4757
  online: boolean;
4761
4758
  setOnline: UpdateGlobalState<boolean>;
@@ -5000,4 +4997,4 @@ declare function ReactQueryContainer({ children }: {
5000
4997
  children: ReactNode;
5001
4998
  }): react_jsx_runtime.JSX.Element;
5002
4999
 
5003
- export { Accordion, type AccountCollectionModel, type AccountModel, type AccountPaymentProfileCollectionModel, type AccountPaymentProfileModel, type AccountSettingsModel, type AccountShipToCollectionModel, type AccountShipToModel, type AccountsReceivableDto$1 as AccountsReceivableDto, type AddProductToCurrentCartParams$1 as AddProductToCurrentCartParams, AddToCartButton, type AddressFieldCollectionModel, type AddressFieldDisplayCollectionModel, type AddressFieldDisplayModel, type AgingBucketDto$1 as AgingBucketDto, AlgoliaActiveCategories, AlgoliaCategoriesFilters, AlgoliaFilterPanel, type AlgoliaFilterPanelProps, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, type AlgoliaInsightsProviderState, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, type AttributeTypeDto, type AttributeTypeFacetModel, type AttributeTypeModel, type AttributeValueDto, type AttributeValueFacetModel, type AttributeValueModel, type AuthenticationResponse$1 as AuthenticationResponse, type AutocompleteItemModel, type AutocompleteModel, type AutocompleteProductCollectionModel, type AutocompleteProductModel, type AvailabilityDto$2 as AvailabilityDto, AvailabilityMessageType$2 as AvailabilityMessageType, BadRequestError, BadgeImagePlacementValues, type BadgeModel, BadgeStyleValues, BadgeTypeValues, type BaseAddressModel, type BaseModel$1 as BaseModel, type BillToCollectionModel, type BillToModel$1 as BillToModel, type BrandAlphabetLetterModel, type BrandAlphabetModel, type BrandAutocompleteModel, type BrandCategoryCollectionModel, type BrandCategoryModel, type BrandCollectionModel, type BrandDto$2 as BrandDto, type BrandModel, type BrandProductLineCollectionModel, type BrandProductLineModel, type BreadCrumb, type BreadCrumbModel, Breadcrumb, type BreadcrumbLink$1 as BreadcrumbLink, type BreadcrumbProps, type BreakPriceDto$2 as BreakPriceDto, type BreakPriceRfqModel, type BudgetCalendarCollectionModel, type BudgetCalendarModel, type BudgetCollectionModel, type BudgetLineModel, type BudgetModel, Button, type ButtonProps, type CalculationMethod, type CarrierDto, type CartCollectionModel, type CartLineCollectionModel, type CartLineModel$2 as CartLineModel, type CartModel, CartProvider, type CartSettingsModel, type CatalogPageModel, type Category$1 as Category, CategoryCarousel, type CategoryCarouselProps, type CategoryCollectionModel, type CategoryFacetModel, type CategoryModel, Checkbox, type CheckboxProps$1 as CheckboxProps, type ChildTraitValueModel, ColorCheckbox, type ColorCheckboxProps, type ConfigSectionDto, type ConfigSectionModel, type ConfigSectionOptionDto, type ConfigurationModel, ConnectedAddToCartButton, type ContactUsModel, type ContentModel, type CostCodeDto, type CostCodeModel$1 as CostCodeModel, type CountryCollectionModel, type CountryModel$1 as CountryModel, type CreateSessionRequestBody, type CreditCardBillingAddressDto, type CreditCardDto, type CrossSellCollectionModel, type CurrencyCollectionModel, type CurrencyModel$1 as CurrencyModel, CurrencyPositioningType$1 as CurrencyPositioningType, type CustomerCostCodeDto, type CustomerOrderTaxDto, type CustomerSettingsModel, type CustomerValidationDto$1 as CustomerValidationDto, type DashboardPanelCollectionModel, type DashboardPanelModel, type DealerCollectionModel, type DealerModel, type DetailModel, type DocumentDto, type DocumentModel, type ECheckDto, type FacetModel, FavoriteButton, type FavoriteButtonProps, FavoriteProvider, type FetchProductListingPageDataArgs, type FieldScoreDetailedDto, type FieldScoreDetailedModel, type FieldScoreDto, type FieldScoreModel, type FieldValidationDto$1 as FieldValidationDto, type FilterOption, FilterSection, type Filters, ForbiddenRequestError, FormattedMessage, type FormattedMessageFunction, type FormattedMessageProps, GlobalSearch, GlobalSearchContainer, GlobalSearchDisclosureContext, GlobalStateProvider, GlobalStateProviderContext, IconButton, type IconButtonProps, Image, type ImageModel, InternalServerErrorRequest, IntlProvider, type InventoryAvailabilityDto, type InventoryWarehousesDto, type InvoiceCollectionModel, type InvoiceHistoryTaxDto, type InvoiceLineModel, type InvoiceModel, type InvoiceSettingsModel, type JobQuoteCollectionModel, type JobQuoteLineModel, type JobQuoteModel, type LanguageCollectionModel, type LanguageModel$1 as LanguageModel, type LegacyConfigurationDto, Link, type LinkProps, LoadingOverlay, type MessageCollectionModel, type MessageModel, type MobileAppSettingsModel, type MobileContentModel, type MobilePageDto, type MobileWidgetDto, MultiSelect, type MultiSelectProps, type NavigateFn, type NavigateOptions, NotFoundRequestError, NumberField, type NumberFieldSize, type OrderApprovalCollectionModel, type OrderCollectionModel, type OrderHistoryTaxDto, type OrderLineModel, type OrderModel, type OrderPromotionModel, type OrderRequestModel, type OrderSettingsModel, type OrderStatusMappingCollectionModel, type OrderStatusMappingModel, Page, PageContainer, type PageProps, type PaginationModel$1 as PaginationModel, type PaymentMethodDto, type PaymentOptionsDto, type PersonaModel$1 as PersonaModel, type PoRequisitionModel, type PriceFacetModel, type PriceRangeModel, type PricingRfqModel, type ProductAutocompleteItemModel, type ProductAvailabilityModel, ProductCard, type ProductCardProps, type ProductCollectionModel, type ProductDto, type ProductHit$1 as ProductHit, type ProductImageDto, type ProductInventoryDto, type ProductLineDto, type ProductLineModel, ProductListingPage, type ProductListingPageDataResponse, type ProductListingPageProps, type ProductModel, ProductOverviewGrid, type ProductOverviewGridProps, ProductPrice, type ProductPriceDto$2 as ProductPriceDto, type ProductPriceModel, type ProductPriceProps, type ProductSettingsModel, ProductSku, type ProductSkuProps, type ProductSubscriptionDto$2 as ProductSubscriptionDto, type ProductSubscriptionModel, type ProductUnitOfMeasureDto$1 as ProductUnitOfMeasureDto, type ProfileTransactionRequestModel, ProgressCircle, type ProgressCircleProps, type PromoCard$1 as PromoCard, type PromoCards, type PromotionCollectionModel, type PromotionModel, type QuoteCollectionModel, type QuoteLineModel, type QuoteModel, type QuoteSettingsModel, ReactQueryContainer, type RealTimeCartInventoryModel, type RealTimeInventoryModel, type RealTimePricingModel, type RefinementListItem, type RelatedProductDto, RequestError, type RequestHeaders, type RequisitionCollectionModel, type RequisitionLineCollectionModel, type RequisitionLineModel, type RequisitionModel, type RmaLineDto, type RmaModel, RouteButton, RouteLink, RouteProvider, type RouteProviderProps, type SalespersonModel, type ScoreExplanationDto, type ScoreExplanationModel, SearchResultsPage, type SectionOptionDto$2 as SectionOptionDto, type SectionOptionModel, Select, type SelectProps, type SessionModel$1 as SessionModel, type SessionRequestModel, type SettingsCollectionModel, type SetupRequestModel, type ShareEntityModel, type ShareOrderModel, type ShipToCollectionModel, type ShipToModel$1 as ShipToModel, type ShipViaDto, type ShipmentPackageDto, type ShipmentPackageLineDto, ShowAll, type ShowAllProps, Sidebar, SidebarDetectBreakpoint, type SidebarProps, SidebarProvider, type SiteMessageCollectionModel, type SiteMessageModel, type SortOptionModel$1 as SortOptionModel, type SpecificationDto, type SpecificationModel, type StateCollectionModel, type StateModel$1 as StateModel, type StyleTraitDto, type StyleValueDto, type StyledProductDto, type SuggestionModel, type TellAFriendModel, TextField, TimeoutRequestError, type TraitValueModel, type TranslationDictionaryCollectionModel, type TranslationDictionaryModel, type TranslationId, UnauthorizedRequestError, type UnitOfMeasureModel, UnprocessableContentRequestError, type UpdateCartLineParams, type UpdateGlobalState$1 as UpdateGlobalState, type UpdateWishListLineCollectionModel, type UseAlgoliaEventResult, VariantDisplayTypeValues, type VariantTraitModel, type VmiBinCollectionModel, type VmiBinCountModel, type VmiBinModel, type VmiCountCollectionModel, type VmiCountModel, type VmiLocationCollectionModel, type VmiLocationModel, type VmiNoteCollectionModel, type VmiNoteModel, type VmiUserImportCollectionModel, type VmiUserImportModel, type VmiUserModel, type WarehouseCollectionModel, type WarehouseDto, type WarehouseModel$1 as WarehouseModel, type WebsiteModel, type WebsiteSettingsModel, type WishListCollectionModel$1 as WishListCollectionModel, type WishListEmailScheduleModel$1 as WishListEmailScheduleModel, type WishListLineCollectionModel$1 as WishListLineCollectionModel, type WishListLineModel$1 as WishListLineModel, type WishListModel$1 as WishListModel, WishListNameAlreadyExistsError, type WishListSettingsModel, type WishListShareModel$1 as WishListShareModel, addProductToCurrentCart, addWishList, addWishListItemToWishList, config, configPerEnvironment, createSession, createSonicSearchClient, createWishList, deleteCartLineById, deleteWishList, deleteWishListItemFromWishList, fetchCurrentCartLines, fetchTranslations, getSession, getWishList, getWishListItemsByWishListId, getWishLists, isRequestError, removeWishListItemFromWishList, request, signIn, signOut, transformAlgoliaProductHitToProductHit, updateCartLineById, useAddProductToCurrentCart, useAddWishList, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaInsights, useAlgoliaSearch, useBreakpoint, useCartEvents, useCreateCurrentWishList, useDebouncedCallback, useDeleteCartLineById, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchCurrentCartLines, useFetchProductListingPageData, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useIsAuthenticated, useIsBreakpoint, useNavigate, useRemoveWishListItemFromCurrentWishList, useScrollLock, useSession, useSignIn, useSignOut, useUpdateCartLineById, userToken, userTokenEventEmitter };
5000
+ export { Accordion, type AccountCollectionModel, type AccountModel, type AccountPaymentProfileCollectionModel, type AccountPaymentProfileModel, type AccountSettingsModel, type AccountShipToCollectionModel, type AccountShipToModel, type AccountsReceivableDto$1 as AccountsReceivableDto, type AddProductToCurrentCartParams$1 as AddProductToCurrentCartParams, AddToCartButton, type AddressFieldCollectionModel, type AddressFieldDisplayCollectionModel, type AddressFieldDisplayModel, type AgingBucketDto$1 as AgingBucketDto, AlgoliaActiveCategories, AlgoliaCategoriesFilters, AlgoliaFilterPanel, type AlgoliaFilterPanelProps, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, type AlgoliaInsightsProviderState, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, type AttributeTypeDto, type AttributeTypeFacetModel, type AttributeTypeModel, type AttributeValueDto, type AttributeValueFacetModel, type AttributeValueModel, type AuthenticationResponse$1 as AuthenticationResponse, type AutocompleteItemModel, type AutocompleteModel, type AutocompleteProductCollectionModel, type AutocompleteProductModel, type AvailabilityDto$2 as AvailabilityDto, AvailabilityMessageType$2 as AvailabilityMessageType, BadRequestError, BadgeImagePlacementValues, type BadgeModel, BadgeStyleValues, BadgeTypeValues, type BaseAddressModel, type BaseModel$1 as BaseModel, type BillToCollectionModel, type BillToModel$1 as BillToModel, type BrandAlphabetLetterModel, type BrandAlphabetModel, type BrandAutocompleteModel, type BrandCategoryCollectionModel, type BrandCategoryModel, type BrandCollectionModel, type BrandDto$2 as BrandDto, type BrandModel, type BrandProductLineCollectionModel, type BrandProductLineModel, type BreadCrumb, type BreadCrumbModel, Breadcrumb, type BreadcrumbLink$1 as BreadcrumbLink, type BreadcrumbProps, type BreakPriceDto$2 as BreakPriceDto, type BreakPriceRfqModel, type BudgetCalendarCollectionModel, type BudgetCalendarModel, type BudgetCollectionModel, type BudgetLineModel, type BudgetModel, Button, type ButtonProps, type CalculationMethod, type CarrierDto, type CartCollectionModel, type CartLineCollectionModel, type CartLineModel$2 as CartLineModel, type CartModel, CartProvider, type CartSettingsModel, type CatalogPageModel, type Category$1 as Category, CategoryCarousel, type CategoryCarouselProps, type CategoryCollectionModel, type CategoryFacetModel, type CategoryModel, Checkbox, type CheckboxProps$1 as CheckboxProps, type ChildTraitValueModel, ColorCheckbox, type ColorCheckboxProps, type ConfigSectionDto, type ConfigSectionModel, type ConfigSectionOptionDto, type ConfigurationModel, ConnectedAddToCartButton, type ContactUsModel, type ContentModel, type CostCodeDto, type CostCodeModel$1 as CostCodeModel, type CountryCollectionModel, type CountryModel$1 as CountryModel, type CreateSessionRequestBody, type CreditCardBillingAddressDto, type CreditCardDto, type CrossSellCollectionModel, type CurrencyCollectionModel, type CurrencyModel$1 as CurrencyModel, CurrencyPositioningType$1 as CurrencyPositioningType, type CustomerCostCodeDto, type CustomerOrderTaxDto, type CustomerSettingsModel, type CustomerValidationDto$1 as CustomerValidationDto, type DashboardPanelCollectionModel, type DashboardPanelModel, type DealerCollectionModel, type DealerModel, type DetailModel, type DocumentDto, type DocumentModel, type ECheckDto, type Environment, type FacetModel, FavoriteButton, type FavoriteButtonProps, FavoriteProvider, type FetchProductListingPageDataArgs, type FieldScoreDetailedDto, type FieldScoreDetailedModel, type FieldScoreDto, type FieldScoreModel, type FieldValidationDto$1 as FieldValidationDto, type FilterOption, FilterSection, type Filters, ForbiddenRequestError, FormattedMessage, type FormattedMessageFunction, type FormattedMessageProps, GlobalSearch, GlobalSearchContainer, GlobalSearchDisclosureContext, GlobalStateProvider, GlobalStateProviderContext, IconButton, type IconButtonProps, Image, type ImageModel, InternalServerErrorRequest, IntlProvider, type InventoryAvailabilityDto, type InventoryWarehousesDto, type InvoiceCollectionModel, type InvoiceHistoryTaxDto, type InvoiceLineModel, type InvoiceModel, type InvoiceSettingsModel, type JobQuoteCollectionModel, type JobQuoteLineModel, type JobQuoteModel, type LanguageCollectionModel, type LanguageModel$1 as LanguageModel, type LegacyConfigurationDto, Link, type LinkProps, LoadingOverlay, type MessageCollectionModel, type MessageModel, type MobileAppSettingsModel, type MobileContentModel, type MobilePageDto, type MobileWidgetDto, MultiSelect, type MultiSelectProps, type NavigateFn, type NavigateOptions, NotFoundRequestError, NumberField, type NumberFieldSize, type OrderApprovalCollectionModel, type OrderCollectionModel, type OrderHistoryTaxDto, type OrderLineModel, type OrderModel, type OrderPromotionModel, type OrderRequestModel, type OrderSettingsModel, type OrderStatusMappingCollectionModel, type OrderStatusMappingModel, Page, PageContainer, type PageProps, type PaginationModel$1 as PaginationModel, type PaymentMethodDto, type PaymentOptionsDto, type PersonaModel$1 as PersonaModel, type PoRequisitionModel, type PriceFacetModel, type PriceRangeModel, type PricingRfqModel, type ProductAutocompleteItemModel, type ProductAvailabilityModel, ProductCard, type ProductCardProps, type ProductCollectionModel, type ProductDto, type ProductHit$1 as ProductHit, type ProductImageDto, type ProductInventoryDto, type ProductLineDto, type ProductLineModel, ProductListingPage, type ProductListingPageDataResponse, type ProductListingPageProps, type ProductModel, ProductOverviewGrid, type ProductOverviewGridProps, ProductPrice, type ProductPriceDto$2 as ProductPriceDto, type ProductPriceModel, type ProductPriceProps, type ProductSettingsModel, ProductSku, type ProductSkuProps, type ProductSubscriptionDto$2 as ProductSubscriptionDto, type ProductSubscriptionModel, type ProductUnitOfMeasureDto$1 as ProductUnitOfMeasureDto, type ProfileTransactionRequestModel, ProgressCircle, type ProgressCircleProps, type PromoCard$1 as PromoCard, type PromoCards, type PromotionCollectionModel, type PromotionModel, type QuoteCollectionModel, type QuoteLineModel, type QuoteModel, type QuoteSettingsModel, ReactQueryContainer, type RealTimeCartInventoryModel, type RealTimeInventoryModel, type RealTimePricingModel, type RefinementListItem, type RelatedProductDto, RequestError, type RequestHeaders, type RequisitionCollectionModel, type RequisitionLineCollectionModel, type RequisitionLineModel, type RequisitionModel, type RmaLineDto, type RmaModel, RouteButton, RouteLink, RouteProvider, type RouteProviderProps, type SalespersonModel, type ScoreExplanationDto, type ScoreExplanationModel, SearchResultsPage, type SectionOptionDto$2 as SectionOptionDto, type SectionOptionModel, Select, type SelectProps, type SessionModel$1 as SessionModel, type SessionRequestModel, type SettingsCollectionModel, type SetupRequestModel, type ShareEntityModel, type ShareOrderModel, type ShipToCollectionModel, type ShipToModel$1 as ShipToModel, type ShipViaDto, type ShipmentPackageDto, type ShipmentPackageLineDto, ShowAll, type ShowAllProps, Sidebar, SidebarDetectBreakpoint, type SidebarProps, SidebarProvider, type SiteMessageCollectionModel, type SiteMessageModel, type SortOptionModel$1 as SortOptionModel, type SpecificationDto, type SpecificationModel, type StateCollectionModel, type StateModel$1 as StateModel, type StyleTraitDto, type StyleValueDto, type StyledProductDto, type SuggestionModel, type TellAFriendModel, TextField, TimeoutRequestError, type TraitValueModel, type TranslationDictionaryCollectionModel, type TranslationDictionaryModel, type TranslationId, UnauthorizedRequestError, type UnitOfMeasureModel, UnprocessableContentRequestError, type UpdateCartLineParams, type UpdateGlobalState$1 as UpdateGlobalState, type UpdateWishListLineCollectionModel, type UseAlgoliaEventResult, VariantDisplayTypeValues, type VariantTraitModel, type VmiBinCollectionModel, type VmiBinCountModel, type VmiBinModel, type VmiCountCollectionModel, type VmiCountModel, type VmiLocationCollectionModel, type VmiLocationModel, type VmiNoteCollectionModel, type VmiNoteModel, type VmiUserImportCollectionModel, type VmiUserImportModel, type VmiUserModel, type WarehouseCollectionModel, type WarehouseDto, type WarehouseModel$1 as WarehouseModel, type WebsiteModel, type WebsiteSettingsModel, type WishListCollectionModel$1 as WishListCollectionModel, type WishListEmailScheduleModel$1 as WishListEmailScheduleModel, type WishListLineCollectionModel$1 as WishListLineCollectionModel, type WishListLineModel$1 as WishListLineModel, type WishListModel$1 as WishListModel, WishListNameAlreadyExistsError, type WishListSettingsModel, type WishListShareModel$1 as WishListShareModel, addProductToCurrentCart, addWishList, addWishListItemToWishList, config, configPerEnvironment, createSession, createSonicSearchClient, createWishList, deleteCartLineById, deleteWishList, deleteWishListItemFromWishList, environment, environments, fetchCurrentCartLines, fetchTranslations, getSession, getWishList, getWishListItemsByWishListId, getWishLists, isRequestError, removeWishListItemFromWishList, request, signIn, signOut, transformAlgoliaProductHitToProductHit, updateCartLineById, useAddProductToCurrentCart, useAddWishList, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaInsights, useAlgoliaSearch, useBreakpoint, useCartEvents, useCreateCurrentWishList, useDebouncedCallback, useDeleteCartLineById, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchCurrentCartLines, useFetchProductListingPageData, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useIsAuthenticated, useIsBreakpoint, useNavigate, useRemoveWishListItemFromCurrentWishList, useScrollLock, useSession, useSignIn, useSignOut, useUpdateCartLineById, userToken };
package/dist/index.js CHANGED
@@ -5,11 +5,12 @@ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
5
5
  import { deepEqual } from 'fast-equals';
6
6
  import { Link as Link$1, Button as Button$1, Breadcrumbs, Breadcrumb as Breadcrumb$1, FieldError as FieldError$1, useContextProps, InputContext, Input as Input$1, Label as Label$1, NumberField as NumberField$1, Checkbox as Checkbox$1, Select as Select$1, SelectValue, Popover, ListBox, Section, Header, ListBoxItem, TextAreaContext, TextArea as TextArea$1, TextField as TextField$1, ModalOverlay, Modal as Modal$1, Dialog as Dialog$1, Form } from 'react-aria-components';
7
7
  import clsx from 'clsx';
8
+ import { usePress } from 'react-aria';
8
9
  import { useHierarchicalMenu, useCurrentRefinements, useClearRefinements, useRefinementList, useHits, useDynamicWidgets, usePagination, useInstantSearch, InstantSearch, Configure, useSortBy } from 'react-instantsearch';
9
- import aa from 'search-insights';
10
10
  import { history } from 'instantsearch.js/es/lib/routers/index.js';
11
11
  import { simple } from 'instantsearch.js/es/lib/stateMappings/index.js';
12
12
  import algoliasearch from 'algoliasearch';
13
+ import aa from 'search-insights';
13
14
  import ReactDOM from 'react-dom';
14
15
  import { createAutocomplete } from '@algolia/autocomplete-core';
15
16
  import { getAlgoliaResults, parseAlgoliaHitHighlight } from '@algolia/autocomplete-preset-algolia';
@@ -17,6 +18,7 @@ import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query
17
18
  import { createLocalStorageRecentSearchesPlugin, search } from '@algolia/autocomplete-plugin-recent-searches';
18
19
  import { TransitionGroup, Transition } from 'react-transition-group';
19
20
 
21
+ const environments = ['sandbox', 'production', 'local'];
20
22
  const localUrls = /sonic.local.com/i;
21
23
  const sandboxUrls = /local|insitesandbox.com|azurestaticapps|ui.sonic-equipment.com|sandbox|accept|test/i;
22
24
  const productionUrls = /sonic-equipment.com|production/i;
@@ -67,8 +69,8 @@ const configPerEnvironment = {
67
69
  production: {
68
70
  ALGOLIA_API_KEY: 'e31a3a53449eceb4d0f9273b9bcd9759',
69
71
  ALGOLIA_APP_ID: '14CUFCVMAD',
70
- ALGOLIA_HOST: 'bff.shop.sonic-equipment.com',
71
- BFF_API_URL: 'https://bff.shop.sonic-equipment.com',
72
+ ALGOLIA_HOST: 'shop.sonic-equipment.com',
73
+ BFF_API_URL: 'https://shop.sonic-equipment.com/api/v1/bff',
72
74
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
73
75
  SHOP_API_URL: 'https://shop.sonic-equipment.com',
74
76
  },
@@ -1120,9 +1122,12 @@ function useGlobalState(key, initialState) {
1120
1122
  const state = useContext(GlobalStateProviderContext).get(key, initialState);
1121
1123
  const [rerenderState, setRerenderState] = useState(state.value);
1122
1124
  useEffect(() => {
1123
- state.addEventListener('stateChanged', setRerenderState);
1125
+ const updateState = (value) => {
1126
+ setTimeout(() => setRerenderState(value), 0);
1127
+ };
1128
+ state.addEventListener('stateChanged', updateState);
1124
1129
  return () => {
1125
- state.removeEventListener('stateChanged', setRerenderState);
1130
+ state.removeEventListener('stateChanged', updateState);
1126
1131
  };
1127
1132
  }, [state]);
1128
1133
  function updateGlobalState(valueOrFn) {
@@ -1365,7 +1370,8 @@ const Input = forwardRef(({ _pseudo = 'none', autoGrow, size = 'lg', ...inputPro
1365
1370
  const handleChange = (event) => isControlled
1366
1371
  ? onChange?.(event)
1367
1372
  : setUncontrolledValue(event.target.value);
1368
- return (jsx("div", { className: clsx(styles$N['input-container'], styles$N[size], styles$N[_pseudo]), children: jsxs("div", { className: clsx({ [styles$N['growing-input']]: autoGrow }), children: [jsx(Input$1, { size: autoGrow ? 1 : undefined, ...props, ref: ref, onChange: handleChange, onClick: e => {
1373
+ const { pressProps } = usePress({});
1374
+ return (jsx("div", { className: clsx(styles$N['input-container'], styles$N[size], styles$N[_pseudo]), children: jsxs("div", { className: clsx({ [styles$N['growing-input']]: autoGrow }), children: [jsx(Input$1, { size: autoGrow ? 1 : undefined, ...props, ...pressProps, ref: ref, onChange: handleChange, onClick: e => {
1369
1375
  e.preventDefault();
1370
1376
  e.stopPropagation();
1371
1377
  e.target.focus();
@@ -7386,6 +7392,22 @@ function AlgoliaCategoriesFilters() {
7386
7392
  }), isDisabled: isRefined, onClick: () => refine(value), children: [jsx("span", { className: styles$p.value, children: value }), ' ', jsxs("span", { className: styles$p.count, children: ["(", count, ")"] })] }, value))) }));
7387
7393
  }
7388
7394
 
7395
+ function AlgoliaDummyRefinementListConsumer() {
7396
+ /*
7397
+ * This component supresses the following Algolia warning:
7398
+ *
7399
+ * [InstantSearch.js]: The UI state for the index "instant_search" is not consistent with the widgets mounted.
7400
+ *
7401
+ * When the page loads the useDynamicWidgets hook is called to
7402
+ * get a list of attributes to render. This is list is empty initially
7403
+ * and therefor no refinement list is rendered. This causes the warning.
7404
+ *
7405
+ * Reference: https://github.com/algolia/instantsearch/pull/4140
7406
+ */
7407
+ useRefinementList({ attribute: 'dummy' });
7408
+ return null;
7409
+ }
7410
+
7389
7411
  function AlgoliaMultiSelectFilterSection({ attribute, }) {
7390
7412
  const { items, refine } = useRefinementList({
7391
7413
  attribute,
@@ -7393,7 +7415,8 @@ function AlgoliaMultiSelectFilterSection({ attribute, }) {
7393
7415
  operator: 'or',
7394
7416
  showMoreLimit: 100,
7395
7417
  });
7396
- if (items.length < 2 && items.filter(item => item.isRefined).length === 0) {
7418
+ if (items.length === 0 ||
7419
+ (items.length < 2 && items.filter(item => item.isRefined).length === 0)) {
7397
7420
  return null;
7398
7421
  }
7399
7422
  return (jsx(FilterSection, { title: attribute, variant: "collapsible", children: jsx(MultiSelect, { onChange: ({ value }) => refine(value), options: items.map(item => ({
@@ -7413,15 +7436,31 @@ function AlgoliaResultsCount() {
7413
7436
  return `${count} ${count === 1 ? t('article') : t('articles')}`;
7414
7437
  }
7415
7438
 
7439
+ const MULTISELECT_ATTRIBUTE_IGNORE_LIST = [
7440
+ 'hierarchicalCategories.lvl0',
7441
+ ];
7416
7442
  function PanelCloseButton() {
7417
7443
  const { close } = useSidebarActions();
7418
7444
  return (jsx("div", { className: styles$p.button, children: jsxs(Button, { withArrow: true, onPress: close, size: "md", children: [jsx(FormattedMessage, { id: "Show" }), " ", jsx(AlgoliaResultsCount, {})] }) }));
7419
7445
  }
7420
7446
  function AlgoliaFilterPanel({ showActiveCategories = false, showCategoriesFilters = false, }) {
7447
+ /*
7448
+ * This hook will return the attributes that are available to be rendered.
7449
+ * Initially it will return an empty array and fires a new query to Algolia
7450
+ * to get the attributes that are available to be rendered.
7451
+ *
7452
+ * *** THIS WILL CAUSE A SECOND QUERY TO ALGOLIA ON PAGE LOAD***
7453
+ * See ticket: https://dev.azure.com/arlanet/Sonic%20Equipment/_workitems/edit/23095
7454
+ */
7421
7455
  const { attributesToRender } = useDynamicWidgets({
7456
+ facets: ['*'],
7422
7457
  maxValuesPerFacet: 100,
7423
7458
  });
7424
- return (jsx("div", { className: styles$p['filter-panel'], children: jsxs("div", { className: styles$p['scroll-container'], children: [showActiveCategories && jsx(AlgoliaActiveCategories, {}), showCategoriesFilters && jsx(AlgoliaCategoriesFilters, {}), jsx(AlgoliaActiveFilters, {}), attributesToRender.length > 0 && (jsx("section", { children: attributesToRender.map((attribute, index) => (jsx(AlgoliaMultiSelectFilterSection, { attribute: attribute }, `attribute-${index}`))) })), jsx(PanelCloseButton, {})] }) }));
7459
+ return (jsx("div", { className: styles$p['filter-panel'], children: jsxs("div", { className: styles$p['scroll-container'], children: [showActiveCategories && jsx(AlgoliaActiveCategories, {}), showCategoriesFilters && jsx(AlgoliaCategoriesFilters, {}), jsx(AlgoliaActiveFilters, {}), attributesToRender.length === 0 ? (jsx(AlgoliaDummyRefinementListConsumer, {})) : (jsx("section", { children: attributesToRender
7460
+ .filter(attribute => !MULTISELECT_ATTRIBUTE_IGNORE_LIST.includes(attribute))
7461
+ .map((attribute, index) => {
7462
+ return (jsx(AlgoliaMultiSelectFilterSection, { attribute: attribute }, `attribute-${index}`));
7463
+ }) })), jsx(PanelCloseButton, {})] }) }));
7425
7464
  }
7426
7465
 
7427
7466
  function GlyphsChevronsSlimRightIcon(props) {
@@ -7536,48 +7575,8 @@ const getAlgoliaIndex = (environment, languageCode) => {
7536
7575
  };
7537
7576
  };
7538
7577
 
7539
- function getCookies() {
7540
- if (typeof window === 'undefined')
7541
- return {};
7542
- return document.cookie
7543
- .split(';')
7544
- .map(entry => entry.trim().split('='))
7545
- .reduce((cookie, [key, value]) => ({ ...cookie, [key || '']: value }), {});
7546
- }
7547
- function getCookie(name, defaultValue) {
7548
- return getCookies()[name] ?? defaultValue;
7549
- }
7550
-
7551
- const userTokenEventEmitter = new EventEmitter();
7552
- let userToken;
7553
- aa('init', {
7554
- apiKey: config.ALGOLIA_API_KEY,
7555
- appId: config.ALGOLIA_APP_ID,
7556
- useCookie: getCookie('cookie-statistics-0', 'false').toLowerCase() === 'true',
7557
- });
7558
- aa('getUserToken', {}, (err, value) => {
7559
- if (err)
7560
- return console.error(err);
7561
- userToken = value !== undefined ? String(value) : value;
7562
- userTokenEventEmitter.trigger('change', userToken);
7563
- });
7564
- aa('onUserTokenChange', value => {
7565
- userToken = value !== undefined ? String(value) : value;
7566
- userTokenEventEmitter.trigger('change', userToken);
7567
- });
7568
-
7569
7578
  function useAlgoliaInsightsGlobalState() {
7570
- const [state, setState] = useGlobalState('algolia-insights-global-state', { userToken });
7571
- useEffect(() => {
7572
- function onTokenChanged(userToken) {
7573
- setState(state => ({ ...state, userToken }));
7574
- }
7575
- userTokenEventEmitter.addEventListener('change', onTokenChanged);
7576
- return () => {
7577
- userTokenEventEmitter.removeEventListener('change', onTokenChanged);
7578
- };
7579
- // eslint-disable-next-line react-hooks/exhaustive-deps
7580
- }, []);
7579
+ const [state, setState] = useGlobalState('algolia-insights-global-state', {});
7581
7580
  return [state, setState];
7582
7581
  }
7583
7582
 
@@ -7756,7 +7755,7 @@ function createQueryStringRouting({ algoliaIndex, hierarchicalCategories, }) {
7756
7755
  };
7757
7756
  }
7758
7757
 
7759
- function AlgoliaProvider({ categoryPages, children, hierarchicalCategories, languageCode, offlineSearchClient, online: _online = true, query, routing, searchClient, }) {
7758
+ function AlgoliaProvider({ categoryPages, children, hierarchicalCategories, languageCode, offlineSearchClient, online: _online = true, query, searchClient, }) {
7760
7759
  const { online } = useAlgoliaInstantSearchState({
7761
7760
  online: _online,
7762
7761
  });
@@ -7764,8 +7763,10 @@ function AlgoliaProvider({ categoryPages, children, hierarchicalCategories, lang
7764
7763
  return (jsxs(InstantSearch, { future: {
7765
7764
  persistHierarchicalRootCount: true,
7766
7765
  preserveSharedStateOnUnmount: true,
7767
- }, indexName: algoliaIndex.default, insights: true, routing: routing ||
7768
- createQueryStringRouting({ algoliaIndex, hierarchicalCategories }), searchClient: online ? searchClient : offlineSearchClient || searchClient, children: [jsx(Configure, { analytics: true, filters: categoryPages
7766
+ }, indexName: algoliaIndex.default, insights: true, routing: createQueryStringRouting({
7767
+ algoliaIndex,
7768
+ hierarchicalCategories,
7769
+ }), searchClient: online ? searchClient : offlineSearchClient || searchClient, children: [jsx(Configure, { analytics: true, filters: categoryPages
7769
7770
  ? // Replace double quotes with escaped double quotes to avoid breaking the query
7770
7771
  `categoryPages: "${categoryPages.replace(/"/g, '\\"')}"`
7771
7772
  : undefined, maxValuesPerFacet: 100, query: query, ruleContexts: ['storefront'] }), jsx(AlgoliaInstantSearchStateProvider, {}), jsx(AlgoliaProductHitsProvider, {}), jsx(AlgoliaInsightInstantSearchProvider, { children: children })] }));
@@ -7924,6 +7925,50 @@ function NoResults$1({ content, title }) {
7924
7925
  return (jsxs("div", { className: styles$h['no-results'], children: [jsx(Heading, { bold: false, className: styles$h.title, size: lg ? 's' : 'xs', tag: "h2", children: title }), jsx("p", { className: styles$h.body, children: content }), jsx("div", { className: styles$h.buttons, children: jsx(RouteButton, { withArrow: true, href: `${config.SHOP_API_URL}`, size: "md", children: jsx(FormattedMessage, { id: "Continue shopping" }) }) })] }));
7925
7926
  }
7926
7927
 
7928
+ function getCookies() {
7929
+ if (typeof window === 'undefined')
7930
+ return {};
7931
+ return document.cookie
7932
+ .split(';')
7933
+ .map(entry => entry.trim().split('='))
7934
+ .reduce((cookie, [key, value]) => ({ ...cookie, [key || '']: value }), {});
7935
+ }
7936
+ function getCookie(name, defaultValue) {
7937
+ return getCookies()[name] ?? defaultValue;
7938
+ }
7939
+
7940
+ let userToken = generateUserToken();
7941
+ aa('init', {
7942
+ apiKey: config.ALGOLIA_API_KEY,
7943
+ appId: config.ALGOLIA_APP_ID,
7944
+ useCookie: getCookie('cookie-statistics-0', 'false').toLowerCase() === 'true',
7945
+ userToken,
7946
+ });
7947
+ aa('getUserToken', {}, (err, value) => {
7948
+ if (err)
7949
+ return console.error(err);
7950
+ userToken = value !== undefined ? String(value) : generateUserToken();
7951
+ });
7952
+ aa('onUserTokenChange', value => {
7953
+ userToken = value !== undefined ? String(value) : generateUserToken();
7954
+ });
7955
+ /**
7956
+ * Create UUID according to
7957
+ * https://www.ietf.org/rfc/rfc4122.txt.
7958
+ *
7959
+ * @returns Generated UUID.
7960
+ */
7961
+ function createUUID() {
7962
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
7963
+ const r = (Math.random() * 16) | 0;
7964
+ const v = c === 'x' ? r : (r & 0x3) | 0x8;
7965
+ return v.toString(16);
7966
+ });
7967
+ }
7968
+ function generateUserToken() {
7969
+ return `anonymous-${createUUID()}`;
7970
+ }
7971
+
7927
7972
  function useAlgoliaInsights() {
7928
7973
  const context = useContext(AlgoliaInsightsProviderContext);
7929
7974
  const [, setGlobalState] = useAlgoliaInsightsGlobalState();
@@ -7939,7 +7984,7 @@ function useAlgoliaInsights() {
7939
7984
  index: context.index,
7940
7985
  objectIDs: [].concat(objectId),
7941
7986
  queryID: context.queryId,
7942
- userToken: context.userToken,
7987
+ userToken,
7943
7988
  });
7944
7989
  },
7945
7990
  sendAddToCartFromSearchEvent({ objectId, queryId }) {
@@ -7950,7 +7995,7 @@ function useAlgoliaInsights() {
7950
7995
  index: context.index,
7951
7996
  objectIDs: [].concat(objectId),
7952
7997
  queryID: queryId,
7953
- userToken: context.userToken,
7998
+ userToken,
7954
7999
  });
7955
8000
  },
7956
8001
  sendAddToCartFromSearchResultPageEvent({ objectId, }) {
@@ -7963,7 +8008,7 @@ function useAlgoliaInsights() {
7963
8008
  index: context.index,
7964
8009
  objectIDs: [].concat(objectId),
7965
8010
  queryID: context.queryId,
7966
- userToken: context.userToken,
8011
+ userToken,
7967
8012
  });
7968
8013
  },
7969
8014
  sendAddToWishListFromProductListPageEvent({ objectId, position, }) {
@@ -7977,7 +8022,7 @@ function useAlgoliaInsights() {
7977
8022
  objectIDs: [].concat(objectId),
7978
8023
  positions: [].concat(position),
7979
8024
  queryID: context.queryId,
7980
- userToken: context.userToken,
8025
+ userToken,
7981
8026
  });
7982
8027
  },
7983
8028
  sendAddToWishListFromSearchEvent({ objectId, position, queryId, }) {
@@ -7989,7 +8034,7 @@ function useAlgoliaInsights() {
7989
8034
  objectIDs: [].concat(objectId),
7990
8035
  positions: [].concat(position),
7991
8036
  queryID: queryId,
7992
- userToken: context.userToken,
8037
+ userToken,
7993
8038
  });
7994
8039
  },
7995
8040
  sendAddToWishListFromSearchResultPageEvent({ objectId, position, }) {
@@ -8003,7 +8048,7 @@ function useAlgoliaInsights() {
8003
8048
  objectIDs: [].concat(objectId),
8004
8049
  positions: [].concat(position),
8005
8050
  queryID: context.queryId,
8006
- userToken: context.userToken,
8051
+ userToken,
8007
8052
  });
8008
8053
  },
8009
8054
  sendProductClickFromProductListPageEvent({ objectId, position }) {
@@ -8019,12 +8064,11 @@ function useAlgoliaInsights() {
8019
8064
  objectIDs: [].concat(objectId),
8020
8065
  positions: [].concat(position),
8021
8066
  queryID: context.queryId,
8022
- userToken: context.userToken,
8067
+ userToken,
8023
8068
  });
8024
8069
  setGlobalState({
8025
8070
  index: context.index,
8026
8071
  queryId: context.queryId,
8027
- userToken: context.userToken,
8028
8072
  });
8029
8073
  },
8030
8074
  sendProductClickFromSearchEvent({ index, objectId, position, queryId }) {
@@ -8036,12 +8080,11 @@ function useAlgoliaInsights() {
8036
8080
  objectIDs: [].concat(objectId),
8037
8081
  positions: [].concat(position),
8038
8082
  queryID: queryId,
8039
- userToken: context.userToken,
8083
+ userToken,
8040
8084
  });
8041
8085
  setGlobalState({
8042
8086
  index,
8043
8087
  queryId,
8044
- userToken: context.userToken,
8045
8088
  });
8046
8089
  },
8047
8090
  sendProductClickFromSearchResultPageEvent({ objectId, position, }) {
@@ -8057,12 +8100,11 @@ function useAlgoliaInsights() {
8057
8100
  objectIDs: [].concat(objectId),
8058
8101
  positions: [].concat(position),
8059
8102
  queryID: context.queryId,
8060
- userToken: context.userToken,
8103
+ userToken,
8061
8104
  });
8062
8105
  setGlobalState({
8063
8106
  index: context.index,
8064
8107
  queryId: context.queryId,
8065
- userToken: context.userToken,
8066
8108
  });
8067
8109
  },
8068
8110
  };
@@ -8923,4 +8965,4 @@ function ReactQueryContainer({ children }) {
8923
8965
  return (jsx(QueryClientProvider, { client: queryClient, children: children }));
8924
8966
  }
8925
8967
 
8926
- export { Accordion, AddToCartButton, AlgoliaActiveCategories, AlgoliaCategoriesFilters, AlgoliaFilterPanel, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, AvailabilityMessageType, BadRequestError, BadgeImagePlacementValues, BadgeStyleValues, BadgeTypeValues, Breadcrumb, Button, CartProvider, CategoryCarousel, Checkbox, ColorCheckbox, ConnectedAddToCartButton, CurrencyPositioningType, FavoriteButton, FavoriteProvider, FilterSection, ForbiddenRequestError, FormattedMessage, GlobalSearch, GlobalSearchContainer, GlobalSearchDisclosureContext, GlobalStateProvider, GlobalStateProviderContext, IconButton, Image, InternalServerErrorRequest, IntlProvider, Link, LoadingOverlay, MultiSelect, NotFoundRequestError, NumberField, Page, PageContainer, ProductCard, ProductListingPage, ProductOverviewGrid, ProductPrice, ProductSku, ProgressCircle, ReactQueryContainer, RequestError, RouteButton, RouteLink, RouteProvider, SearchResultsPage, Select, ShowAll, Sidebar, SidebarDetectBreakpoint, SidebarProvider, TextField, TimeoutRequestError, UnauthorizedRequestError, UnprocessableContentRequestError, VariantDisplayTypeValues, WishListNameAlreadyExistsError, addProductToCurrentCart, addWishList, addWishListItemToWishList, config, configPerEnvironment, createSession, createSonicSearchClient, createWishList, deleteCartLineById, deleteWishList, deleteWishListItemFromWishList, fetchCurrentCartLines, fetchTranslations, getSession, getWishList, getWishListItemsByWishListId, getWishLists, isRequestError, removeWishListItemFromWishList, request, signIn, signOut, transformAlgoliaProductHitToProductHit, updateCartLineById, useAddProductToCurrentCart, useAddWishList, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaInsights, useAlgoliaSearch, useBreakpoint, useCartEvents, useCreateCurrentWishList, useDebouncedCallback, useDeleteCartLineById, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchCurrentCartLines, useFetchProductListingPageData, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useIsAuthenticated, useIsBreakpoint, useNavigate, useRemoveWishListItemFromCurrentWishList, useScrollLock, useSession, useSignIn, useSignOut, useUpdateCartLineById, userToken, userTokenEventEmitter };
8968
+ export { Accordion, AddToCartButton, AlgoliaActiveCategories, AlgoliaCategoriesFilters, AlgoliaFilterPanel, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, AvailabilityMessageType, BadRequestError, BadgeImagePlacementValues, BadgeStyleValues, BadgeTypeValues, Breadcrumb, Button, CartProvider, CategoryCarousel, Checkbox, ColorCheckbox, ConnectedAddToCartButton, CurrencyPositioningType, FavoriteButton, FavoriteProvider, FilterSection, ForbiddenRequestError, FormattedMessage, GlobalSearch, GlobalSearchContainer, GlobalSearchDisclosureContext, GlobalStateProvider, GlobalStateProviderContext, IconButton, Image, InternalServerErrorRequest, IntlProvider, Link, LoadingOverlay, MultiSelect, NotFoundRequestError, NumberField, Page, PageContainer, ProductCard, ProductListingPage, ProductOverviewGrid, ProductPrice, ProductSku, ProgressCircle, ReactQueryContainer, RequestError, RouteButton, RouteLink, RouteProvider, SearchResultsPage, Select, ShowAll, Sidebar, SidebarDetectBreakpoint, SidebarProvider, TextField, TimeoutRequestError, UnauthorizedRequestError, UnprocessableContentRequestError, VariantDisplayTypeValues, WishListNameAlreadyExistsError, addProductToCurrentCart, addWishList, addWishListItemToWishList, config, configPerEnvironment, createSession, createSonicSearchClient, createWishList, deleteCartLineById, deleteWishList, deleteWishListItemFromWishList, environment, environments, fetchCurrentCartLines, fetchTranslations, getSession, getWishList, getWishListItemsByWishListId, getWishLists, isRequestError, removeWishListItemFromWishList, request, signIn, signOut, transformAlgoliaProductHitToProductHit, updateCartLineById, useAddProductToCurrentCart, useAddWishList, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaInsights, useAlgoliaSearch, useBreakpoint, useCartEvents, useCreateCurrentWishList, useDebouncedCallback, useDeleteCartLineById, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchCurrentCartLines, useFetchProductListingPageData, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useIsAuthenticated, useIsBreakpoint, useNavigate, useRemoveWishListItemFromCurrentWishList, useScrollLock, useSession, useSignIn, useSignOut, useUpdateCartLineById, userToken };
@@ -0,0 +1 @@
1
+ export declare function AlgoliaDummyRefinementListConsumer(): null;
@@ -1,3 +1 @@
1
- import { EventEmitter } from 'shared/utils/event-emitter';
2
- export declare const userTokenEventEmitter: EventEmitter<string | undefined>;
3
- export declare let userToken: string | undefined;
1
+ export declare let userToken: string;
@@ -1,7 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SearchClient } from 'algoliasearch';
3
- import { RouterProps } from 'instantsearch.js/es/middlewares/createRouterMiddleware';
4
- import { UiState } from 'instantsearch.js/es/types';
5
3
  interface AlgoliaProviderProps {
6
4
  categoryPages?: string;
7
5
  children: ReactNode;
@@ -10,10 +8,9 @@ interface AlgoliaProviderProps {
10
8
  offlineSearchClient?: SearchClient;
11
9
  online?: boolean;
12
10
  query?: string;
13
- routing?: boolean | RouterProps<UiState, UiState> | undefined;
14
11
  searchClient: SearchClient;
15
12
  }
16
- export declare function AlgoliaProvider({ categoryPages, children, hierarchicalCategories, languageCode, offlineSearchClient, online: _online, query, routing, searchClient, }: AlgoliaProviderProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function AlgoliaProvider({ categoryPages, children, hierarchicalCategories, languageCode, offlineSearchClient, online: _online, query, searchClient, }: AlgoliaProviderProps): import("react/jsx-runtime").JSX.Element;
17
14
  export declare function useAlgolia(): {
18
15
  online: boolean;
19
16
  setOnline: import("shared/providers/global-state-provider").UpdateGlobalState<boolean>;
@@ -2,7 +2,6 @@ import { UpdateGlobalState } from 'shared/providers/global-state-provider';
2
2
  export interface AlgoliaInsightsProviderGlobalState {
3
3
  index?: string | undefined;
4
4
  queryId?: string | undefined;
5
- userToken?: string;
6
5
  }
7
6
  export declare function useAlgoliaInsightsGlobalState(): [
8
7
  AlgoliaInsightsProviderGlobalState,
@@ -1,4 +1,5 @@
1
1
  import './tokens/index.css';
2
+ export * from 'shared/utils/environment';
2
3
  export * from './config';
3
4
  export * from './shared/fetch/request';
4
5
  export * from './shared/feature-flags/use-feature-flags';
package/dist/styles.css CHANGED
@@ -217,6 +217,11 @@
217
217
  --search-layer: 200;
218
218
  --modal-layer: 300;
219
219
  }
220
+ :root {
221
+ --header-height-desktop: 96px;
222
+ --header-height-mobile: 54px;
223
+ --search-input-height: 76px;
224
+ }
220
225
 
221
226
  .link-module-xLqBn {
222
227
  all: unset;
@@ -2283,18 +2288,22 @@
2283
2288
  display: flex;
2284
2289
  align-items: center;
2285
2290
  justify-content: center;
2286
- gap: var(--space-24);
2287
2291
  }
2288
2292
 
2289
2293
  .pagination-module-k4OgY .pagination-module-oq89A, .pagination-module-oq89A .pagination-module-oq89A {
2290
2294
  gap: var(--space-8);
2291
2295
  }
2292
2296
 
2293
- .pagination-module-k4OgY button svg, .pagination-module-oq89A button svg {
2294
- width: 12px;
2295
- height: 12px;
2297
+ .pagination-module-k4OgY button, .pagination-module-oq89A button {
2298
+ align-self: stretch;
2299
+ padding-inline: var(--space-24);
2296
2300
  }
2297
2301
 
2302
+ .pagination-module-k4OgY button svg, .pagination-module-oq89A button svg {
2303
+ width: 12px;
2304
+ height: 12px;
2305
+ }
2306
+
2298
2307
  .category-card-module-4NUjH {
2299
2308
  all: unset;
2300
2309
  display: grid;
@@ -2402,8 +2411,6 @@
2402
2411
  }
2403
2412
 
2404
2413
  .blank-page-spacer-module-lXxle {
2405
- --header-height-desktop: 96px;
2406
- --header-height-mobile: 54px;
2407
2414
  --header-height: var(--header-height-mobile);
2408
2415
 
2409
2416
  display: grid;
@@ -3261,14 +3268,23 @@
3261
3268
  z-index: var(--sidebar-layer);
3262
3269
  top: 100%;
3263
3270
  left: 0;
3264
- overflow: hidden;
3271
+ overflow: auto;
3265
3272
  width: 100%;
3273
+ height: calc(
3274
+ 100dvh - var(--header-height-mobile) - var(--search-input-height)
3275
+ );
3266
3276
  box-sizing: border-box;
3267
3277
  background-color: var(--color-white);
3268
3278
  box-shadow: var(--box-shadow-heavy);
3269
3279
  transition: transform 0.3s ease-in-out;
3270
3280
  }
3271
3281
 
3282
+ @media (width >= 768px) {.search-result-panel-module-KBrc9 {
3283
+ overflow: hidden;
3284
+ height: auto
3285
+ }
3286
+ }
3287
+
3272
3288
  .search-result-panel-module-KBrc9.search-result-panel-module-Us8rb,
3273
3289
  .search-result-panel-module-KBrc9.search-result-panel-module-7UxfH {
3274
3290
  transform: translateY(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonic-equipment/ui",
3
- "version": "0.0.67",
3
+ "version": "0.0.69",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -127,6 +127,7 @@
127
127
  "fast-equals": "^5.0.1",
128
128
  "instantsearch.js": "^4.73.1",
129
129
  "query-string": "^9.1.0",
130
+ "react-aria": "^3.34.3",
130
131
  "react-aria-components": "^1.2.1",
131
132
  "react-instantsearch": "^7.12.1",
132
133
  "react-transition-group": "^4.4.5",