@sonic-equipment/ui 0.0.43 → 0.0.45
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 +100 -38
- package/dist/index.js +314 -100
- package/dist/pages/product-listing-page/product-listing-page.stories.d.ts +0 -1
- 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 +12 -12
- 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;
|
|
@@ -3520,7 +3533,9 @@ declare class EventEmitter<T> {
|
|
|
3520
3533
|
|
|
3521
3534
|
declare class State<T> extends EventEmitter<T | undefined> {
|
|
3522
3535
|
private _state;
|
|
3523
|
-
|
|
3536
|
+
private _key;
|
|
3537
|
+
constructor(key: string | symbol, state?: T);
|
|
3538
|
+
get key(): string | symbol;
|
|
3524
3539
|
get value(): T | undefined;
|
|
3525
3540
|
set value(newState: T | undefined);
|
|
3526
3541
|
}
|
|
@@ -3536,8 +3551,12 @@ interface GlobalStateProviderProps {
|
|
|
3536
3551
|
children: ReactNode;
|
|
3537
3552
|
}
|
|
3538
3553
|
declare function GlobalStateProvider({ children, }: GlobalStateProviderProps): ReactElement | null;
|
|
3539
|
-
|
|
3540
|
-
|
|
3554
|
+
interface UpdateGlobalState$1<T> {
|
|
3555
|
+
(value: T | undefined): void;
|
|
3556
|
+
(fn: (value: T | undefined) => T | undefined): void;
|
|
3557
|
+
}
|
|
3558
|
+
declare function useGlobalState<T>(key: string | symbol): [T | undefined, UpdateGlobalState$1<T>];
|
|
3559
|
+
declare function useGlobalState<T>(key: string | symbol, initialState: T): [T, UpdateGlobalState$1<T>];
|
|
3541
3560
|
|
|
3542
3561
|
interface NavigateOptions$1 {
|
|
3543
3562
|
prefetch?: boolean;
|
|
@@ -3551,10 +3570,18 @@ interface RouteProviderProps {
|
|
|
3551
3570
|
declare function RouteProvider({ children, navigate }: RouteProviderProps): react_jsx_runtime.JSX.Element;
|
|
3552
3571
|
declare function useNavigate(): NavigateFn;
|
|
3553
3572
|
|
|
3554
|
-
interface
|
|
3573
|
+
interface AutocompleteProps$1 {
|
|
3574
|
+
areaSelected?: boolean;
|
|
3575
|
+
id?: string;
|
|
3576
|
+
onClick?(event: MouseEvent): void;
|
|
3577
|
+
onMouseDown?(event: MouseEvent): void;
|
|
3578
|
+
onMouseMove?(event: MouseEvent): void;
|
|
3579
|
+
role?: 'option';
|
|
3580
|
+
}
|
|
3581
|
+
interface RouteLinkProps extends LinkProps, RefAttributes<HTMLAnchorElement>, AutocompleteProps$1 {
|
|
3555
3582
|
route?: NavigateOptions$1;
|
|
3556
3583
|
}
|
|
3557
|
-
declare function RouteLink({ children, ...props }: RouteLinkProps): react_jsx_runtime.JSX.Element;
|
|
3584
|
+
declare function RouteLink({ children, onClick: _onClick, ...props }: RouteLinkProps): react_jsx_runtime.JSX.Element;
|
|
3558
3585
|
|
|
3559
3586
|
interface RouteButtonProps extends ButtonProps$1, RefAttributes<HTMLButtonElement> {
|
|
3560
3587
|
href?: string;
|
|
@@ -3562,7 +3589,7 @@ interface RouteButtonProps extends ButtonProps$1, RefAttributes<HTMLButtonElemen
|
|
|
3562
3589
|
}
|
|
3563
3590
|
declare function RouteButton({ children, ...props }: RouteButtonProps): react_jsx_runtime.JSX.Element;
|
|
3564
3591
|
|
|
3565
|
-
interface
|
|
3592
|
+
interface Product$1 {
|
|
3566
3593
|
[key: string]: any;
|
|
3567
3594
|
alternativeNumber: string;
|
|
3568
3595
|
categories: string[];
|
|
@@ -3598,6 +3625,7 @@ interface ProductHit$3 {
|
|
|
3598
3625
|
weight: number;
|
|
3599
3626
|
width: number;
|
|
3600
3627
|
}
|
|
3628
|
+
type ProductHit$1 = Hit<Product$1>;
|
|
3601
3629
|
|
|
3602
3630
|
interface Link$1 {
|
|
3603
3631
|
href: string;
|
|
@@ -3642,6 +3670,11 @@ interface IconButtonProps {
|
|
|
3642
3670
|
}
|
|
3643
3671
|
declare function IconButton({ children, className, color, isDisabled, onPress, size, type, }: IconButtonProps): react_jsx_runtime.JSX.Element;
|
|
3644
3672
|
|
|
3673
|
+
interface UpdateGlobalState<T> {
|
|
3674
|
+
(value: T | undefined): void
|
|
3675
|
+
(fn: (value: T | undefined) => T | undefined): void
|
|
3676
|
+
}
|
|
3677
|
+
|
|
3645
3678
|
interface NavigateOptions {
|
|
3646
3679
|
prefetch?: boolean
|
|
3647
3680
|
replace?: boolean
|
|
@@ -3669,9 +3702,19 @@ interface AddToCartButtonProps {
|
|
|
3669
3702
|
declare function AddToCartButton({ initialState, isDisabled, onChange, quantity, }: AddToCartButtonProps): react_jsx_runtime.JSX.Element;
|
|
3670
3703
|
|
|
3671
3704
|
interface Props {
|
|
3705
|
+
onAddToCart?: () => void;
|
|
3672
3706
|
productId: string;
|
|
3673
3707
|
}
|
|
3674
|
-
declare const ConnectedAddToCartButton: ({ productId }: Props) => react_jsx_runtime.JSX.Element;
|
|
3708
|
+
declare const ConnectedAddToCartButton: ({ onAddToCart, productId }: Props) => react_jsx_runtime.JSX.Element;
|
|
3709
|
+
|
|
3710
|
+
interface AutocompleteProps {
|
|
3711
|
+
areaSelected?: boolean
|
|
3712
|
+
id?: string
|
|
3713
|
+
onClick?(event: MouseEvent): void
|
|
3714
|
+
onMouseDown?(event: MouseEvent): void
|
|
3715
|
+
onMouseMove?(event: MouseEvent): void
|
|
3716
|
+
role?: 'option'
|
|
3717
|
+
}
|
|
3675
3718
|
|
|
3676
3719
|
interface ProductPrice$1 {
|
|
3677
3720
|
isVatIncluded: boolean
|
|
@@ -3679,7 +3722,7 @@ interface ProductPrice$1 {
|
|
|
3679
3722
|
price: number
|
|
3680
3723
|
}
|
|
3681
3724
|
|
|
3682
|
-
interface ProductCardProps {
|
|
3725
|
+
interface ProductCardProps extends AutocompleteProps {
|
|
3683
3726
|
addToCartButton: ReactElement;
|
|
3684
3727
|
favoriteButton?: ReactElement;
|
|
3685
3728
|
href: string;
|
|
@@ -3690,7 +3733,7 @@ interface ProductCardProps {
|
|
|
3690
3733
|
tags?: string[];
|
|
3691
3734
|
title: string;
|
|
3692
3735
|
}
|
|
3693
|
-
declare function ProductCard({ addToCartButton: AddToCartButton, favoriteButton: FavoriteButton, href, image, onPress, price, sku, tags, title, }: ProductCardProps): react_jsx_runtime.JSX.Element;
|
|
3736
|
+
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
3737
|
|
|
3695
3738
|
interface CategoryCarouselProps {
|
|
3696
3739
|
categoryCards: ReactNode[];
|
|
@@ -3935,6 +3978,9 @@ interface SidebarProviderProps {
|
|
|
3935
3978
|
declare function SidebarDetectBreakpoint(): react_jsx_runtime.JSX.Element | null;
|
|
3936
3979
|
declare function SidebarProvider({ children }: SidebarProviderProps): react_jsx_runtime.JSX.Element;
|
|
3937
3980
|
|
|
3981
|
+
declare const userTokenEventEmitter: EventEmitter<string | undefined>;
|
|
3982
|
+
declare let userToken: string | undefined;
|
|
3983
|
+
|
|
3938
3984
|
declare function AlgoliaCategories(): react_jsx_runtime.JSX.Element;
|
|
3939
3985
|
|
|
3940
3986
|
interface AlgoliaFilterPanelProps {
|
|
@@ -3969,18 +4015,29 @@ interface AlgoliaPaginationProps {
|
|
|
3969
4015
|
}
|
|
3970
4016
|
declare function AlgoliaPagination({ onChange }: AlgoliaPaginationProps): react_jsx_runtime.JSX.Element;
|
|
3971
4017
|
|
|
3972
|
-
declare const createSonicSearchClient: ({ apiKey, appId, path, }: {
|
|
4018
|
+
declare const createSonicSearchClient: ({ apiKey, appId, host, path, }: {
|
|
3973
4019
|
apiKey: string;
|
|
3974
4020
|
appId: string;
|
|
3975
4021
|
host: string | undefined;
|
|
3976
4022
|
path: string;
|
|
3977
4023
|
}) => SearchClient;
|
|
3978
4024
|
|
|
3979
|
-
interface
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
4025
|
+
interface AlgoliaInsightsProviderGlobalState {
|
|
4026
|
+
index?: string | undefined;
|
|
4027
|
+
queryId?: string | undefined;
|
|
4028
|
+
userToken?: string;
|
|
4029
|
+
}
|
|
4030
|
+
|
|
4031
|
+
interface AlgoliaInsightsProviderState extends AlgoliaInsightsProviderGlobalState {
|
|
4032
|
+
objectId?: string | string[] | undefined;
|
|
4033
|
+
position?: number | number[] | undefined;
|
|
3983
4034
|
}
|
|
4035
|
+
declare const AlgoliaInsightsProviderContext: React.Context<AlgoliaInsightsProviderState>;
|
|
4036
|
+
declare function AlgoliaInsightsProvider({ children, value, }: {
|
|
4037
|
+
children?: ReactNode;
|
|
4038
|
+
value?: AlgoliaInsightsProviderState;
|
|
4039
|
+
}): react_jsx_runtime.JSX.Element;
|
|
4040
|
+
|
|
3984
4041
|
interface AlgoliaProviderProps {
|
|
3985
4042
|
categoryPages: string;
|
|
3986
4043
|
children: ReactNode;
|
|
@@ -3990,8 +4047,15 @@ interface AlgoliaProviderProps {
|
|
|
3990
4047
|
routing?: boolean | RouterProps<UiState, UiState> | undefined;
|
|
3991
4048
|
searchClient: SearchClient;
|
|
3992
4049
|
}
|
|
4050
|
+
declare function AlgoliaInsightInstantSearchProvider({ children, }: {
|
|
4051
|
+
children?: ReactNode;
|
|
4052
|
+
}): react_jsx_runtime.JSX.Element;
|
|
3993
4053
|
declare function AlgoliaProvider({ categoryPages, children, languageCode, offlineSearchClient, online: _online, routing, searchClient, }: AlgoliaProviderProps): react_jsx_runtime.JSX.Element;
|
|
3994
|
-
declare function useAlgolia():
|
|
4054
|
+
declare function useAlgolia(): {
|
|
4055
|
+
online: boolean;
|
|
4056
|
+
setOnline: UpdateGlobalState<boolean>;
|
|
4057
|
+
toggleOnline: () => void;
|
|
4058
|
+
};
|
|
3995
4059
|
|
|
3996
4060
|
declare function AlgoliaResultsCount(): string | null;
|
|
3997
4061
|
|
|
@@ -4021,22 +4085,7 @@ declare function GlobalSearchContainer({ children, }: {
|
|
|
4021
4085
|
children: React.ReactNode;
|
|
4022
4086
|
}): react_jsx_runtime.JSX.Element;
|
|
4023
4087
|
|
|
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 {
|
|
4088
|
+
interface Product {
|
|
4040
4089
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4041
4090
|
[key: string]: any
|
|
4042
4091
|
alternativeNumber: string
|
|
@@ -4076,7 +4125,22 @@ interface ProductHit$2 {
|
|
|
4076
4125
|
width: number
|
|
4077
4126
|
}
|
|
4078
4127
|
|
|
4079
|
-
type ProductHit
|
|
4128
|
+
type ProductHit = Hit<Product>
|
|
4129
|
+
|
|
4130
|
+
type CategoryHit$1 = Hit<{
|
|
4131
|
+
listCategories: string[];
|
|
4132
|
+
}>;
|
|
4133
|
+
|
|
4134
|
+
type PopularCategoryHit$1 = Hit<{
|
|
4135
|
+
count: number;
|
|
4136
|
+
label: string;
|
|
4137
|
+
}>;
|
|
4138
|
+
|
|
4139
|
+
type PopularSearchHit$1 = Hit<{
|
|
4140
|
+
nb_words: number;
|
|
4141
|
+
popularity: number;
|
|
4142
|
+
query: string;
|
|
4143
|
+
}>;
|
|
4080
4144
|
|
|
4081
4145
|
type QuerySuggestionHit$1 = Hit<{
|
|
4082
4146
|
nb_words: number;
|
|
@@ -4096,7 +4160,7 @@ type RecentSearchHit$1 = Hit<{
|
|
|
4096
4160
|
label: string;
|
|
4097
4161
|
}>;
|
|
4098
4162
|
|
|
4099
|
-
type AutocompleteItem = ProductHit
|
|
4163
|
+
type AutocompleteItem = ProductHit | QuerySuggestionHit$1 | PopularCategoryHit$1 | QuickAccessHit$1 | RecentSearchHit$1 | CategoryHit$1 | PopularSearchHit$1;
|
|
4100
4164
|
type Autocomplete = AutocompleteApi<AutocompleteItem, React.BaseSyntheticEvent, React.MouseEvent, React.KeyboardEvent>;
|
|
4101
4165
|
type AutocompleteState = AutocompleteState$1<AutocompleteItem>;
|
|
4102
4166
|
|
|
@@ -4115,8 +4179,6 @@ type PopularSearchHit = Hit<{
|
|
|
4115
4179
|
query: string
|
|
4116
4180
|
}>
|
|
4117
4181
|
|
|
4118
|
-
type ProductHit = Hit<ProductHit$2>
|
|
4119
|
-
|
|
4120
4182
|
type QuerySuggestionHit = Hit<{
|
|
4121
4183
|
nb_words: number
|
|
4122
4184
|
popularity: number
|
|
@@ -4162,4 +4224,4 @@ declare const useGlobalSearchDisclosure: () => {
|
|
|
4162
4224
|
toggle: VoidFunction;
|
|
4163
4225
|
};
|
|
4164
4226
|
|
|
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$
|
|
4227
|
+
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 };
|