@sonic-equipment/ui 0.0.67 → 0.0.68
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 +3 -8
- package/dist/index.js +106 -65
- package/dist/src/algolia/algolia-dummy-refinement-list-consumer.d.ts +1 -0
- package/dist/src/algolia/algolia-intialization.d.ts +1 -3
- package/dist/src/algolia/algolia-provider.d.ts +1 -4
- package/dist/src/algolia/use-algolia-insights-provider-global-state.d.ts +0 -1
- package/dist/styles.css +23 -7
- package/package.json +6 -2
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,6 @@ 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
|
|
@@ -4672,8 +4670,7 @@ interface SidebarProviderProps {
|
|
|
4672
4670
|
declare function SidebarDetectBreakpoint(): null;
|
|
4673
4671
|
declare function SidebarProvider({ children }: SidebarProviderProps): react_jsx_runtime.JSX.Element;
|
|
4674
4672
|
|
|
4675
|
-
declare
|
|
4676
|
-
declare let userToken: string | undefined;
|
|
4673
|
+
declare let userToken: string;
|
|
4677
4674
|
|
|
4678
4675
|
declare function AlgoliaActiveCategories(): react_jsx_runtime.JSX.Element | null;
|
|
4679
4676
|
|
|
@@ -4731,7 +4728,6 @@ declare const createSonicSearchClient: ({ apiKey, appId, host, }: {
|
|
|
4731
4728
|
interface AlgoliaInsightsProviderGlobalState {
|
|
4732
4729
|
index?: string | undefined;
|
|
4733
4730
|
queryId?: string | undefined;
|
|
4734
|
-
userToken?: string;
|
|
4735
4731
|
}
|
|
4736
4732
|
|
|
4737
4733
|
interface AlgoliaInsightsProviderState extends AlgoliaInsightsProviderGlobalState {
|
|
@@ -4752,10 +4748,9 @@ interface AlgoliaProviderProps {
|
|
|
4752
4748
|
offlineSearchClient?: SearchClient;
|
|
4753
4749
|
online?: boolean;
|
|
4754
4750
|
query?: string;
|
|
4755
|
-
routing?: boolean | RouterProps<UiState, UiState> | undefined;
|
|
4756
4751
|
searchClient: SearchClient;
|
|
4757
4752
|
}
|
|
4758
|
-
declare function AlgoliaProvider({ categoryPages, children, hierarchicalCategories, languageCode, offlineSearchClient, online: _online, query,
|
|
4753
|
+
declare function AlgoliaProvider({ categoryPages, children, hierarchicalCategories, languageCode, offlineSearchClient, online: _online, query, searchClient, }: AlgoliaProviderProps): react_jsx_runtime.JSX.Element;
|
|
4759
4754
|
declare function useAlgolia(): {
|
|
4760
4755
|
online: boolean;
|
|
4761
4756
|
setOnline: UpdateGlobalState<boolean>;
|
|
@@ -5000,4 +4995,4 @@ declare function ReactQueryContainer({ children }: {
|
|
|
5000
4995
|
children: ReactNode;
|
|
5001
4996
|
}): react_jsx_runtime.JSX.Element;
|
|
5002
4997
|
|
|
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 };
|
|
4998
|
+
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 };
|
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';
|
|
@@ -67,8 +68,8 @@ const configPerEnvironment = {
|
|
|
67
68
|
production: {
|
|
68
69
|
ALGOLIA_API_KEY: 'e31a3a53449eceb4d0f9273b9bcd9759',
|
|
69
70
|
ALGOLIA_APP_ID: '14CUFCVMAD',
|
|
70
|
-
ALGOLIA_HOST: '
|
|
71
|
-
BFF_API_URL: 'https://
|
|
71
|
+
ALGOLIA_HOST: 'shop.sonic-equipment.com',
|
|
72
|
+
BFF_API_URL: 'https://shop.sonic-equipment.com/api/v1/bff',
|
|
72
73
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
73
74
|
SHOP_API_URL: 'https://shop.sonic-equipment.com',
|
|
74
75
|
},
|
|
@@ -1120,9 +1121,12 @@ function useGlobalState(key, initialState) {
|
|
|
1120
1121
|
const state = useContext(GlobalStateProviderContext).get(key, initialState);
|
|
1121
1122
|
const [rerenderState, setRerenderState] = useState(state.value);
|
|
1122
1123
|
useEffect(() => {
|
|
1123
|
-
|
|
1124
|
+
const updateState = (value) => {
|
|
1125
|
+
setTimeout(() => setRerenderState(value), 0);
|
|
1126
|
+
};
|
|
1127
|
+
state.addEventListener('stateChanged', updateState);
|
|
1124
1128
|
return () => {
|
|
1125
|
-
state.removeEventListener('stateChanged',
|
|
1129
|
+
state.removeEventListener('stateChanged', updateState);
|
|
1126
1130
|
};
|
|
1127
1131
|
}, [state]);
|
|
1128
1132
|
function updateGlobalState(valueOrFn) {
|
|
@@ -1365,7 +1369,8 @@ const Input = forwardRef(({ _pseudo = 'none', autoGrow, size = 'lg', ...inputPro
|
|
|
1365
1369
|
const handleChange = (event) => isControlled
|
|
1366
1370
|
? onChange?.(event)
|
|
1367
1371
|
: setUncontrolledValue(event.target.value);
|
|
1368
|
-
|
|
1372
|
+
const { pressProps } = usePress({});
|
|
1373
|
+
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
1374
|
e.preventDefault();
|
|
1370
1375
|
e.stopPropagation();
|
|
1371
1376
|
e.target.focus();
|
|
@@ -7386,6 +7391,22 @@ function AlgoliaCategoriesFilters() {
|
|
|
7386
7391
|
}), isDisabled: isRefined, onClick: () => refine(value), children: [jsx("span", { className: styles$p.value, children: value }), ' ', jsxs("span", { className: styles$p.count, children: ["(", count, ")"] })] }, value))) }));
|
|
7387
7392
|
}
|
|
7388
7393
|
|
|
7394
|
+
function AlgoliaDummyRefinementListConsumer() {
|
|
7395
|
+
/*
|
|
7396
|
+
* This component supresses the following Algolia warning:
|
|
7397
|
+
*
|
|
7398
|
+
* [InstantSearch.js]: The UI state for the index "instant_search" is not consistent with the widgets mounted.
|
|
7399
|
+
*
|
|
7400
|
+
* When the page loads the useDynamicWidgets hook is called to
|
|
7401
|
+
* get a list of attributes to render. This is list is empty initially
|
|
7402
|
+
* and therefor no refinement list is rendered. This causes the warning.
|
|
7403
|
+
*
|
|
7404
|
+
* Reference: https://github.com/algolia/instantsearch/pull/4140
|
|
7405
|
+
*/
|
|
7406
|
+
useRefinementList({ attribute: 'dummy' });
|
|
7407
|
+
return null;
|
|
7408
|
+
}
|
|
7409
|
+
|
|
7389
7410
|
function AlgoliaMultiSelectFilterSection({ attribute, }) {
|
|
7390
7411
|
const { items, refine } = useRefinementList({
|
|
7391
7412
|
attribute,
|
|
@@ -7393,7 +7414,8 @@ function AlgoliaMultiSelectFilterSection({ attribute, }) {
|
|
|
7393
7414
|
operator: 'or',
|
|
7394
7415
|
showMoreLimit: 100,
|
|
7395
7416
|
});
|
|
7396
|
-
if (items.length
|
|
7417
|
+
if (items.length === 0 ||
|
|
7418
|
+
(items.length < 2 && items.filter(item => item.isRefined).length === 0)) {
|
|
7397
7419
|
return null;
|
|
7398
7420
|
}
|
|
7399
7421
|
return (jsx(FilterSection, { title: attribute, variant: "collapsible", children: jsx(MultiSelect, { onChange: ({ value }) => refine(value), options: items.map(item => ({
|
|
@@ -7413,15 +7435,31 @@ function AlgoliaResultsCount() {
|
|
|
7413
7435
|
return `${count} ${count === 1 ? t('article') : t('articles')}`;
|
|
7414
7436
|
}
|
|
7415
7437
|
|
|
7438
|
+
const MULTISELECT_ATTRIBUTE_IGNORE_LIST = [
|
|
7439
|
+
'hierarchicalCategories.lvl0',
|
|
7440
|
+
];
|
|
7416
7441
|
function PanelCloseButton() {
|
|
7417
7442
|
const { close } = useSidebarActions();
|
|
7418
7443
|
return (jsx("div", { className: styles$p.button, children: jsxs(Button, { withArrow: true, onPress: close, size: "md", children: [jsx(FormattedMessage, { id: "Show" }), " ", jsx(AlgoliaResultsCount, {})] }) }));
|
|
7419
7444
|
}
|
|
7420
7445
|
function AlgoliaFilterPanel({ showActiveCategories = false, showCategoriesFilters = false, }) {
|
|
7446
|
+
/*
|
|
7447
|
+
* This hook will return the attributes that are available to be rendered.
|
|
7448
|
+
* Initially it will return an empty array and fires a new query to Algolia
|
|
7449
|
+
* to get the attributes that are available to be rendered.
|
|
7450
|
+
*
|
|
7451
|
+
* *** THIS WILL CAUSE A SECOND QUERY TO ALGOLIA ON PAGE LOAD***
|
|
7452
|
+
* See ticket: https://dev.azure.com/arlanet/Sonic%20Equipment/_workitems/edit/23095
|
|
7453
|
+
*/
|
|
7421
7454
|
const { attributesToRender } = useDynamicWidgets({
|
|
7455
|
+
facets: ['*'],
|
|
7422
7456
|
maxValuesPerFacet: 100,
|
|
7423
7457
|
});
|
|
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
|
|
7458
|
+
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
|
|
7459
|
+
.filter(attribute => !MULTISELECT_ATTRIBUTE_IGNORE_LIST.includes(attribute))
|
|
7460
|
+
.map((attribute, index) => {
|
|
7461
|
+
return (jsx(AlgoliaMultiSelectFilterSection, { attribute: attribute }, `attribute-${index}`));
|
|
7462
|
+
}) })), jsx(PanelCloseButton, {})] }) }));
|
|
7425
7463
|
}
|
|
7426
7464
|
|
|
7427
7465
|
function GlyphsChevronsSlimRightIcon(props) {
|
|
@@ -7536,48 +7574,8 @@ const getAlgoliaIndex = (environment, languageCode) => {
|
|
|
7536
7574
|
};
|
|
7537
7575
|
};
|
|
7538
7576
|
|
|
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
7577
|
function useAlgoliaInsightsGlobalState() {
|
|
7570
|
-
const [state, setState] = useGlobalState('algolia-insights-global-state', {
|
|
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
|
-
}, []);
|
|
7578
|
+
const [state, setState] = useGlobalState('algolia-insights-global-state', {});
|
|
7581
7579
|
return [state, setState];
|
|
7582
7580
|
}
|
|
7583
7581
|
|
|
@@ -7756,7 +7754,7 @@ function createQueryStringRouting({ algoliaIndex, hierarchicalCategories, }) {
|
|
|
7756
7754
|
};
|
|
7757
7755
|
}
|
|
7758
7756
|
|
|
7759
|
-
function AlgoliaProvider({ categoryPages, children, hierarchicalCategories, languageCode, offlineSearchClient, online: _online = true, query,
|
|
7757
|
+
function AlgoliaProvider({ categoryPages, children, hierarchicalCategories, languageCode, offlineSearchClient, online: _online = true, query, searchClient, }) {
|
|
7760
7758
|
const { online } = useAlgoliaInstantSearchState({
|
|
7761
7759
|
online: _online,
|
|
7762
7760
|
});
|
|
@@ -7764,8 +7762,10 @@ function AlgoliaProvider({ categoryPages, children, hierarchicalCategories, lang
|
|
|
7764
7762
|
return (jsxs(InstantSearch, { future: {
|
|
7765
7763
|
persistHierarchicalRootCount: true,
|
|
7766
7764
|
preserveSharedStateOnUnmount: true,
|
|
7767
|
-
}, indexName: algoliaIndex.default, insights: true, routing:
|
|
7768
|
-
|
|
7765
|
+
}, indexName: algoliaIndex.default, insights: true, routing: createQueryStringRouting({
|
|
7766
|
+
algoliaIndex,
|
|
7767
|
+
hierarchicalCategories,
|
|
7768
|
+
}), searchClient: online ? searchClient : offlineSearchClient || searchClient, children: [jsx(Configure, { analytics: true, filters: categoryPages
|
|
7769
7769
|
? // Replace double quotes with escaped double quotes to avoid breaking the query
|
|
7770
7770
|
`categoryPages: "${categoryPages.replace(/"/g, '\\"')}"`
|
|
7771
7771
|
: undefined, maxValuesPerFacet: 100, query: query, ruleContexts: ['storefront'] }), jsx(AlgoliaInstantSearchStateProvider, {}), jsx(AlgoliaProductHitsProvider, {}), jsx(AlgoliaInsightInstantSearchProvider, { children: children })] }));
|
|
@@ -7924,6 +7924,50 @@ function NoResults$1({ content, title }) {
|
|
|
7924
7924
|
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
7925
|
}
|
|
7926
7926
|
|
|
7927
|
+
function getCookies() {
|
|
7928
|
+
if (typeof window === 'undefined')
|
|
7929
|
+
return {};
|
|
7930
|
+
return document.cookie
|
|
7931
|
+
.split(';')
|
|
7932
|
+
.map(entry => entry.trim().split('='))
|
|
7933
|
+
.reduce((cookie, [key, value]) => ({ ...cookie, [key || '']: value }), {});
|
|
7934
|
+
}
|
|
7935
|
+
function getCookie(name, defaultValue) {
|
|
7936
|
+
return getCookies()[name] ?? defaultValue;
|
|
7937
|
+
}
|
|
7938
|
+
|
|
7939
|
+
let userToken = generateUserToken();
|
|
7940
|
+
aa('init', {
|
|
7941
|
+
apiKey: config.ALGOLIA_API_KEY,
|
|
7942
|
+
appId: config.ALGOLIA_APP_ID,
|
|
7943
|
+
useCookie: getCookie('cookie-statistics-0', 'false').toLowerCase() === 'true',
|
|
7944
|
+
userToken,
|
|
7945
|
+
});
|
|
7946
|
+
aa('getUserToken', {}, (err, value) => {
|
|
7947
|
+
if (err)
|
|
7948
|
+
return console.error(err);
|
|
7949
|
+
userToken = value !== undefined ? String(value) : generateUserToken();
|
|
7950
|
+
});
|
|
7951
|
+
aa('onUserTokenChange', value => {
|
|
7952
|
+
userToken = value !== undefined ? String(value) : generateUserToken();
|
|
7953
|
+
});
|
|
7954
|
+
/**
|
|
7955
|
+
* Create UUID according to
|
|
7956
|
+
* https://www.ietf.org/rfc/rfc4122.txt.
|
|
7957
|
+
*
|
|
7958
|
+
* @returns Generated UUID.
|
|
7959
|
+
*/
|
|
7960
|
+
function createUUID() {
|
|
7961
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
|
|
7962
|
+
const r = (Math.random() * 16) | 0;
|
|
7963
|
+
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
7964
|
+
return v.toString(16);
|
|
7965
|
+
});
|
|
7966
|
+
}
|
|
7967
|
+
function generateUserToken() {
|
|
7968
|
+
return `anonymous-${createUUID()}`;
|
|
7969
|
+
}
|
|
7970
|
+
|
|
7927
7971
|
function useAlgoliaInsights() {
|
|
7928
7972
|
const context = useContext(AlgoliaInsightsProviderContext);
|
|
7929
7973
|
const [, setGlobalState] = useAlgoliaInsightsGlobalState();
|
|
@@ -7939,7 +7983,7 @@ function useAlgoliaInsights() {
|
|
|
7939
7983
|
index: context.index,
|
|
7940
7984
|
objectIDs: [].concat(objectId),
|
|
7941
7985
|
queryID: context.queryId,
|
|
7942
|
-
userToken
|
|
7986
|
+
userToken,
|
|
7943
7987
|
});
|
|
7944
7988
|
},
|
|
7945
7989
|
sendAddToCartFromSearchEvent({ objectId, queryId }) {
|
|
@@ -7950,7 +7994,7 @@ function useAlgoliaInsights() {
|
|
|
7950
7994
|
index: context.index,
|
|
7951
7995
|
objectIDs: [].concat(objectId),
|
|
7952
7996
|
queryID: queryId,
|
|
7953
|
-
userToken
|
|
7997
|
+
userToken,
|
|
7954
7998
|
});
|
|
7955
7999
|
},
|
|
7956
8000
|
sendAddToCartFromSearchResultPageEvent({ objectId, }) {
|
|
@@ -7963,7 +8007,7 @@ function useAlgoliaInsights() {
|
|
|
7963
8007
|
index: context.index,
|
|
7964
8008
|
objectIDs: [].concat(objectId),
|
|
7965
8009
|
queryID: context.queryId,
|
|
7966
|
-
userToken
|
|
8010
|
+
userToken,
|
|
7967
8011
|
});
|
|
7968
8012
|
},
|
|
7969
8013
|
sendAddToWishListFromProductListPageEvent({ objectId, position, }) {
|
|
@@ -7977,7 +8021,7 @@ function useAlgoliaInsights() {
|
|
|
7977
8021
|
objectIDs: [].concat(objectId),
|
|
7978
8022
|
positions: [].concat(position),
|
|
7979
8023
|
queryID: context.queryId,
|
|
7980
|
-
userToken
|
|
8024
|
+
userToken,
|
|
7981
8025
|
});
|
|
7982
8026
|
},
|
|
7983
8027
|
sendAddToWishListFromSearchEvent({ objectId, position, queryId, }) {
|
|
@@ -7989,7 +8033,7 @@ function useAlgoliaInsights() {
|
|
|
7989
8033
|
objectIDs: [].concat(objectId),
|
|
7990
8034
|
positions: [].concat(position),
|
|
7991
8035
|
queryID: queryId,
|
|
7992
|
-
userToken
|
|
8036
|
+
userToken,
|
|
7993
8037
|
});
|
|
7994
8038
|
},
|
|
7995
8039
|
sendAddToWishListFromSearchResultPageEvent({ objectId, position, }) {
|
|
@@ -8003,7 +8047,7 @@ function useAlgoliaInsights() {
|
|
|
8003
8047
|
objectIDs: [].concat(objectId),
|
|
8004
8048
|
positions: [].concat(position),
|
|
8005
8049
|
queryID: context.queryId,
|
|
8006
|
-
userToken
|
|
8050
|
+
userToken,
|
|
8007
8051
|
});
|
|
8008
8052
|
},
|
|
8009
8053
|
sendProductClickFromProductListPageEvent({ objectId, position }) {
|
|
@@ -8019,12 +8063,11 @@ function useAlgoliaInsights() {
|
|
|
8019
8063
|
objectIDs: [].concat(objectId),
|
|
8020
8064
|
positions: [].concat(position),
|
|
8021
8065
|
queryID: context.queryId,
|
|
8022
|
-
userToken
|
|
8066
|
+
userToken,
|
|
8023
8067
|
});
|
|
8024
8068
|
setGlobalState({
|
|
8025
8069
|
index: context.index,
|
|
8026
8070
|
queryId: context.queryId,
|
|
8027
|
-
userToken: context.userToken,
|
|
8028
8071
|
});
|
|
8029
8072
|
},
|
|
8030
8073
|
sendProductClickFromSearchEvent({ index, objectId, position, queryId }) {
|
|
@@ -8036,12 +8079,11 @@ function useAlgoliaInsights() {
|
|
|
8036
8079
|
objectIDs: [].concat(objectId),
|
|
8037
8080
|
positions: [].concat(position),
|
|
8038
8081
|
queryID: queryId,
|
|
8039
|
-
userToken
|
|
8082
|
+
userToken,
|
|
8040
8083
|
});
|
|
8041
8084
|
setGlobalState({
|
|
8042
8085
|
index,
|
|
8043
8086
|
queryId,
|
|
8044
|
-
userToken: context.userToken,
|
|
8045
8087
|
});
|
|
8046
8088
|
},
|
|
8047
8089
|
sendProductClickFromSearchResultPageEvent({ objectId, position, }) {
|
|
@@ -8057,12 +8099,11 @@ function useAlgoliaInsights() {
|
|
|
8057
8099
|
objectIDs: [].concat(objectId),
|
|
8058
8100
|
positions: [].concat(position),
|
|
8059
8101
|
queryID: context.queryId,
|
|
8060
|
-
userToken
|
|
8102
|
+
userToken,
|
|
8061
8103
|
});
|
|
8062
8104
|
setGlobalState({
|
|
8063
8105
|
index: context.index,
|
|
8064
8106
|
queryId: context.queryId,
|
|
8065
|
-
userToken: context.userToken,
|
|
8066
8107
|
});
|
|
8067
8108
|
},
|
|
8068
8109
|
};
|
|
@@ -8923,4 +8964,4 @@ function ReactQueryContainer({ children }) {
|
|
|
8923
8964
|
return (jsx(QueryClientProvider, { client: queryClient, children: children }));
|
|
8924
8965
|
}
|
|
8925
8966
|
|
|
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
|
|
8967
|
+
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 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AlgoliaDummyRefinementListConsumer(): null;
|
|
@@ -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,
|
|
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,
|
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
|
|
2294
|
-
|
|
2295
|
-
|
|
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:
|
|
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.
|
|
3
|
+
"version": "0.0.68",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
"default": "./dist/index.js"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
"files": [
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
19
22
|
"main": "dist/index.js",
|
|
20
23
|
"types": "./dist/index.d.ts",
|
|
21
24
|
"scripts": {
|
|
@@ -127,6 +130,7 @@
|
|
|
127
130
|
"fast-equals": "^5.0.1",
|
|
128
131
|
"instantsearch.js": "^4.73.1",
|
|
129
132
|
"query-string": "^9.1.0",
|
|
133
|
+
"react-aria": "^3.34.3",
|
|
130
134
|
"react-aria-components": "^1.2.1",
|
|
131
135
|
"react-instantsearch": "^7.12.1",
|
|
132
136
|
"react-transition-group": "^4.4.5",
|