@getlupa/client 0.5.1-alpha-12 → 0.5.1-alpha-15

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.
@@ -4,12 +4,14 @@ import { DocumentSearchBoxPanel } from "@/types/search-box/SearchBoxPanel";
4
4
  import { SearchBoxOptionLabels } from "@/types/search-box/SearchBoxOptions";
5
5
  import { DocumentElement } from "@/types/DocumentElement";
6
6
  import { TrackableEventData } from "@/types/search-box/Common";
7
+ import { RoutingBehavior } from "@/types/search-results/RoutingBehavior";
7
8
  export default class SearchBoxProduct extends Vue {
8
9
  item: Document;
9
10
  inputValue: string;
10
11
  panelOptions: DocumentSearchBoxPanel;
11
12
  labels?: SearchBoxOptionLabels;
12
13
  highlighted?: boolean;
14
+ boxRoutingBehavior: RoutingBehavior;
13
15
  trackClick: ({ queryKey, data, }: {
14
16
  queryKey: string;
15
17
  data: TrackableEventData;
@@ -21,5 +23,5 @@ export default class SearchBoxProduct extends Vue {
21
23
  get imageElements(): DocumentElement[];
22
24
  get detailElements(): DocumentElement[];
23
25
  get id(): string;
24
- handleClick(): void;
26
+ handleClick(event?: Event): void;
25
27
  }
@@ -25,6 +25,10 @@ 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;
28
32
  addParams: (params: QueryParams) => {
29
33
  params: QueryParams;
30
34
  };
@@ -5491,11 +5491,11 @@ var String$2 = global$d.String;
5491
5491
  var counter$1 = 0;
5492
5492
  var queue$1 = {};
5493
5493
  var ONREADYSTATECHANGE = 'onreadystatechange';
5494
- var location$1, defer, channel, port;
5494
+ var location, defer, channel, port;
5495
5495
 
5496
5496
  try {
5497
5497
  // Deno throws a ReferenceError on `location` access without `--location` flag
5498
- location$1 = global$d.location;
5498
+ location = global$d.location;
5499
5499
  } catch (error) {
5500
5500
  /* empty */
5501
5501
  }
@@ -5520,7 +5520,7 @@ var listener = function (event) {
5520
5520
 
5521
5521
  var post = function (id) {
5522
5522
  // old engines have not location.origin
5523
- global$d.postMessage(String$2(id), location$1.protocol + '//' + location$1.host);
5523
+ global$d.postMessage(String$2(id), location.protocol + '//' + location.host);
5524
5524
  }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
5525
5525
 
5526
5526
 
@@ -5558,7 +5558,7 @@ if (!set$1 || !clear) {
5558
5558
  channel.port1.onmessage = listener;
5559
5559
  defer = bind$5(port.postMessage, port); // Browsers with postMessage, skip WebWorkers
5560
5560
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
5561
- } else if (global$d.addEventListener && isCallable$1(global$d.postMessage) && !global$d.importScripts && location$1 && location$1.protocol !== 'file:' && !fails$8(post)) {
5561
+ } else if (global$d.addEventListener && isCallable$1(global$d.postMessage) && !global$d.importScripts && location && location.protocol !== 'file:' && !fails$8(post)) {
5562
5562
  defer = post;
5563
5563
  global$d.addEventListener('message', listener, false); // IE8-
5564
5564
  } else if (ONREADYSTATECHANGE in createElement$2('script')) {
@@ -19687,13 +19687,6 @@ var generateResultLink = function generateResultLink(link, searchText, facet) {
19687
19687
  var queryParam = "?".concat(QUERY_PARAMS.QUERY, "=").concat(encodeParam(searchText));
19688
19688
  return "".concat(link).concat(queryParam).concat(facetParam);
19689
19689
  };
19690
- var getPathName = function getPathName(resultPageLink) {
19691
- var pathname = window.location.pathname;
19692
- if (pathname.charAt(pathname.length - 1) === "/") pathname = pathname.substr(0, pathname.length - 1);
19693
- if (resultPageLink.charAt(0) !== "/") pathname += "/";
19694
- pathname += !location.pathname.includes(resultPageLink) ? resultPageLink : "";
19695
- return pathname;
19696
- };
19697
19690
  var getRelativePath = function getRelativePath(link) {
19698
19691
  try {
19699
19692
  var url = new URL(link);
@@ -19712,8 +19705,87 @@ var linksMatch = function linksMatch(link1, link2) {
19712
19705
  return link1 === link2 || getRelativePath(link1) === getRelativePath(link2);
19713
19706
  };
19714
19707
 
19708
+ // `SameValue` abstract operation
19709
+ // https://tc39.es/ecma262/#sec-samevalue
19710
+ // eslint-disable-next-line es/no-object-is -- safe
19711
+ var sameValue$1 = Object.is || function is(x, y) {
19712
+ // eslint-disable-next-line no-self-compare -- NaN check
19713
+ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
19714
+ };
19715
+
19716
+ var call = functionCall;
19717
+
19718
+ var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
19719
+
19720
+ var anObject = anObject$k;
19721
+
19722
+ var requireObjectCoercible = requireObjectCoercible$c;
19723
+
19724
+ var sameValue = sameValue$1;
19725
+
19726
+ var toString = toString$h;
19727
+
19728
+ var getMethod = getMethod$7;
19729
+
19730
+ var regExpExec = regexpExecAbstract; // @@search logic
19731
+
19732
+
19733
+ fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
19734
+ return [// `String.prototype.search` method
19735
+ // https://tc39.es/ecma262/#sec-string.prototype.search
19736
+ function search(regexp) {
19737
+ var O = requireObjectCoercible(this);
19738
+ var searcher = regexp == undefined ? undefined : getMethod(regexp, SEARCH);
19739
+ return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
19740
+ }, // `RegExp.prototype[@@search]` method
19741
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
19742
+ function (string) {
19743
+ var rx = anObject(this);
19744
+ var S = toString(string);
19745
+ var res = maybeCallNative(nativeSearch, rx, S);
19746
+ if (res.done) return res.value;
19747
+ var previousLastIndex = rx.lastIndex;
19748
+ if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
19749
+ var result = regExpExec(rx, S);
19750
+ if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
19751
+ return result === null ? -1 : result.index;
19752
+ }];
19753
+ });
19754
+
19755
+ var emitRoutingEvent = function emitRoutingEvent(url) {
19756
+ var event = new CustomEvent(LUPA_ROUTING_EVENT, {
19757
+ detail: url
19758
+ });
19759
+ window.dispatchEvent(event);
19760
+ };
19761
+ var handleRoutingEvent = function handleRoutingEvent(link, event) {
19762
+ var hasEventRouting = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
19763
+
19764
+ if (!hasEventRouting) {
19765
+ return;
19766
+ }
19767
+
19768
+ event === null || event === void 0 ? void 0 : event.preventDefault();
19769
+ emitRoutingEvent(link);
19770
+ };
19771
+ var redirectToResultsPage = function redirectToResultsPage(link, searchText, facet) {
19772
+ var routingBehavior = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "direct-link";
19773
+ var url = generateResultLink(link, searchText, facet);
19774
+
19775
+ if (routingBehavior === "event") {
19776
+ emitRoutingEvent(url);
19777
+ } else {
19778
+ window.location.assign(url);
19779
+ }
19780
+ };
19781
+ var getPageUrl = function getPageUrl(pathnameOverride) {
19782
+ var pathname = pathnameOverride || window.location.pathname;
19783
+ return new URL(window.location.origin + pathname + window.location.search);
19784
+ };
19785
+
19715
19786
  var history$3 = namespace("history");
19716
19787
  var tracking$5 = namespace("tracking");
19788
+ var options$9 = namespace("options");
19717
19789
 
19718
19790
  var SearchBoxProduct = /*#__PURE__*/function (_Vue) {
19719
19791
  _inherits(SearchBoxProduct, _Vue);
@@ -19762,7 +19834,7 @@ var SearchBoxProduct = /*#__PURE__*/function (_Vue) {
19762
19834
  }
19763
19835
  }, {
19764
19836
  key: "handleClick",
19765
- value: function handleClick() {
19837
+ value: function handleClick(event) {
19766
19838
  if (this.panelOptions.titleKey) {
19767
19839
  this.addHistory({
19768
19840
  item: this.item[this.panelOptions.titleKey] || ""
@@ -19785,6 +19857,12 @@ var SearchBoxProduct = /*#__PURE__*/function (_Vue) {
19785
19857
  }
19786
19858
  }
19787
19859
  });
19860
+
19861
+ if (!this.link) {
19862
+ return;
19863
+ }
19864
+
19865
+ handleRoutingEvent(this.link, event, this.boxRoutingBehavior === "event");
19788
19866
  }
19789
19867
  }]);
19790
19868
 
@@ -19805,6 +19883,8 @@ __decorate([Prop({
19805
19883
  default: false
19806
19884
  })], SearchBoxProduct.prototype, "highlighted", void 0);
19807
19885
 
19886
+ __decorate([options$9.Getter("boxRoutingBehavior")], SearchBoxProduct.prototype, "boxRoutingBehavior", void 0);
19887
+
19808
19888
  __decorate([tracking$5.Action("track")], SearchBoxProduct.prototype, "trackClick", void 0);
19809
19889
 
19810
19890
  __decorate([history$3.Action("add")], SearchBoxProduct.prototype, "addHistory", void 0);
@@ -21740,53 +21820,6 @@ var __vue_component__$P = /*#__PURE__*/normalizeComponent({
21740
21820
  staticRenderFns: __vue_staticRenderFns__$P
21741
21821
  }, __vue_inject_styles__$P, __vue_script__$P, __vue_scope_id__$P, __vue_is_functional_template__$P, __vue_module_identifier__$P, false, undefined, undefined, undefined);
21742
21822
 
21743
- // `SameValue` abstract operation
21744
- // https://tc39.es/ecma262/#sec-samevalue
21745
- // eslint-disable-next-line es/no-object-is -- safe
21746
- var sameValue$1 = Object.is || function is(x, y) {
21747
- // eslint-disable-next-line no-self-compare -- NaN check
21748
- return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
21749
- };
21750
-
21751
- var call = functionCall;
21752
-
21753
- var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
21754
-
21755
- var anObject = anObject$k;
21756
-
21757
- var requireObjectCoercible = requireObjectCoercible$c;
21758
-
21759
- var sameValue = sameValue$1;
21760
-
21761
- var toString = toString$h;
21762
-
21763
- var getMethod = getMethod$7;
21764
-
21765
- var regExpExec = regexpExecAbstract; // @@search logic
21766
-
21767
-
21768
- fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
21769
- return [// `String.prototype.search` method
21770
- // https://tc39.es/ecma262/#sec-string.prototype.search
21771
- function search(regexp) {
21772
- var O = requireObjectCoercible(this);
21773
- var searcher = regexp == undefined ? undefined : getMethod(regexp, SEARCH);
21774
- return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
21775
- }, // `RegExp.prototype[@@search]` method
21776
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
21777
- function (string) {
21778
- var rx = anObject(this);
21779
- var S = toString(string);
21780
- var res = maybeCallNative(nativeSearch, rx, S);
21781
- if (res.done) return res.value;
21782
- var previousLastIndex = rx.lastIndex;
21783
- if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
21784
- var result = regExpExec(rx, S);
21785
- if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
21786
- return result === null ? -1 : result.index;
21787
- }];
21788
- });
21789
-
21790
21823
  var DEFAULT_OPTIONS_RESULTS = {
21791
21824
  options: {
21792
21825
  environment: "production"
@@ -27438,33 +27471,6 @@ var __vue_component__$G = /*#__PURE__*/normalizeComponent({
27438
27471
  staticRenderFns: __vue_staticRenderFns__$G
27439
27472
  }, __vue_inject_styles__$G, __vue_script__$G, __vue_scope_id__$G, __vue_is_functional_template__$G, __vue_module_identifier__$G, false, undefined, undefined, undefined);
27440
27473
 
27441
- var emitRoutingEvent = function emitRoutingEvent(url) {
27442
- var event = new CustomEvent(LUPA_ROUTING_EVENT, {
27443
- detail: url
27444
- });
27445
- window.dispatchEvent(event);
27446
- };
27447
- var handleRoutingEvent = function handleRoutingEvent(link, event) {
27448
- var hasEventRouting = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
27449
-
27450
- if (!hasEventRouting) {
27451
- return;
27452
- }
27453
-
27454
- event === null || event === void 0 ? void 0 : event.preventDefault();
27455
- emitRoutingEvent(link);
27456
- };
27457
- var redirectToResultsPage = function redirectToResultsPage(link, searchText, facet) {
27458
- var routingBehavior = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "direct-link";
27459
- var url = generateResultLink(link, searchText, facet);
27460
-
27461
- if (routingBehavior === "event") {
27462
- emitRoutingEvent(url);
27463
- } else {
27464
- window.location.assign(url);
27465
- }
27466
- };
27467
-
27468
27474
  var CategoryFilterItem = /*#__PURE__*/function (_Vue) {
27469
27475
  _inherits(CategoryFilterItem, _Vue);
27470
27476
 
@@ -27846,6 +27852,7 @@ var __vue_render__$D = function __vue_render__() {
27846
27852
  var _c = _vm._self._c || _h;
27847
27853
 
27848
27854
  return _c("div", {
27855
+ staticClass: "lupa-search-result-filters",
27849
27856
  attrs: {
27850
27857
  id: "lupa-search-result-filters"
27851
27858
  }
@@ -29872,6 +29879,7 @@ var __vue_render__$m = function __vue_render__() {
29872
29879
  var _c = _vm._self._c || _h;
29873
29880
 
29874
29881
  return _c("div", {
29882
+ staticClass: "lupa-search-result-product-card",
29875
29883
  class: !_vm.isInStock ? "lupa-out-of-stock" : "",
29876
29884
  attrs: {
29877
29885
  id: "lupa-search-result-product-card",
@@ -30840,6 +30848,7 @@ var __vue_render__$h = function __vue_render__() {
30840
30848
  var _c = _vm._self._c || _h;
30841
30849
 
30842
30850
  return _c("div", {
30851
+ staticClass: "lupa-search-results-sort",
30843
30852
  attrs: {
30844
30853
  id: "lupa-search-results-sort"
30845
30854
  }
@@ -31762,6 +31771,7 @@ var __vue_render__$9 = function __vue_render__() {
31762
31771
  var _c = _vm._self._c || _h;
31763
31772
 
31764
31773
  return _c("div", {
31774
+ staticClass: "lupa-search-result-filters",
31765
31775
  attrs: {
31766
31776
  id: "lupa-search-result-filters"
31767
31777
  }
@@ -32477,30 +32487,17 @@ var SearchResults = /*#__PURE__*/function (_Vue) {
32477
32487
  value: function handleResults(_ref) {
32478
32488
  var queryKey = _ref.queryKey,
32479
32489
  results = _ref.results;
32490
+
32491
+ var _a;
32492
+
32480
32493
  this.trackResults({
32481
32494
  queryKey: queryKey,
32482
32495
  results: results
32483
32496
  });
32484
- var noResultsParam = this.options.noResultsQueryFlag;
32485
-
32486
- if (!noResultsParam) {
32487
- return;
32488
- }
32489
-
32490
- if (results.total < 1) {
32491
- this.appendParams({
32492
- params: [{
32493
- name: noResultsParam,
32494
- value: "true"
32495
- }],
32496
- save: false
32497
- });
32498
- } else {
32499
- this.removeParams({
32500
- paramsToRemove: [noResultsParam],
32501
- save: false
32502
- });
32503
- }
32497
+ this.handleNoResultsFlag({
32498
+ resultCount: (_a = results === null || results === void 0 ? void 0 : results.total) !== null && _a !== void 0 ? _a : 0,
32499
+ noResultsParam: this.options.noResultsQueryFlag
32500
+ });
32504
32501
  }
32505
32502
  }, {
32506
32503
  key: "handleResize",
@@ -32543,6 +32540,8 @@ __decorate([params$1.State("searchString")], SearchResults.prototype, "searchStr
32543
32540
 
32544
32541
  __decorate([params$1.Action("setDefaultLimit")], SearchResults.prototype, "setDefaultLimit", void 0);
32545
32542
 
32543
+ __decorate([params$1.Action("handleNoResultsFlag")], SearchResults.prototype, "handleNoResultsFlag", void 0);
32544
+
32546
32545
  __decorate([params$1.Action("add")], SearchResults.prototype, "addParams", void 0);
32547
32546
 
32548
32547
  __decorate([params$1.Action("removeParams")], SearchResults.prototype, "removeParams", void 0);
@@ -34317,7 +34316,7 @@ var ParamsModule = /*#__PURE__*/function (_VuexModule) {
34317
34316
  }, {
34318
34317
  key: "removeAllFilters",
34319
34318
  value: function removeAllFilters() {
34320
- var url = new URL(window.location.origin + getPathName(this.searchResultsLink) + window.location.search);
34319
+ var url = getPageUrl();
34321
34320
  var paramsToRemove = Array.from(url.searchParams.keys()).filter(isFacetKey);
34322
34321
 
34323
34322
  removeParams(url, paramsToRemove);
@@ -34334,7 +34333,7 @@ var ParamsModule = /*#__PURE__*/function (_VuexModule) {
34334
34333
  var paramsToRemove = _ref2.paramsToRemove,
34335
34334
  _ref2$save = _ref2.save,
34336
34335
  save = _ref2$save === void 0 ? true : _ref2$save;
34337
- var url = new URL(window.location.origin + getPathName(this.searchResultsLink) + window.location.search);
34336
+ var url = getPageUrl();
34338
34337
  paramsToRemove = getRemovableParams(url, paramsToRemove);
34339
34338
 
34340
34339
  removeParams(url, paramsToRemove);
@@ -34345,11 +34344,36 @@ var ParamsModule = /*#__PURE__*/function (_VuexModule) {
34345
34344
  searchString: url.search
34346
34345
  } : {};
34347
34346
  }
34347
+ }, {
34348
+ key: "handleNoResultsFlag",
34349
+ value: function handleNoResultsFlag(_ref3) {
34350
+ var resultCount = _ref3.resultCount,
34351
+ noResultsParam = _ref3.noResultsParam;
34352
+
34353
+ if (!noResultsParam || this.searchResultsLink && this.searchResultsLink !== window.location.pathname) {
34354
+ return;
34355
+ }
34356
+
34357
+ if (resultCount < 1) {
34358
+ this.context.dispatch("appendParams", {
34359
+ params: [{
34360
+ name: noResultsParam,
34361
+ value: "true"
34362
+ }],
34363
+ save: false
34364
+ });
34365
+ } else {
34366
+ this.context.dispatch("removeParams", {
34367
+ paramsToRemove: [noResultsParam],
34368
+ save: false
34369
+ });
34370
+ }
34371
+ }
34348
34372
  }, {
34349
34373
  key: "goToResults",
34350
- value: function goToResults(_ref3) {
34351
- var searchText = _ref3.searchText,
34352
- facet = _ref3.facet;
34374
+ value: function goToResults(_ref4) {
34375
+ var searchText = _ref4.searchText,
34376
+ facet = _ref4.facet;
34353
34377
 
34354
34378
  var _a;
34355
34379
 
@@ -34360,7 +34384,8 @@ var ParamsModule = /*#__PURE__*/function (_VuexModule) {
34360
34384
  name: QUERY_PARAMS.QUERY,
34361
34385
  value: searchText
34362
34386
  }].concat(facetParam),
34363
- paramsToRemove: "all"
34387
+ paramsToRemove: "all",
34388
+ searchResultsLink: this.searchResultsLink
34364
34389
  });
34365
34390
  } else {
34366
34391
  var routing = (_a = this.context.rootGetters["options/boxRoutingBehavior"]) !== null && _a !== void 0 ? _a : "direct-link";
@@ -34380,13 +34405,14 @@ var ParamsModule = /*#__PURE__*/function (_VuexModule) {
34380
34405
  }
34381
34406
  }, {
34382
34407
  key: "appendParams",
34383
- value: function appendParams(_ref4) {
34384
- var params = _ref4.params,
34385
- paramsToRemove = _ref4.paramsToRemove,
34386
- _ref4$encode = _ref4.encode,
34387
- encode = _ref4$encode === void 0 ? true : _ref4$encode,
34388
- _ref4$save = _ref4.save,
34389
- save = _ref4$save === void 0 ? true : _ref4$save;
34408
+ value: function appendParams(_ref5) {
34409
+ var params = _ref5.params,
34410
+ paramsToRemove = _ref5.paramsToRemove,
34411
+ _ref5$encode = _ref5.encode,
34412
+ encode = _ref5$encode === void 0 ? true : _ref5$encode,
34413
+ _ref5$save = _ref5.save,
34414
+ save = _ref5$save === void 0 ? true : _ref5$save,
34415
+ searchResultsLink = _ref5.searchResultsLink;
34390
34416
 
34391
34417
  if (!(params === null || params === void 0 ? void 0 : params.length)) {
34392
34418
  return {
@@ -34394,7 +34420,7 @@ var ParamsModule = /*#__PURE__*/function (_VuexModule) {
34394
34420
  };
34395
34421
  }
34396
34422
 
34397
- var url = new URL(window.location.origin + getPathName(this.searchResultsLink) + window.location.search);
34423
+ var url = getPageUrl(searchResultsLink);
34398
34424
  paramsToRemove = getRemovableParams(url, paramsToRemove);
34399
34425
 
34400
34426
  removeParams(url, paramsToRemove);
@@ -34453,6 +34479,8 @@ __decorate([Action({
34453
34479
  commit: "save"
34454
34480
  })], ParamsModule.prototype, "removeParams", null);
34455
34481
 
34482
+ __decorate([Action({})], ParamsModule.prototype, "handleNoResultsFlag", null);
34483
+
34456
34484
  __decorate([Action({})], ParamsModule.prototype, "goToResults", null);
34457
34485
 
34458
34486
  __decorate([Action({
@@ -32,11 +32,15 @@ export default class ParamsModule extends VuexModule {
32
32
  params?: QueryParams;
33
33
  searchString?: string;
34
34
  };
35
+ handleNoResultsFlag({ resultCount, noResultsParam, }: {
36
+ resultCount: number;
37
+ noResultsParam?: string;
38
+ }): void;
35
39
  goToResults({ searchText, facet, }: {
36
40
  searchText: string;
37
41
  facet?: InputSuggestionFacet;
38
42
  }): void;
39
- appendParams({ params, paramsToRemove, encode, save, }: {
43
+ appendParams({ params, paramsToRemove, encode, save, searchResultsLink, }: {
40
44
  params: {
41
45
  name: string;
42
46
  value: string;
@@ -44,6 +48,7 @@ export default class ParamsModule extends VuexModule {
44
48
  paramsToRemove?: "all" | string[];
45
49
  encode?: boolean;
46
50
  save?: boolean;
51
+ searchResultsLink?: string;
47
52
  }): {
48
53
  params?: QueryParams;
49
54
  searchString?: string;
@@ -3,3 +3,4 @@ import { RoutingBehavior } from "..";
3
3
  export declare const emitRoutingEvent: (url: string) => void;
4
4
  export declare const handleRoutingEvent: (link: string, event?: Event | undefined, hasEventRouting?: boolean) => void;
5
5
  export declare const redirectToResultsPage: (link: string, searchText: string, facet?: InputSuggestionFacet | undefined, routingBehavior?: RoutingBehavior) => void;
6
+ export declare const getPageUrl: (pathnameOverride?: string | undefined) => URL;
@@ -4,12 +4,14 @@ import { DocumentSearchBoxPanel } from "@/types/search-box/SearchBoxPanel";
4
4
  import { SearchBoxOptionLabels } from "@/types/search-box/SearchBoxOptions";
5
5
  import { DocumentElement } from "@/types/DocumentElement";
6
6
  import { TrackableEventData } from "@/types/search-box/Common";
7
+ import { RoutingBehavior } from "@/types/search-results/RoutingBehavior";
7
8
  export default class SearchBoxProduct extends Vue {
8
9
  item: Document;
9
10
  inputValue: string;
10
11
  panelOptions: DocumentSearchBoxPanel;
11
12
  labels?: SearchBoxOptionLabels;
12
13
  highlighted?: boolean;
14
+ boxRoutingBehavior: RoutingBehavior;
13
15
  trackClick: ({ queryKey, data, }: {
14
16
  queryKey: string;
15
17
  data: TrackableEventData;
@@ -21,5 +23,5 @@ export default class SearchBoxProduct extends Vue {
21
23
  get imageElements(): DocumentElement[];
22
24
  get detailElements(): DocumentElement[];
23
25
  get id(): string;
24
- handleClick(): void;
26
+ handleClick(event?: Event): void;
25
27
  }
@@ -25,6 +25,10 @@ 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;
28
32
  addParams: (params: QueryParams) => {
29
33
  params: QueryParams;
30
34
  };