@getlupa/client 0.4.3 → 0.5.1-alpha-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.
Files changed (114) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/ProductListEntry.vue.d.ts +5 -0
  3. package/dist/cjs/components/product-list/CategoryDescription.vue.d.ts +8 -0
  4. package/dist/cjs/components/product-list/CategoryFilter.vue.d.ts +20 -0
  5. package/dist/cjs/components/product-list/CategoryFilterItem.vue.d.ts +12 -0
  6. package/dist/cjs/components/product-list/ProductList.vue.d.ts +6 -0
  7. package/dist/cjs/components/search-results/SearchResults.vue.d.ts +23 -4
  8. package/dist/cjs/components/search-results/SearchResultsTitle.vue.d.ts +13 -0
  9. package/dist/cjs/components/search-results/filters/CurrentFilters.vue.d.ts +3 -2
  10. package/dist/cjs/components/search-results/filters/MobileFilterSidebar.vue.d.ts +4 -0
  11. package/dist/cjs/components/search-results/filters/facets/FacetList.vue.d.ts +1 -0
  12. package/dist/cjs/components/search-results/filters/facets/StatsFacet.vue.d.ts +12 -1
  13. package/dist/cjs/components/search-results/filters/facets/TermFacet.vue.d.ts +5 -3
  14. package/dist/cjs/components/search-results/products/SearchResultsMobileToggle.vue.d.ts +2 -0
  15. package/dist/cjs/components/search-results/products/SearchResultsToolbar.vue.d.ts +1 -0
  16. package/dist/cjs/constants/development/searchBoxDev.example.const.d.ts +2 -0
  17. package/dist/cjs/constants/development/searchProductListDev.example.d.ts +28 -0
  18. package/dist/cjs/constants/development/searchResultsDev.example.const.d.ts +17 -0
  19. package/dist/cjs/constants/global.const.d.ts +1 -0
  20. package/dist/cjs/constants/queryParams.const.d.ts +1 -0
  21. package/dist/cjs/constants/searchResults.const.d.ts +1 -0
  22. package/dist/cjs/index-iife.d.ts +5 -0
  23. package/dist/cjs/index.d.ts +3 -0
  24. package/dist/cjs/index.min.js +3075 -1789
  25. package/dist/cjs/store/modules/options.d.ts +6 -1
  26. package/dist/cjs/store/modules/params.d.ts +7 -5
  27. package/dist/cjs/store/modules/searchBox.d.ts +4 -3
  28. package/dist/cjs/store/modules/searchResult.d.ts +4 -0
  29. package/dist/cjs/types/General.d.ts +4 -0
  30. package/dist/cjs/types/product-list/ProductListOptions.d.ts +28 -0
  31. package/dist/cjs/types/search-box/SearchBoxOptions.d.ts +1 -0
  32. package/dist/cjs/types/search-results/SearchResultsOptions.d.ts +22 -0
  33. package/dist/cjs/utils/filter.toggle.utils.d.ts +1 -1
  34. package/dist/cjs/utils/filter.utils.d.ts +1 -0
  35. package/dist/cjs/utils/price.utils.d.ts +2 -2
  36. package/dist/cjs/utils/query.utils.d.ts +2 -1
  37. package/dist/cjs/utils/routing.utils.d.ts +1 -0
  38. package/dist/cjs/utils/tracking.utils.d.ts +4 -0
  39. package/dist/es/ProductListEntry.vue.d.ts +5 -0
  40. package/dist/es/components/product-list/CategoryDescription.vue.d.ts +8 -0
  41. package/dist/es/components/product-list/CategoryFilter.vue.d.ts +20 -0
  42. package/dist/es/components/product-list/CategoryFilterItem.vue.d.ts +12 -0
  43. package/dist/es/components/product-list/ProductList.vue.d.ts +6 -0
  44. package/dist/es/components/search-results/SearchResults.vue.d.ts +23 -4
  45. package/dist/es/components/search-results/SearchResultsTitle.vue.d.ts +13 -0
  46. package/dist/es/components/search-results/filters/CurrentFilters.vue.d.ts +3 -2
  47. package/dist/es/components/search-results/filters/MobileFilterSidebar.vue.d.ts +4 -0
  48. package/dist/es/components/search-results/filters/facets/FacetList.vue.d.ts +1 -0
  49. package/dist/es/components/search-results/filters/facets/StatsFacet.vue.d.ts +12 -1
  50. package/dist/es/components/search-results/filters/facets/TermFacet.vue.d.ts +5 -3
  51. package/dist/es/components/search-results/products/SearchResultsMobileToggle.vue.d.ts +2 -0
  52. package/dist/es/components/search-results/products/SearchResultsToolbar.vue.d.ts +1 -0
  53. package/dist/es/constants/development/searchBoxDev.example.const.d.ts +2 -0
  54. package/dist/es/constants/development/searchProductListDev.example.d.ts +28 -0
  55. package/dist/es/constants/development/searchResultsDev.example.const.d.ts +17 -0
  56. package/dist/es/constants/global.const.d.ts +1 -0
  57. package/dist/es/constants/queryParams.const.d.ts +1 -0
  58. package/dist/es/constants/searchResults.const.d.ts +1 -0
  59. package/dist/es/index-iife.d.ts +5 -0
  60. package/dist/es/index.d.ts +3 -0
  61. package/dist/es/index.min.js +3075 -1789
  62. package/dist/es/store/modules/options.d.ts +6 -1
  63. package/dist/es/store/modules/params.d.ts +7 -5
  64. package/dist/es/store/modules/searchBox.d.ts +4 -3
  65. package/dist/es/store/modules/searchResult.d.ts +4 -0
  66. package/dist/es/types/General.d.ts +4 -0
  67. package/dist/es/types/product-list/ProductListOptions.d.ts +28 -0
  68. package/dist/es/types/search-box/SearchBoxOptions.d.ts +1 -0
  69. package/dist/es/types/search-results/SearchResultsOptions.d.ts +22 -0
  70. package/dist/es/utils/filter.toggle.utils.d.ts +1 -1
  71. package/dist/es/utils/filter.utils.d.ts +1 -0
  72. package/dist/es/utils/price.utils.d.ts +2 -2
  73. package/dist/es/utils/query.utils.d.ts +2 -1
  74. package/dist/es/utils/routing.utils.d.ts +1 -0
  75. package/dist/es/utils/tracking.utils.d.ts +4 -0
  76. package/dist/iife/ProductListEntry.vue.d.ts +5 -0
  77. package/dist/iife/components/product-list/CategoryDescription.vue.d.ts +8 -0
  78. package/dist/iife/components/product-list/CategoryFilter.vue.d.ts +20 -0
  79. package/dist/iife/components/product-list/CategoryFilterItem.vue.d.ts +12 -0
  80. package/dist/iife/components/product-list/ProductList.vue.d.ts +6 -0
  81. package/dist/iife/components/search-results/SearchResults.vue.d.ts +23 -4
  82. package/dist/iife/components/search-results/SearchResultsTitle.vue.d.ts +13 -0
  83. package/dist/iife/components/search-results/filters/CurrentFilters.vue.d.ts +3 -2
  84. package/dist/iife/components/search-results/filters/MobileFilterSidebar.vue.d.ts +4 -0
  85. package/dist/iife/components/search-results/filters/facets/FacetList.vue.d.ts +1 -0
  86. package/dist/iife/components/search-results/filters/facets/StatsFacet.vue.d.ts +12 -1
  87. package/dist/iife/components/search-results/filters/facets/TermFacet.vue.d.ts +5 -3
  88. package/dist/iife/components/search-results/products/SearchResultsMobileToggle.vue.d.ts +2 -0
  89. package/dist/iife/components/search-results/products/SearchResultsToolbar.vue.d.ts +1 -0
  90. package/dist/iife/constants/development/searchBoxDev.example.const.d.ts +2 -0
  91. package/dist/iife/constants/development/searchProductListDev.example.d.ts +28 -0
  92. package/dist/iife/constants/development/searchResultsDev.example.const.d.ts +17 -0
  93. package/dist/iife/constants/global.const.d.ts +1 -0
  94. package/dist/iife/constants/queryParams.const.d.ts +1 -0
  95. package/dist/iife/constants/searchResults.const.d.ts +1 -0
  96. package/dist/iife/index-iife.d.ts +5 -0
  97. package/dist/iife/index.d.ts +3 -0
  98. package/dist/iife/index.min.js +1 -1
  99. package/dist/iife/store/modules/options.d.ts +6 -1
  100. package/dist/iife/store/modules/params.d.ts +7 -5
  101. package/dist/iife/store/modules/searchBox.d.ts +4 -3
  102. package/dist/iife/store/modules/searchResult.d.ts +4 -0
  103. package/dist/iife/types/General.d.ts +4 -0
  104. package/dist/iife/types/product-list/ProductListOptions.d.ts +28 -0
  105. package/dist/iife/types/search-box/SearchBoxOptions.d.ts +1 -0
  106. package/dist/iife/types/search-results/SearchResultsOptions.d.ts +22 -0
  107. package/dist/iife/utils/filter.toggle.utils.d.ts +1 -1
  108. package/dist/iife/utils/filter.utils.d.ts +1 -0
  109. package/dist/iife/utils/price.utils.d.ts +2 -2
  110. package/dist/iife/utils/query.utils.d.ts +2 -1
  111. package/dist/iife/utils/routing.utils.d.ts +1 -0
  112. package/dist/iife/utils/tracking.utils.d.ts +4 -0
  113. package/dist/style.css +1 -1
  114. package/package.json +2 -2
@@ -1,16 +1,21 @@
1
1
  import { SearchBoxOptions } from "@/types/search-box/SearchBoxOptions";
2
2
  import { SearchResultsOptions } from "@/types/search-results/SearchResultsOptions";
3
- import { Options } from "@getlupa/client-sdk/Types";
3
+ import { FilterGroup, Options } from "@getlupa/client-sdk/Types";
4
4
  import { VuexModule } from "vuex-module-decorators";
5
5
  export default class OptionsModule extends VuexModule {
6
6
  searchBoxOptions: SearchBoxOptions;
7
7
  searchResultOptions: SearchResultsOptions;
8
+ searchResultInitialFilters: FilterGroup;
8
9
  get envOptions(): Options;
9
10
  get classMap(): Record<string, string>;
11
+ get initialFilters(): FilterGroup;
10
12
  setSearchBoxOptions({ options }: {
11
13
  options: SearchBoxOptions;
12
14
  }): void;
13
15
  setSearchResultOptions({ options }: {
14
16
  options: SearchResultsOptions;
15
17
  }): void;
18
+ setInitialFilters({ initialFilters }: {
19
+ initialFilters: FilterGroup;
20
+ }): void;
16
21
  }
@@ -25,25 +25,27 @@ export default class ParamsModule extends VuexModule {
25
25
  params: QueryParams;
26
26
  searchString: string;
27
27
  };
28
- removeParams({ paramsToRemove }: {
28
+ removeParams({ paramsToRemove, save, }: {
29
29
  paramsToRemove?: "all" | string[];
30
+ save: boolean;
30
31
  }): {
31
- params: QueryParams;
32
- searchString: string;
32
+ params?: QueryParams;
33
+ searchString?: string;
33
34
  };
34
35
  goToResults({ searchText, facet, }: {
35
36
  searchText: string;
36
37
  facet?: InputSuggestionFacet;
37
38
  }): void;
38
- appendParams({ params, paramsToRemove, encode, }: {
39
+ appendParams({ params, paramsToRemove, encode, save, }: {
39
40
  params: {
40
41
  name: string;
41
42
  value: string;
42
43
  }[];
43
44
  paramsToRemove?: "all" | string[];
44
45
  encode?: boolean;
46
+ save?: boolean;
45
47
  }): {
46
- params: QueryParams;
48
+ params?: QueryParams;
47
49
  searchString?: string;
48
50
  };
49
51
  setDefaultLimit(defaultLimit: number): {
@@ -1,8 +1,9 @@
1
1
  import { SearchBoxOptions } from "@/types/search-box/SearchBoxOptions";
2
- import { Options, PublicQuery, SearchQueryResult, Suggestion } from "@getlupa/client-sdk/Types";
2
+ import { PublicQuery, SearchQueryResult, Suggestion } from "@getlupa/client-sdk/Types";
3
3
  import { VuexModule } from "vuex-module-decorators";
4
4
  import { DisplaySuggestion, HighlightedDocInfo } from "@/types/search-box/Common";
5
5
  import { SearchBoxPanel } from "@/types/search-box/SearchBoxPanel";
6
+ import { SdkOptions } from "@/types/General";
6
7
  export default class SearchBoxModule extends VuexModule {
7
8
  options: SearchBoxOptions;
8
9
  docResults: Record<string, SearchQueryResult>;
@@ -43,7 +44,7 @@ export default class SearchBoxModule extends VuexModule {
43
44
  querySuggestions({ queryKey, publicQuery, options, }: {
44
45
  queryKey: string;
45
46
  publicQuery: PublicQuery;
46
- options?: Options | undefined;
47
+ options?: SdkOptions;
47
48
  }): Promise<{
48
49
  queryKey: string;
49
50
  suggestions?: Suggestion[];
@@ -52,7 +53,7 @@ export default class SearchBoxModule extends VuexModule {
52
53
  queryDocuments({ queryKey, publicQuery, options, }: {
53
54
  queryKey: string;
54
55
  publicQuery: PublicQuery;
55
- options?: Options | undefined;
56
+ options?: SdkOptions;
56
57
  }): Promise<{
57
58
  queryKey: string;
58
59
  result?: SearchQueryResult;
@@ -1,3 +1,4 @@
1
+ import { LabeledFilter } from "@/types/search-results/Filters";
1
2
  import { ResultsLayout } from "@/types/search-results/ResultsLayout";
2
3
  import { ProductGrid } from "@/types/search-results/SearchResultsOptions";
3
4
  import { FacetResult, FilterGroup, SearchQueryResult } from "@getlupa/client-sdk/Types";
@@ -15,6 +16,9 @@ export default class SearchResultModule extends VuexModule {
15
16
  get currentQueryText(): string;
16
17
  get totalItems(): number;
17
18
  get hasResults(): boolean;
19
+ get labeledFilters(): LabeledFilter[];
20
+ get displayFilters(): LabeledFilter[];
21
+ get currentFilterCount(): number;
18
22
  get hasAnyFilter(): boolean;
19
23
  get itemRange(): number[];
20
24
  setSidebarVisibility({ visible }: {
@@ -2,6 +2,10 @@ import { Environment } from "@getlupa/client-sdk/Types";
2
2
  import { AnalyticsOptions } from "./AnalyticsOptions";
3
3
  export declare type SdkOptions = {
4
4
  environment: Environment;
5
+ customUrl?: string;
6
+ customPayload?: Record<string, unknown>;
7
+ customHeaders?: Record<string, string>;
8
+ onError?: (err: unknown) => unknown;
5
9
  };
6
10
  export declare type TrackingOptions = {
7
11
  trackBase?: boolean;
@@ -0,0 +1,28 @@
1
+ import { FilterGroup } from "@getlupa/client-sdk/Types";
2
+ import { SearchResultsOptions } from "../search-results/SearchResultsOptions";
3
+ export declare type CategoryFilterOptions = {
4
+ queryKey: string;
5
+ routingBehavior?: RoutingBehavior;
6
+ keys: {
7
+ titleKey?: string;
8
+ urlKey?: string;
9
+ };
10
+ filters?: Record<string, string[]>;
11
+ back?: {
12
+ url: string;
13
+ title: string;
14
+ };
15
+ parent?: {
16
+ url: string;
17
+ title: string;
18
+ };
19
+ current?: {
20
+ title: string;
21
+ description: string;
22
+ };
23
+ };
24
+ export declare type RoutingBehavior = "direct-link" | "event";
25
+ export declare type ProductListOptions = SearchResultsOptions & {
26
+ initialFilters?: FilterGroup;
27
+ categories?: CategoryFilterOptions;
28
+ };
@@ -10,6 +10,7 @@ export declare type SearchBoxOptionLabels = {
10
10
  noResults: string;
11
11
  moreResults: string;
12
12
  currency: string;
13
+ priceSeparator?: string;
13
14
  defaultFacetLabel?: string;
14
15
  };
15
16
  export declare type SearchBoxOptionLinks = {
@@ -1,4 +1,5 @@
1
1
  import { SdkOptions } from "../General";
2
+ import { CategoryFilterOptions } from "../product-list/ProductListOptions";
2
3
  import { SearchResultsAdditionalPanelOptions } from "./SearchResultsAdditionalPanelOptions";
3
4
  import { SearchResultsProductCardOptions } from "./SearchResultsProductCardOptions";
4
5
  import { SearchResultsSortOptions } from "./SearchResultsSort";
@@ -6,7 +7,10 @@ export declare type SearchResultsOptions = SearchResultsProductOptions & SearchR
6
7
  containerSelector: string;
7
8
  breadcrumbs: SearchResultsBreadcrumb[];
8
9
  classMap?: Record<string, string>;
10
+ searchTitlePosition?: string;
11
+ noResultsQueryFlag?: string;
9
12
  };
13
+ export declare type SearchTitlePosition = "page-top" | "search-results-top";
10
14
  export declare type SearchResultsDidYouMeanLabels = {
11
15
  noResultsSuggestion: string;
12
16
  didYouMean: string;
@@ -18,6 +22,8 @@ export declare type SearchResultsSimilarQueriesLabels = {
18
22
  export declare type SearchResultsOptionLabels = SearchResultsPaginationLabels & SearchResultsDidYouMeanLabels & SearchResultsSimilarQueriesLabels & {
19
23
  sortBy: string;
20
24
  currency: string;
25
+ priceSeparator?: string;
26
+ searchResults?: string;
21
27
  itemCount: string;
22
28
  emptyResults: string;
23
29
  mobileFilterButton: string;
@@ -37,6 +43,7 @@ export declare type SearchResultsProductOptions = SearchResultsProductCardOption
37
43
  layoutSelector?: boolean;
38
44
  itemSummary?: boolean;
39
45
  clearFilters?: boolean;
46
+ totalCount?: boolean;
40
47
  };
41
48
  };
42
49
  export declare type ProductGrid = {
@@ -75,12 +82,17 @@ export declare type ResultCurrentFilterOptions = {
75
82
  mobileSidebar: boolean;
76
83
  mobileToolbar: boolean;
77
84
  };
85
+ mobileSidebar?: {
86
+ showFilterCount?: boolean;
87
+ activeFiltersExpanded?: boolean;
88
+ };
78
89
  };
79
90
  export declare type FacetStyle = "sidebar" | "top-dropdown";
80
91
  export declare type ResultFacetOptions = {
81
92
  labels: {
82
93
  title: string;
83
94
  showAll: string;
95
+ showLess?: string;
84
96
  facetFilter: string;
85
97
  facetClear?: string;
86
98
  };
@@ -93,15 +105,25 @@ export declare type ResultFacetOptions = {
93
105
  topLevelValueCountLimit?: number;
94
106
  filterable?: boolean;
95
107
  };
108
+ stats?: {
109
+ slider?: boolean;
110
+ inputs?: boolean;
111
+ labels?: {
112
+ from?: string;
113
+ to?: string;
114
+ };
115
+ };
96
116
  facetValueCountLimit?: number;
97
117
  showDocumentCount?: boolean;
98
118
  style?: {
99
119
  type: FacetStyle;
100
120
  };
121
+ exclude?: string[];
101
122
  };
102
123
  export declare type SearchResultsFilterOptions = {
103
124
  currentFilters?: ResultCurrentFilterOptions;
104
125
  facets?: ResultFacetOptions;
126
+ categories?: CategoryFilterOptions;
105
127
  };
106
128
  export declare type SearchResultsBreadcrumb = {
107
129
  label: string;
@@ -16,7 +16,7 @@ export declare const getFacetParam: (key: string, value: string[] | string, type
16
16
  };
17
17
  export declare const toggleTermFilter: (appendParams: AppendParams, facetAction: TermFacetAction, currentFilters?: FilterGroup | undefined) => void;
18
18
  export declare const toggleHierarchyFilter: (appendParams: AppendParams, facetAction: HierarchyFacetAction, currentFilters?: FilterGroup | undefined, removeAllLevels?: boolean) => void;
19
- export declare const toggleRangeFilter: (appendParams: AppendParams, facetAction: RangeFacetAction) => void;
19
+ export declare const toggleRangeFilter: (appendParams: AppendParams, facetAction: RangeFacetAction, currentFilters?: FilterGroup | undefined) => void;
20
20
  export declare const toggleTermParam: (params?: string[], param?: string) => string[];
21
21
  export declare const toggleLastPram: (params?: string[], param?: string) => string[];
22
22
  export declare const toggleHierarchyParam: (params?: string[], param?: string, removeAllLevels?: boolean) => string[];
@@ -8,3 +8,4 @@ export declare const isArrayKey: (key: string) => boolean;
8
8
  export declare const getMostSpecificHierarchyTerms: (terms: string[]) => string[];
9
9
  export declare const recursiveFilter: (items: HierarchyTree[], query?: string) => HierarchyTree[];
10
10
  export declare const recursiveFilterItem: (item: HierarchyTree, query?: string) => HierarchyTree | undefined;
11
+ export declare const rangeFilterToString: (rangeFilter: FilterGroupItemTypeRange, separator?: string | undefined) => string;
@@ -1,2 +1,2 @@
1
- export declare const formatPrice: (price?: string | number | undefined, currency?: string) => string;
2
- export declare const formatPriceSummary: ([min, max]: [min?: string | number | undefined, max?: string | number | undefined], currency?: string | undefined) => string;
1
+ export declare const formatPrice: (price?: string | number | undefined, currency?: string, separator?: string) => string;
2
+ export declare const formatPriceSummary: ([min, max]: [min?: string | number | undefined, max?: string | number | undefined], currency?: string | undefined, separator?: string) => string;
@@ -1,4 +1,5 @@
1
1
  import { QueryParams } from "@/types/search-results/QueryParams";
2
2
  import { SearchResultsSortOptions } from "@/types/search-results/SearchResultsSort";
3
- import { PublicQuery } from "@getlupa/client-sdk/Types";
3
+ import { FilterGroup, PublicQuery } from "@getlupa/client-sdk/Types";
4
4
  export declare const createPublicQuery: (queryParams: QueryParams, sortOptions?: SearchResultsSortOptions[] | undefined) => PublicQuery;
5
+ export declare const getPublicQuery: (publicQuery: PublicQuery, initialFilters: FilterGroup, isProductList: boolean) => PublicQuery;
@@ -0,0 +1 @@
1
+ export declare const emitRoutingEvent: (url: string) => void;
@@ -2,4 +2,8 @@ import { TrackingOptions } from "@/types/General";
2
2
  import { TrackableEventData } from "@/types/search-box/Common";
3
3
  import { Options } from "@getlupa/client-sdk/Types";
4
4
  export declare const initTracking: (options: TrackingOptions) => void;
5
+ export declare const getLupaTrackingContext: () => {
6
+ userId?: string;
7
+ sessionId?: string;
8
+ };
5
9
  export declare const track: (queryKey?: string | undefined, data?: TrackableEventData, options?: Options | undefined) => void;
@@ -0,0 +1,5 @@
1
+ import Vue from "vue";
2
+ import { ProductListOptions } from "./types/product-list/ProductListOptions";
3
+ export default class ProductListEntry extends Vue {
4
+ productListOptions: ProductListOptions;
5
+ }
@@ -0,0 +1,8 @@
1
+ import Vue from "vue";
2
+ import { ProductListOptions } from "@/types/product-list/ProductListOptions";
3
+ export default class CategoryDescription extends Vue {
4
+ options: ProductListOptions;
5
+ get title(): string | undefined;
6
+ get description(): string | undefined;
7
+ get overviewVisible(): boolean;
8
+ }
@@ -0,0 +1,20 @@
1
+ import Vue from "vue";
2
+ import { Options } from "@getlupa/client-sdk/Types";
3
+ import { CategoryFilterOptions } from "@/types/product-list/ProductListOptions";
4
+ export default class CategoryFilter extends Vue {
5
+ options: CategoryFilterOptions;
6
+ categoryChildren: Record<string, string>[];
7
+ envOptions: Options;
8
+ get hasBackButton(): boolean;
9
+ get hasDirectRouting(): boolean;
10
+ get backTitle(): string | undefined;
11
+ get backUrl(): string | undefined;
12
+ get backUrlLink(): string | undefined;
13
+ get parentTitle(): string | undefined;
14
+ get parentUrl(): string | undefined;
15
+ get parentUrlLink(): string | undefined;
16
+ get isActive(): boolean;
17
+ mounted(): Promise<void>;
18
+ getCategoryKey(item: Record<string, string>): string;
19
+ handleNavigation(url: string): void;
20
+ }
@@ -0,0 +1,12 @@
1
+ import Vue from "vue";
2
+ import { CategoryFilterOptions } from "@/types/product-list/ProductListOptions";
3
+ export default class CategoryFilterItem extends Vue {
4
+ options: CategoryFilterOptions;
5
+ item: Record<string, string>;
6
+ get title(): string;
7
+ get urlLink(): string;
8
+ get url(): string | undefined;
9
+ get isActive(): boolean;
10
+ get hasDirectRouting(): boolean;
11
+ handleNavigation(): void;
12
+ }
@@ -0,0 +1,6 @@
1
+ import Vue from "vue";
2
+ import { ProductListOptions } from "@/types/product-list/ProductListOptions";
3
+ export default class ProductList extends Vue {
4
+ options: ProductListOptions;
5
+ get componentOptions(): ProductListOptions;
6
+ }
@@ -1,13 +1,16 @@
1
1
  import { QueryParams } from "@/types/search-results/QueryParams";
2
2
  import { ProductGrid, SearchResultsDidYouMeanLabels, SearchResultsOptions, SearchResultsProductOptions } from "@/types/search-results/SearchResultsOptions";
3
- import { PublicQuery, SearchQueryResult } from "@getlupa/client-sdk/Types";
3
+ import { FilterGroup, PublicQuery, SearchQueryResult } from "@getlupa/client-sdk/Types";
4
4
  import Vue from "vue";
5
5
  export default class SearchResults extends Vue {
6
6
  options: SearchResultsOptions;
7
+ initialFilters: FilterGroup;
8
+ isProductList: boolean;
7
9
  get productsOptions(): SearchResultsProductOptions;
10
+ currentQueryText: string;
8
11
  get didYouMeanLabels(): SearchResultsDidYouMeanLabels;
9
- get queryText(): string;
10
12
  get showFilterSidebar(): boolean;
13
+ get isTitleResultTopPosition(): boolean;
11
14
  trackSearch: ({ queryKey, query, }: {
12
15
  queryKey: string;
13
16
  query: PublicQuery;
@@ -16,8 +19,6 @@ export default class SearchResults extends Vue {
16
19
  queryKey: string;
17
20
  results: SearchQueryResult;
18
21
  }) => void;
19
- currentQueryText: string;
20
- suggestedSearchText: string;
21
22
  searchString: string;
22
23
  setDefaultLimit: (defaultLimit: number) => {
23
24
  defaultLimit: number;
@@ -25,9 +26,23 @@ export default class SearchResults extends Vue {
25
26
  addParams: (params: QueryParams) => {
26
27
  params: QueryParams;
27
28
  };
29
+ removeParams: ({ paramsToRemove, save, }: {
30
+ paramsToRemove: string[];
31
+ save: boolean;
32
+ }) => void;
33
+ appendParams: ({ params, save, }: {
34
+ params: {
35
+ name: string;
36
+ value: string;
37
+ }[];
38
+ save: boolean;
39
+ }) => void;
28
40
  setSearchResultOptions: ({ options, }: {
29
41
  options: SearchResultsOptions;
30
42
  }) => void;
43
+ setInitialFilters: ({ initialFilters, }: {
44
+ initialFilters: FilterGroup;
45
+ }) => void;
31
46
  mounted(): void;
32
47
  beforeDestroy(): void;
33
48
  handleMounted(): void;
@@ -38,6 +53,10 @@ export default class SearchResults extends Vue {
38
53
  };
39
54
  handleUrlChange(params?: URLSearchParams): void;
40
55
  query(publicQuery: PublicQuery): void;
56
+ handleResults({ queryKey, results, }: {
57
+ queryKey: string;
58
+ results: SearchQueryResult;
59
+ }): void;
41
60
  setColumnCount: ({ width, grid, }: {
42
61
  width: number;
43
62
  grid: ProductGrid;
@@ -0,0 +1,13 @@
1
+ import { SearchResultsOptions } from "@/types/search-results/SearchResultsOptions";
2
+ import Vue from "vue";
3
+ export default class SearchResultsTitle extends Vue {
4
+ options: SearchResultsOptions;
5
+ isProductList: boolean;
6
+ currentQueryText: string;
7
+ totalItems: number;
8
+ suggestedSearchText: string;
9
+ get queryText(): string;
10
+ get showProductCount(): boolean;
11
+ get showSearchTitle(): boolean;
12
+ getLabel(label: string): string;
13
+ }
@@ -9,9 +9,10 @@ export default class CurrentFilters extends Vue {
9
9
  isOpen: boolean;
10
10
  currentFilters: FilterGroup;
11
11
  facets: FacetResult[] | undefined;
12
- get labeledFilters(): LabeledFilter[];
12
+ displayFilters: LabeledFilter[];
13
+ currentFilterCount: number;
14
+ initialFilters: FilterGroup;
13
15
  get hasFilters(): boolean;
14
- get filterCount(): number;
15
16
  removeParams: ({ paramsToRemove, }: {
16
17
  paramsToRemove?: string[];
17
18
  }) => {
@@ -6,5 +6,9 @@ export default class MobileFilterSidebar extends Vue {
6
6
  visible: boolean;
7
7
  }) => void;
8
8
  isMobileSidebarVisible: boolean;
9
+ currentFilterCount: number;
10
+ get sidebarTitle(): string;
11
+ get isFilterCountVisible(): boolean;
12
+ get isActiveFiltersExpanded(): boolean;
9
13
  handleMobileToggle(): void;
10
14
  }
@@ -8,6 +8,7 @@ export default class FacetList extends Vue {
8
8
  currentFilters: FilterGroup;
9
9
  facetStyle: FacetStyle;
10
10
  clearable: boolean;
11
+ get displayFacets(): FacetResult[];
11
12
  handleFacetSelect(facetAction: FacetAction): void;
12
13
  clear(facet: FacetResult): void;
13
14
  }
@@ -1,11 +1,21 @@
1
1
  import Vue from "vue";
2
2
  import { FacetGroupTypeStats, FilterGroupItemTypeRange } from "@getlupa/client-sdk/Types";
3
- import { ResultFacetOptions } from "@/types/search-results/SearchResultsOptions";
3
+ import { ResultFacetOptions, SearchResultsOptions } from "@/types/search-results/SearchResultsOptions";
4
4
  export default class TermFacet extends Vue {
5
5
  options: ResultFacetOptions;
6
6
  facet: FacetGroupTypeStats;
7
7
  currentFilters: FilterGroupItemTypeRange;
8
8
  innerSliderRange: number[];
9
+ searchResultOptions: SearchResultsOptions;
10
+ get rangeLabelFrom(): string;
11
+ get rangeLabelTo(): string;
12
+ get currency(): string;
13
+ get isSliderVisible(): boolean;
14
+ get isInputVisible(): boolean;
15
+ get fromValue(): string;
16
+ set fromValue(stringValue: string);
17
+ get toValue(): string;
18
+ set toValue(stringValue: string);
9
19
  get currentGte(): number | undefined;
10
20
  get currentLte(): number | undefined;
11
21
  get currentMinValue(): number;
@@ -18,6 +28,7 @@ export default class TermFacet extends Vue {
18
28
  get statsSummary(): string;
19
29
  onMinValueChange(): void;
20
30
  onMaxValueChange(): void;
31
+ handleInputChange(): void;
21
32
  handleChange(): void;
22
33
  handleDragging(value: number[]): void;
23
34
  }
@@ -1,10 +1,10 @@
1
1
  import Vue from "vue";
2
- import { FacetGroup, FacetGroupItem, FilterGroupItemTypeTerms } from "@getlupa/client-sdk/Types";
2
+ import { FacetGroup, FacetGroupItem, FilterGroupItemTypeRange, FilterGroupItemTypeTerms } from "@getlupa/client-sdk/Types";
3
3
  import { ResultFacetOptions } from "@/types/search-results/SearchResultsOptions";
4
4
  export default class TermFacet extends Vue {
5
5
  options: ResultFacetOptions;
6
6
  facet: FacetGroup;
7
- currentFilters: FilterGroupItemTypeTerms;
7
+ currentFilters: FilterGroupItemTypeTerms | FilterGroupItemTypeRange[];
8
8
  showAll: boolean;
9
9
  termFilter: string;
10
10
  get itemLimit(): number;
@@ -12,7 +12,9 @@ export default class TermFacet extends Vue {
12
12
  get displayValues(): FacetGroupItem[];
13
13
  get filteredValues(): FacetGroupItem[];
14
14
  get isFilterable(): boolean;
15
+ get isRange(): boolean;
16
+ get displayShowMore(): boolean;
15
17
  handleFacetClick(item: FacetGroupItem): void;
16
- handleShowAll(): void;
18
+ toggleShowAll(): void;
17
19
  isChecked(item: FacetGroupItem): boolean;
18
20
  }
@@ -1,6 +1,8 @@
1
1
  import Vue from "vue";
2
2
  export default class SearchResultsMobileToggle extends Vue {
3
3
  label: string;
4
+ showFilterCount: boolean;
5
+ currentFilterCount: number;
4
6
  setSidebarVisibility: ({ visible, }: {
5
7
  visible: boolean;
6
8
  }) => void;
@@ -14,6 +14,7 @@ export default class SearchResultsToolbar extends Vue {
14
14
  hasAnyFilter: boolean;
15
15
  get displayPageSelect(): boolean;
16
16
  get searchSummaryLabel(): string;
17
+ get showMobileFilterCount(): boolean;
17
18
  removeAllFilters: () => {
18
19
  params: QueryParams;
19
20
  };
@@ -13,11 +13,13 @@ export declare const SEARCH_BOX_CONFIGURATION: {
13
13
  noResults: string;
14
14
  moreResults: string;
15
15
  currency: string;
16
+ priceSeparator: string;
16
17
  defaultFacetLabel: string;
17
18
  };
18
19
  links: {
19
20
  searchResults: string;
20
21
  };
22
+ searchTitlePosition: string;
21
23
  panels: SearchBoxPanel[];
22
24
  history: {
23
25
  labels: {
@@ -0,0 +1,28 @@
1
+ export declare const PRODUCT_LIST_CONFIGURATION: {
2
+ initialFilters: {
3
+ category: string[];
4
+ };
5
+ categories: {
6
+ queryKey: string;
7
+ routingBehavior: string;
8
+ keys: {
9
+ titleKey: string;
10
+ urlKey: string;
11
+ };
12
+ filters: {
13
+ category: string[];
14
+ };
15
+ back: {
16
+ title: string;
17
+ url: string;
18
+ };
19
+ parent: {
20
+ title: string;
21
+ url: string;
22
+ };
23
+ current: {
24
+ title: string;
25
+ description: string;
26
+ };
27
+ };
28
+ };
@@ -10,6 +10,7 @@ export declare const SEARCH_RESULTS_CONFIGURATION: {
10
10
  sortBy: string;
11
11
  itemCount: string;
12
12
  currency: string;
13
+ priceSeparator: string;
13
14
  showMore: string;
14
15
  emptyResults: string;
15
16
  mobileFilterButton: string;
@@ -19,6 +20,9 @@ export declare const SEARCH_RESULTS_CONFIGURATION: {
19
20
  similarQuery: string;
20
21
  similarQueries: string;
21
22
  };
23
+ toolbar: {
24
+ totalCount: boolean;
25
+ };
22
26
  grid: {
23
27
  columns: {
24
28
  xl: number;
@@ -55,11 +59,16 @@ export declare const SEARCH_RESULTS_CONFIGURATION: {
55
59
  title: string;
56
60
  clearAll: string;
57
61
  };
62
+ mobileSidebar: {
63
+ showFilterCount: boolean;
64
+ activeFiltersExpanded: boolean;
65
+ };
58
66
  };
59
67
  facets: {
60
68
  labels: {
61
69
  title: string;
62
70
  showAll: string;
71
+ showLess: string;
63
72
  facetFilter: string;
64
73
  };
65
74
  hierarchy: {
@@ -67,6 +76,14 @@ export declare const SEARCH_RESULTS_CONFIGURATION: {
67
76
  topLevelValueCountLimit: number;
68
77
  filterable: boolean;
69
78
  };
79
+ stats: {
80
+ slider: boolean;
81
+ inputs: boolean;
82
+ labels: {
83
+ from: string;
84
+ to: string;
85
+ };
86
+ };
70
87
  filterable: {
71
88
  minValues: number;
72
89
  };
@@ -11,3 +11,4 @@ export declare const XL_MIN_WIDTH = 1199;
11
11
  export declare const MAX_FACET_VALUES = 1000;
12
12
  export declare const CURRENCY_KEY_INDICATOR = "price";
13
13
  export declare const DEFAULT_PAGE_SIZE = 12;
14
+ export declare const LUPA_ROUTING_EVENT = "lupaRedirect";
@@ -23,3 +23,4 @@ export declare const FACET_FILTER_MAP: {
23
23
  export declare const FACET_KEY_SEPARATOR = ".";
24
24
  export declare const FACET_RANGE_SEPARATOR = ":";
25
25
  export declare const HIERARCHY_SEPARATOR = ">";
26
+ export declare const FACET_TERM_RANGE_SEPARATOR = "-";
@@ -6,6 +6,7 @@ export declare const DEFAULT_OPTIONS_RESULTS: {
6
6
  };
7
7
  queryKey: string;
8
8
  containerSelector: string;
9
+ searchTitlePosition: string;
9
10
  labels: {
10
11
  pageSize: string;
11
12
  sortBy: string;