@getlupa/client 0.6.0 → 0.7.0-alpha-1
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/product-list/CategoryDescription.vue.d.ts +0 -1
- package/dist/cjs/components/product-list/CategoryFilter.vue.d.ts +4 -1
- package/dist/cjs/components/search-results/SearchResults.vue.d.ts +3 -4
- package/dist/cjs/components/search-results/additional-panels/AdditionalPanel.vue.d.ts +3 -0
- package/dist/cjs/components/search-results/filters/MobileFilterSidebar.vue.d.ts +1 -1
- package/dist/cjs/components/search-results/filters/facets/FacetDisplay.vue.d.ts +9 -0
- package/dist/cjs/components/search-results/products/SearchResultsMobileToggle.vue.d.ts +1 -1
- package/dist/cjs/components/search-results/products/SearchResultsProducts.vue.d.ts +8 -0
- package/dist/cjs/components/search-results/products/SearchResultsToolbar.vue.d.ts +1 -0
- package/dist/cjs/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +3 -0
- package/dist/cjs/constants/development/searchResultsDev.example.const.d.ts +3 -0
- package/dist/cjs/constants/global.const.d.ts +2 -1
- package/dist/cjs/constants/searchResults.const.d.ts +1 -0
- package/dist/cjs/index.d.ts +5 -4
- package/dist/cjs/index.min.js +20367 -35287
- package/dist/cjs/store/modules/options.d.ts +1 -0
- package/dist/cjs/store/modules/searchResult.d.ts +18 -0
- package/dist/cjs/types/DocumentElement.d.ts +2 -1
- package/dist/cjs/types/General.d.ts +3 -2
- package/dist/cjs/types/product-list/ProductListOptions.d.ts +6 -6
- package/dist/cjs/types/search-results/BadgeOptions.d.ts +5 -4
- package/dist/cjs/types/search-results/PaginationOptions.d.ts +1 -0
- package/dist/cjs/types/search-results/SearchResultsOptions.d.ts +31 -2
- package/dist/cjs/types/search-results/SearchResultsSort.d.ts +1 -1
- package/dist/cjs/utils/scroll.utils.d.ts +2 -0
- package/dist/es/components/product-list/CategoryDescription.vue.d.ts +0 -1
- package/dist/es/components/product-list/CategoryFilter.vue.d.ts +4 -1
- package/dist/es/components/search-results/SearchResults.vue.d.ts +3 -4
- package/dist/es/components/search-results/additional-panels/AdditionalPanel.vue.d.ts +3 -0
- package/dist/es/components/search-results/filters/MobileFilterSidebar.vue.d.ts +1 -1
- package/dist/es/components/search-results/filters/facets/FacetDisplay.vue.d.ts +9 -0
- package/dist/es/components/search-results/products/SearchResultsMobileToggle.vue.d.ts +1 -1
- package/dist/es/components/search-results/products/SearchResultsProducts.vue.d.ts +8 -0
- package/dist/es/components/search-results/products/SearchResultsToolbar.vue.d.ts +1 -0
- package/dist/es/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +3 -0
- package/dist/es/constants/development/searchResultsDev.example.const.d.ts +3 -0
- package/dist/es/constants/global.const.d.ts +2 -1
- package/dist/es/constants/searchResults.const.d.ts +1 -0
- package/dist/es/index.d.ts +5 -4
- package/dist/es/index.min.js +20367 -35287
- package/dist/es/store/modules/options.d.ts +1 -0
- package/dist/es/store/modules/searchResult.d.ts +18 -0
- package/dist/es/types/DocumentElement.d.ts +2 -1
- package/dist/es/types/General.d.ts +3 -2
- package/dist/es/types/product-list/ProductListOptions.d.ts +6 -6
- package/dist/es/types/search-results/BadgeOptions.d.ts +5 -4
- package/dist/es/types/search-results/PaginationOptions.d.ts +1 -0
- package/dist/es/types/search-results/SearchResultsOptions.d.ts +31 -2
- package/dist/es/types/search-results/SearchResultsSort.d.ts +1 -1
- package/dist/es/utils/scroll.utils.d.ts +2 -0
- package/dist/iife/components/product-list/CategoryDescription.vue.d.ts +0 -1
- package/dist/iife/components/product-list/CategoryFilter.vue.d.ts +4 -1
- package/dist/iife/components/search-results/SearchResults.vue.d.ts +3 -4
- package/dist/iife/components/search-results/additional-panels/AdditionalPanel.vue.d.ts +3 -0
- package/dist/iife/components/search-results/filters/MobileFilterSidebar.vue.d.ts +1 -1
- package/dist/iife/components/search-results/filters/facets/FacetDisplay.vue.d.ts +9 -0
- package/dist/iife/components/search-results/products/SearchResultsMobileToggle.vue.d.ts +1 -1
- package/dist/iife/components/search-results/products/SearchResultsProducts.vue.d.ts +8 -0
- package/dist/iife/components/search-results/products/SearchResultsToolbar.vue.d.ts +1 -0
- package/dist/iife/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +3 -0
- package/dist/iife/constants/development/searchResultsDev.example.const.d.ts +3 -0
- package/dist/iife/constants/global.const.d.ts +2 -1
- package/dist/iife/constants/searchResults.const.d.ts +1 -0
- package/dist/iife/index.d.ts +5 -4
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/store/modules/options.d.ts +1 -0
- package/dist/iife/store/modules/searchResult.d.ts +18 -0
- package/dist/iife/types/DocumentElement.d.ts +2 -1
- package/dist/iife/types/General.d.ts +3 -2
- package/dist/iife/types/product-list/ProductListOptions.d.ts +6 -6
- package/dist/iife/types/search-results/BadgeOptions.d.ts +5 -4
- package/dist/iife/types/search-results/PaginationOptions.d.ts +1 -0
- package/dist/iife/types/search-results/SearchResultsOptions.d.ts +31 -2
- package/dist/iife/types/search-results/SearchResultsSort.d.ts +1 -1
- package/dist/iife/utils/scroll.utils.d.ts +2 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@ import Vue from "vue";
|
|
|
2
2
|
import { ProductListOptions } from "@/types/product-list/ProductListOptions";
|
|
3
3
|
export default class CategoryDescription extends Vue {
|
|
4
4
|
options: ProductListOptions;
|
|
5
|
-
get title(): string | undefined;
|
|
6
5
|
get description(): string | undefined;
|
|
7
6
|
get overviewVisible(): boolean;
|
|
8
7
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import Vue from "vue";
|
|
2
|
-
import { Options } from "@getlupa/client-sdk/Types";
|
|
2
|
+
import { Options, SdkError, SearchQueryResult } from "@getlupa/client-sdk/Types";
|
|
3
3
|
import { CategoryFilterOptions } from "@/types/product-list/ProductListOptions";
|
|
4
|
+
import { SearchResultsOptions } from "@/types/search-results/SearchResultsOptions";
|
|
4
5
|
export default class CategoryFilter extends Vue {
|
|
5
6
|
options: CategoryFilterOptions;
|
|
6
7
|
categoryChildren: Record<string, string>[];
|
|
7
8
|
envOptions: Options;
|
|
9
|
+
searchResultOptions: SearchResultsOptions;
|
|
8
10
|
get hasBackButton(): boolean;
|
|
9
11
|
get hasEventRouting(): boolean;
|
|
10
12
|
get backTitle(): string | undefined;
|
|
@@ -13,6 +15,7 @@ export default class CategoryFilter extends Vue {
|
|
|
13
15
|
get parentUrlLink(): string | undefined;
|
|
14
16
|
get isActive(): boolean;
|
|
15
17
|
mounted(): Promise<void>;
|
|
18
|
+
handleResult(result: SearchQueryResult | SdkError): void;
|
|
16
19
|
getCategoryKey(item: Record<string, string>): string;
|
|
17
20
|
handleNavigationParent(event?: Event): void;
|
|
18
21
|
handleNavigationBack(event?: Event): void;
|
|
@@ -25,10 +25,6 @@ export default class SearchResults extends Vue {
|
|
|
25
25
|
setDefaultLimit: (defaultLimit: number) => {
|
|
26
26
|
defaultLimit: number;
|
|
27
27
|
};
|
|
28
|
-
handleNoResultsFlag: ({ resultCount, noResultsParam, }: {
|
|
29
|
-
resultCount: number;
|
|
30
|
-
noResultsParam?: string;
|
|
31
|
-
}) => void;
|
|
32
28
|
addParams: (params: QueryParams) => {
|
|
33
29
|
params: QueryParams;
|
|
34
30
|
};
|
|
@@ -64,6 +60,9 @@ export default class SearchResults extends Vue {
|
|
|
64
60
|
queryKey: string;
|
|
65
61
|
results: SearchQueryResult;
|
|
66
62
|
}): void;
|
|
63
|
+
setScreenWidth: ({ width, }: {
|
|
64
|
+
width: number;
|
|
65
|
+
}) => void;
|
|
67
66
|
setColumnCount: ({ width, grid, }: {
|
|
68
67
|
width: number;
|
|
69
68
|
grid: ProductGrid;
|
|
@@ -3,11 +3,13 @@ import Vue from "vue";
|
|
|
3
3
|
import { SdkOptions } from "@/types/General";
|
|
4
4
|
import { SearchQueryResult } from "@getlupa/client-sdk/Types";
|
|
5
5
|
import { Document } from "@getlupa/client-sdk/Types";
|
|
6
|
+
import { SearchResultsOptions } from "@/types/search-results/SearchResultsOptions";
|
|
6
7
|
export default class AdditionalPanels extends Vue {
|
|
7
8
|
panel: SearchResultsAdditionalPanelOptions;
|
|
8
9
|
options: SdkOptions;
|
|
9
10
|
result: SearchQueryResult;
|
|
10
11
|
query: string;
|
|
12
|
+
searchResultOptions: SearchResultsOptions;
|
|
11
13
|
showAll: boolean;
|
|
12
14
|
get displayShowMore(): boolean;
|
|
13
15
|
get itemCount(): number;
|
|
@@ -16,6 +18,7 @@ export default class AdditionalPanels extends Vue {
|
|
|
16
18
|
get hasResults(): boolean;
|
|
17
19
|
mounted(): void;
|
|
18
20
|
handleQueryChange(): void;
|
|
21
|
+
handleResults(res: SearchQueryResult): void;
|
|
19
22
|
toggleShowMore(): void;
|
|
20
23
|
addParams(label: string, itemCount: number): string;
|
|
21
24
|
}
|
|
@@ -2,7 +2,7 @@ import { SearchResultsFilterOptions } from "@/types/search-results/SearchResults
|
|
|
2
2
|
import Vue from "vue";
|
|
3
3
|
export default class MobileFilterSidebar extends Vue {
|
|
4
4
|
options: SearchResultsFilterOptions;
|
|
5
|
-
|
|
5
|
+
setSidebarState: ({ visible, }: {
|
|
6
6
|
visible: boolean;
|
|
7
7
|
}) => void;
|
|
8
8
|
isMobileSidebarVisible: boolean;
|
|
@@ -7,14 +7,23 @@ export default class FacetDisplay extends Vue {
|
|
|
7
7
|
facet: FacetResult;
|
|
8
8
|
currentFilters: FilterGroup;
|
|
9
9
|
clearable: boolean;
|
|
10
|
+
currentFilterKeys: string[];
|
|
10
11
|
isOpen: boolean;
|
|
11
12
|
get facetType(): string;
|
|
12
13
|
get hasItems(): boolean;
|
|
13
14
|
get hasFilter(): boolean;
|
|
15
|
+
get filterQueryKey(): string | undefined;
|
|
16
|
+
get activeFilterKeys(): string;
|
|
14
17
|
mounted(): void;
|
|
15
18
|
beforeDestroy(): void;
|
|
16
19
|
handleMouseClick(e: MouseEvent): void;
|
|
20
|
+
handleParamsChange(): void;
|
|
21
|
+
queryFacet: ({ queryKey, facetKey, }: {
|
|
22
|
+
queryKey: string;
|
|
23
|
+
facetKey: string;
|
|
24
|
+
}) => Promise<void>;
|
|
17
25
|
toggleFacet(): void;
|
|
26
|
+
handleFacetQueryFilter(): void;
|
|
18
27
|
handleFacetSelect(item: FacetAction): void;
|
|
19
28
|
clear(): void;
|
|
20
29
|
}
|
|
@@ -3,7 +3,7 @@ export default class SearchResultsMobileToggle extends Vue {
|
|
|
3
3
|
label: string;
|
|
4
4
|
showFilterCount: boolean;
|
|
5
5
|
currentFilterCount: number;
|
|
6
|
-
|
|
6
|
+
setSidebarState: ({ visible, }: {
|
|
7
7
|
visible: boolean;
|
|
8
8
|
}) => void;
|
|
9
9
|
handleMobileToggle(): void;
|
|
@@ -8,6 +8,7 @@ export default class SearchResultsProducts extends Vue {
|
|
|
8
8
|
loading: boolean;
|
|
9
9
|
hasResults: boolean;
|
|
10
10
|
currentQueryText: string;
|
|
11
|
+
isPageEmpty: boolean;
|
|
11
12
|
isMobileSidebarVisible: boolean;
|
|
12
13
|
productCardOptions(): SearchResultsProductCardOptions;
|
|
13
14
|
get similarQueriesLabels(): SearchResultsSimilarQueriesLabels;
|
|
@@ -21,4 +22,11 @@ export default class SearchResultsProducts extends Vue {
|
|
|
21
22
|
page: number;
|
|
22
23
|
get columnSize(): string;
|
|
23
24
|
getProductKey(index: string, product: Document): string;
|
|
25
|
+
appendParams: ({ params, }: {
|
|
26
|
+
params: {
|
|
27
|
+
name: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}[];
|
|
30
|
+
}) => void;
|
|
31
|
+
goToFirstPage(): void;
|
|
24
32
|
}
|
|
@@ -21,6 +21,7 @@ export default class SearchResultsToolbar extends Vue {
|
|
|
21
21
|
get displayPageSelect(): boolean;
|
|
22
22
|
get searchSummaryLabel(): string;
|
|
23
23
|
get showMobileFilterCount(): boolean;
|
|
24
|
+
currentResolutionPageSizes: number[];
|
|
24
25
|
removeAllFilters: () => {
|
|
25
26
|
params: QueryParams;
|
|
26
27
|
};
|
package/dist/cjs/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export default class SearchResultsPageSelect extends Vue {
|
|
|
5
5
|
lastPageLabel: string;
|
|
6
6
|
firstPageLabel: string;
|
|
7
7
|
options: PaginationPageSelect;
|
|
8
|
+
isMobileWidth: boolean;
|
|
9
|
+
get pageOptionsCount(): number;
|
|
8
10
|
get pages(): number[];
|
|
9
11
|
get showBack(): boolean;
|
|
10
12
|
get lastPage(): number | undefined;
|
|
@@ -12,6 +14,7 @@ export default class SearchResultsPageSelect extends Vue {
|
|
|
12
14
|
get showLastPageSeparator(): boolean;
|
|
13
15
|
get showFirstPage(): boolean;
|
|
14
16
|
get showFirstPageSeparator(): boolean;
|
|
17
|
+
get showPagination(): boolean;
|
|
15
18
|
appendParams: ({ params, paramsToRemove, }: {
|
|
16
19
|
params: {
|
|
17
20
|
name: string;
|
|
@@ -13,12 +13,15 @@ export declare const SEARCH_RESULTS_CONFIGURATION: {
|
|
|
13
13
|
priceSeparator: string;
|
|
14
14
|
showMore: string;
|
|
15
15
|
emptyResults: string;
|
|
16
|
+
noItemsInPage: string;
|
|
17
|
+
backToFirstPage: string;
|
|
16
18
|
mobileFilterButton: string;
|
|
17
19
|
htmlTitleTemplate: string;
|
|
18
20
|
noResultsSuggestion: string;
|
|
19
21
|
didYouMean: string;
|
|
20
22
|
similarQuery: string;
|
|
21
23
|
similarQueries: string;
|
|
24
|
+
aiSuggestions: string;
|
|
22
25
|
};
|
|
23
26
|
toolbar: {
|
|
24
27
|
totalCount: boolean;
|
|
@@ -8,7 +8,8 @@ export declare const S_MIN_WIDTH = 575;
|
|
|
8
8
|
export declare const MD_MIN_WIDTH = 767;
|
|
9
9
|
export declare const L_MIN_WIDTH = 991;
|
|
10
10
|
export declare const XL_MIN_WIDTH = 1199;
|
|
11
|
-
export declare const MAX_FACET_VALUES =
|
|
11
|
+
export declare const MAX_FACET_VALUES = 5000;
|
|
12
12
|
export declare const CURRENCY_KEY_INDICATOR = "price";
|
|
13
13
|
export declare const DEFAULT_PAGE_SIZE = 12;
|
|
14
|
+
export declare const DEFAULT_PAGE_SIZE_SELECTION: number[];
|
|
14
15
|
export declare const LUPA_ROUTING_EVENT = "lupaRedirect";
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { SearchBoxOptions } from "./types/search-box/SearchBoxOptions";
|
|
2
|
-
import { FacetStyle, SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
|
|
2
|
+
import { CallbackContext, FacetFilterQuery, FacetStyle, SearchResultEventCallbacks, SearchResultsFilterOptions, SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
|
|
3
3
|
import { SdkOptions, TrackingOptions, Environment, SortDirection } from "./types/General";
|
|
4
|
-
import { ProductListOptions } from "./types/product-list/ProductListOptions";
|
|
4
|
+
import { CategoryFilterOptions, ProductListOptions } from "./types/product-list/ProductListOptions";
|
|
5
5
|
import { AddToCartElement, CustomDocumentElement, CustomHtmlElement, DescriptionDocumentElement, DocumentElement, DocumentElementType, ImageDocumentElement, PriceElement, RatingElement, RegularPriceDocumentElement, TitleDocumentElement } from "./types/DocumentElement";
|
|
6
6
|
import { SearchBoxPanelType } from "./types/search-box/SearchBoxPanel";
|
|
7
7
|
import { RoutingBehavior } from "./types/search-results/RoutingBehavior";
|
|
8
8
|
import { AnchorPosition } from "./types/search-results/SearchResultsProductCardOptions";
|
|
9
|
-
import { BadgeType } from "./types/search-results/BadgeOptions";
|
|
9
|
+
import { BadgeType, SearchResultBadgeElement, SearchResultBadgeType } from "./types/search-results/BadgeOptions";
|
|
10
|
+
import { SearchResultsSortOptions, SortOptions } from "./types/search-results/SearchResultsSort";
|
|
10
11
|
declare const lupaSearch: {
|
|
11
12
|
searchBox: (options: SearchBoxOptions) => void;
|
|
12
13
|
searchResults: (options: SearchResultsOptions) => void;
|
|
@@ -16,5 +17,5 @@ declare const lupaSearch: {
|
|
|
16
17
|
clearSearchResults: () => void;
|
|
17
18
|
clearProductList: () => void;
|
|
18
19
|
};
|
|
19
|
-
export { TrackingOptions, SearchBoxOptions, SearchResultsOptions, ProductListOptions, SdkOptions, DocumentElementType, SearchBoxPanelType, FacetStyle, Environment, RoutingBehavior, AnchorPosition, BadgeType, SortDirection, DocumentElement, ImageDocumentElement, TitleDocumentElement, DescriptionDocumentElement, CustomDocumentElement, PriceElement, RegularPriceDocumentElement, RatingElement, AddToCartElement, CustomHtmlElement, };
|
|
20
|
+
export { TrackingOptions, SearchBoxOptions, SearchResultsOptions, ProductListOptions, SdkOptions, DocumentElementType, SearchBoxPanelType, FacetStyle, Environment, RoutingBehavior, AnchorPosition, BadgeType, SortDirection, DocumentElement, ImageDocumentElement, TitleDocumentElement, DescriptionDocumentElement, CustomDocumentElement, PriceElement, RegularPriceDocumentElement, RatingElement, AddToCartElement, CustomHtmlElement, SortOptions, SearchResultsSortOptions, SearchResultEventCallbacks, CallbackContext, FacetFilterQuery, CategoryFilterOptions, SearchResultsFilterOptions, SearchResultBadgeType, SearchResultBadgeElement, };
|
|
20
21
|
export default lupaSearch;
|