@soma-vertical-web/multi-lib 1.0.40 → 1.0.41
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/contexts/hooks/useSessionManager.d.ts +27 -0
- package/contexts/index.d.ts +14 -0
- package/index-DsX1pAV4.js +4 -0
- package/index-YdrSlTYb.mjs +2714 -0
- package/index.js +16 -16
- package/index.mjs +4270 -4189
- package/index2.js +1 -1
- package/index2.mjs +305 -302
- package/package.json +1 -1
- package/types/contexts/contexts/search.d.ts +1 -0
- package/types/data/api/search/product/index.d.ts +2 -0
- package/types/data/events/index.d.ts +11 -0
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ export interface QueryFacetsProviderProps extends PropsWithChildren {
|
|
|
26
26
|
}
|
|
27
27
|
export interface QueryProductsContextProps extends ProductSearchResultPage, Pick<RootQueryContextProps, 'refetch' | 'isFetched' | 'isLoading'> {
|
|
28
28
|
total: number;
|
|
29
|
+
term?: string | null | undefined;
|
|
29
30
|
}
|
|
30
31
|
export interface SuggestedTermsContextProps {
|
|
31
32
|
loading: boolean;
|
|
@@ -57,6 +57,7 @@ export interface EventsFunctionType {
|
|
|
57
57
|
MAIN_IMAGE: MAIN_IMAGEType;
|
|
58
58
|
NAME_SPLIT_SYMBOL: NAME_SPLIT_SYMBOLType;
|
|
59
59
|
VENDOR_CODE?: string;
|
|
60
|
+
storeId?: string;
|
|
60
61
|
};
|
|
61
62
|
}
|
|
62
63
|
export type SendDatalayerEventType = {
|
|
@@ -65,7 +66,17 @@ export type SendDatalayerEventType = {
|
|
|
65
66
|
callBack?: () => void;
|
|
66
67
|
timeout?: number;
|
|
67
68
|
};
|
|
69
|
+
type SearchEventType = 'session.ping' | 'search.click' | 'search.query';
|
|
70
|
+
interface SearchEventProps {
|
|
71
|
+
productId?: string;
|
|
72
|
+
position?: number;
|
|
73
|
+
text?: string;
|
|
74
|
+
misspelled?: boolean;
|
|
75
|
+
match?: number;
|
|
76
|
+
operator?: string;
|
|
77
|
+
}
|
|
68
78
|
export interface EventContextProps {
|
|
79
|
+
sendSearchEvent: (type: SearchEventType, data?: SearchEventProps | undefined) => Promise<Response>;
|
|
69
80
|
sendDataLayerEvent: (data: SendDatalayerEventType) => void;
|
|
70
81
|
triggerSelectItemEventRef: MutableRefObject<{
|
|
71
82
|
trigger: boolean;
|