@getlupa/client 1.6.5 → 1.7.0

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.
@@ -6275,11 +6275,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
6275
6275
  return { success: false, errors };
6276
6276
  });
6277
6277
  const track$1 = (queryKey, event, environment, customBaseUrl) => __awaiter(void 0, void 0, void 0, function* () {
6278
- const res = yield fetch(`${getApiUrl$1(environment, customBaseUrl)}events`, Object.assign(Object.assign({}, defaultConfig$1), { body: JSON.stringify(Object.assign({ queryKey }, event)) }));
6279
- if (res.status < 400) {
6278
+ try {
6279
+ const res = yield fetch(`${getApiUrl$1(environment, customBaseUrl)}events`, Object.assign(Object.assign({}, defaultConfig$1), { body: JSON.stringify(Object.assign({ queryKey }, event)) }));
6280
+ if (res.status < 400) {
6281
+ return { success: false };
6282
+ }
6283
+ return res.json();
6284
+ } catch (e) {
6280
6285
  return { success: false };
6281
6286
  }
6282
- return res.json();
6283
6287
  });
6284
6288
  const loadRedirectionRules = (queryKey, environment, customBaseUrl) => __awaiter(void 0, void 0, void 0, function* () {
6285
6289
  const res = yield fetch(`${getApiUrl$1(environment, customBaseUrl)}redirections/${queryKey}`, Object.assign(Object.assign({}, defaultConfig$1), { method: "GET" }));
@@ -7808,8 +7812,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7808
7812
  const _hoisted_1$1c = { id: "lupa-search-box-input-container" };
7809
7813
  const _hoisted_2$P = { class: "lupa-input-clear" };
7810
7814
  const _hoisted_3$B = { id: "lupa-search-box-input" };
7811
- const _hoisted_4$r = ["value"];
7812
- const _hoisted_5$f = ["placeholder"];
7815
+ const _hoisted_4$s = ["value"];
7816
+ const _hoisted_5$g = ["aria-label", "placeholder"];
7813
7817
  const _hoisted_6$9 = {
7814
7818
  key: 0,
7815
7819
  class: "lupa-close-label"
@@ -7858,6 +7862,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7858
7862
  var _a;
7859
7863
  return __spreadValues2({}, (_a = props.options.inputAttributes) != null ? _a : {});
7860
7864
  });
7865
+ const ariaLabel = computed(() => {
7866
+ var _a;
7867
+ return (_a = labels.value.searchInputAriaLabel) != null ? _a : "Search input";
7868
+ });
7861
7869
  watch(suggestedValue, () => {
7862
7870
  if (suggestedValue.value.override) {
7863
7871
  input.value = suggestedValue.value.item.suggestion;
@@ -7901,22 +7909,24 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7901
7909
  createBaseVNode("div", _hoisted_3$B, [
7902
7910
  createBaseVNode("input", {
7903
7911
  class: "lupa-hint",
7912
+ "aria-hidden": "true",
7904
7913
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
7905
7914
  disabled: ""
7906
- }, null, 8, _hoisted_4$r),
7915
+ }, null, 8, _hoisted_4$s),
7907
7916
  withDirectives(createBaseVNode("input", mergeProps({
7908
7917
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
7909
7918
  }, inputAttributes.value, {
7910
7919
  ref_key: "mainInput",
7911
7920
  ref: mainInput,
7912
7921
  autocomplete: "off",
7922
+ "aria-label": ariaLabel.value,
7913
7923
  class: "lupa-search-box-input-field",
7914
7924
  "data-cy": "lupa-search-box-input-field",
7915
7925
  type: "text",
7916
7926
  placeholder: labels.value.placeholder,
7917
7927
  onInput: handleInput,
7918
7928
  onFocus: handleFocus
7919
- }), null, 16, _hoisted_5$f), [
7929
+ }), null, 16, _hoisted_5$g), [
7920
7930
  [vModelText, inputValue.value]
7921
7931
  ])
7922
7932
  ]),
@@ -8082,11 +8092,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8082
8092
  class: "lupa-suggestion-facet",
8083
8093
  "data-cy": "lupa-suggestion-facet"
8084
8094
  };
8085
- const _hoisted_4$q = {
8095
+ const _hoisted_4$r = {
8086
8096
  class: "lupa-suggestion-facet-label",
8087
8097
  "data-cy": "lupa-suggestion-facet-label"
8088
8098
  };
8089
- const _hoisted_5$e = {
8099
+ const _hoisted_5$f = {
8090
8100
  class: "lupa-suggestion-facet-value",
8091
8101
  "data-cy": "lupa-suggestion-facet-value"
8092
8102
  };
@@ -8128,8 +8138,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8128
8138
  innerHTML: _ctx.suggestion.displayHighlight
8129
8139
  }, null, 8, _hoisted_1$18)) : (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(_ctx.suggestion.display), 1)),
8130
8140
  _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$A, [
8131
- createBaseVNode("span", _hoisted_4$q, toDisplayString(facetLabel.value), 1),
8132
- createBaseVNode("span", _hoisted_5$e, toDisplayString(_ctx.suggestion.facet.title), 1)
8141
+ createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
8142
+ createBaseVNode("span", _hoisted_5$f, toDisplayString(_ctx.suggestion.facet.title), 1)
8133
8143
  ])) : createCommentVNode("", true)
8134
8144
  ]);
8135
8145
  };
@@ -8536,8 +8546,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8536
8546
  const _hoisted_1$11 = ["innerHTML"];
8537
8547
  const _hoisted_2$K = { key: 0 };
8538
8548
  const _hoisted_3$z = { key: 1 };
8539
- const _hoisted_4$p = { class: "lupa-search-box-custom-label" };
8540
- const _hoisted_5$d = { class: "lupa-search-box-custom-text" };
8549
+ const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
8550
+ const _hoisted_5$e = { class: "lupa-search-box-custom-text" };
8541
8551
  const _sfc_main$16 = /* @__PURE__ */ defineComponent({
8542
8552
  __name: "SearchBoxProductCustom",
8543
8553
  props: {
@@ -8569,8 +8579,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8569
8579
  class: [className.value, "lupa-search-box-product-custom"]
8570
8580
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
8571
8581
  !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$K, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$z, [
8572
- createBaseVNode("div", _hoisted_4$p, toDisplayString(label.value), 1),
8573
- createBaseVNode("div", _hoisted_5$d, toDisplayString(text.value), 1)
8582
+ createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
8583
+ createBaseVNode("div", _hoisted_5$e, toDisplayString(text.value), 1)
8574
8584
  ]))
8575
8585
  ], 16));
8576
8586
  };
@@ -8910,7 +8920,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8910
8920
  const _hoisted_1$_ = ["href"];
8911
8921
  const _hoisted_2$I = { class: "lupa-search-box-product-image-section" };
8912
8922
  const _hoisted_3$x = { class: "lupa-search-box-product-details-section" };
8913
- const _hoisted_4$o = {
8923
+ const _hoisted_4$p = {
8914
8924
  key: 0,
8915
8925
  class: "lupa-search-box-product-add-to-cart-section"
8916
8926
  };
@@ -8945,6 +8955,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8945
8955
  var _a;
8946
8956
  return (_a = props.panelOptions.elements) == null ? void 0 : _a.find((e) => e.type === DocumentElementType.ADDTOCART);
8947
8957
  });
8958
+ const customDocumentHtmlAttributes = computed(() => {
8959
+ var _a, _b, _c;
8960
+ return (_c = (_b = (_a = props.panelOptions).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.item)) != null ? _c : {};
8961
+ });
8948
8962
  const handleClick = (event) => {
8949
8963
  emit2("product-click", {
8950
8964
  item: props.item,
@@ -8959,12 +8973,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8959
8973
  isInStock.value = props.panelOptions.isInStock ? yield props.panelOptions.isInStock(props.item) : true;
8960
8974
  });
8961
8975
  return (_ctx, _cache) => {
8962
- return openBlock(), createElementBlock("a", {
8963
- class: normalizeClass(["lupa-search-box-product", { "lupa-search-box-product-highlighted": _ctx.highlighted }]),
8976
+ return openBlock(), createElementBlock("a", mergeProps({
8977
+ class: ["lupa-search-box-product", { "lupa-search-box-product-highlighted": _ctx.highlighted }],
8978
+ href: link.value
8979
+ }, customDocumentHtmlAttributes.value, {
8964
8980
  "data-cy": "lupa-search-box-product",
8965
- href: link.value,
8966
8981
  onClick: handleClick
8967
- }, [
8982
+ }), [
8968
8983
  createBaseVNode("div", _hoisted_2$I, [
8969
8984
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
8970
8985
  return openBlock(), createBlock(_sfc_main$13, {
@@ -8989,7 +9004,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8989
9004
  }, null, 8, ["item", "element", "labels", "link"]);
8990
9005
  }), 128))
8991
9006
  ]),
8992
- addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
9007
+ addToCartElement.value ? (openBlock(), createElementBlock("div", _hoisted_4$p, [
8993
9008
  createVNode(_sfc_main$13, {
8994
9009
  class: "lupa-search-box-product-element",
8995
9010
  item: _ctx.item,
@@ -8999,7 +9014,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8999
9014
  isInStock: isInStock.value
9000
9015
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
9001
9016
  ])) : createCommentVNode("", true)
9002
- ], 10, _hoisted_1$_);
9017
+ ], 16, _hoisted_1$_);
9003
9018
  };
9004
9019
  }
9005
9020
  });
@@ -9113,7 +9128,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9113
9128
  }
9114
9129
  }
9115
9130
  });
9116
- if (!link) {
9131
+ if (!link || eventType === "addToCart") {
9117
9132
  return;
9118
9133
  }
9119
9134
  emit2("product-click");
@@ -9225,7 +9240,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9225
9240
  key: 0,
9226
9241
  class: "lupa-panel-title"
9227
9242
  };
9228
- const _hoisted_4$n = {
9243
+ const _hoisted_4$o = {
9229
9244
  key: 1,
9230
9245
  id: "lupa-search-box-panel"
9231
9246
  };
@@ -9406,7 +9421,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9406
9421
  showTotalCount: (_a = _ctx.options.showTotalCount) != null ? _a : false,
9407
9422
  onGoToResults: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("go-to-results"))
9408
9423
  }, null, 8, ["labels", "showTotalCount"])) : createCommentVNode("", true)
9409
- ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_4$n, [
9424
+ ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_4$o, [
9410
9425
  createVNode(_sfc_main$1h, {
9411
9426
  options: _ctx.options.history,
9412
9427
  history: history.value,
@@ -9784,7 +9799,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9784
9799
  key: 1,
9785
9800
  "data-cy": "did-you-mean-label"
9786
9801
  };
9787
- const _hoisted_4$m = { key: 1 };
9802
+ const _hoisted_4$n = { key: 1 };
9788
9803
  const _sfc_main$Z = /* @__PURE__ */ defineComponent({
9789
9804
  __name: "SearchResultsDidYouMean",
9790
9805
  props: {
@@ -9835,7 +9850,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9835
9850
  class: "lupa-did-you-mean lupa-highlighted-search-text",
9836
9851
  "data-cy": "did-you-mean-value",
9837
9852
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
9838
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$m, toDisplayString(label) + " ", 1))
9853
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
9839
9854
  ]);
9840
9855
  }), 128))
9841
9856
  ])) : createCommentVNode("", true)
@@ -9885,7 +9900,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9885
9900
  key: 1,
9886
9901
  class: "lupa-results-total-count"
9887
9902
  };
9888
- const _hoisted_4$l = ["innerHTML"];
9903
+ const _hoisted_4$m = ["innerHTML"];
9889
9904
  const _sfc_main$X = /* @__PURE__ */ defineComponent({
9890
9905
  __name: "SearchResultsTitle",
9891
9906
  props: {
@@ -9934,7 +9949,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9934
9949
  key: 2,
9935
9950
  class: "lupa-result-page-description-top",
9936
9951
  innerHTML: descriptionTop.value
9937
- }, null, 8, _hoisted_4$l)) : createCommentVNode("", true)
9952
+ }, null, 8, _hoisted_4$m)) : createCommentVNode("", true)
9938
9953
  ]);
9939
9954
  };
9940
9955
  }
@@ -9980,7 +9995,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9980
9995
  key: 0,
9981
9996
  class: "filter-values"
9982
9997
  };
9983
- const _hoisted_4$k = { class: "lupa-current-filter-list" };
9998
+ const _hoisted_4$l = { class: "lupa-current-filter-list" };
9984
9999
  const _sfc_main$V = /* @__PURE__ */ defineComponent({
9985
10000
  __name: "CurrentFilters",
9986
10001
  props: {
@@ -10046,7 +10061,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10046
10061
  }, null, 2)) : createCommentVNode("", true)
10047
10062
  ]),
10048
10063
  !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$s, [
10049
- createBaseVNode("div", _hoisted_4$k, [
10064
+ createBaseVNode("div", _hoisted_4$l, [
10050
10065
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(displayFilters), (filter) => {
10051
10066
  return openBlock(), createBlock(_sfc_main$W, {
10052
10067
  key: filter.key + "_" + filter.value,
@@ -10114,8 +10129,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10114
10129
  };
10115
10130
  const _hoisted_2$A = { class: "lupa-category-back" };
10116
10131
  const _hoisted_3$r = ["href"];
10117
- const _hoisted_4$j = ["href"];
10118
- const _hoisted_5$c = { class: "lupa-child-category-list" };
10132
+ const _hoisted_4$k = ["href"];
10133
+ const _hoisted_5$d = { class: "lupa-child-category-list" };
10119
10134
  const _sfc_main$T = /* @__PURE__ */ defineComponent({
10120
10135
  __name: "CategoryFilter",
10121
10136
  props: {
@@ -10219,9 +10234,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10219
10234
  href: parentUrlLink.value,
10220
10235
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
10221
10236
  onClick: handleNavigationParent
10222
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$j)
10237
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
10223
10238
  ], 2),
10224
- createBaseVNode("div", _hoisted_5$c, [
10239
+ createBaseVNode("div", _hoisted_5$d, [
10225
10240
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
10226
10241
  return openBlock(), createBlock(_sfc_main$U, {
10227
10242
  key: getCategoryKey(child),
@@ -10240,8 +10255,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10240
10255
  };
10241
10256
  const _hoisted_2$z = ["placeholder"];
10242
10257
  const _hoisted_3$q = { class: "lupa-terms-list" };
10243
- const _hoisted_4$i = ["onClick"];
10244
- const _hoisted_5$b = { class: "lupa-term-checkbox-wrapper" };
10258
+ const _hoisted_4$j = ["onClick"];
10259
+ const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
10245
10260
  const _hoisted_6$8 = { class: "lupa-term-checkbox-label" };
10246
10261
  const _hoisted_7$6 = { class: "lupa-term-label" };
10247
10262
  const _hoisted_8$1 = {
@@ -10337,7 +10352,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10337
10352
  key: item.title,
10338
10353
  onClick: ($event) => handleFacetClick(item)
10339
10354
  }, [
10340
- createBaseVNode("div", _hoisted_5$b, [
10355
+ createBaseVNode("div", _hoisted_5$c, [
10341
10356
  createBaseVNode("span", {
10342
10357
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
10343
10358
  }, null, 2)
@@ -10346,7 +10361,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
10346
10361
  createBaseVNode("span", _hoisted_7$6, toDisplayString(item.title), 1),
10347
10362
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_8$1, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
10348
10363
  ])
10349
- ], 10, _hoisted_4$i);
10364
+ ], 10, _hoisted_4$j);
10350
10365
  }), 128))
10351
10366
  ]),
10352
10367
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -11346,12 +11361,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11346
11361
  key: 1,
11347
11362
  class: "lupa-stats-facet-summary-input"
11348
11363
  };
11349
- const _hoisted_4$h = {
11364
+ const _hoisted_4$i = {
11350
11365
  key: 0,
11351
11366
  class: "lupa-stats-range-label"
11352
11367
  };
11353
- const _hoisted_5$a = { class: "lupa-stats-from" };
11354
- const _hoisted_6$7 = ["max", "min", "pattern"];
11368
+ const _hoisted_5$b = { class: "lupa-stats-from" };
11369
+ const _hoisted_6$7 = ["max", "min", "pattern", "aria-label"];
11355
11370
  const _hoisted_7$5 = { key: 0 };
11356
11371
  const _hoisted_8 = /* @__PURE__ */ createBaseVNode("div", { class: "lupa-stats-separator" }, null, -1);
11357
11372
  const _hoisted_9 = {
@@ -11359,7 +11374,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11359
11374
  class: "lupa-stats-range-label"
11360
11375
  };
11361
11376
  const _hoisted_10 = { class: "lupa-stats-to" };
11362
- const _hoisted_11 = ["max", "min", "pattern"];
11377
+ const _hoisted_11 = ["max", "min", "pattern", "aria-label"];
11363
11378
  const _hoisted_12 = { key: 0 };
11364
11379
  const _hoisted_13 = {
11365
11380
  key: 2,
@@ -11487,6 +11502,20 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11487
11502
  const sliderInputFormat = computed(() => {
11488
11503
  return isPrice.value ? `[0-9]+([${separator.value}][0-9]{1,2})?` : void 0;
11489
11504
  });
11505
+ const sliderAria = computed(() => {
11506
+ var _a, _b, _c, _d, _e, _f;
11507
+ return {
11508
+ "aria-label": ((_b = (_a = props.options.stats) == null ? void 0 : _a.labels) == null ? void 0 : _b.sliderDotAriaLabel) ? `${(_d = (_c = props.options.stats) == null ? void 0 : _c.labels) == null ? void 0 : _d.sliderDotAriaLabel} - ${(_e = props.facet) == null ? void 0 : _e.label}` : `Range slider control dot for ${(_f = props.facet) == null ? void 0 : _f.label}`
11509
+ };
11510
+ });
11511
+ const ariaLabelFrom = computed(() => {
11512
+ var _a, _b, _c, _d, _e;
11513
+ return `${(_b = (_a = props.facet) == null ? void 0 : _a.label) != null ? _b : ""} ${(_e = (_d = (_c = props.options.stats) == null ? void 0 : _c.labels) == null ? void 0 : _d.ariaFrom) != null ? _e : rangeLabelFrom.value}`;
11514
+ });
11515
+ const ariaLabelTo = computed(() => {
11516
+ var _a, _b, _c, _d, _e;
11517
+ return `${(_b = (_a = props.facet) == null ? void 0 : _a.label) != null ? _b : ""} ${(_e = (_d = (_c = props.options.stats) == null ? void 0 : _c.labels) == null ? void 0 : _d.ariaTo) != null ? _e : rangeLabelTo.value}`;
11518
+ });
11490
11519
  watch(currentMinValue, () => {
11491
11520
  innerSliderRange.value = [];
11492
11521
  });
@@ -11516,15 +11545,16 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11516
11545
  return openBlock(), createElementBlock("div", _hoisted_1$O, [
11517
11546
  !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$p, [
11518
11547
  createBaseVNode("div", null, [
11519
- rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
11520
- createBaseVNode("div", _hoisted_5$a, [
11548
+ rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
11549
+ createBaseVNode("div", _hoisted_5$b, [
11521
11550
  withDirectives(createBaseVNode("input", {
11522
11551
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
11523
11552
  type: "text",
11524
11553
  maxlength: "8",
11525
11554
  max: facetMax.value,
11526
11555
  min: facetMin.value,
11527
- pattern: sliderInputFormat.value
11556
+ pattern: sliderInputFormat.value,
11557
+ "aria-label": ariaLabelFrom.value
11528
11558
  }, null, 8, _hoisted_6$7), [
11529
11559
  [
11530
11560
  vModelText,
@@ -11546,7 +11576,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11546
11576
  maxlength: "8",
11547
11577
  max: facetMax.value,
11548
11578
  min: facetMin.value,
11549
- pattern: sliderInputFormat.value
11579
+ pattern: sliderInputFormat.value,
11580
+ "aria-label": ariaLabelTo.value
11550
11581
  }, null, 8, _hoisted_11), [
11551
11582
  [
11552
11583
  vModelText,
@@ -11567,11 +11598,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11567
11598
  max: facetMax.value,
11568
11599
  lazy: true,
11569
11600
  step: interval.value,
11601
+ aria: sliderAria.value,
11570
11602
  modelValue: sliderRange.value,
11571
11603
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => sliderRange.value = $event),
11572
11604
  onSlide: handleDragging,
11573
11605
  onEnd: handleChange
11574
- }, null, 8, ["min", "max", "step", "modelValue"])
11606
+ }, null, 8, ["min", "max", "step", "aria", "modelValue"])
11575
11607
  ])) : createCommentVNode("", true)
11576
11608
  ]);
11577
11609
  };
@@ -11580,11 +11612,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11580
11612
  const _hoisted_1$N = { class: "lupa-term-checkbox-wrapper" };
11581
11613
  const _hoisted_2$x = { class: "lupa-term-checkbox-label" };
11582
11614
  const _hoisted_3$o = { class: "lupa-term-label" };
11583
- const _hoisted_4$g = {
11615
+ const _hoisted_4$h = {
11584
11616
  key: 0,
11585
11617
  class: "lupa-term-count"
11586
11618
  };
11587
- const _hoisted_5$9 = {
11619
+ const _hoisted_5$a = {
11588
11620
  key: 0,
11589
11621
  class: "lupa-facet-level"
11590
11622
  };
@@ -11641,10 +11673,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11641
11673
  ]),
11642
11674
  createBaseVNode("div", _hoisted_2$x, [
11643
11675
  createBaseVNode("span", _hoisted_3$o, toDisplayString(_ctx.item.title) + toDisplayString(" "), 1),
11644
- _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$g, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
11676
+ _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_4$h, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
11645
11677
  ])
11646
11678
  ]),
11647
- showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$9, [
11679
+ showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_5$a, [
11648
11680
  (openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
11649
11681
  return openBlock(), createBlock(_component_HierarchyFacetLevel, {
11650
11682
  key: itemChild.title,
@@ -12077,8 +12109,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12077
12109
  };
12078
12110
  const _hoisted_2$t = ["onClick"];
12079
12111
  const _hoisted_3$m = { class: "lupa-mobile-sidebar-content" };
12080
- const _hoisted_4$f = { class: "lupa-sidebar-top" };
12081
- const _hoisted_5$8 = { class: "lupa-sidebar-title" };
12112
+ const _hoisted_4$g = { class: "lupa-sidebar-top" };
12113
+ const _hoisted_5$9 = { class: "lupa-sidebar-title" };
12082
12114
  const _hoisted_6$6 = {
12083
12115
  key: 0,
12084
12116
  class: "lupa-sidebar-filter-count"
@@ -12116,8 +12148,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12116
12148
  onClick: withModifiers(handleMobileToggle, ["stop"])
12117
12149
  }, null, 8, _hoisted_2$t),
12118
12150
  createBaseVNode("div", _hoisted_3$m, [
12119
- createBaseVNode("div", _hoisted_4$f, [
12120
- createBaseVNode("div", _hoisted_5$8, [
12151
+ createBaseVNode("div", _hoisted_4$g, [
12152
+ createBaseVNode("div", _hoisted_5$9, [
12121
12153
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
12122
12154
  isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
12123
12155
  ]),
@@ -12143,7 +12175,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12143
12175
  key: 1,
12144
12176
  class: "lupa-search-results-breadcrumb-text"
12145
12177
  };
12146
- const _hoisted_4$e = { key: 2 };
12178
+ const _hoisted_4$f = { key: 2 };
12147
12179
  const _sfc_main$J = /* @__PURE__ */ defineComponent({
12148
12180
  __name: "SearchResultsBreadcrumbs",
12149
12181
  props: {
@@ -12184,7 +12216,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12184
12216
  return handleNavigation(e, (_a = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a : "");
12185
12217
  }
12186
12218
  }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$s)) : (openBlock(), createElementBlock("span", _hoisted_3$l, toDisplayString(getLabel(breadcrumb.label)), 1)),
12187
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$e, " / ")) : createCommentVNode("", true)
12219
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, " / ")) : createCommentVNode("", true)
12188
12220
  ]);
12189
12221
  }), 128))
12190
12222
  ]);
@@ -12285,7 +12317,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12285
12317
  class: "lupa-page-number-separator"
12286
12318
  };
12287
12319
  const _hoisted_3$k = ["onClick"];
12288
- const _hoisted_4$d = {
12320
+ const _hoisted_4$e = {
12289
12321
  key: 0,
12290
12322
  class: "lupa-page-number-separator"
12291
12323
  };
@@ -12376,7 +12408,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12376
12408
  }, toDisplayString(page), 11, _hoisted_3$k);
12377
12409
  }), 128)),
12378
12410
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
12379
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$d, "...")) : createCommentVNode("", true),
12411
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
12380
12412
  createBaseVNode("div", {
12381
12413
  class: "lupa-page-number lupa-page-number-last",
12382
12414
  onClick: _cache[2] || (_cache[2] = () => {
@@ -12401,6 +12433,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12401
12433
  };
12402
12434
  const _hoisted_2$q = { id: "lupa-select" };
12403
12435
  const _hoisted_3$j = { class: "lupa-select-label" };
12436
+ const _hoisted_4$d = ["aria-label"];
12404
12437
  const _sfc_main$E = /* @__PURE__ */ defineComponent({
12405
12438
  __name: "SearchResultsPageSize",
12406
12439
  props: {
@@ -12423,6 +12456,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12423
12456
  createBaseVNode("label", _hoisted_3$j, toDisplayString(_ctx.label), 1),
12424
12457
  createBaseVNode("select", {
12425
12458
  class: "lupa-select-dropdown",
12459
+ "aria-label": _ctx.label,
12426
12460
  "data-cy": "lupa-page-size-select-dropdown",
12427
12461
  onChange: handleSelect,
12428
12462
  ref_key: "select",
@@ -12431,7 +12465,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12431
12465
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options.sizes, (option) => {
12432
12466
  return openBlock(), createElementBlock("option", { key: option }, toDisplayString(option), 1);
12433
12467
  }), 128))
12434
- ], 544)
12468
+ ], 40, _hoisted_4$d)
12435
12469
  ])
12436
12470
  ]);
12437
12471
  };
@@ -12443,7 +12477,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12443
12477
  };
12444
12478
  const _hoisted_2$p = { id: "lupa-select" };
12445
12479
  const _hoisted_3$i = { class: "lupa-select-label" };
12446
- const _hoisted_4$c = ["value"];
12480
+ const _hoisted_4$c = ["aria-label"];
12481
+ const _hoisted_5$8 = ["value"];
12447
12482
  const _sfc_main$D = /* @__PURE__ */ defineComponent({
12448
12483
  __name: "SearchResultsSort",
12449
12484
  props: {
@@ -12497,6 +12532,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12497
12532
  createBaseVNode("label", _hoisted_3$i, toDisplayString(_ctx.options.label), 1),
12498
12533
  withDirectives(createBaseVNode("select", {
12499
12534
  class: "lupa-select-dropdown",
12535
+ "aria-label": _ctx.options.label,
12500
12536
  "data-cy": "lupa-sort-select-dropdown",
12501
12537
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => selectedKey.value = $event),
12502
12538
  onChange: handleSelect,
@@ -12506,9 +12542,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
12506
12542
  return openBlock(), createElementBlock("option", {
12507
12543
  key: option.key,
12508
12544
  value: option.key
12509
- }, toDisplayString(option.label), 9, _hoisted_4$c);
12545
+ }, toDisplayString(option.label), 9, _hoisted_5$8);
12510
12546
  }), 128))
12511
- ], 544), [
12547
+ ], 40, _hoisted_4$c), [
12512
12548
  [vModelSelect, selectedKey.value]
12513
12549
  ])
12514
12550
  ])
@@ -13490,6 +13526,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13490
13526
  }
13491
13527
  return (_b = (_a = props.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.htmlTitleTemplate;
13492
13528
  });
13529
+ const customDocumentHtmlAttributes = computed(() => {
13530
+ var _a, _b, _c;
13531
+ return (_c = (_b = (_a = props.options).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.product)) != null ? _c : {};
13532
+ });
13493
13533
  const getGroupElements = (group) => {
13494
13534
  var _a, _b;
13495
13535
  return (_b = (_a = props.options.elements) == null ? void 0 : _a.filter((e) => e.group === group)) != null ? _b : [];
@@ -13546,12 +13586,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13546
13586
  }
13547
13587
  return (_ctx, _cache) => {
13548
13588
  var _a;
13549
- return openBlock(), createElementBlock("div", {
13589
+ return openBlock(), createElementBlock("div", mergeProps({
13550
13590
  id: "lupa-search-result-product-card",
13551
13591
  "data-cy": "lupa-search-result-product-card",
13552
- class: normalizeClass(["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]),
13553
- onClick: handleClick
13554
- }, [
13592
+ class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
13593
+ }, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
13555
13594
  createVNode(_sfc_main$w, { options: badgesOptions.value }, null, 8, ["options"]),
13556
13595
  createBaseVNode("div", {
13557
13596
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
@@ -13613,7 +13652,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13613
13652
  ], 2);
13614
13653
  }), 128))
13615
13654
  ], 2)
13616
- ], 2);
13655
+ ], 16);
13617
13656
  };
13618
13657
  }
13619
13658
  });
@@ -13940,7 +13979,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13940
13979
  "queryKey",
13941
13980
  "idKey",
13942
13981
  "titleKey",
13943
- "routingBehavior"
13982
+ "routingBehavior",
13983
+ "customDocumentHtmlAttributes"
13944
13984
  ]);
13945
13985
  });
13946
13986
  const similarQueriesLabels = computed(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/client",
3
- "version": "1.6.5",
3
+ "version": "1.7.0",
4
4
  "main": "dist/lupaSearch.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/src/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@getlupa/client-sdk": "^1.3.4",
23
- "@getlupa/vue": "0.7.7",
23
+ "@getlupa/vue": "0.8.0",
24
24
  "@rushstack/eslint-patch": "^1.3.2",
25
25
  "@tsconfig/node18": "^2.0.1",
26
26
  "@types/jsdom": "^21.1.1",