@getlupa/client 1.24.2 → 1.24.3

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.
@@ -29902,11 +29902,14 @@ and ensure you are accounting for this risk.
29902
29902
  }
29903
29903
  return parsedAttributes;
29904
29904
  };
29905
- const getFieldValue = (doc2, field = "") => {
29905
+ const getFieldValue = (doc2, field = "", matchLiteral) => {
29906
29906
  var _a25;
29907
29907
  if (typeof field === "number") {
29908
29908
  return +field;
29909
29909
  }
29910
+ if (matchLiteral) {
29911
+ return field;
29912
+ }
29910
29913
  const value = (_a25 = field == null ? void 0 : field.split(".")) == null ? void 0 : _a25.reduce((obj, key) => obj ? obj[key] : void 0, doc2);
29911
29914
  if (+value) {
29912
29915
  return +value;
@@ -29930,32 +29933,32 @@ and ensure you are accounting for this risk.
29930
29933
  case "equals": {
29931
29934
  if (fields.length < 2) return false;
29932
29935
  const [field1, field2] = fields;
29933
- return getFieldValue(doc2, field1) === getFieldValue(doc2, field2);
29936
+ return getFieldValue(doc2, field1) === getFieldValue(doc2, field2, displayCondition.matchLiteral);
29934
29937
  }
29935
29938
  case "notEquals": {
29936
29939
  if (fields.length < 2) return false;
29937
29940
  const [field1, field2] = fields;
29938
- return getFieldValue(doc2, field1) !== getFieldValue(doc2, field2);
29941
+ return getFieldValue(doc2, field1) !== getFieldValue(doc2, field2, displayCondition.matchLiteral);
29939
29942
  }
29940
29943
  case "greaterThan": {
29941
29944
  if (fields.length < 2) return false;
29942
29945
  const [field1, field2] = fields;
29943
- return getFieldValue(doc2, field1) > getFieldValue(doc2, field2);
29946
+ return getFieldValue(doc2, field1) > getFieldValue(doc2, field2, displayCondition.matchLiteral);
29944
29947
  }
29945
29948
  case "lessThan": {
29946
29949
  if (fields.length < 2) return false;
29947
29950
  const [field1, field2] = fields;
29948
- return getFieldValue(doc2, field1) < getFieldValue(doc2, field2);
29951
+ return getFieldValue(doc2, field1) < getFieldValue(doc2, field2, displayCondition.matchLiteral);
29949
29952
  }
29950
29953
  case "greaterThanOrEquals": {
29951
29954
  if (fields.length < 2) return false;
29952
29955
  const [field1, field2] = fields;
29953
- return getFieldValue(doc2, field1) >= getFieldValue(doc2, field2);
29956
+ return getFieldValue(doc2, field1) >= getFieldValue(doc2, field2, displayCondition.matchLiteral);
29954
29957
  }
29955
29958
  case "lessThanOrEquals": {
29956
29959
  if (fields.length < 2) return false;
29957
29960
  const [field1, field2] = fields;
29958
- return getFieldValue(doc2, field1) <= getFieldValue(doc2, field2);
29961
+ return getFieldValue(doc2, field1) <= getFieldValue(doc2, field2, displayCondition.matchLiteral);
29959
29962
  }
29960
29963
  default:
29961
29964
  return false;
@@ -38026,9 +38029,6 @@ and ensure you are accounting for this risk.
38026
38029
  var _a25, _b25, _c;
38027
38030
  return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) !== "sidebar";
38028
38031
  });
38029
- const showMobileFilters = computed(() => {
38030
- return props.options.searchTitlePosition !== "search-results-top";
38031
- });
38032
38032
  const currentFilterToolbarVisible = computed(() => {
38033
38033
  var _a25, _b25, _c, _d, _e, _f;
38034
38034
  return Boolean(
@@ -38127,15 +38127,14 @@ and ensure you are accounting for this risk.
38127
38127
  key: 0,
38128
38128
  options: (_a25 = _ctx.options.filters) != null ? _a25 : {}
38129
38129
  }, null, 8, ["options"])) : createCommentVNode("", true),
38130
- showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$H, {
38131
- key: 1,
38130
+ createVNode(_sfc_main$H, {
38132
38131
  class: "lupa-toolbar-mobile",
38133
38132
  options: _ctx.options,
38134
38133
  "pagination-location": "top",
38135
38134
  onFilter: filter
38136
- }, null, 8, ["options"])) : createCommentVNode("", true),
38135
+ }, null, 8, ["options"]),
38137
38136
  currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$14, {
38138
- key: 2,
38137
+ key: 1,
38139
38138
  class: normalizeClass(currentFiltersClass.value),
38140
38139
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
38141
38140
  options: currentFilterOptions.value,
@@ -38295,12 +38294,7 @@ and ensure you are accounting for this risk.
38295
38294
  options: categoryOptions.value
38296
38295
  }, null, 8, ["item", "options"]);
38297
38296
  }), 128))
38298
- ])) : createCommentVNode("", true),
38299
- createVNode(_sfc_main$H, {
38300
- class: "lupa-toolbar-mobile",
38301
- "pagination-location": "top",
38302
- options: _ctx.options
38303
- }, null, 8, ["options"])
38297
+ ])) : createCommentVNode("", true)
38304
38298
  ])
38305
38299
  ], 2);
38306
38300
  };
@@ -29902,11 +29902,14 @@ const getDynamicAttributes = (dynamicAttributes = [], document2 = {}) => {
29902
29902
  }
29903
29903
  return parsedAttributes;
29904
29904
  };
29905
- const getFieldValue = (doc2, field = "") => {
29905
+ const getFieldValue = (doc2, field = "", matchLiteral) => {
29906
29906
  var _a25;
29907
29907
  if (typeof field === "number") {
29908
29908
  return +field;
29909
29909
  }
29910
+ if (matchLiteral) {
29911
+ return field;
29912
+ }
29910
29913
  const value = (_a25 = field == null ? void 0 : field.split(".")) == null ? void 0 : _a25.reduce((obj, key) => obj ? obj[key] : void 0, doc2);
29911
29914
  if (+value) {
29912
29915
  return +value;
@@ -29930,32 +29933,32 @@ const processDisplayCondition = (displayCondition, doc2 = {}) => {
29930
29933
  case "equals": {
29931
29934
  if (fields.length < 2) return false;
29932
29935
  const [field1, field2] = fields;
29933
- return getFieldValue(doc2, field1) === getFieldValue(doc2, field2);
29936
+ return getFieldValue(doc2, field1) === getFieldValue(doc2, field2, displayCondition.matchLiteral);
29934
29937
  }
29935
29938
  case "notEquals": {
29936
29939
  if (fields.length < 2) return false;
29937
29940
  const [field1, field2] = fields;
29938
- return getFieldValue(doc2, field1) !== getFieldValue(doc2, field2);
29941
+ return getFieldValue(doc2, field1) !== getFieldValue(doc2, field2, displayCondition.matchLiteral);
29939
29942
  }
29940
29943
  case "greaterThan": {
29941
29944
  if (fields.length < 2) return false;
29942
29945
  const [field1, field2] = fields;
29943
- return getFieldValue(doc2, field1) > getFieldValue(doc2, field2);
29946
+ return getFieldValue(doc2, field1) > getFieldValue(doc2, field2, displayCondition.matchLiteral);
29944
29947
  }
29945
29948
  case "lessThan": {
29946
29949
  if (fields.length < 2) return false;
29947
29950
  const [field1, field2] = fields;
29948
- return getFieldValue(doc2, field1) < getFieldValue(doc2, field2);
29951
+ return getFieldValue(doc2, field1) < getFieldValue(doc2, field2, displayCondition.matchLiteral);
29949
29952
  }
29950
29953
  case "greaterThanOrEquals": {
29951
29954
  if (fields.length < 2) return false;
29952
29955
  const [field1, field2] = fields;
29953
- return getFieldValue(doc2, field1) >= getFieldValue(doc2, field2);
29956
+ return getFieldValue(doc2, field1) >= getFieldValue(doc2, field2, displayCondition.matchLiteral);
29954
29957
  }
29955
29958
  case "lessThanOrEquals": {
29956
29959
  if (fields.length < 2) return false;
29957
29960
  const [field1, field2] = fields;
29958
- return getFieldValue(doc2, field1) <= getFieldValue(doc2, field2);
29961
+ return getFieldValue(doc2, field1) <= getFieldValue(doc2, field2, displayCondition.matchLiteral);
29959
29962
  }
29960
29963
  default:
29961
29964
  return false;
@@ -38026,9 +38029,6 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
38026
38029
  var _a25, _b25, _c;
38027
38030
  return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) !== "sidebar";
38028
38031
  });
38029
- const showMobileFilters = computed(() => {
38030
- return props.options.searchTitlePosition !== "search-results-top";
38031
- });
38032
38032
  const currentFilterToolbarVisible = computed(() => {
38033
38033
  var _a25, _b25, _c, _d, _e, _f;
38034
38034
  return Boolean(
@@ -38127,15 +38127,14 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
38127
38127
  key: 0,
38128
38128
  options: (_a25 = _ctx.options.filters) != null ? _a25 : {}
38129
38129
  }, null, 8, ["options"])) : createCommentVNode("", true),
38130
- showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$H, {
38131
- key: 1,
38130
+ createVNode(_sfc_main$H, {
38132
38131
  class: "lupa-toolbar-mobile",
38133
38132
  options: _ctx.options,
38134
38133
  "pagination-location": "top",
38135
38134
  onFilter: filter
38136
- }, null, 8, ["options"])) : createCommentVNode("", true),
38135
+ }, null, 8, ["options"]),
38137
38136
  currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$14, {
38138
- key: 2,
38137
+ key: 1,
38139
38138
  class: normalizeClass(currentFiltersClass.value),
38140
38139
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
38141
38140
  options: currentFilterOptions.value,
@@ -38295,12 +38294,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
38295
38294
  options: categoryOptions.value
38296
38295
  }, null, 8, ["item", "options"]);
38297
38296
  }), 128))
38298
- ])) : createCommentVNode("", true),
38299
- createVNode(_sfc_main$H, {
38300
- class: "lupa-toolbar-mobile",
38301
- "pagination-location": "top",
38302
- options: _ctx.options
38303
- }, null, 8, ["options"])
38297
+ ])) : createCommentVNode("", true)
38304
38298
  ])
38305
38299
  ], 2);
38306
38300
  };
@@ -29900,11 +29900,14 @@ const getDynamicAttributes = (dynamicAttributes = [], document2 = {}) => {
29900
29900
  }
29901
29901
  return parsedAttributes;
29902
29902
  };
29903
- const getFieldValue = (doc2, field = "") => {
29903
+ const getFieldValue = (doc2, field = "", matchLiteral) => {
29904
29904
  var _a25;
29905
29905
  if (typeof field === "number") {
29906
29906
  return +field;
29907
29907
  }
29908
+ if (matchLiteral) {
29909
+ return field;
29910
+ }
29908
29911
  const value = (_a25 = field == null ? void 0 : field.split(".")) == null ? void 0 : _a25.reduce((obj, key) => obj ? obj[key] : void 0, doc2);
29909
29912
  if (+value) {
29910
29913
  return +value;
@@ -29928,32 +29931,32 @@ const processDisplayCondition = (displayCondition, doc2 = {}) => {
29928
29931
  case "equals": {
29929
29932
  if (fields.length < 2) return false;
29930
29933
  const [field1, field2] = fields;
29931
- return getFieldValue(doc2, field1) === getFieldValue(doc2, field2);
29934
+ return getFieldValue(doc2, field1) === getFieldValue(doc2, field2, displayCondition.matchLiteral);
29932
29935
  }
29933
29936
  case "notEquals": {
29934
29937
  if (fields.length < 2) return false;
29935
29938
  const [field1, field2] = fields;
29936
- return getFieldValue(doc2, field1) !== getFieldValue(doc2, field2);
29939
+ return getFieldValue(doc2, field1) !== getFieldValue(doc2, field2, displayCondition.matchLiteral);
29937
29940
  }
29938
29941
  case "greaterThan": {
29939
29942
  if (fields.length < 2) return false;
29940
29943
  const [field1, field2] = fields;
29941
- return getFieldValue(doc2, field1) > getFieldValue(doc2, field2);
29944
+ return getFieldValue(doc2, field1) > getFieldValue(doc2, field2, displayCondition.matchLiteral);
29942
29945
  }
29943
29946
  case "lessThan": {
29944
29947
  if (fields.length < 2) return false;
29945
29948
  const [field1, field2] = fields;
29946
- return getFieldValue(doc2, field1) < getFieldValue(doc2, field2);
29949
+ return getFieldValue(doc2, field1) < getFieldValue(doc2, field2, displayCondition.matchLiteral);
29947
29950
  }
29948
29951
  case "greaterThanOrEquals": {
29949
29952
  if (fields.length < 2) return false;
29950
29953
  const [field1, field2] = fields;
29951
- return getFieldValue(doc2, field1) >= getFieldValue(doc2, field2);
29954
+ return getFieldValue(doc2, field1) >= getFieldValue(doc2, field2, displayCondition.matchLiteral);
29952
29955
  }
29953
29956
  case "lessThanOrEquals": {
29954
29957
  if (fields.length < 2) return false;
29955
29958
  const [field1, field2] = fields;
29956
- return getFieldValue(doc2, field1) <= getFieldValue(doc2, field2);
29959
+ return getFieldValue(doc2, field1) <= getFieldValue(doc2, field2, displayCondition.matchLiteral);
29957
29960
  }
29958
29961
  default:
29959
29962
  return false;
@@ -38024,9 +38027,6 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
38024
38027
  var _a25, _b25, _c;
38025
38028
  return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) !== "sidebar";
38026
38029
  });
38027
- const showMobileFilters = computed(() => {
38028
- return props.options.searchTitlePosition !== "search-results-top";
38029
- });
38030
38030
  const currentFilterToolbarVisible = computed(() => {
38031
38031
  var _a25, _b25, _c, _d, _e, _f;
38032
38032
  return Boolean(
@@ -38125,15 +38125,14 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
38125
38125
  key: 0,
38126
38126
  options: (_a25 = _ctx.options.filters) != null ? _a25 : {}
38127
38127
  }, null, 8, ["options"])) : createCommentVNode("", true),
38128
- showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$H, {
38129
- key: 1,
38128
+ createVNode(_sfc_main$H, {
38130
38129
  class: "lupa-toolbar-mobile",
38131
38130
  options: _ctx.options,
38132
38131
  "pagination-location": "top",
38133
38132
  onFilter: filter
38134
- }, null, 8, ["options"])) : createCommentVNode("", true),
38133
+ }, null, 8, ["options"]),
38135
38134
  currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$14, {
38136
- key: 2,
38135
+ key: 1,
38137
38136
  class: normalizeClass(currentFiltersClass.value),
38138
38137
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
38139
38138
  options: currentFilterOptions.value,
@@ -38293,12 +38292,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
38293
38292
  options: categoryOptions.value
38294
38293
  }, null, 8, ["item", "options"]);
38295
38294
  }), 128))
38296
- ])) : createCommentVNode("", true),
38297
- createVNode(_sfc_main$H, {
38298
- class: "lupa-toolbar-mobile",
38299
- "pagination-location": "top",
38300
- options: _ctx.options
38301
- }, null, 8, ["options"])
38295
+ ])) : createCommentVNode("", true)
38302
38296
  ])
38303
38297
  ], 2);
38304
38298
  };
@@ -29904,11 +29904,14 @@ and ensure you are accounting for this risk.
29904
29904
  }
29905
29905
  return parsedAttributes;
29906
29906
  };
29907
- const getFieldValue = (doc2, field = "") => {
29907
+ const getFieldValue = (doc2, field = "", matchLiteral) => {
29908
29908
  var _a25;
29909
29909
  if (typeof field === "number") {
29910
29910
  return +field;
29911
29911
  }
29912
+ if (matchLiteral) {
29913
+ return field;
29914
+ }
29912
29915
  const value = (_a25 = field == null ? void 0 : field.split(".")) == null ? void 0 : _a25.reduce((obj, key) => obj ? obj[key] : void 0, doc2);
29913
29916
  if (+value) {
29914
29917
  return +value;
@@ -29932,32 +29935,32 @@ and ensure you are accounting for this risk.
29932
29935
  case "equals": {
29933
29936
  if (fields.length < 2) return false;
29934
29937
  const [field1, field2] = fields;
29935
- return getFieldValue(doc2, field1) === getFieldValue(doc2, field2);
29938
+ return getFieldValue(doc2, field1) === getFieldValue(doc2, field2, displayCondition.matchLiteral);
29936
29939
  }
29937
29940
  case "notEquals": {
29938
29941
  if (fields.length < 2) return false;
29939
29942
  const [field1, field2] = fields;
29940
- return getFieldValue(doc2, field1) !== getFieldValue(doc2, field2);
29943
+ return getFieldValue(doc2, field1) !== getFieldValue(doc2, field2, displayCondition.matchLiteral);
29941
29944
  }
29942
29945
  case "greaterThan": {
29943
29946
  if (fields.length < 2) return false;
29944
29947
  const [field1, field2] = fields;
29945
- return getFieldValue(doc2, field1) > getFieldValue(doc2, field2);
29948
+ return getFieldValue(doc2, field1) > getFieldValue(doc2, field2, displayCondition.matchLiteral);
29946
29949
  }
29947
29950
  case "lessThan": {
29948
29951
  if (fields.length < 2) return false;
29949
29952
  const [field1, field2] = fields;
29950
- return getFieldValue(doc2, field1) < getFieldValue(doc2, field2);
29953
+ return getFieldValue(doc2, field1) < getFieldValue(doc2, field2, displayCondition.matchLiteral);
29951
29954
  }
29952
29955
  case "greaterThanOrEquals": {
29953
29956
  if (fields.length < 2) return false;
29954
29957
  const [field1, field2] = fields;
29955
- return getFieldValue(doc2, field1) >= getFieldValue(doc2, field2);
29958
+ return getFieldValue(doc2, field1) >= getFieldValue(doc2, field2, displayCondition.matchLiteral);
29956
29959
  }
29957
29960
  case "lessThanOrEquals": {
29958
29961
  if (fields.length < 2) return false;
29959
29962
  const [field1, field2] = fields;
29960
- return getFieldValue(doc2, field1) <= getFieldValue(doc2, field2);
29963
+ return getFieldValue(doc2, field1) <= getFieldValue(doc2, field2, displayCondition.matchLiteral);
29961
29964
  }
29962
29965
  default:
29963
29966
  return false;
@@ -38028,9 +38031,6 @@ and ensure you are accounting for this risk.
38028
38031
  var _a25, _b25, _c;
38029
38032
  return ((_c = (_b25 = (_a25 = props.options.filters) == null ? void 0 : _a25.facets) == null ? void 0 : _b25.style) == null ? void 0 : _c.type) !== "sidebar";
38030
38033
  });
38031
- const showMobileFilters = computed(() => {
38032
- return props.options.searchTitlePosition !== "search-results-top";
38033
- });
38034
38034
  const currentFilterToolbarVisible = computed(() => {
38035
38035
  var _a25, _b25, _c, _d, _e, _f;
38036
38036
  return Boolean(
@@ -38129,15 +38129,14 @@ and ensure you are accounting for this risk.
38129
38129
  key: 0,
38130
38130
  options: (_a25 = _ctx.options.filters) != null ? _a25 : {}
38131
38131
  }, null, 8, ["options"])) : createCommentVNode("", true),
38132
- showMobileFilters.value ? (openBlock(), createBlock(_sfc_main$H, {
38133
- key: 1,
38132
+ createVNode(_sfc_main$H, {
38134
38133
  class: "lupa-toolbar-mobile",
38135
38134
  options: _ctx.options,
38136
38135
  "pagination-location": "top",
38137
38136
  onFilter: filter
38138
- }, null, 8, ["options"])) : createCommentVNode("", true),
38137
+ }, null, 8, ["options"]),
38139
38138
  currentFilterOptions.value && currentFilterPositionDesktop.value === "pageTop" ? (openBlock(), createBlock(_sfc_main$14, {
38140
- key: 2,
38139
+ key: 1,
38141
38140
  class: normalizeClass(currentFiltersClass.value),
38142
38141
  "data-cy": "lupa-search-result-filters-mobile-toolbar",
38143
38142
  options: currentFilterOptions.value,
@@ -38297,12 +38296,7 @@ and ensure you are accounting for this risk.
38297
38296
  options: categoryOptions.value
38298
38297
  }, null, 8, ["item", "options"]);
38299
38298
  }), 128))
38300
- ])) : createCommentVNode("", true),
38301
- createVNode(_sfc_main$H, {
38302
- class: "lupa-toolbar-mobile",
38303
- "pagination-location": "top",
38304
- options: _ctx.options
38305
- }, null, 8, ["options"])
38299
+ ])) : createCommentVNode("", true)
38306
38300
  ])
38307
38301
  ], 2);
38308
38302
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/client",
3
- "version": "1.24.2",
3
+ "version": "1.24.3",
4
4
  "main": "dist/lupaSearch.js",
5
5
  "module": "dist/lupaSearch.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@getlupa/client-sdk": "^1.8.1",
23
- "@getlupa/vue": "0.24.2",
23
+ "@getlupa/vue": "0.24.3",
24
24
  "@rushstack/eslint-patch": "^1.12.0",
25
25
  "@tsconfig/node18": "^18.2.4",
26
26
  "@types/jsdom": "^21.1.7",