@getlupa/client 0.10.0-alpha-2 → 0.10.2
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/cjs/components/search-box/SearchBox.vue.d.ts +7 -1
- package/dist/cjs/components/search-box/products/SearchBoxProduct.vue.d.ts +1 -0
- package/dist/cjs/components/search-results/SearchResults.vue.d.ts +2 -0
- package/dist/cjs/components/search-results/filters/facets/StatsFacet.vue.d.ts +2 -0
- package/dist/cjs/components/search-results/products/product-card/SearchResultsProductCard.vue.d.ts +1 -0
- package/dist/cjs/constants/development/searchResultsDev.example.const.d.ts +1 -0
- package/dist/cjs/index.min.js +150 -41
- package/dist/cjs/store/modules/tracking.d.ts +3 -1
- package/dist/cjs/types/AnalyticsOptions.d.ts +3 -2
- package/dist/cjs/types/search-box/Common.d.ts +1 -0
- package/dist/cjs/types/search-results/SearchResultsProductCardOptions.d.ts +1 -0
- package/dist/cjs/utils/string.utils.d.ts +1 -0
- package/dist/es/components/search-box/SearchBox.vue.d.ts +7 -1
- package/dist/es/components/search-box/products/SearchBoxProduct.vue.d.ts +1 -0
- package/dist/es/components/search-results/SearchResults.vue.d.ts +2 -0
- package/dist/es/components/search-results/filters/facets/StatsFacet.vue.d.ts +2 -0
- package/dist/es/components/search-results/products/product-card/SearchResultsProductCard.vue.d.ts +1 -0
- package/dist/es/constants/development/searchResultsDev.example.const.d.ts +1 -0
- package/dist/es/index.min.js +150 -41
- package/dist/es/store/modules/tracking.d.ts +3 -1
- package/dist/es/types/AnalyticsOptions.d.ts +3 -2
- package/dist/es/types/search-box/Common.d.ts +1 -0
- package/dist/es/types/search-results/SearchResultsProductCardOptions.d.ts +1 -0
- package/dist/es/utils/string.utils.d.ts +1 -0
- package/dist/iife/components/search-box/SearchBox.vue.d.ts +7 -1
- package/dist/iife/components/search-box/products/SearchBoxProduct.vue.d.ts +1 -0
- package/dist/iife/components/search-results/SearchResults.vue.d.ts +2 -0
- package/dist/iife/components/search-results/filters/facets/StatsFacet.vue.d.ts +2 -0
- package/dist/iife/components/search-results/products/product-card/SearchResultsProductCard.vue.d.ts +1 -0
- package/dist/iife/constants/development/searchResultsDev.example.const.d.ts +1 -0
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/store/modules/tracking.d.ts +3 -1
- package/dist/iife/types/AnalyticsOptions.d.ts +3 -2
- package/dist/iife/types/search-box/Common.d.ts +1 -0
- package/dist/iife/types/search-results/SearchResultsProductCardOptions.d.ts +1 -0
- package/dist/iife/utils/string.utils.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { AnalyticsEventType } from "@/types/AnalyticsOptions";
|
|
1
2
|
import { TrackableEventData } from "@/types/search-box/Common";
|
|
2
3
|
import { PublicQuery, SearchQueryResult } from "@getlupa/client-sdk/Types";
|
|
3
4
|
import { VuexModule } from "vuex-module-decorators";
|
|
4
5
|
export default class TrackingModule extends VuexModule {
|
|
5
|
-
trackSearch({ queryKey, query, }: {
|
|
6
|
+
trackSearch({ queryKey, query, type, }: {
|
|
6
7
|
queryKey: string;
|
|
7
8
|
query: PublicQuery;
|
|
9
|
+
type?: AnalyticsEventType;
|
|
8
10
|
}): void;
|
|
9
11
|
trackResults({ queryKey, results, }: {
|
|
10
12
|
queryKey: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export declare const PARENT_EVENT_NAME = "GetLupa";
|
|
2
|
-
export declare type AnalyticsEventType = "
|
|
2
|
+
export declare type AnalyticsEventType = "search_query" | "search_form_submit" | "autocomplete_suggestion_click" | "autocomplete_product_click" | "search_product_click" | "search_zero_results" | "search_filters" | "search_add_to_cart";
|
|
3
3
|
export declare type AnalyticsOptions = {
|
|
4
|
-
type: "ua";
|
|
4
|
+
type: "ua" | "ga4" | "debug";
|
|
5
5
|
enabled: boolean;
|
|
6
6
|
parentEventName: string;
|
|
7
|
+
ignoreEvents?: AnalyticsEventType[];
|
|
7
8
|
};
|
|
@@ -5,4 +5,5 @@ export declare const addParamsToLabel: (label: string, ...params: unknown[]) =>
|
|
|
5
5
|
export declare const getRandomString: (length: number) => string;
|
|
6
6
|
export declare const getDisplayValue: (value?: string | number | undefined) => string;
|
|
7
7
|
export declare const getProductKey: (index: string, product: Document, idKey: string | undefined) => string;
|
|
8
|
+
export declare const normalizeFloat: (value?: string | undefined) => number;
|
|
8
9
|
export declare const escapeHtml: (value?: string | undefined) => string;
|