@getlupa/client 1.15.13 → 1.15.14

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.
@@ -18,6 +18,18 @@ var __spreadValues = (a, b) => {
18
18
  return a;
19
19
  };
20
20
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
+ var __objRest = (source, exclude) => {
22
+ var target = {};
23
+ for (var prop in source)
24
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
25
+ target[prop] = source[prop];
26
+ if (source != null && __getOwnPropSymbols)
27
+ for (var prop of __getOwnPropSymbols(source)) {
28
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
29
+ target[prop] = source[prop];
30
+ }
31
+ return target;
32
+ };
21
33
  var __async = (__this, __arguments, generator) => {
22
34
  return new Promise((resolve, reject) => {
23
35
  var fulfilled = (value) => {
@@ -6406,7 +6418,7 @@ var __async = (__this, __arguments, generator) => {
6406
6418
  return a;
6407
6419
  };
6408
6420
  var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
6409
- var __objRest = (source, exclude) => {
6421
+ var __objRest2 = (source, exclude) => {
6410
6422
  var target = {};
6411
6423
  for (var prop in source)
6412
6424
  if (__hasOwnProp2.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -14883,7 +14895,7 @@ var __async = (__this, __arguments, generator) => {
14883
14895
  function fromJSON$1(json, inputs) {
14884
14896
  if (Array.isArray(json))
14885
14897
  return json.map((n) => fromJSON$1(n));
14886
- let _a = json, { inputs: ownInputs } = _a, defaults = __objRest(_a, ["inputs"]);
14898
+ let _a = json, { inputs: ownInputs } = _a, defaults = __objRest2(_a, ["inputs"]);
14887
14899
  if (ownInputs) {
14888
14900
  inputs = [];
14889
14901
  for (let input2 of ownInputs) {
@@ -14900,7 +14912,7 @@ var __async = (__this, __arguments, generator) => {
14900
14912
  defaults.nodes = json.nodes.map((n) => fromJSON$1(n, inputs));
14901
14913
  }
14902
14914
  if (defaults.source) {
14903
- let _b = defaults.source, { inputId } = _b, source = __objRest(_b, ["inputId"]);
14915
+ let _b = defaults.source, { inputId } = _b, source = __objRest2(_b, ["inputId"]);
14904
14916
  defaults.source = source;
14905
14917
  if (inputId != null) {
14906
14918
  defaults.source.input = inputs[inputId];
@@ -18978,7 +18990,7 @@ and ensure you are accounting for this risk.
18978
18990
  });
18979
18991
  const displayElement = computed(() => {
18980
18992
  const element = props.element;
18981
- const item = props.item;
18993
+ const item = enhancedItem.value;
18982
18994
  if (!element.display) {
18983
18995
  return true;
18984
18996
  }
@@ -25035,7 +25047,8 @@ and ensure you are accounting for this risk.
25035
25047
  relatedQueries.value = queries;
25036
25048
  }));
25037
25049
  const hasEnoughRelatedQueries = computed(() => {
25038
- return relatedQueries.value.length > 1;
25050
+ var _a;
25051
+ return ((_a = relatedQueries.value) == null ? void 0 : _a.length) > 1;
25039
25052
  });
25040
25053
  const handleRelatedQueryClick = (query) => {
25041
25054
  var _a;
@@ -39663,6 +39676,49 @@ and ensure you are accounting for this risk.
39663
39676
  return null;
39664
39677
  }
39665
39678
  };
39679
+ const mergeSearchBoxConfiguration = (options, overrides) => {
39680
+ var _a, _b, _c;
39681
+ for (const panel of (_a = options.panels) != null ? _a : []) {
39682
+ if (panel.type !== SearchBoxPanelType.DOCUMENT) {
39683
+ continue;
39684
+ }
39685
+ const overridePanel = (_b = overrides.panels) == null ? void 0 : _b.find((p2) => p2.queryKey === panel.queryKey);
39686
+ if (!overridePanel || overridePanel.type !== SearchBoxPanelType.DOCUMENT || !overridePanel) {
39687
+ continue;
39688
+ }
39689
+ panel.elements = (_c = panel.elements) == null ? void 0 : _c.map((element) => {
39690
+ var _a2;
39691
+ const overrideElement = (_a2 = overridePanel == null ? void 0 : overridePanel.elements) == null ? void 0 : _a2.find((e2) => e2.key === element.key);
39692
+ if (!overrideElement) {
39693
+ return element;
39694
+ }
39695
+ return __spreadValues(__spreadValues({}, element), overrideElement);
39696
+ });
39697
+ }
39698
+ const _d = overrides, { panels } = _d, overridesWithoutPanels = __objRest(_d, ["panels"]);
39699
+ return merge(options, overridesWithoutPanels);
39700
+ };
39701
+ const mergeSearchResultsConfiguration = (options, overrides) => {
39702
+ var _a;
39703
+ if (!overrides.elements) {
39704
+ return merge(options, overrides);
39705
+ }
39706
+ const elements = (_a = options.elements) == null ? void 0 : _a.map((element) => {
39707
+ var _a2;
39708
+ const overrideElement = (_a2 = overrides.elements) == null ? void 0 : _a2.find((e2) => e2.key === element.key);
39709
+ if (!overrideElement) {
39710
+ return element;
39711
+ }
39712
+ return __spreadValues(__spreadValues({}, element), overrideElement);
39713
+ });
39714
+ options.elements = elements;
39715
+ const _b = overrides, { elements: _ } = _b, overridesWithoutElements = __objRest(_b, ["elements"]);
39716
+ return merge(options, overridesWithoutElements);
39717
+ };
39718
+ const PluginConfigurationMerger = {
39719
+ mergeSearchBoxConfiguration,
39720
+ mergeSearchResultsConfiguration
39721
+ };
39666
39722
  const PREVIEW_PARAMETER = "lupaSearchPreview";
39667
39723
  const MAX_ELEMENT_MOUNT_RETRIES = 25;
39668
39724
  let styleElement = null;
@@ -39758,7 +39814,10 @@ and ensure you are accounting for this risk.
39758
39814
  );
39759
39815
  return;
39760
39816
  }
39761
- const mergedOptions = merge(resolvedConfiguration, (_a = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _a : {});
39817
+ const mergedOptions = PluginConfigurationMerger.mergeSearchBoxConfiguration(
39818
+ resolvedConfiguration,
39819
+ (_a = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _a : {}
39820
+ );
39762
39821
  searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
39763
39822
  });
39764
39823
  const mountSearchResults = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(this, null, function* () {
@@ -39779,7 +39838,10 @@ and ensure you are accounting for this risk.
39779
39838
  );
39780
39839
  return;
39781
39840
  }
39782
- const mergedOptions = merge(resolvedConfiguration, (_a = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _a : {});
39841
+ const mergedOptions = PluginConfigurationMerger.mergeSearchResultsConfiguration(
39842
+ resolvedConfiguration,
39843
+ (_a = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _a : {}
39844
+ );
39783
39845
  searchResults(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
39784
39846
  });
39785
39847
  const mountProductList = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(this, null, function* () {
@@ -18,6 +18,18 @@ var __spreadValues = (a, b) => {
18
18
  return a;
19
19
  };
20
20
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
+ var __objRest = (source, exclude) => {
22
+ var target = {};
23
+ for (var prop in source)
24
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
25
+ target[prop] = source[prop];
26
+ if (source != null && __getOwnPropSymbols)
27
+ for (var prop of __getOwnPropSymbols(source)) {
28
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
29
+ target[prop] = source[prop];
30
+ }
31
+ return target;
32
+ };
21
33
  var __async = (__this, __arguments, generator) => {
22
34
  return new Promise((resolve2, reject) => {
23
35
  var fulfilled = (value) => {
@@ -6406,7 +6418,7 @@ var __spreadValues2 = (a, b) => {
6406
6418
  return a;
6407
6419
  };
6408
6420
  var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
6409
- var __objRest = (source, exclude) => {
6421
+ var __objRest2 = (source, exclude) => {
6410
6422
  var target = {};
6411
6423
  for (var prop in source)
6412
6424
  if (__hasOwnProp2.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -14883,7 +14895,7 @@ let Rule$2 = rule;
14883
14895
  function fromJSON$1(json, inputs) {
14884
14896
  if (Array.isArray(json))
14885
14897
  return json.map((n) => fromJSON$1(n));
14886
- let _a = json, { inputs: ownInputs } = _a, defaults = __objRest(_a, ["inputs"]);
14898
+ let _a = json, { inputs: ownInputs } = _a, defaults = __objRest2(_a, ["inputs"]);
14887
14899
  if (ownInputs) {
14888
14900
  inputs = [];
14889
14901
  for (let input2 of ownInputs) {
@@ -14900,7 +14912,7 @@ function fromJSON$1(json, inputs) {
14900
14912
  defaults.nodes = json.nodes.map((n) => fromJSON$1(n, inputs));
14901
14913
  }
14902
14914
  if (defaults.source) {
14903
- let _b = defaults.source, { inputId } = _b, source = __objRest(_b, ["inputId"]);
14915
+ let _b = defaults.source, { inputId } = _b, source = __objRest2(_b, ["inputId"]);
14904
14916
  defaults.source = source;
14905
14917
  if (inputId != null) {
14906
14918
  defaults.source.input = inputs[inputId];
@@ -18978,7 +18990,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
18978
18990
  });
18979
18991
  const displayElement = computed(() => {
18980
18992
  const element = props.element;
18981
- const item = props.item;
18993
+ const item = enhancedItem.value;
18982
18994
  if (!element.display) {
18983
18995
  return true;
18984
18996
  }
@@ -25035,7 +25047,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
25035
25047
  relatedQueries.value = queries;
25036
25048
  }));
25037
25049
  const hasEnoughRelatedQueries = computed(() => {
25038
- return relatedQueries.value.length > 1;
25050
+ var _a;
25051
+ return ((_a = relatedQueries.value) == null ? void 0 : _a.length) > 1;
25039
25052
  });
25040
25053
  const handleRelatedQueryClick = (query) => {
25041
25054
  var _a;
@@ -39663,6 +39676,49 @@ const getQueryParam = (name) => {
39663
39676
  return null;
39664
39677
  }
39665
39678
  };
39679
+ const mergeSearchBoxConfiguration = (options, overrides) => {
39680
+ var _a, _b, _c;
39681
+ for (const panel of (_a = options.panels) != null ? _a : []) {
39682
+ if (panel.type !== SearchBoxPanelType.DOCUMENT) {
39683
+ continue;
39684
+ }
39685
+ const overridePanel = (_b = overrides.panels) == null ? void 0 : _b.find((p2) => p2.queryKey === panel.queryKey);
39686
+ if (!overridePanel || overridePanel.type !== SearchBoxPanelType.DOCUMENT || !overridePanel) {
39687
+ continue;
39688
+ }
39689
+ panel.elements = (_c = panel.elements) == null ? void 0 : _c.map((element) => {
39690
+ var _a2;
39691
+ const overrideElement = (_a2 = overridePanel == null ? void 0 : overridePanel.elements) == null ? void 0 : _a2.find((e2) => e2.key === element.key);
39692
+ if (!overrideElement) {
39693
+ return element;
39694
+ }
39695
+ return __spreadValues(__spreadValues({}, element), overrideElement);
39696
+ });
39697
+ }
39698
+ const _d = overrides, { panels } = _d, overridesWithoutPanels = __objRest(_d, ["panels"]);
39699
+ return merge(options, overridesWithoutPanels);
39700
+ };
39701
+ const mergeSearchResultsConfiguration = (options, overrides) => {
39702
+ var _a;
39703
+ if (!overrides.elements) {
39704
+ return merge(options, overrides);
39705
+ }
39706
+ const elements = (_a = options.elements) == null ? void 0 : _a.map((element) => {
39707
+ var _a2;
39708
+ const overrideElement = (_a2 = overrides.elements) == null ? void 0 : _a2.find((e2) => e2.key === element.key);
39709
+ if (!overrideElement) {
39710
+ return element;
39711
+ }
39712
+ return __spreadValues(__spreadValues({}, element), overrideElement);
39713
+ });
39714
+ options.elements = elements;
39715
+ const _b = overrides, { elements: _ } = _b, overridesWithoutElements = __objRest(_b, ["elements"]);
39716
+ return merge(options, overridesWithoutElements);
39717
+ };
39718
+ const PluginConfigurationMerger = {
39719
+ mergeSearchBoxConfiguration,
39720
+ mergeSearchResultsConfiguration
39721
+ };
39666
39722
  const PREVIEW_PARAMETER = "lupaSearchPreview";
39667
39723
  const MAX_ELEMENT_MOUNT_RETRIES = 25;
39668
39724
  let styleElement = null;
@@ -39758,7 +39814,10 @@ const mountSearchBox = (configuration, options, optionOverrides, fetch2 = true,
39758
39814
  );
39759
39815
  return;
39760
39816
  }
39761
- const mergedOptions = merge(resolvedConfiguration, (_a = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _a : {});
39817
+ const mergedOptions = PluginConfigurationMerger.mergeSearchBoxConfiguration(
39818
+ resolvedConfiguration,
39819
+ (_a = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _a : {}
39820
+ );
39762
39821
  searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
39763
39822
  });
39764
39823
  const mountSearchResults = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(exports, null, function* () {
@@ -39779,7 +39838,10 @@ const mountSearchResults = (configuration, options, optionOverrides, fetch2 = tr
39779
39838
  );
39780
39839
  return;
39781
39840
  }
39782
- const mergedOptions = merge(resolvedConfiguration, (_a = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _a : {});
39841
+ const mergedOptions = PluginConfigurationMerger.mergeSearchResultsConfiguration(
39842
+ resolvedConfiguration,
39843
+ (_a = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _a : {}
39844
+ );
39783
39845
  searchResults(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
39784
39846
  });
39785
39847
  const mountProductList = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(exports, null, function* () {
@@ -17,6 +17,18 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
20
32
  var __async = (__this, __arguments, generator) => {
21
33
  return new Promise((resolve2, reject) => {
22
34
  var fulfilled = (value) => {
@@ -6404,7 +6416,7 @@ var __spreadValues2 = (a, b) => {
6404
6416
  return a;
6405
6417
  };
6406
6418
  var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
6407
- var __objRest = (source, exclude) => {
6419
+ var __objRest2 = (source, exclude) => {
6408
6420
  var target = {};
6409
6421
  for (var prop in source)
6410
6422
  if (__hasOwnProp2.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -14881,7 +14893,7 @@ let Rule$2 = rule;
14881
14893
  function fromJSON$1(json, inputs) {
14882
14894
  if (Array.isArray(json))
14883
14895
  return json.map((n) => fromJSON$1(n));
14884
- let _a = json, { inputs: ownInputs } = _a, defaults = __objRest(_a, ["inputs"]);
14896
+ let _a = json, { inputs: ownInputs } = _a, defaults = __objRest2(_a, ["inputs"]);
14885
14897
  if (ownInputs) {
14886
14898
  inputs = [];
14887
14899
  for (let input2 of ownInputs) {
@@ -14898,7 +14910,7 @@ function fromJSON$1(json, inputs) {
14898
14910
  defaults.nodes = json.nodes.map((n) => fromJSON$1(n, inputs));
14899
14911
  }
14900
14912
  if (defaults.source) {
14901
- let _b = defaults.source, { inputId } = _b, source = __objRest(_b, ["inputId"]);
14913
+ let _b = defaults.source, { inputId } = _b, source = __objRest2(_b, ["inputId"]);
14902
14914
  defaults.source = source;
14903
14915
  if (inputId != null) {
14904
14916
  defaults.source.input = inputs[inputId];
@@ -18976,7 +18988,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
18976
18988
  });
18977
18989
  const displayElement = computed(() => {
18978
18990
  const element = props.element;
18979
- const item = props.item;
18991
+ const item = enhancedItem.value;
18980
18992
  if (!element.display) {
18981
18993
  return true;
18982
18994
  }
@@ -25033,7 +25045,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
25033
25045
  relatedQueries.value = queries;
25034
25046
  }));
25035
25047
  const hasEnoughRelatedQueries = computed(() => {
25036
- return relatedQueries.value.length > 1;
25048
+ var _a;
25049
+ return ((_a = relatedQueries.value) == null ? void 0 : _a.length) > 1;
25037
25050
  });
25038
25051
  const handleRelatedQueryClick = (query) => {
25039
25052
  var _a;
@@ -39661,6 +39674,49 @@ const getQueryParam = (name) => {
39661
39674
  return null;
39662
39675
  }
39663
39676
  };
39677
+ const mergeSearchBoxConfiguration = (options, overrides) => {
39678
+ var _a, _b, _c;
39679
+ for (const panel of (_a = options.panels) != null ? _a : []) {
39680
+ if (panel.type !== SearchBoxPanelType.DOCUMENT) {
39681
+ continue;
39682
+ }
39683
+ const overridePanel = (_b = overrides.panels) == null ? void 0 : _b.find((p2) => p2.queryKey === panel.queryKey);
39684
+ if (!overridePanel || overridePanel.type !== SearchBoxPanelType.DOCUMENT || !overridePanel) {
39685
+ continue;
39686
+ }
39687
+ panel.elements = (_c = panel.elements) == null ? void 0 : _c.map((element) => {
39688
+ var _a2;
39689
+ const overrideElement = (_a2 = overridePanel == null ? void 0 : overridePanel.elements) == null ? void 0 : _a2.find((e2) => e2.key === element.key);
39690
+ if (!overrideElement) {
39691
+ return element;
39692
+ }
39693
+ return __spreadValues(__spreadValues({}, element), overrideElement);
39694
+ });
39695
+ }
39696
+ const _d = overrides, { panels } = _d, overridesWithoutPanels = __objRest(_d, ["panels"]);
39697
+ return merge(options, overridesWithoutPanels);
39698
+ };
39699
+ const mergeSearchResultsConfiguration = (options, overrides) => {
39700
+ var _a;
39701
+ if (!overrides.elements) {
39702
+ return merge(options, overrides);
39703
+ }
39704
+ const elements = (_a = options.elements) == null ? void 0 : _a.map((element) => {
39705
+ var _a2;
39706
+ const overrideElement = (_a2 = overrides.elements) == null ? void 0 : _a2.find((e2) => e2.key === element.key);
39707
+ if (!overrideElement) {
39708
+ return element;
39709
+ }
39710
+ return __spreadValues(__spreadValues({}, element), overrideElement);
39711
+ });
39712
+ options.elements = elements;
39713
+ const _b = overrides, { elements: _ } = _b, overridesWithoutElements = __objRest(_b, ["elements"]);
39714
+ return merge(options, overridesWithoutElements);
39715
+ };
39716
+ const PluginConfigurationMerger = {
39717
+ mergeSearchBoxConfiguration,
39718
+ mergeSearchResultsConfiguration
39719
+ };
39664
39720
  const PREVIEW_PARAMETER = "lupaSearchPreview";
39665
39721
  const MAX_ELEMENT_MOUNT_RETRIES = 25;
39666
39722
  let styleElement = null;
@@ -39756,7 +39812,10 @@ const mountSearchBox = (configuration, options, optionOverrides, fetch2 = true,
39756
39812
  );
39757
39813
  return;
39758
39814
  }
39759
- const mergedOptions = merge(resolvedConfiguration, (_a = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _a : {});
39815
+ const mergedOptions = PluginConfigurationMerger.mergeSearchBoxConfiguration(
39816
+ resolvedConfiguration,
39817
+ (_a = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _a : {}
39818
+ );
39760
39819
  searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
39761
39820
  });
39762
39821
  const mountSearchResults = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(void 0, null, function* () {
@@ -39777,7 +39836,10 @@ const mountSearchResults = (configuration, options, optionOverrides, fetch2 = tr
39777
39836
  );
39778
39837
  return;
39779
39838
  }
39780
- const mergedOptions = merge(resolvedConfiguration, (_a = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _a : {});
39839
+ const mergedOptions = PluginConfigurationMerger.mergeSearchResultsConfiguration(
39840
+ resolvedConfiguration,
39841
+ (_a = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _a : {}
39842
+ );
39781
39843
  searchResults(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
39782
39844
  });
39783
39845
  const mountProductList = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(void 0, null, function* () {
@@ -20,6 +20,18 @@ var __spreadValues = (a, b) => {
20
20
  return a;
21
21
  };
22
22
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
23
35
  var __async = (__this, __arguments, generator) => {
24
36
  return new Promise((resolve, reject) => {
25
37
  var fulfilled = (value) => {
@@ -6408,7 +6420,7 @@ var __async = (__this, __arguments, generator) => {
6408
6420
  return a;
6409
6421
  };
6410
6422
  var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
6411
- var __objRest = (source, exclude) => {
6423
+ var __objRest2 = (source, exclude) => {
6412
6424
  var target = {};
6413
6425
  for (var prop in source)
6414
6426
  if (__hasOwnProp2.call(source, prop) && exclude.indexOf(prop) < 0)
@@ -14885,7 +14897,7 @@ var __async = (__this, __arguments, generator) => {
14885
14897
  function fromJSON$1(json, inputs) {
14886
14898
  if (Array.isArray(json))
14887
14899
  return json.map((n) => fromJSON$1(n));
14888
- let _a = json, { inputs: ownInputs } = _a, defaults = __objRest(_a, ["inputs"]);
14900
+ let _a = json, { inputs: ownInputs } = _a, defaults = __objRest2(_a, ["inputs"]);
14889
14901
  if (ownInputs) {
14890
14902
  inputs = [];
14891
14903
  for (let input2 of ownInputs) {
@@ -14902,7 +14914,7 @@ var __async = (__this, __arguments, generator) => {
14902
14914
  defaults.nodes = json.nodes.map((n) => fromJSON$1(n, inputs));
14903
14915
  }
14904
14916
  if (defaults.source) {
14905
- let _b = defaults.source, { inputId } = _b, source = __objRest(_b, ["inputId"]);
14917
+ let _b = defaults.source, { inputId } = _b, source = __objRest2(_b, ["inputId"]);
14906
14918
  defaults.source = source;
14907
14919
  if (inputId != null) {
14908
14920
  defaults.source.input = inputs[inputId];
@@ -18980,7 +18992,7 @@ and ensure you are accounting for this risk.
18980
18992
  });
18981
18993
  const displayElement = computed(() => {
18982
18994
  const element = props.element;
18983
- const item = props.item;
18995
+ const item = enhancedItem.value;
18984
18996
  if (!element.display) {
18985
18997
  return true;
18986
18998
  }
@@ -25037,7 +25049,8 @@ and ensure you are accounting for this risk.
25037
25049
  relatedQueries.value = queries;
25038
25050
  }));
25039
25051
  const hasEnoughRelatedQueries = computed(() => {
25040
- return relatedQueries.value.length > 1;
25052
+ var _a;
25053
+ return ((_a = relatedQueries.value) == null ? void 0 : _a.length) > 1;
25041
25054
  });
25042
25055
  const handleRelatedQueryClick = (query) => {
25043
25056
  var _a;
@@ -39665,6 +39678,49 @@ and ensure you are accounting for this risk.
39665
39678
  return null;
39666
39679
  }
39667
39680
  };
39681
+ const mergeSearchBoxConfiguration = (options, overrides) => {
39682
+ var _a, _b, _c;
39683
+ for (const panel of (_a = options.panels) != null ? _a : []) {
39684
+ if (panel.type !== SearchBoxPanelType.DOCUMENT) {
39685
+ continue;
39686
+ }
39687
+ const overridePanel = (_b = overrides.panels) == null ? void 0 : _b.find((p2) => p2.queryKey === panel.queryKey);
39688
+ if (!overridePanel || overridePanel.type !== SearchBoxPanelType.DOCUMENT || !overridePanel) {
39689
+ continue;
39690
+ }
39691
+ panel.elements = (_c = panel.elements) == null ? void 0 : _c.map((element) => {
39692
+ var _a2;
39693
+ const overrideElement = (_a2 = overridePanel == null ? void 0 : overridePanel.elements) == null ? void 0 : _a2.find((e2) => e2.key === element.key);
39694
+ if (!overrideElement) {
39695
+ return element;
39696
+ }
39697
+ return __spreadValues(__spreadValues({}, element), overrideElement);
39698
+ });
39699
+ }
39700
+ const _d = overrides, { panels } = _d, overridesWithoutPanels = __objRest(_d, ["panels"]);
39701
+ return merge(options, overridesWithoutPanels);
39702
+ };
39703
+ const mergeSearchResultsConfiguration = (options, overrides) => {
39704
+ var _a;
39705
+ if (!overrides.elements) {
39706
+ return merge(options, overrides);
39707
+ }
39708
+ const elements = (_a = options.elements) == null ? void 0 : _a.map((element) => {
39709
+ var _a2;
39710
+ const overrideElement = (_a2 = overrides.elements) == null ? void 0 : _a2.find((e2) => e2.key === element.key);
39711
+ if (!overrideElement) {
39712
+ return element;
39713
+ }
39714
+ return __spreadValues(__spreadValues({}, element), overrideElement);
39715
+ });
39716
+ options.elements = elements;
39717
+ const _b = overrides, { elements: _ } = _b, overridesWithoutElements = __objRest(_b, ["elements"]);
39718
+ return merge(options, overridesWithoutElements);
39719
+ };
39720
+ const PluginConfigurationMerger = {
39721
+ mergeSearchBoxConfiguration,
39722
+ mergeSearchResultsConfiguration
39723
+ };
39668
39724
  const PREVIEW_PARAMETER = "lupaSearchPreview";
39669
39725
  const MAX_ELEMENT_MOUNT_RETRIES = 25;
39670
39726
  let styleElement = null;
@@ -39760,7 +39816,10 @@ and ensure you are accounting for this risk.
39760
39816
  );
39761
39817
  return;
39762
39818
  }
39763
- const mergedOptions = merge(resolvedConfiguration, (_a = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _a : {});
39819
+ const mergedOptions = PluginConfigurationMerger.mergeSearchBoxConfiguration(
39820
+ resolvedConfiguration,
39821
+ (_a = optionOverrides == null ? void 0 : optionOverrides.searchBox) != null ? _a : {}
39822
+ );
39764
39823
  searchBox(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
39765
39824
  });
39766
39825
  const mountSearchResults = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(this, null, function* () {
@@ -39781,7 +39840,10 @@ and ensure you are accounting for this risk.
39781
39840
  );
39782
39841
  return;
39783
39842
  }
39784
- const mergedOptions = merge(resolvedConfiguration, (_a = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _a : {});
39843
+ const mergedOptions = PluginConfigurationMerger.mergeSearchResultsConfiguration(
39844
+ resolvedConfiguration,
39845
+ (_a = optionOverrides == null ? void 0 : optionOverrides.searchResults) != null ? _a : {}
39846
+ );
39785
39847
  searchResults(__spreadProps(__spreadValues({}, mergedOptions), { options }), { fetch: fetch2, allowedMountUrls });
39786
39848
  });
39787
39849
  const mountProductList = (configuration, options, optionOverrides, fetch2 = true, remount = false) => __async(this, null, function* () {
@@ -0,0 +1,85 @@
1
+ import { ResolvedSearchBoxOptions, ResolvedSearchResultOptions } from '../../types/ResolvedOptions';
2
+ import { SearchBoxOptions, SearchResultsOptions } from '@getlupa/vue';
3
+ declare const _default: {
4
+ mergeSearchBoxConfiguration: (options: ResolvedSearchBoxOptions, overrides: Partial<SearchBoxOptions>) => import("@getlupa/vue/dist/src/types/search-box/SearchBoxOptions").SearchBoxInputOptions & {
5
+ history: import("@getlupa/vue/dist/src/types/search-box/SearchBoxHistory").SearchBoxHistory;
6
+ panels: import("@getlupa/vue/dist/src/types/search-box/SearchBoxPanel").SearchBoxPanel[];
7
+ options: import("@getlupa/vue").SdkOptions;
8
+ debounce?: number;
9
+ showTotalCount?: boolean;
10
+ showNoResultsPanel?: boolean;
11
+ hideMoreResultsButtonOnNoResults?: boolean;
12
+ showMoreResultsButton?: boolean;
13
+ expandOnSinglePanel?: boolean;
14
+ forceFullReloadOnParams?: string[];
15
+ initialFilters?: import("@getlupa/client-sdk/Types").FilterGroup | Record<string, import("@getlupa/vue/dist/src/types/DataExtraction").DataExtraction>;
16
+ } & {
17
+ inputSelector: string;
18
+ searchTriggers?: string[];
19
+ routingBehavior?: import("@getlupa/vue").RoutingBehavior;
20
+ dynamicData?: import("@getlupa/vue").DynamicData;
21
+ callbacks?: import("@getlupa/vue").SearchBoxEventCallbacks;
22
+ redirections?: import("@getlupa/vue").RedirectionOptions;
23
+ queryParameterNames?: Record<import("@getlupa/vue/dist/src/types/General").LupaQueryParamValue, string>;
24
+ keepOpen?: boolean;
25
+ } & {
26
+ allowedMountUrls?: string[];
27
+ } & {
28
+ minInputLength?: number;
29
+ labels?: import("@getlupa/vue/dist/src/types/search-box/SearchBoxOptions").SearchBoxOptionLabels;
30
+ links?: import("@getlupa/vue/dist/src/types/search-box/SearchBoxOptions").SearchBoxOptionLinks;
31
+ inputAttributes?: Record<string, string>;
32
+ showSubmitButton?: boolean;
33
+ history?: import("@getlupa/vue/dist/src/types/search-box/SearchBoxHistory").SearchBoxHistory;
34
+ options?: import("@getlupa/vue").SdkOptions;
35
+ debounce?: number;
36
+ showTotalCount?: boolean;
37
+ showNoResultsPanel?: boolean;
38
+ hideMoreResultsButtonOnNoResults?: boolean;
39
+ showMoreResultsButton?: boolean;
40
+ expandOnSinglePanel?: boolean;
41
+ forceFullReloadOnParams?: string[];
42
+ initialFilters?: import("@getlupa/client-sdk/Types").FilterGroup | Record<string, import("@getlupa/vue/dist/src/types/DataExtraction").DataExtraction>;
43
+ inputSelector?: string;
44
+ searchTriggers?: string[];
45
+ routingBehavior?: import("@getlupa/vue").RoutingBehavior;
46
+ dynamicData?: import("@getlupa/vue").DynamicData;
47
+ callbacks?: import("@getlupa/vue").SearchBoxEventCallbacks;
48
+ redirections?: import("@getlupa/vue").RedirectionOptions;
49
+ queryParameterNames?: Record<import("@getlupa/vue/dist/src/types/General").LupaQueryParamValue, string>;
50
+ keepOpen?: boolean;
51
+ };
52
+ mergeSearchResultsConfiguration: (options: ResolvedSearchResultOptions, overrides: Partial<SearchResultsOptions>) => import("@getlupa/vue/dist/src/types/search-results/SearchResultsProductCardOptions").SearchResultsProductCardOptions & import("@getlupa/vue/dist/src/types/search-results/SearchResultsOptions").SearchResultsAdditionalPanels & {
53
+ grid: import("@getlupa/vue/dist/src/types/search-results/SearchResultsOptions").ProductGrid;
54
+ options: import("@getlupa/vue").SdkOptions;
55
+ queryKey: string;
56
+ pagination: import("@getlupa/vue/dist/src/types/search-results/SearchResultsOptions").SearchResultsPagination;
57
+ sort: import("@getlupa/vue").SearchResultsSortOptions[];
58
+ filters?: import("@getlupa/vue").SearchResultsFilterOptions;
59
+ searchTitlePosition?: string;
60
+ hideResultsOnReload?: boolean;
61
+ relatedQueries?: import("@getlupa/vue/dist/src/types/search-results/RelatedQueryOptions").RelatedQueryOptions;
62
+ redirectionSuggestions?: import("@getlupa/vue/dist/src/types/search-results/RedirectionSuggestionOptionts").RedirectionSuggestionOptions[];
63
+ toolbar?: {
64
+ layoutSelector?: boolean;
65
+ itemSummary?: boolean;
66
+ clearFilters?: boolean;
67
+ totalCount?: boolean;
68
+ };
69
+ } & {
70
+ containerSelector: string;
71
+ breadcrumbs: import("@getlupa/vue/dist/src/types/search-results/SearchResultsOptions").SearchResultsBreadcrumb[];
72
+ classMap?: Record<string, string>;
73
+ disallowEmptyQuery?: boolean;
74
+ callbacks?: import("@getlupa/vue").SearchResultEventCallbacks;
75
+ categories?: import("@getlupa/vue").CategoryFilterOptions;
76
+ dynamicData?: import("@getlupa/vue").DynamicData;
77
+ ssr?: import("@getlupa/vue").SsrOptions;
78
+ redirections?: import("@getlupa/vue").RedirectionOptions;
79
+ scrollToResults?: import("@getlupa/vue").ScrollToResultsOptions;
80
+ initialFilters?: import("@getlupa/client-sdk/Types").FilterGroup | Record<string, import("@getlupa/vue/dist/src/types/DataExtraction").DataExtraction>;
81
+ } & {
82
+ allowedMountUrls?: string[];
83
+ } & Partial<SearchResultsOptions>;
84
+ };
85
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/client",
3
- "version": "1.15.13",
3
+ "version": "1.15.14",
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.15.13",
23
+ "@getlupa/vue": "0.15.14",
24
24
  "@rushstack/eslint-patch": "^1.3.2",
25
25
  "@tsconfig/node18": "^2.0.1",
26
26
  "@types/jsdom": "^21.1.1",