@getlupa/client 0.6.0-alpha-22 → 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.
@@ -21,6 +21,7 @@ export declare const SEARCH_RESULTS_CONFIGURATION: {
21
21
  didYouMean: string;
22
22
  similarQuery: string;
23
23
  similarQueries: string;
24
+ aiSuggestions: string;
24
25
  };
25
26
  toolbar: {
26
27
  totalCount: boolean;
@@ -1,12 +1,12 @@
1
1
  import { SearchBoxOptions } from "./types/search-box/SearchBoxOptions";
2
- import { CallbackContext, FacetFilterQuery, FacetStyle, SearchResultEventCallbacks, 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
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
10
  import { SearchResultsSortOptions, SortOptions } from "./types/search-results/SearchResultsSort";
11
11
  declare const lupaSearch: {
12
12
  searchBox: (options: SearchBoxOptions) => void;
@@ -17,5 +17,5 @@ declare const lupaSearch: {
17
17
  clearSearchResults: () => void;
18
18
  clearProductList: () => void;
19
19
  };
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, };
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, };
21
21
  export default lupaSearch;
@@ -16324,35 +16324,47 @@ var __vue_render__$C = function () {
16324
16324
  var _c = _vm._self._c || _h;
16325
16325
  return _vm.isMobileSidebarVisible
16326
16326
  ? _c("div", { staticClass: "lupa-mobile-filter-sidebar" }, [
16327
- _c("div", { staticClass: "lupa-sidebar-top" }, [
16328
- _c("div", { staticClass: "lupa-sidebar-title" }, [
16329
- _vm._v("\n " + _vm._s(_vm.sidebarTitle) + "\n "),
16330
- _vm.isFilterCountVisible
16331
- ? _c("span", { staticClass: "lupa-sidebar-filter-count" }, [
16332
- _vm._v(_vm._s(_vm.currentFilterCount)),
16333
- ])
16334
- : _vm._e(),
16327
+ _c("div", {
16328
+ staticClass: "lupa-sidebar-close",
16329
+ on: {
16330
+ click: function ($event) {
16331
+ $event.stopPropagation();
16332
+ return _vm.handleMobileToggle.apply(null, arguments)
16333
+ },
16334
+ },
16335
+ }),
16336
+ _vm._v(" "),
16337
+ _c("div", { staticClass: "lupa-mobile-sidebar-content" }, [
16338
+ _c("div", { staticClass: "lupa-sidebar-top" }, [
16339
+ _c("div", { staticClass: "lupa-sidebar-title" }, [
16340
+ _vm._v("\n " + _vm._s(_vm.sidebarTitle) + "\n "),
16341
+ _vm.isFilterCountVisible
16342
+ ? _c("span", { staticClass: "lupa-sidebar-filter-count" }, [
16343
+ _vm._v(_vm._s(_vm.currentFilterCount)),
16344
+ ])
16345
+ : _vm._e(),
16346
+ ]),
16347
+ _vm._v(" "),
16348
+ _c("div", {
16349
+ staticClass: "lupa-filter-toggle-mobile",
16350
+ on: { click: _vm.handleMobileToggle },
16351
+ }),
16335
16352
  ]),
16336
16353
  _vm._v(" "),
16337
- _c("div", {
16338
- staticClass: "lupa-filter-toggle-mobile",
16339
- on: { click: _vm.handleMobileToggle },
16340
- }),
16354
+ _c(
16355
+ "div",
16356
+ { staticClass: "lupa-sidebar-filter-options" },
16357
+ [
16358
+ _c("SearchResultsFilters", {
16359
+ attrs: {
16360
+ options: _vm.options,
16361
+ expandable: _vm.isActiveFiltersExpanded,
16362
+ },
16363
+ }),
16364
+ ],
16365
+ 1
16366
+ ),
16341
16367
  ]),
16342
- _vm._v(" "),
16343
- _c(
16344
- "div",
16345
- { staticClass: "lupa-sidebar-filter-options" },
16346
- [
16347
- _c("SearchResultsFilters", {
16348
- attrs: {
16349
- options: _vm.options,
16350
- expandable: _vm.isActiveFiltersExpanded,
16351
- },
16352
- }),
16353
- ],
16354
- 1
16355
- ),
16356
16368
  ])
16357
16369
  : _vm._e()
16358
16370
  };
@@ -16537,10 +16549,12 @@ exports.BadgeType = void 0;
16537
16549
 
16538
16550
  let CustomBadge = class CustomBadge extends Vue$1 {
16539
16551
  get text() {
16540
- return this.badge.html(this.badge.product);
16552
+ var _a;
16553
+ return this.badge.html((_a = this.badge.product) !== null && _a !== void 0 ? _a : {});
16541
16554
  }
16542
16555
  get className() {
16543
- return this.badge.className;
16556
+ var _a;
16557
+ return (_a = this.badge.className) !== null && _a !== void 0 ? _a : "";
16544
16558
  }
16545
16559
  };
16546
16560
  __decorate([
@@ -16756,9 +16770,10 @@ let SearchResultsBadgeWrapper = class SearchResultsBadgeWrapper extends Vue$1 {
16756
16770
  return [];
16757
16771
  }
16758
16772
  return this.options.elements
16759
- .filter((e) => !e.display || e.display(this.options.product))
16773
+ .filter((e) => { var _a; return !e.display || e.display((_a = this.options.product) !== null && _a !== void 0 ? _a : {}); })
16760
16774
  .map((x) => {
16761
- return Object.assign(Object.assign({}, x), { value: this.options.product[x.key] || "badge", product: this.options.product });
16775
+ var _a;
16776
+ return Object.assign(Object.assign({}, x), { value: ((_a = this.options.product) === null || _a === void 0 ? void 0 : _a[x.key]) || "badge", product: this.options.product });
16762
16777
  });
16763
16778
  }
16764
16779
  getBadgeComponent(type) {
@@ -19631,34 +19646,54 @@ var __vue_render__$a = function () {
19631
19646
  staticClass: "lupa-similar-query-label",
19632
19647
  attrs: { "data-cy": "lupa-similar-query-label" },
19633
19648
  },
19634
- _vm._l(_vm.labels.similarQuery.split(" "), function (label, index) {
19635
- return _c("span", { key: index }, [
19636
- label.includes("{1}")
19637
- ? _c(
19638
- "span",
19639
- {
19640
- staticClass:
19641
- "lupa-similar-query-value lupa-similar-query-link",
19642
- attrs: { "data-cy": "lupa-similar-query-value" },
19643
- on: {
19644
- click: function ($event) {
19645
- return _vm.goToResults({
19646
- searchText: similarQuery.query,
19647
- })
19648
- },
19649
- },
19650
- },
19651
- [
19652
- _c("SimilarQueryText", {
19653
- attrs: { label: label, similarQuery: similarQuery },
19654
- }),
19655
- ],
19656
- 1
19657
- )
19658
- : _c("span", [_vm._v(_vm._s(label) + " ")]),
19659
- ])
19660
- }),
19661
- 0
19649
+ [
19650
+ !similarQuery.aiSuggestions
19651
+ ? _vm._l(
19652
+ _vm.labels.similarQuery.split(" "),
19653
+ function (label, index) {
19654
+ return _c("span", { key: index }, [
19655
+ label.includes("{1}")
19656
+ ? _c(
19657
+ "span",
19658
+ {
19659
+ staticClass:
19660
+ "lupa-similar-query-value lupa-similar-query-link",
19661
+ attrs: {
19662
+ "data-cy": "lupa-similar-query-value",
19663
+ },
19664
+ on: {
19665
+ click: function ($event) {
19666
+ return _vm.goToResults({
19667
+ searchText: similarQuery.query,
19668
+ })
19669
+ },
19670
+ },
19671
+ },
19672
+ [
19673
+ _c("SimilarQueryText", {
19674
+ attrs: {
19675
+ label: label,
19676
+ similarQuery: similarQuery,
19677
+ },
19678
+ }),
19679
+ ],
19680
+ 1
19681
+ )
19682
+ : _c("span", [_vm._v(_vm._s(label) + " ")]),
19683
+ ])
19684
+ }
19685
+ )
19686
+ : [
19687
+ _c("span", [
19688
+ _c("span", { staticClass: "lupa-similar-query-value" }, [
19689
+ _vm._v(
19690
+ _vm._s(_vm.labels.aiSuggestions) + "\n "
19691
+ ),
19692
+ ]),
19693
+ ]),
19694
+ ],
19695
+ ],
19696
+ 2
19662
19697
  ),
19663
19698
  _vm._v(" "),
19664
19699
  _c(
@@ -19806,7 +19841,7 @@ let SearchResultsProducts = class SearchResultsProducts extends Vue$1 {
19806
19841
  ]);
19807
19842
  }
19808
19843
  get similarQueriesLabels() {
19809
- return pick(this.options.labels, ["similarQuery", "similarQueries"]);
19844
+ return this.options.labels;
19810
19845
  }
19811
19846
  get showTopFilters() {
19812
19847
  var _a, _b, _c;
@@ -13,7 +13,7 @@ export declare enum DocumentElementType {
13
13
  export declare type DocumentElementBase = {
14
14
  type: DocumentElementType;
15
15
  key?: string;
16
- display?: (document: Record<string, unknown>) => boolean;
16
+ display?: <T>(document: T) => boolean;
17
17
  isHtml?: boolean;
18
18
  };
19
19
  export declare type ImageDocumentElement = DocumentElementBase & {
@@ -32,6 +32,7 @@ export declare type DescriptionDocumentElement = DocumentElementBase & {
32
32
  type: DocumentElementType.DESCRIPTION;
33
33
  maxLines: number;
34
34
  key: string;
35
+ className: string;
35
36
  };
36
37
  export declare type CustomDocumentElement = DocumentElementBase & {
37
38
  type: DocumentElementType.CUSTOM;
@@ -14,12 +14,12 @@ export declare type CategoryFilterOptions = {
14
14
  title: string;
15
15
  };
16
16
  parent?: {
17
- url: string;
18
- title: string;
17
+ url?: string;
18
+ title?: string;
19
19
  };
20
20
  current?: {
21
- title: string;
22
- description: string;
21
+ title?: string;
22
+ description?: string;
23
23
  };
24
24
  };
25
25
  export declare type ProductListOptions = SearchResultsOptions & {
@@ -4,13 +4,14 @@ export declare type SearchResultBadgeType = "text" | "image" | "customHtml";
4
4
  export declare type BadgeOptions = {
5
5
  anchor: AnchorPosition;
6
6
  elements: BadgeElement[];
7
- product: Document;
7
+ product?: Document;
8
8
  };
9
9
  export declare type SearchResultBadgeElement = {
10
10
  type: SearchResultBadgeType;
11
11
  key: string;
12
- isHtml: boolean;
13
- product: Document;
12
+ isHtml?: boolean;
13
+ className?: boolean;
14
+ product?: Document;
14
15
  display?: (document: Record<string, unknown>) => boolean;
15
16
  };
16
17
  export declare type BaseBadgeElement = SearchResultBadgeElement & {
@@ -28,7 +29,7 @@ export declare type ImageBadgeElement = BaseBadgeElement & {
28
29
  };
29
30
  export declare type CustomHtmlBadgeElement = BaseBadgeElement & {
30
31
  type: "customHtml";
31
- className: string;
32
+ className?: string;
32
33
  html: (doc: Document) => string;
33
34
  };
34
35
  export declare type BadgeElement = BaseBadgeElement | TextBadgeElement;
@@ -18,6 +18,7 @@ export declare type SearchResultsDidYouMeanLabels = {
18
18
  export declare type SearchResultsSimilarQueriesLabels = {
19
19
  similarQuery: string;
20
20
  similarQueries: string;
21
+ aiSuggestions?: string;
21
22
  };
22
23
  export declare type CallbackContext = {
23
24
  queryKey: string;
@@ -72,6 +73,7 @@ export declare type ProductGrid = {
72
73
  export declare type SearchResultsPaginationLabels = {
73
74
  pageSize: string;
74
75
  showMore: string;
76
+ showLess?: string;
75
77
  };
76
78
  export declare type ResponsiveSearchResultPageSizes = {
77
79
  xs: number[];
@@ -21,6 +21,7 @@ export declare const SEARCH_RESULTS_CONFIGURATION: {
21
21
  didYouMean: string;
22
22
  similarQuery: string;
23
23
  similarQueries: string;
24
+ aiSuggestions: string;
24
25
  };
25
26
  toolbar: {
26
27
  totalCount: boolean;
@@ -1,12 +1,12 @@
1
1
  import { SearchBoxOptions } from "./types/search-box/SearchBoxOptions";
2
- import { CallbackContext, FacetFilterQuery, FacetStyle, SearchResultEventCallbacks, 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
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
10
  import { SearchResultsSortOptions, SortOptions } from "./types/search-results/SearchResultsSort";
11
11
  declare const lupaSearch: {
12
12
  searchBox: (options: SearchBoxOptions) => void;
@@ -17,5 +17,5 @@ declare const lupaSearch: {
17
17
  clearSearchResults: () => void;
18
18
  clearProductList: () => void;
19
19
  };
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, };
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, };
21
21
  export default lupaSearch;
@@ -16320,35 +16320,47 @@ var __vue_render__$C = function () {
16320
16320
  var _c = _vm._self._c || _h;
16321
16321
  return _vm.isMobileSidebarVisible
16322
16322
  ? _c("div", { staticClass: "lupa-mobile-filter-sidebar" }, [
16323
- _c("div", { staticClass: "lupa-sidebar-top" }, [
16324
- _c("div", { staticClass: "lupa-sidebar-title" }, [
16325
- _vm._v("\n " + _vm._s(_vm.sidebarTitle) + "\n "),
16326
- _vm.isFilterCountVisible
16327
- ? _c("span", { staticClass: "lupa-sidebar-filter-count" }, [
16328
- _vm._v(_vm._s(_vm.currentFilterCount)),
16329
- ])
16330
- : _vm._e(),
16323
+ _c("div", {
16324
+ staticClass: "lupa-sidebar-close",
16325
+ on: {
16326
+ click: function ($event) {
16327
+ $event.stopPropagation();
16328
+ return _vm.handleMobileToggle.apply(null, arguments)
16329
+ },
16330
+ },
16331
+ }),
16332
+ _vm._v(" "),
16333
+ _c("div", { staticClass: "lupa-mobile-sidebar-content" }, [
16334
+ _c("div", { staticClass: "lupa-sidebar-top" }, [
16335
+ _c("div", { staticClass: "lupa-sidebar-title" }, [
16336
+ _vm._v("\n " + _vm._s(_vm.sidebarTitle) + "\n "),
16337
+ _vm.isFilterCountVisible
16338
+ ? _c("span", { staticClass: "lupa-sidebar-filter-count" }, [
16339
+ _vm._v(_vm._s(_vm.currentFilterCount)),
16340
+ ])
16341
+ : _vm._e(),
16342
+ ]),
16343
+ _vm._v(" "),
16344
+ _c("div", {
16345
+ staticClass: "lupa-filter-toggle-mobile",
16346
+ on: { click: _vm.handleMobileToggle },
16347
+ }),
16331
16348
  ]),
16332
16349
  _vm._v(" "),
16333
- _c("div", {
16334
- staticClass: "lupa-filter-toggle-mobile",
16335
- on: { click: _vm.handleMobileToggle },
16336
- }),
16350
+ _c(
16351
+ "div",
16352
+ { staticClass: "lupa-sidebar-filter-options" },
16353
+ [
16354
+ _c("SearchResultsFilters", {
16355
+ attrs: {
16356
+ options: _vm.options,
16357
+ expandable: _vm.isActiveFiltersExpanded,
16358
+ },
16359
+ }),
16360
+ ],
16361
+ 1
16362
+ ),
16337
16363
  ]),
16338
- _vm._v(" "),
16339
- _c(
16340
- "div",
16341
- { staticClass: "lupa-sidebar-filter-options" },
16342
- [
16343
- _c("SearchResultsFilters", {
16344
- attrs: {
16345
- options: _vm.options,
16346
- expandable: _vm.isActiveFiltersExpanded,
16347
- },
16348
- }),
16349
- ],
16350
- 1
16351
- ),
16352
16364
  ])
16353
16365
  : _vm._e()
16354
16366
  };
@@ -16533,10 +16545,12 @@ var BadgeType;
16533
16545
 
16534
16546
  let CustomBadge = class CustomBadge extends Vue$1 {
16535
16547
  get text() {
16536
- return this.badge.html(this.badge.product);
16548
+ var _a;
16549
+ return this.badge.html((_a = this.badge.product) !== null && _a !== void 0 ? _a : {});
16537
16550
  }
16538
16551
  get className() {
16539
- return this.badge.className;
16552
+ var _a;
16553
+ return (_a = this.badge.className) !== null && _a !== void 0 ? _a : "";
16540
16554
  }
16541
16555
  };
16542
16556
  __decorate([
@@ -16752,9 +16766,10 @@ let SearchResultsBadgeWrapper = class SearchResultsBadgeWrapper extends Vue$1 {
16752
16766
  return [];
16753
16767
  }
16754
16768
  return this.options.elements
16755
- .filter((e) => !e.display || e.display(this.options.product))
16769
+ .filter((e) => { var _a; return !e.display || e.display((_a = this.options.product) !== null && _a !== void 0 ? _a : {}); })
16756
16770
  .map((x) => {
16757
- return Object.assign(Object.assign({}, x), { value: this.options.product[x.key] || "badge", product: this.options.product });
16771
+ var _a;
16772
+ return Object.assign(Object.assign({}, x), { value: ((_a = this.options.product) === null || _a === void 0 ? void 0 : _a[x.key]) || "badge", product: this.options.product });
16758
16773
  });
16759
16774
  }
16760
16775
  getBadgeComponent(type) {
@@ -19627,34 +19642,54 @@ var __vue_render__$a = function () {
19627
19642
  staticClass: "lupa-similar-query-label",
19628
19643
  attrs: { "data-cy": "lupa-similar-query-label" },
19629
19644
  },
19630
- _vm._l(_vm.labels.similarQuery.split(" "), function (label, index) {
19631
- return _c("span", { key: index }, [
19632
- label.includes("{1}")
19633
- ? _c(
19634
- "span",
19635
- {
19636
- staticClass:
19637
- "lupa-similar-query-value lupa-similar-query-link",
19638
- attrs: { "data-cy": "lupa-similar-query-value" },
19639
- on: {
19640
- click: function ($event) {
19641
- return _vm.goToResults({
19642
- searchText: similarQuery.query,
19643
- })
19644
- },
19645
- },
19646
- },
19647
- [
19648
- _c("SimilarQueryText", {
19649
- attrs: { label: label, similarQuery: similarQuery },
19650
- }),
19651
- ],
19652
- 1
19653
- )
19654
- : _c("span", [_vm._v(_vm._s(label) + " ")]),
19655
- ])
19656
- }),
19657
- 0
19645
+ [
19646
+ !similarQuery.aiSuggestions
19647
+ ? _vm._l(
19648
+ _vm.labels.similarQuery.split(" "),
19649
+ function (label, index) {
19650
+ return _c("span", { key: index }, [
19651
+ label.includes("{1}")
19652
+ ? _c(
19653
+ "span",
19654
+ {
19655
+ staticClass:
19656
+ "lupa-similar-query-value lupa-similar-query-link",
19657
+ attrs: {
19658
+ "data-cy": "lupa-similar-query-value",
19659
+ },
19660
+ on: {
19661
+ click: function ($event) {
19662
+ return _vm.goToResults({
19663
+ searchText: similarQuery.query,
19664
+ })
19665
+ },
19666
+ },
19667
+ },
19668
+ [
19669
+ _c("SimilarQueryText", {
19670
+ attrs: {
19671
+ label: label,
19672
+ similarQuery: similarQuery,
19673
+ },
19674
+ }),
19675
+ ],
19676
+ 1
19677
+ )
19678
+ : _c("span", [_vm._v(_vm._s(label) + " ")]),
19679
+ ])
19680
+ }
19681
+ )
19682
+ : [
19683
+ _c("span", [
19684
+ _c("span", { staticClass: "lupa-similar-query-value" }, [
19685
+ _vm._v(
19686
+ _vm._s(_vm.labels.aiSuggestions) + "\n "
19687
+ ),
19688
+ ]),
19689
+ ]),
19690
+ ],
19691
+ ],
19692
+ 2
19658
19693
  ),
19659
19694
  _vm._v(" "),
19660
19695
  _c(
@@ -19802,7 +19837,7 @@ let SearchResultsProducts = class SearchResultsProducts extends Vue$1 {
19802
19837
  ]);
19803
19838
  }
19804
19839
  get similarQueriesLabels() {
19805
- return pick(this.options.labels, ["similarQuery", "similarQueries"]);
19840
+ return this.options.labels;
19806
19841
  }
19807
19842
  get showTopFilters() {
19808
19843
  var _a, _b, _c;
@@ -13,7 +13,7 @@ export declare enum DocumentElementType {
13
13
  export declare type DocumentElementBase = {
14
14
  type: DocumentElementType;
15
15
  key?: string;
16
- display?: (document: Record<string, unknown>) => boolean;
16
+ display?: <T>(document: T) => boolean;
17
17
  isHtml?: boolean;
18
18
  };
19
19
  export declare type ImageDocumentElement = DocumentElementBase & {
@@ -32,6 +32,7 @@ export declare type DescriptionDocumentElement = DocumentElementBase & {
32
32
  type: DocumentElementType.DESCRIPTION;
33
33
  maxLines: number;
34
34
  key: string;
35
+ className: string;
35
36
  };
36
37
  export declare type CustomDocumentElement = DocumentElementBase & {
37
38
  type: DocumentElementType.CUSTOM;
@@ -14,12 +14,12 @@ export declare type CategoryFilterOptions = {
14
14
  title: string;
15
15
  };
16
16
  parent?: {
17
- url: string;
18
- title: string;
17
+ url?: string;
18
+ title?: string;
19
19
  };
20
20
  current?: {
21
- title: string;
22
- description: string;
21
+ title?: string;
22
+ description?: string;
23
23
  };
24
24
  };
25
25
  export declare type ProductListOptions = SearchResultsOptions & {
@@ -4,13 +4,14 @@ export declare type SearchResultBadgeType = "text" | "image" | "customHtml";
4
4
  export declare type BadgeOptions = {
5
5
  anchor: AnchorPosition;
6
6
  elements: BadgeElement[];
7
- product: Document;
7
+ product?: Document;
8
8
  };
9
9
  export declare type SearchResultBadgeElement = {
10
10
  type: SearchResultBadgeType;
11
11
  key: string;
12
- isHtml: boolean;
13
- product: Document;
12
+ isHtml?: boolean;
13
+ className?: boolean;
14
+ product?: Document;
14
15
  display?: (document: Record<string, unknown>) => boolean;
15
16
  };
16
17
  export declare type BaseBadgeElement = SearchResultBadgeElement & {
@@ -28,7 +29,7 @@ export declare type ImageBadgeElement = BaseBadgeElement & {
28
29
  };
29
30
  export declare type CustomHtmlBadgeElement = BaseBadgeElement & {
30
31
  type: "customHtml";
31
- className: string;
32
+ className?: string;
32
33
  html: (doc: Document) => string;
33
34
  };
34
35
  export declare type BadgeElement = BaseBadgeElement | TextBadgeElement;
@@ -18,6 +18,7 @@ export declare type SearchResultsDidYouMeanLabels = {
18
18
  export declare type SearchResultsSimilarQueriesLabels = {
19
19
  similarQuery: string;
20
20
  similarQueries: string;
21
+ aiSuggestions?: string;
21
22
  };
22
23
  export declare type CallbackContext = {
23
24
  queryKey: string;
@@ -72,6 +73,7 @@ export declare type ProductGrid = {
72
73
  export declare type SearchResultsPaginationLabels = {
73
74
  pageSize: string;
74
75
  showMore: string;
76
+ showLess?: string;
75
77
  };
76
78
  export declare type ResponsiveSearchResultPageSizes = {
77
79
  xs: number[];
@@ -21,6 +21,7 @@ export declare const SEARCH_RESULTS_CONFIGURATION: {
21
21
  didYouMean: string;
22
22
  similarQuery: string;
23
23
  similarQueries: string;
24
+ aiSuggestions: string;
24
25
  };
25
26
  toolbar: {
26
27
  totalCount: boolean;
@@ -1,12 +1,12 @@
1
1
  import { SearchBoxOptions } from "./types/search-box/SearchBoxOptions";
2
- import { CallbackContext, FacetFilterQuery, FacetStyle, SearchResultEventCallbacks, 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
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
10
  import { SearchResultsSortOptions, SortOptions } from "./types/search-results/SearchResultsSort";
11
11
  declare const lupaSearch: {
12
12
  searchBox: (options: SearchBoxOptions) => void;
@@ -17,5 +17,5 @@ declare const lupaSearch: {
17
17
  clearSearchResults: () => void;
18
18
  clearProductList: () => void;
19
19
  };
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, };
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, };
21
21
  export default lupaSearch;