@sonic-equipment/ui 0.0.44 → 0.0.46
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/algolia/algolia-insights-provider.d.ts +11 -0
- package/dist/algolia/algolia-intialization.d.ts +3 -0
- package/dist/algolia/algolia-provider.d.ts +8 -6
- package/dist/algolia/algolia-sonic-searchclient.d.ts +1 -1
- package/dist/algolia/use-algolia-insights.d.ts +22 -0
- package/dist/algolia/user-algolia-insights-provider-global-state.d.ts +10 -0
- package/dist/buttons/add-to-cart-button/connected-add-to-cart-button.d.ts +2 -1
- package/dist/cards/product-card/connected-product-cart.d.ts +2 -1
- package/dist/cards/product-card/product-card.d.ts +3 -2
- package/dist/global-search/global-search-provider/use-algolia-search.d.ts +1 -1
- package/dist/global-search/global-search.stories.d.ts +0 -1
- package/dist/global-search/plugins/products-plugin.d.ts +1 -3
- package/dist/global-search/search-input/search-input.d.ts +2 -1
- package/dist/global-search/types.d.ts +1 -1
- package/dist/index.d.ts +102 -38
- package/dist/index.js +466 -197
- package/dist/pages/product-listing-page/product-listing-page-data-types.d.ts +1 -0
- package/dist/pages/product-listing-page/product-listing-page.stories.d.ts +0 -1
- package/dist/promos/promo-card/promo-card.d.ts +10 -0
- package/dist/promos/promo-card/promo-card.stories.d.ts +19 -0
- package/dist/promos/promo-cards/promo-cards.d.ts +4 -0
- package/dist/promos/promo-cards/promo-cards.stories.d.ts +18 -0
- package/dist/shared/api/bff/model/bff.model.d.ts +1 -0
- package/dist/shared/providers/global-state-provider.d.ts +9 -3
- package/dist/shared/routing/route-link.d.ts +11 -3
- package/dist/shared/types/product.d.ts +4 -1
- package/dist/shared/utils/cookies.d.ts +3 -0
- package/dist/shared/utils/environment.d.ts +1 -1
- package/dist/styles.css +88 -17
- package/package.json +34 -33
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AlgoliaInsightsProviderGlobalState } from './user-algolia-insights-provider-global-state';
|
|
3
|
+
export interface AlgoliaInsightsProviderState extends AlgoliaInsightsProviderGlobalState {
|
|
4
|
+
objectId?: string | string[] | undefined;
|
|
5
|
+
position?: number | number[] | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare const AlgoliaInsightsProviderContext: React.Context<AlgoliaInsightsProviderState>;
|
|
8
|
+
export declare function AlgoliaInsightsProvider({ children, value, }: {
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
value?: AlgoliaInsightsProviderState;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,11 +2,6 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { SearchClient } from 'algoliasearch';
|
|
3
3
|
import { RouterProps } from 'instantsearch.js/es/middlewares/createRouterMiddleware';
|
|
4
4
|
import { UiState } from 'instantsearch.js/es/types';
|
|
5
|
-
interface AlgoliaContextType {
|
|
6
|
-
online: boolean;
|
|
7
|
-
setOnline: (online: boolean) => void;
|
|
8
|
-
toggleOnline: VoidFunction;
|
|
9
|
-
}
|
|
10
5
|
interface AlgoliaProviderProps {
|
|
11
6
|
categoryPages: string;
|
|
12
7
|
children: ReactNode;
|
|
@@ -16,6 +11,13 @@ interface AlgoliaProviderProps {
|
|
|
16
11
|
routing?: boolean | RouterProps<UiState, UiState> | undefined;
|
|
17
12
|
searchClient: SearchClient;
|
|
18
13
|
}
|
|
14
|
+
export declare function AlgoliaInsightInstantSearchProvider({ children, }: {
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
17
|
export declare function AlgoliaProvider({ categoryPages, children, languageCode, offlineSearchClient, online: _online, routing, searchClient, }: AlgoliaProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export declare function useAlgolia():
|
|
18
|
+
export declare function useAlgolia(): {
|
|
19
|
+
online: boolean;
|
|
20
|
+
setOnline: import("shared/providers/global-state-provider").UpdateGlobalState<boolean>;
|
|
21
|
+
toggleOnline: () => void;
|
|
22
|
+
};
|
|
21
23
|
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AlgoliaInsightsProviderGlobalState } from './user-algolia-insights-provider-global-state';
|
|
2
|
+
export interface UseAlgoliaEventResult {
|
|
3
|
+
context: Readonly<AlgoliaInsightsProviderGlobalState>;
|
|
4
|
+
sendAddToCartFromProductListPageEvent({ objectId, }: {
|
|
5
|
+
objectId: string;
|
|
6
|
+
}): void;
|
|
7
|
+
sendAddToCartFromSearchEvent({ objectId, queryId, }: {
|
|
8
|
+
objectId: string;
|
|
9
|
+
queryId: string;
|
|
10
|
+
}): void;
|
|
11
|
+
sendProductClickFromProductListPageEvent({ objectId, position, }: {
|
|
12
|
+
objectId: string;
|
|
13
|
+
position: number;
|
|
14
|
+
}): void;
|
|
15
|
+
sendProductClickFromSearchEvent({ index, objectId, position, queryId, }: {
|
|
16
|
+
index: string;
|
|
17
|
+
objectId: string | string[] | undefined;
|
|
18
|
+
position: number | number[];
|
|
19
|
+
queryId: string;
|
|
20
|
+
}): void;
|
|
21
|
+
}
|
|
22
|
+
export declare function useAlgoliaInsights(): UseAlgoliaEventResult;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UpdateGlobalState } from 'shared/providers/global-state-provider';
|
|
2
|
+
export interface AlgoliaInsightsProviderGlobalState {
|
|
3
|
+
index?: string | undefined;
|
|
4
|
+
queryId?: string | undefined;
|
|
5
|
+
userToken?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function useAlgoliaInsightsGlobalState(): [
|
|
8
|
+
AlgoliaInsightsProviderGlobalState,
|
|
9
|
+
UpdateGlobalState<AlgoliaInsightsProviderGlobalState>
|
|
10
|
+
];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
interface Props {
|
|
2
|
+
onAddToCart?: () => void;
|
|
2
3
|
productId: string;
|
|
3
4
|
}
|
|
4
|
-
export declare const ConnectedAddToCartButton: ({ productId }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const ConnectedAddToCartButton: ({ onAddToCart, productId }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ProductCardProps } from './product-card';
|
|
2
2
|
export interface ConnectedProductCartProps extends Omit<ProductCardProps, 'addToCartButton'> {
|
|
3
|
+
onAddToCart?: () => void;
|
|
3
4
|
productId: string;
|
|
4
5
|
}
|
|
5
|
-
export declare function ConnectedProductCard({ productId, ...props }: ConnectedProductCartProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function ConnectedProductCard({ onAddToCart, productId, ...props }: ConnectedProductCartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { PressEvent } from 'react-aria-components';
|
|
3
|
+
import { AutocompleteProps } from 'shared/routing/route-link';
|
|
3
4
|
import type { ImageSource } from 'shared/types/image';
|
|
4
5
|
import type { ProductPrice as ProductPriceType } from 'shared/types/price';
|
|
5
|
-
export interface ProductCardProps {
|
|
6
|
+
export interface ProductCardProps extends AutocompleteProps {
|
|
6
7
|
addToCartButton: ReactElement;
|
|
7
8
|
favoriteButton?: ReactElement;
|
|
8
9
|
href: string;
|
|
@@ -13,4 +14,4 @@ export interface ProductCardProps {
|
|
|
13
14
|
tags?: string[];
|
|
14
15
|
title: string;
|
|
15
16
|
}
|
|
16
|
-
export declare function ProductCard({ addToCartButton: AddToCartButton, favoriteButton: FavoriteButton, href, image, onPress, price, sku, tags, title, }: ProductCardProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function ProductCard({ addToCartButton: AddToCartButton, areaSelected, favoriteButton: FavoriteButton, href, id, image, onClick, onMouseDown, onMouseMove, onPress, price, role, sku, tags, title, }: ProductCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,10 +2,10 @@ import { AutocompleteCollection } from '@algolia/autocomplete-core';
|
|
|
2
2
|
import { CategoryHit } from 'global-search/plugins/categories-plugin';
|
|
3
3
|
import { PopularCategoryHit } from 'global-search/plugins/popular-categories-plugin';
|
|
4
4
|
import { PopularSearchHit } from 'global-search/plugins/popular-searches-plugin';
|
|
5
|
-
import { ProductHit } from 'global-search/plugins/products-plugin';
|
|
6
5
|
import { QuerySuggestionHit } from 'global-search/plugins/query-suggestions-plugin';
|
|
7
6
|
import { QuickAccessHit } from 'global-search/plugins/quick-access-plugin';
|
|
8
7
|
import { RecentSearchHit } from 'global-search/plugins/recent-searches-plugin';
|
|
8
|
+
import { ProductHit } from 'shared/types/product';
|
|
9
9
|
export declare function useAlgoliaSearch(): {
|
|
10
10
|
categories: AutocompleteCollection<CategoryHit> | undefined;
|
|
11
11
|
hasResults: boolean;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { AutocompletePlugin } from '@algolia/autocomplete-core';
|
|
2
|
-
import { Hit } from '@algolia/client-search';
|
|
3
2
|
import { SearchClient } from 'algoliasearch';
|
|
4
|
-
import type { ProductHit
|
|
5
|
-
export type ProductHit = Hit<ProductHitType>;
|
|
3
|
+
import type { ProductHit } from 'shared/types/product';
|
|
6
4
|
export declare const productsPlugin: ({ productsIndexName, searchClient, }: {
|
|
7
5
|
productsIndexName: string;
|
|
8
6
|
searchClient: SearchClient;
|
|
@@ -3,5 +3,6 @@ export interface SearchInputProps {
|
|
|
3
3
|
autocomplete?: Autocomplete;
|
|
4
4
|
formRef: React.RefObject<HTMLFormElement>;
|
|
5
5
|
inputRef: React.RefObject<HTMLInputElement>;
|
|
6
|
+
onCancel?: VoidFunction;
|
|
6
7
|
}
|
|
7
|
-
export declare function SearchInput({ autocomplete, formRef, inputRef, }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function SearchInput({ autocomplete, formRef, inputRef, onCancel, }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AutocompleteApi, AutocompleteState as _AutocompleteState } from '@algolia/autocomplete-core';
|
|
2
2
|
import { SearchClient } from 'algoliasearch';
|
|
3
|
+
import { ProductHit } from 'shared/types/product';
|
|
3
4
|
import { CategoryHit } from './plugins/categories-plugin';
|
|
4
5
|
import { PopularCategoryHit } from './plugins/popular-categories-plugin';
|
|
5
6
|
import { PopularSearchHit } from './plugins/popular-searches-plugin';
|
|
6
|
-
import { ProductHit } from './plugins/products-plugin';
|
|
7
7
|
import { QuerySuggestionHit } from './plugins/query-suggestions-plugin';
|
|
8
8
|
import { QuickAccessHit } from './plugins/quick-access-plugin';
|
|
9
9
|
import { RecentSearchHit } from './plugins/recent-searches-plugin';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import { ReactElement, MutableRefObject, ReactNode, RefAttributes, HTMLAttributeAnchorTarget, FormEventHandler, KeyboardEvent, ComponentType } from 'react';
|
|
2
|
+
import { ReactElement, MutableRefObject, ReactNode, MouseEvent, RefAttributes, HTMLAttributeAnchorTarget, FormEventHandler, KeyboardEvent, ComponentType } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { LinkProps, ButtonProps as ButtonProps$1, PressEvent } from 'react-aria-components';
|
|
5
|
+
import { Hit } from '@algolia/client-search';
|
|
5
6
|
import * as algoliasearch from 'algoliasearch';
|
|
6
7
|
import { SearchClient } from 'algoliasearch';
|
|
7
8
|
import { RouterProps } from 'instantsearch.js/es/middlewares/createRouterMiddleware';
|
|
8
9
|
import { UiState } from 'instantsearch.js/es/types';
|
|
9
10
|
import { AutocompleteApi, AutocompleteState as AutocompleteState$1, AutocompleteCollection } from '@algolia/autocomplete-core';
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
declare const environments = ['sandbox', 'production'] as const
|
|
13
|
+
type Environment = (typeof environments)[number]
|
|
14
|
+
|
|
15
|
+
interface Config {
|
|
16
|
+
ALGOLIA_API_KEY: string;
|
|
17
|
+
ALGOLIA_APP_ID: string;
|
|
18
|
+
ALGOLIA_HOST: string;
|
|
19
|
+
BFF_API_URL: string;
|
|
20
|
+
SHOP_API_URL: string;
|
|
21
|
+
}
|
|
22
|
+
declare const configPerEnvironment: Record<Environment, Config>;
|
|
23
|
+
declare const config: Config;
|
|
11
24
|
|
|
12
25
|
interface Category$1 {
|
|
13
26
|
activateOn: string;
|
|
@@ -39,6 +52,7 @@ interface Category$1 {
|
|
|
39
52
|
}
|
|
40
53
|
interface BannerItem$1 {
|
|
41
54
|
alt: string;
|
|
55
|
+
href: string;
|
|
42
56
|
srcSet: {
|
|
43
57
|
src: string;
|
|
44
58
|
width: number;
|
|
@@ -86,6 +100,7 @@ interface Category {
|
|
|
86
100
|
|
|
87
101
|
interface BannerItem {
|
|
88
102
|
alt: string
|
|
103
|
+
href: string
|
|
89
104
|
srcSet: {
|
|
90
105
|
src: string
|
|
91
106
|
width: number
|
|
@@ -3520,7 +3535,9 @@ declare class EventEmitter<T> {
|
|
|
3520
3535
|
|
|
3521
3536
|
declare class State<T> extends EventEmitter<T | undefined> {
|
|
3522
3537
|
private _state;
|
|
3523
|
-
|
|
3538
|
+
private _key;
|
|
3539
|
+
constructor(key: string | symbol, state?: T);
|
|
3540
|
+
get key(): string | symbol;
|
|
3524
3541
|
get value(): T | undefined;
|
|
3525
3542
|
set value(newState: T | undefined);
|
|
3526
3543
|
}
|
|
@@ -3536,8 +3553,12 @@ interface GlobalStateProviderProps {
|
|
|
3536
3553
|
children: ReactNode;
|
|
3537
3554
|
}
|
|
3538
3555
|
declare function GlobalStateProvider({ children, }: GlobalStateProviderProps): ReactElement | null;
|
|
3539
|
-
|
|
3540
|
-
|
|
3556
|
+
interface UpdateGlobalState$1<T> {
|
|
3557
|
+
(value: T | undefined): void;
|
|
3558
|
+
(fn: (value: T | undefined) => T | undefined): void;
|
|
3559
|
+
}
|
|
3560
|
+
declare function useGlobalState<T>(key: string | symbol): [T | undefined, UpdateGlobalState$1<T>];
|
|
3561
|
+
declare function useGlobalState<T>(key: string | symbol, initialState: T): [T, UpdateGlobalState$1<T>];
|
|
3541
3562
|
|
|
3542
3563
|
interface NavigateOptions$1 {
|
|
3543
3564
|
prefetch?: boolean;
|
|
@@ -3551,10 +3572,18 @@ interface RouteProviderProps {
|
|
|
3551
3572
|
declare function RouteProvider({ children, navigate }: RouteProviderProps): react_jsx_runtime.JSX.Element;
|
|
3552
3573
|
declare function useNavigate(): NavigateFn;
|
|
3553
3574
|
|
|
3554
|
-
interface
|
|
3575
|
+
interface AutocompleteProps$1 {
|
|
3576
|
+
areaSelected?: boolean;
|
|
3577
|
+
id?: string;
|
|
3578
|
+
onClick?(event: MouseEvent): void;
|
|
3579
|
+
onMouseDown?(event: MouseEvent): void;
|
|
3580
|
+
onMouseMove?(event: MouseEvent): void;
|
|
3581
|
+
role?: 'option';
|
|
3582
|
+
}
|
|
3583
|
+
interface RouteLinkProps extends LinkProps, RefAttributes<HTMLAnchorElement>, AutocompleteProps$1 {
|
|
3555
3584
|
route?: NavigateOptions$1;
|
|
3556
3585
|
}
|
|
3557
|
-
declare function RouteLink({ children, ...props }: RouteLinkProps): react_jsx_runtime.JSX.Element;
|
|
3586
|
+
declare function RouteLink({ children, onClick: _onClick, ...props }: RouteLinkProps): react_jsx_runtime.JSX.Element;
|
|
3558
3587
|
|
|
3559
3588
|
interface RouteButtonProps extends ButtonProps$1, RefAttributes<HTMLButtonElement> {
|
|
3560
3589
|
href?: string;
|
|
@@ -3562,7 +3591,7 @@ interface RouteButtonProps extends ButtonProps$1, RefAttributes<HTMLButtonElemen
|
|
|
3562
3591
|
}
|
|
3563
3592
|
declare function RouteButton({ children, ...props }: RouteButtonProps): react_jsx_runtime.JSX.Element;
|
|
3564
3593
|
|
|
3565
|
-
interface
|
|
3594
|
+
interface Product$1 {
|
|
3566
3595
|
[key: string]: any;
|
|
3567
3596
|
alternativeNumber: string;
|
|
3568
3597
|
categories: string[];
|
|
@@ -3598,6 +3627,7 @@ interface ProductHit$3 {
|
|
|
3598
3627
|
weight: number;
|
|
3599
3628
|
width: number;
|
|
3600
3629
|
}
|
|
3630
|
+
type ProductHit$1 = Hit<Product$1>;
|
|
3601
3631
|
|
|
3602
3632
|
interface Link$1 {
|
|
3603
3633
|
href: string;
|
|
@@ -3642,6 +3672,11 @@ interface IconButtonProps {
|
|
|
3642
3672
|
}
|
|
3643
3673
|
declare function IconButton({ children, className, color, isDisabled, onPress, size, type, }: IconButtonProps): react_jsx_runtime.JSX.Element;
|
|
3644
3674
|
|
|
3675
|
+
interface UpdateGlobalState<T> {
|
|
3676
|
+
(value: T | undefined): void
|
|
3677
|
+
(fn: (value: T | undefined) => T | undefined): void
|
|
3678
|
+
}
|
|
3679
|
+
|
|
3645
3680
|
interface NavigateOptions {
|
|
3646
3681
|
prefetch?: boolean
|
|
3647
3682
|
replace?: boolean
|
|
@@ -3669,9 +3704,19 @@ interface AddToCartButtonProps {
|
|
|
3669
3704
|
declare function AddToCartButton({ initialState, isDisabled, onChange, quantity, }: AddToCartButtonProps): react_jsx_runtime.JSX.Element;
|
|
3670
3705
|
|
|
3671
3706
|
interface Props {
|
|
3707
|
+
onAddToCart?: () => void;
|
|
3672
3708
|
productId: string;
|
|
3673
3709
|
}
|
|
3674
|
-
declare const ConnectedAddToCartButton: ({ productId }: Props) => react_jsx_runtime.JSX.Element;
|
|
3710
|
+
declare const ConnectedAddToCartButton: ({ onAddToCart, productId }: Props) => react_jsx_runtime.JSX.Element;
|
|
3711
|
+
|
|
3712
|
+
interface AutocompleteProps {
|
|
3713
|
+
areaSelected?: boolean
|
|
3714
|
+
id?: string
|
|
3715
|
+
onClick?(event: MouseEvent): void
|
|
3716
|
+
onMouseDown?(event: MouseEvent): void
|
|
3717
|
+
onMouseMove?(event: MouseEvent): void
|
|
3718
|
+
role?: 'option'
|
|
3719
|
+
}
|
|
3675
3720
|
|
|
3676
3721
|
interface ProductPrice$1 {
|
|
3677
3722
|
isVatIncluded: boolean
|
|
@@ -3679,7 +3724,7 @@ interface ProductPrice$1 {
|
|
|
3679
3724
|
price: number
|
|
3680
3725
|
}
|
|
3681
3726
|
|
|
3682
|
-
interface ProductCardProps {
|
|
3727
|
+
interface ProductCardProps extends AutocompleteProps {
|
|
3683
3728
|
addToCartButton: ReactElement;
|
|
3684
3729
|
favoriteButton?: ReactElement;
|
|
3685
3730
|
href: string;
|
|
@@ -3690,7 +3735,7 @@ interface ProductCardProps {
|
|
|
3690
3735
|
tags?: string[];
|
|
3691
3736
|
title: string;
|
|
3692
3737
|
}
|
|
3693
|
-
declare function ProductCard({ addToCartButton: AddToCartButton, favoriteButton: FavoriteButton, href, image, onPress, price, sku, tags, title, }: ProductCardProps): react_jsx_runtime.JSX.Element;
|
|
3738
|
+
declare function ProductCard({ addToCartButton: AddToCartButton, areaSelected, favoriteButton: FavoriteButton, href, id, image, onClick, onMouseDown, onMouseMove, onPress, price, role, sku, tags, title, }: ProductCardProps): react_jsx_runtime.JSX.Element;
|
|
3694
3739
|
|
|
3695
3740
|
interface CategoryCarouselProps {
|
|
3696
3741
|
categoryCards: ReactNode[];
|
|
@@ -3935,6 +3980,9 @@ interface SidebarProviderProps {
|
|
|
3935
3980
|
declare function SidebarDetectBreakpoint(): react_jsx_runtime.JSX.Element | null;
|
|
3936
3981
|
declare function SidebarProvider({ children }: SidebarProviderProps): react_jsx_runtime.JSX.Element;
|
|
3937
3982
|
|
|
3983
|
+
declare const userTokenEventEmitter: EventEmitter<string | undefined>;
|
|
3984
|
+
declare let userToken: string | undefined;
|
|
3985
|
+
|
|
3938
3986
|
declare function AlgoliaCategories(): react_jsx_runtime.JSX.Element;
|
|
3939
3987
|
|
|
3940
3988
|
interface AlgoliaFilterPanelProps {
|
|
@@ -3969,18 +4017,29 @@ interface AlgoliaPaginationProps {
|
|
|
3969
4017
|
}
|
|
3970
4018
|
declare function AlgoliaPagination({ onChange }: AlgoliaPaginationProps): react_jsx_runtime.JSX.Element;
|
|
3971
4019
|
|
|
3972
|
-
declare const createSonicSearchClient: ({ apiKey, appId, path, }: {
|
|
4020
|
+
declare const createSonicSearchClient: ({ apiKey, appId, host, path, }: {
|
|
3973
4021
|
apiKey: string;
|
|
3974
4022
|
appId: string;
|
|
3975
4023
|
host: string | undefined;
|
|
3976
4024
|
path: string;
|
|
3977
4025
|
}) => SearchClient;
|
|
3978
4026
|
|
|
3979
|
-
interface
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
4027
|
+
interface AlgoliaInsightsProviderGlobalState {
|
|
4028
|
+
index?: string | undefined;
|
|
4029
|
+
queryId?: string | undefined;
|
|
4030
|
+
userToken?: string;
|
|
3983
4031
|
}
|
|
4032
|
+
|
|
4033
|
+
interface AlgoliaInsightsProviderState extends AlgoliaInsightsProviderGlobalState {
|
|
4034
|
+
objectId?: string | string[] | undefined;
|
|
4035
|
+
position?: number | number[] | undefined;
|
|
4036
|
+
}
|
|
4037
|
+
declare const AlgoliaInsightsProviderContext: React.Context<AlgoliaInsightsProviderState>;
|
|
4038
|
+
declare function AlgoliaInsightsProvider({ children, value, }: {
|
|
4039
|
+
children?: ReactNode;
|
|
4040
|
+
value?: AlgoliaInsightsProviderState;
|
|
4041
|
+
}): react_jsx_runtime.JSX.Element;
|
|
4042
|
+
|
|
3984
4043
|
interface AlgoliaProviderProps {
|
|
3985
4044
|
categoryPages: string;
|
|
3986
4045
|
children: ReactNode;
|
|
@@ -3990,8 +4049,15 @@ interface AlgoliaProviderProps {
|
|
|
3990
4049
|
routing?: boolean | RouterProps<UiState, UiState> | undefined;
|
|
3991
4050
|
searchClient: SearchClient;
|
|
3992
4051
|
}
|
|
4052
|
+
declare function AlgoliaInsightInstantSearchProvider({ children, }: {
|
|
4053
|
+
children?: ReactNode;
|
|
4054
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3993
4055
|
declare function AlgoliaProvider({ categoryPages, children, languageCode, offlineSearchClient, online: _online, routing, searchClient, }: AlgoliaProviderProps): react_jsx_runtime.JSX.Element;
|
|
3994
|
-
declare function useAlgolia():
|
|
4056
|
+
declare function useAlgolia(): {
|
|
4057
|
+
online: boolean;
|
|
4058
|
+
setOnline: UpdateGlobalState<boolean>;
|
|
4059
|
+
toggleOnline: () => void;
|
|
4060
|
+
};
|
|
3995
4061
|
|
|
3996
4062
|
declare function AlgoliaResultsCount(): string | null;
|
|
3997
4063
|
|
|
@@ -4021,22 +4087,7 @@ declare function GlobalSearchContainer({ children, }: {
|
|
|
4021
4087
|
children: React.ReactNode;
|
|
4022
4088
|
}): react_jsx_runtime.JSX.Element;
|
|
4023
4089
|
|
|
4024
|
-
|
|
4025
|
-
listCategories: string[];
|
|
4026
|
-
}>;
|
|
4027
|
-
|
|
4028
|
-
type PopularCategoryHit$1 = Hit<{
|
|
4029
|
-
count: number;
|
|
4030
|
-
label: string;
|
|
4031
|
-
}>;
|
|
4032
|
-
|
|
4033
|
-
type PopularSearchHit$1 = Hit<{
|
|
4034
|
-
nb_words: number;
|
|
4035
|
-
popularity: number;
|
|
4036
|
-
query: string;
|
|
4037
|
-
}>;
|
|
4038
|
-
|
|
4039
|
-
interface ProductHit$2 {
|
|
4090
|
+
interface Product {
|
|
4040
4091
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4041
4092
|
[key: string]: any
|
|
4042
4093
|
alternativeNumber: string
|
|
@@ -4076,7 +4127,22 @@ interface ProductHit$2 {
|
|
|
4076
4127
|
width: number
|
|
4077
4128
|
}
|
|
4078
4129
|
|
|
4079
|
-
type ProductHit
|
|
4130
|
+
type ProductHit = Hit<Product>
|
|
4131
|
+
|
|
4132
|
+
type CategoryHit$1 = Hit<{
|
|
4133
|
+
listCategories: string[];
|
|
4134
|
+
}>;
|
|
4135
|
+
|
|
4136
|
+
type PopularCategoryHit$1 = Hit<{
|
|
4137
|
+
count: number;
|
|
4138
|
+
label: string;
|
|
4139
|
+
}>;
|
|
4140
|
+
|
|
4141
|
+
type PopularSearchHit$1 = Hit<{
|
|
4142
|
+
nb_words: number;
|
|
4143
|
+
popularity: number;
|
|
4144
|
+
query: string;
|
|
4145
|
+
}>;
|
|
4080
4146
|
|
|
4081
4147
|
type QuerySuggestionHit$1 = Hit<{
|
|
4082
4148
|
nb_words: number;
|
|
@@ -4096,7 +4162,7 @@ type RecentSearchHit$1 = Hit<{
|
|
|
4096
4162
|
label: string;
|
|
4097
4163
|
}>;
|
|
4098
4164
|
|
|
4099
|
-
type AutocompleteItem = ProductHit
|
|
4165
|
+
type AutocompleteItem = ProductHit | QuerySuggestionHit$1 | PopularCategoryHit$1 | QuickAccessHit$1 | RecentSearchHit$1 | CategoryHit$1 | PopularSearchHit$1;
|
|
4100
4166
|
type Autocomplete = AutocompleteApi<AutocompleteItem, React.BaseSyntheticEvent, React.MouseEvent, React.KeyboardEvent>;
|
|
4101
4167
|
type AutocompleteState = AutocompleteState$1<AutocompleteItem>;
|
|
4102
4168
|
|
|
@@ -4115,8 +4181,6 @@ type PopularSearchHit = Hit<{
|
|
|
4115
4181
|
query: string
|
|
4116
4182
|
}>
|
|
4117
4183
|
|
|
4118
|
-
type ProductHit = Hit<ProductHit$2>
|
|
4119
|
-
|
|
4120
4184
|
type QuerySuggestionHit = Hit<{
|
|
4121
4185
|
nb_words: number
|
|
4122
4186
|
popularity: number
|
|
@@ -4162,4 +4226,4 @@ declare const useGlobalSearchDisclosure: () => {
|
|
|
4162
4226
|
toggle: VoidFunction;
|
|
4163
4227
|
};
|
|
4164
4228
|
|
|
4165
|
-
export { Accordion, type AccountCollectionModel, type AccountModel, type AccountPaymentProfileCollectionModel, type AccountPaymentProfileModel, type AccountSettingsModel, type AccountShipToCollectionModel, type AccountShipToModel, type AccountsReceivableDto, AddProductToCurrentCartError, type AddProductToCurrentCartParams, AddToCartButton, type AddressFieldCollectionModel, type AddressFieldDisplayCollectionModel, type AddressFieldDisplayModel, type AgingBucketDto, AlgoliaCategories, AlgoliaFilterPanel, type AlgoliaFilterPanelProps, AlgoliaFilterSection, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, type AttributeTypeDto, type AttributeTypeFacetModel, type AttributeTypeModel, type AttributeValueDto, type AttributeValueFacetModel, type AttributeValueModel, type AutocompleteItemModel, type AutocompleteModel, type AutocompleteProductCollectionModel, type AutocompleteProductModel, type AvailabilityDto$2 as AvailabilityDto, AvailabilityMessageType$2 as AvailabilityMessageType, BadgeImagePlacementValues, type BadgeModel, BadgeStyleValues, BadgeTypeValues, type Banner, type BannerItem$1 as BannerItem, type BaseAddressModel, type BaseModel$1 as BaseModel, type BillToCollectionModel, type 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 BreadcrumbProps, type BreakPriceDto$2 as BreakPriceDto, type BreakPriceRfqModel, type Breakpoint, 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, type CountryCollectionModel, type CountryModel, type CreditCardBillingAddressDto, type CreditCardDto, type CrossSellCollectionModel, type CurrencyCollectionModel, type CurrencyModel, CurrencyPositioningType, type CustomerCostCodeDto, type CustomerOrderTaxDto, type CustomerSettingsModel, type CustomerValidationDto, type DashboardPanelCollectionModel, type DashboardPanelModel, type DealerCollectionModel, type DealerModel, DeleteCartLineByIdError, type DetailModel, type DocumentDto, type DocumentModel, type ECheckDto, type FacetModel, FavoriteButton, type FavoriteButtonProps, FavoriteProvider, FetchCurrentCartLinesError, type FetchProductListingPageDataArgs, FetchProductListingPageDataError, type FieldScoreDetailedDto, type FieldScoreDetailedModel, type FieldScoreDto, type FieldScoreModel, type FieldValidationDto, type FilterOption, type Filters, FormattedMessage, type FormattedMessageFunction, type FormattedMessageProps, GlobalSearch, GlobalSearchContainer, GlobalSearchDisclosureContext, GlobalStateProvider, GlobalStateProviderContext, IconButton, type IconButtonProps, Image, type ImageModel, 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, type LegacyConfigurationDto, type Link$1 as Link, LinkButton, type LinkButtonProps, LoadingOverlay, type MessageCollectionModel, type MessageModel, type MobileAppSettingsModel, type MobileContentModel, type MobilePageDto, type MobileWidgetDto, MultiSelect, type MultiSelectProps, type NavigateFn, type NavigateOptions$1 as NavigateOptions, 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, type PaymentMethodDto, type PaymentOptionsDto, type PersonaModel, type PoRequisitionModel, type PriceFacetModel, type PriceRangeModel, type PricingRfqModel, type ProductAutocompleteItemModel, type ProductAvailabilityModel, ProductCard, type ProductCardProps, type ProductCollectionModel, type ProductDto, type ProductHit$
|
|
4229
|
+
export { Accordion, type AccountCollectionModel, type AccountModel, type AccountPaymentProfileCollectionModel, type AccountPaymentProfileModel, type AccountSettingsModel, type AccountShipToCollectionModel, type AccountShipToModel, type AccountsReceivableDto, AddProductToCurrentCartError, type AddProductToCurrentCartParams, AddToCartButton, type AddressFieldCollectionModel, type AddressFieldDisplayCollectionModel, type AddressFieldDisplayModel, type AgingBucketDto, AlgoliaCategories, AlgoliaFilterPanel, type AlgoliaFilterPanelProps, AlgoliaFilterSection, AlgoliaInsightInstantSearchProvider, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, type AlgoliaInsightsProviderState, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, type AttributeTypeDto, type AttributeTypeFacetModel, type AttributeTypeModel, type AttributeValueDto, type AttributeValueFacetModel, type AttributeValueModel, type AutocompleteItemModel, type AutocompleteModel, type AutocompleteProductCollectionModel, type AutocompleteProductModel, type AutocompleteProps$1 as AutocompleteProps, type AvailabilityDto$2 as AvailabilityDto, AvailabilityMessageType$2 as AvailabilityMessageType, BadgeImagePlacementValues, type BadgeModel, BadgeStyleValues, BadgeTypeValues, type Banner, type BannerItem$1 as BannerItem, type BaseAddressModel, type BaseModel$1 as BaseModel, type BillToCollectionModel, type 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 BreadcrumbProps, type BreakPriceDto$2 as BreakPriceDto, type BreakPriceRfqModel, type Breakpoint, 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, type CountryCollectionModel, type CountryModel, type CreditCardBillingAddressDto, type CreditCardDto, type CrossSellCollectionModel, type CurrencyCollectionModel, type CurrencyModel, CurrencyPositioningType, type CustomerCostCodeDto, type CustomerOrderTaxDto, type CustomerSettingsModel, type CustomerValidationDto, type DashboardPanelCollectionModel, type DashboardPanelModel, type DealerCollectionModel, type DealerModel, DeleteCartLineByIdError, type DetailModel, type DocumentDto, type DocumentModel, type ECheckDto, type FacetModel, FavoriteButton, type FavoriteButtonProps, FavoriteProvider, FetchCurrentCartLinesError, type FetchProductListingPageDataArgs, FetchProductListingPageDataError, type FieldScoreDetailedDto, type FieldScoreDetailedModel, type FieldScoreDto, type FieldScoreModel, type FieldValidationDto, type FilterOption, type Filters, FormattedMessage, type FormattedMessageFunction, type FormattedMessageProps, GlobalSearch, GlobalSearchContainer, GlobalSearchDisclosureContext, GlobalStateProvider, GlobalStateProviderContext, IconButton, type IconButtonProps, Image, type ImageModel, 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, type LegacyConfigurationDto, type Link$1 as Link, LinkButton, type LinkButtonProps, LoadingOverlay, type MessageCollectionModel, type MessageModel, type MobileAppSettingsModel, type MobileContentModel, type MobilePageDto, type MobileWidgetDto, MultiSelect, type MultiSelectProps, type NavigateFn, type NavigateOptions$1 as NavigateOptions, 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, type PaymentMethodDto, type PaymentOptionsDto, type 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, type ProfileTransactionRequestModel, ProgressCircle, type ProgressCircleProps, type PromotionCollectionModel, type PromotionModel, type QuoteCollectionModel, type QuoteLineModel, type QuoteModel, type QuoteSettingsModel, type RealTimeCartInventoryModel, type RealTimeInventoryModel, type RealTimePricingModel, type RefinementListItem, type RelatedProductDto, type RequisitionCollectionModel, type RequisitionLineCollectionModel, type RequisitionLineModel, type RequisitionModel, type RmaLineDto, type RmaModel, RouteButton, RouteLink, RouteProvider, type RouteProviderProps, type SalespersonModel, type ScoreExplanationDto, type ScoreExplanationModel, type SectionOptionDto$2 as SectionOptionDto, type SectionOptionModel, Select, type SelectProps, type SessionModel, type SessionRequestModel, type SettingsCollectionModel, type SetupRequestModel, type ShareEntityModel, type ShareOrderModel, type ShipToCollectionModel, type ShipToModel, type ShipViaDto, type ShipmentPackageDto, type ShipmentPackageLineDto, ShowAll, type ShowAllProps, Sidebar, SidebarDetectBreakpoint, type SidebarProps, SidebarProvider, type SiteMessageCollectionModel, type SiteMessageModel, type SortOptionModel, type SpecificationDto, type SpecificationModel, type StateCollectionModel, type StateModel, type StyleTraitDto, type StyleValueDto, type StyledProductDto, type SuggestionModel, type TellAFriendModel, TextField, type TraitValueModel, type TranslationDictionaryCollectionModel, type TranslationDictionaryModel, type TranslationId, type UnitOfMeasureModel, UpdateCartLineByIdError, type UpdateCartLineParams, type UpdateGlobalState$1 as UpdateGlobalState, type UpdateWishListLineCollectionModel, 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, type WebsiteModel, type WebsiteSettingsModel, type WishListCollectionModel, type WishListEmailScheduleModel, type WishListLineCollectionModel, type WishListLineModel, type WishListModel, type WishListSettingsModel, type WishListShareModel, breakpoints, config, configPerEnvironment, createSonicSearchClient, useAddProductToCurrentCart, useAlgolia, useAlgoliaSearch, useBreakpoint, useCartEvents, useDebouncedCallback, useDeleteCartLineById, useDisclosure, useFavorite, useFetchCurrentCartLines, useFetchProductListingPageData, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useNavigate, useScrollLock, useUpdateCartLineById, userToken, userTokenEventEmitter };
|