@getlupa/client 1.6.6 → 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.
@@ -8953,6 +8953,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8953
8953
  var _a;
8954
8954
  return (_a = props.panelOptions.elements) == null ? void 0 : _a.find((e) => e.type === DocumentElementType.ADDTOCART);
8955
8955
  });
8956
+ const customDocumentHtmlAttributes = computed(() => {
8957
+ var _a, _b, _c;
8958
+ return (_c = (_b = (_a = props.panelOptions).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.item)) != null ? _c : {};
8959
+ });
8956
8960
  const handleClick = (event) => {
8957
8961
  emit2("product-click", {
8958
8962
  item: props.item,
@@ -8967,12 +8971,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8967
8971
  isInStock.value = props.panelOptions.isInStock ? yield props.panelOptions.isInStock(props.item) : true;
8968
8972
  });
8969
8973
  return (_ctx, _cache) => {
8970
- return openBlock(), createElementBlock("a", {
8971
- class: normalizeClass(["lupa-search-box-product", { "lupa-search-box-product-highlighted": _ctx.highlighted }]),
8974
+ return openBlock(), createElementBlock("a", mergeProps({
8975
+ class: ["lupa-search-box-product", { "lupa-search-box-product-highlighted": _ctx.highlighted }],
8976
+ href: link.value
8977
+ }, customDocumentHtmlAttributes.value, {
8972
8978
  "data-cy": "lupa-search-box-product",
8973
- href: link.value,
8974
8979
  onClick: handleClick
8975
- }, [
8980
+ }), [
8976
8981
  createBaseVNode("div", _hoisted_2$I, [
8977
8982
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
8978
8983
  return openBlock(), createBlock(_sfc_main$13, {
@@ -9007,7 +9012,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9007
9012
  isInStock: isInStock.value
9008
9013
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
9009
9014
  ])) : createCommentVNode("", true)
9010
- ], 10, _hoisted_1$_);
9015
+ ], 16, _hoisted_1$_);
9011
9016
  };
9012
9017
  }
9013
9018
  });
@@ -13519,6 +13524,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13519
13524
  }
13520
13525
  return (_b = (_a = props.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.htmlTitleTemplate;
13521
13526
  });
13527
+ const customDocumentHtmlAttributes = computed(() => {
13528
+ var _a, _b, _c;
13529
+ return (_c = (_b = (_a = props.options).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.product)) != null ? _c : {};
13530
+ });
13522
13531
  const getGroupElements = (group) => {
13523
13532
  var _a, _b;
13524
13533
  return (_b = (_a = props.options.elements) == null ? void 0 : _a.filter((e) => e.group === group)) != null ? _b : [];
@@ -13575,12 +13584,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13575
13584
  }
13576
13585
  return (_ctx, _cache) => {
13577
13586
  var _a;
13578
- return openBlock(), createElementBlock("div", {
13587
+ return openBlock(), createElementBlock("div", mergeProps({
13579
13588
  id: "lupa-search-result-product-card",
13580
13589
  "data-cy": "lupa-search-result-product-card",
13581
- class: normalizeClass(["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]),
13582
- onClick: handleClick
13583
- }, [
13590
+ class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
13591
+ }, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
13584
13592
  createVNode(_sfc_main$w, { options: badgesOptions.value }, null, 8, ["options"]),
13585
13593
  createBaseVNode("div", {
13586
13594
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
@@ -13642,7 +13650,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13642
13650
  ], 2);
13643
13651
  }), 128))
13644
13652
  ], 2)
13645
- ], 2);
13653
+ ], 16);
13646
13654
  };
13647
13655
  }
13648
13656
  });
@@ -13969,7 +13977,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13969
13977
  "queryKey",
13970
13978
  "idKey",
13971
13979
  "titleKey",
13972
- "routingBehavior"
13980
+ "routingBehavior",
13981
+ "customDocumentHtmlAttributes"
13973
13982
  ]);
13974
13983
  });
13975
13984
  const similarQueriesLabels = computed(() => {
@@ -8953,6 +8953,10 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
8953
8953
  var _a;
8954
8954
  return (_a = props.panelOptions.elements) == null ? void 0 : _a.find((e) => e.type === DocumentElementType.ADDTOCART);
8955
8955
  });
8956
+ const customDocumentHtmlAttributes = computed(() => {
8957
+ var _a, _b, _c;
8958
+ return (_c = (_b = (_a = props.panelOptions).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.item)) != null ? _c : {};
8959
+ });
8956
8960
  const handleClick = (event) => {
8957
8961
  emit2("product-click", {
8958
8962
  item: props.item,
@@ -8967,12 +8971,13 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
8967
8971
  isInStock.value = props.panelOptions.isInStock ? yield props.panelOptions.isInStock(props.item) : true;
8968
8972
  });
8969
8973
  return (_ctx, _cache) => {
8970
- return openBlock(), createElementBlock("a", {
8971
- class: normalizeClass(["lupa-search-box-product", { "lupa-search-box-product-highlighted": _ctx.highlighted }]),
8974
+ return openBlock(), createElementBlock("a", mergeProps({
8975
+ class: ["lupa-search-box-product", { "lupa-search-box-product-highlighted": _ctx.highlighted }],
8976
+ href: link.value
8977
+ }, customDocumentHtmlAttributes.value, {
8972
8978
  "data-cy": "lupa-search-box-product",
8973
- href: link.value,
8974
8979
  onClick: handleClick
8975
- }, [
8980
+ }), [
8976
8981
  createBaseVNode("div", _hoisted_2$I, [
8977
8982
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
8978
8983
  return openBlock(), createBlock(_sfc_main$13, {
@@ -9007,7 +9012,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9007
9012
  isInStock: isInStock.value
9008
9013
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
9009
9014
  ])) : createCommentVNode("", true)
9010
- ], 10, _hoisted_1$_);
9015
+ ], 16, _hoisted_1$_);
9011
9016
  };
9012
9017
  }
9013
9018
  });
@@ -13519,6 +13524,10 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
13519
13524
  }
13520
13525
  return (_b = (_a = props.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.htmlTitleTemplate;
13521
13526
  });
13527
+ const customDocumentHtmlAttributes = computed(() => {
13528
+ var _a, _b, _c;
13529
+ return (_c = (_b = (_a = props.options).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.product)) != null ? _c : {};
13530
+ });
13522
13531
  const getGroupElements = (group) => {
13523
13532
  var _a, _b;
13524
13533
  return (_b = (_a = props.options.elements) == null ? void 0 : _a.filter((e) => e.group === group)) != null ? _b : [];
@@ -13575,12 +13584,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
13575
13584
  }
13576
13585
  return (_ctx, _cache) => {
13577
13586
  var _a;
13578
- return openBlock(), createElementBlock("div", {
13587
+ return openBlock(), createElementBlock("div", mergeProps({
13579
13588
  id: "lupa-search-result-product-card",
13580
13589
  "data-cy": "lupa-search-result-product-card",
13581
- class: normalizeClass(["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]),
13582
- onClick: handleClick
13583
- }, [
13590
+ class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
13591
+ }, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
13584
13592
  createVNode(_sfc_main$w, { options: badgesOptions.value }, null, 8, ["options"]),
13585
13593
  createBaseVNode("div", {
13586
13594
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
@@ -13642,7 +13650,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
13642
13650
  ], 2);
13643
13651
  }), 128))
13644
13652
  ], 2)
13645
- ], 2);
13653
+ ], 16);
13646
13654
  };
13647
13655
  }
13648
13656
  });
@@ -13969,7 +13977,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
13969
13977
  "queryKey",
13970
13978
  "idKey",
13971
13979
  "titleKey",
13972
- "routingBehavior"
13980
+ "routingBehavior",
13981
+ "customDocumentHtmlAttributes"
13973
13982
  ]);
13974
13983
  });
13975
13984
  const similarQueriesLabels = computed(() => {
@@ -8951,6 +8951,10 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
8951
8951
  var _a;
8952
8952
  return (_a = props.panelOptions.elements) == null ? void 0 : _a.find((e) => e.type === DocumentElementType.ADDTOCART);
8953
8953
  });
8954
+ const customDocumentHtmlAttributes = computed(() => {
8955
+ var _a, _b, _c;
8956
+ return (_c = (_b = (_a = props.panelOptions).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.item)) != null ? _c : {};
8957
+ });
8954
8958
  const handleClick = (event) => {
8955
8959
  emit2("product-click", {
8956
8960
  item: props.item,
@@ -8965,12 +8969,13 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
8965
8969
  isInStock.value = props.panelOptions.isInStock ? yield props.panelOptions.isInStock(props.item) : true;
8966
8970
  });
8967
8971
  return (_ctx, _cache) => {
8968
- return openBlock(), createElementBlock("a", {
8969
- class: normalizeClass(["lupa-search-box-product", { "lupa-search-box-product-highlighted": _ctx.highlighted }]),
8972
+ return openBlock(), createElementBlock("a", mergeProps({
8973
+ class: ["lupa-search-box-product", { "lupa-search-box-product-highlighted": _ctx.highlighted }],
8974
+ href: link.value
8975
+ }, customDocumentHtmlAttributes.value, {
8970
8976
  "data-cy": "lupa-search-box-product",
8971
- href: link.value,
8972
8977
  onClick: handleClick
8973
- }, [
8978
+ }), [
8974
8979
  createBaseVNode("div", _hoisted_2$I, [
8975
8980
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
8976
8981
  return openBlock(), createBlock(_sfc_main$13, {
@@ -9005,7 +9010,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
9005
9010
  isInStock: isInStock.value
9006
9011
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
9007
9012
  ])) : createCommentVNode("", true)
9008
- ], 10, _hoisted_1$_);
9013
+ ], 16, _hoisted_1$_);
9009
9014
  };
9010
9015
  }
9011
9016
  });
@@ -13517,6 +13522,10 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
13517
13522
  }
13518
13523
  return (_b = (_a = props.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.htmlTitleTemplate;
13519
13524
  });
13525
+ const customDocumentHtmlAttributes = computed(() => {
13526
+ var _a, _b, _c;
13527
+ return (_c = (_b = (_a = props.options).customDocumentHtmlAttributes) == null ? void 0 : _b.call(_a, props.product)) != null ? _c : {};
13528
+ });
13520
13529
  const getGroupElements = (group) => {
13521
13530
  var _a, _b;
13522
13531
  return (_b = (_a = props.options.elements) == null ? void 0 : _a.filter((e) => e.group === group)) != null ? _b : [];
@@ -13573,12 +13582,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
13573
13582
  }
13574
13583
  return (_ctx, _cache) => {
13575
13584
  var _a;
13576
- return openBlock(), createElementBlock("div", {
13585
+ return openBlock(), createElementBlock("div", mergeProps({
13577
13586
  id: "lupa-search-result-product-card",
13578
13587
  "data-cy": "lupa-search-result-product-card",
13579
- class: normalizeClass(["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]),
13580
- onClick: handleClick
13581
- }, [
13588
+ class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
13589
+ }, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
13582
13590
  createVNode(_sfc_main$w, { options: badgesOptions.value }, null, 8, ["options"]),
13583
13591
  createBaseVNode("div", {
13584
13592
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
@@ -13640,7 +13648,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
13640
13648
  ], 2);
13641
13649
  }), 128))
13642
13650
  ], 2)
13643
- ], 2);
13651
+ ], 16);
13644
13652
  };
13645
13653
  }
13646
13654
  });
@@ -13967,7 +13975,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
13967
13975
  "queryKey",
13968
13976
  "idKey",
13969
13977
  "titleKey",
13970
- "routingBehavior"
13978
+ "routingBehavior",
13979
+ "customDocumentHtmlAttributes"
13971
13980
  ]);
13972
13981
  });
13973
13982
  const similarQueriesLabels = computed(() => {
@@ -8955,6 +8955,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8955
8955
  var _a;
8956
8956
  return (_a = props.panelOptions.elements) == null ? void 0 : _a.find((e) => e.type === DocumentElementType.ADDTOCART);
8957
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
+ });
8958
8962
  const handleClick = (event) => {
8959
8963
  emit2("product-click", {
8960
8964
  item: props.item,
@@ -8969,12 +8973,13 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
8969
8973
  isInStock.value = props.panelOptions.isInStock ? yield props.panelOptions.isInStock(props.item) : true;
8970
8974
  });
8971
8975
  return (_ctx, _cache) => {
8972
- return openBlock(), createElementBlock("a", {
8973
- 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, {
8974
8980
  "data-cy": "lupa-search-box-product",
8975
- href: link.value,
8976
8981
  onClick: handleClick
8977
- }, [
8982
+ }), [
8978
8983
  createBaseVNode("div", _hoisted_2$I, [
8979
8984
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageElements.value, (element) => {
8980
8985
  return openBlock(), createBlock(_sfc_main$13, {
@@ -9009,7 +9014,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9009
9014
  isInStock: isInStock.value
9010
9015
  }, null, 8, ["item", "element", "labels", "link", "isInStock"])
9011
9016
  ])) : createCommentVNode("", true)
9012
- ], 10, _hoisted_1$_);
9017
+ ], 16, _hoisted_1$_);
9013
9018
  };
9014
9019
  }
9015
9020
  });
@@ -13521,6 +13526,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13521
13526
  }
13522
13527
  return (_b = (_a = props.options) == null ? void 0 : _a.labels) == null ? void 0 : _b.htmlTitleTemplate;
13523
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
+ });
13524
13533
  const getGroupElements = (group) => {
13525
13534
  var _a, _b;
13526
13535
  return (_b = (_a = props.options.elements) == null ? void 0 : _a.filter((e) => e.group === group)) != null ? _b : [];
@@ -13577,12 +13586,11 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13577
13586
  }
13578
13587
  return (_ctx, _cache) => {
13579
13588
  var _a;
13580
- return openBlock(), createElementBlock("div", {
13589
+ return openBlock(), createElementBlock("div", mergeProps({
13581
13590
  id: "lupa-search-result-product-card",
13582
13591
  "data-cy": "lupa-search-result-product-card",
13583
- class: normalizeClass(["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]),
13584
- onClick: handleClick
13585
- }, [
13592
+ class: ["lupa-search-result-product-card", !isInStock.value ? "lupa-out-of-stock" : ""]
13593
+ }, customDocumentHtmlAttributes.value, { onClick: handleClick }), [
13586
13594
  createVNode(_sfc_main$w, { options: badgesOptions.value }, null, 8, ["options"]),
13587
13595
  createBaseVNode("div", {
13588
13596
  class: normalizeClass(["lupa-search-result-product-contents", listLayoutClass.value])
@@ -13644,7 +13652,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13644
13652
  ], 2);
13645
13653
  }), 128))
13646
13654
  ], 2)
13647
- ], 2);
13655
+ ], 16);
13648
13656
  };
13649
13657
  }
13650
13658
  });
@@ -13971,7 +13979,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
13971
13979
  "queryKey",
13972
13980
  "idKey",
13973
13981
  "titleKey",
13974
- "routingBehavior"
13982
+ "routingBehavior",
13983
+ "customDocumentHtmlAttributes"
13975
13984
  ]);
13976
13985
  });
13977
13986
  const similarQueriesLabels = computed(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/client",
3
- "version": "1.6.6",
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.9",
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",