@getlupa/client 1.9.0 → 1.9.1

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.
@@ -9280,6 +9280,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9280
9280
  setup(__props, { emit: emit2 }) {
9281
9281
  const props = __props;
9282
9282
  const searchBoxStore = useSearchBoxStore();
9283
+ const mounted = ref(false);
9283
9284
  const { docResults } = storeToRefs(searchBoxStore);
9284
9285
  const searchResult = ref(null);
9285
9286
  const options = computed(() => props.options);
@@ -9294,15 +9295,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9294
9295
  const uniqueFieldValues = Array.from(new Set(allFieldValues));
9295
9296
  return uniqueFieldValues;
9296
9297
  });
9297
- const inputValueProp = computed(() => props.inputValue);
9298
+ const relatedSourceIdsString = computed(() => relatedSourceIds.value.join(","));
9298
9299
  onMounted(() => {
9299
9300
  getItemsDebounced();
9301
+ mounted.value = true;
9300
9302
  });
9301
- watch(relatedSourceIds, () => {
9302
- getItemsDebounced();
9303
- });
9304
- watch(inputValueProp, () => {
9305
- getItemsDebounced();
9303
+ watch(relatedSourceIdsString, () => {
9304
+ if (mounted) {
9305
+ getItemsDebounced();
9306
+ }
9306
9307
  });
9307
9308
  const fetchRelatedItems = () => __async(this, null, function* () {
9308
9309
  var _a, _b;
@@ -9498,6 +9499,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9498
9499
  const panel = panelItemCounts.value.find((v) => v.queryKey === queryKey);
9499
9500
  return (panel == null ? void 0 : panel.count) > 0 && (panel == null ? void 0 : panel.input.length) < 1;
9500
9501
  };
9502
+ const showPanelTitle = (queryKey) => {
9503
+ const panel = panelItemCounts.value.find((v) => v.queryKey === queryKey);
9504
+ return (panel == null ? void 0 : panel.count) > 0;
9505
+ };
9501
9506
  const canShowPanel = (panel) => {
9502
9507
  var _a, _b, _c;
9503
9508
  if (!((_a = panel.visibility) == null ? void 0 : _a.showWhenKeyHasNoResults)) {
@@ -9532,7 +9537,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9532
9537
  "data-cy": "lupa-panel-" + panel.type + "-index"
9533
9538
  }, [
9534
9539
  ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$v, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
9535
- ((_c = panel.labels) == null ? void 0 : _c.title) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
9540
+ ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
9536
9541
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
9537
9542
  key: 2,
9538
9543
  panel,
@@ -9280,6 +9280,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9280
9280
  setup(__props, { emit: emit2 }) {
9281
9281
  const props = __props;
9282
9282
  const searchBoxStore = useSearchBoxStore();
9283
+ const mounted = ref(false);
9283
9284
  const { docResults } = storeToRefs(searchBoxStore);
9284
9285
  const searchResult = ref(null);
9285
9286
  const options = computed(() => props.options);
@@ -9294,15 +9295,15 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9294
9295
  const uniqueFieldValues = Array.from(new Set(allFieldValues));
9295
9296
  return uniqueFieldValues;
9296
9297
  });
9297
- const inputValueProp = computed(() => props.inputValue);
9298
+ const relatedSourceIdsString = computed(() => relatedSourceIds.value.join(","));
9298
9299
  onMounted(() => {
9299
9300
  getItemsDebounced();
9301
+ mounted.value = true;
9300
9302
  });
9301
- watch(relatedSourceIds, () => {
9302
- getItemsDebounced();
9303
- });
9304
- watch(inputValueProp, () => {
9305
- getItemsDebounced();
9303
+ watch(relatedSourceIdsString, () => {
9304
+ if (mounted) {
9305
+ getItemsDebounced();
9306
+ }
9306
9307
  });
9307
9308
  const fetchRelatedItems = () => __async(this, null, function* () {
9308
9309
  var _a, _b;
@@ -9498,6 +9499,10 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
9498
9499
  const panel = panelItemCounts.value.find((v) => v.queryKey === queryKey);
9499
9500
  return (panel == null ? void 0 : panel.count) > 0 && (panel == null ? void 0 : panel.input.length) < 1;
9500
9501
  };
9502
+ const showPanelTitle = (queryKey) => {
9503
+ const panel = panelItemCounts.value.find((v) => v.queryKey === queryKey);
9504
+ return (panel == null ? void 0 : panel.count) > 0;
9505
+ };
9501
9506
  const canShowPanel = (panel) => {
9502
9507
  var _a, _b, _c;
9503
9508
  if (!((_a = panel.visibility) == null ? void 0 : _a.showWhenKeyHasNoResults)) {
@@ -9532,7 +9537,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
9532
9537
  "data-cy": "lupa-panel-" + panel.type + "-index"
9533
9538
  }, [
9534
9539
  ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$v, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
9535
- ((_c = panel.labels) == null ? void 0 : _c.title) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
9540
+ ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
9536
9541
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
9537
9542
  key: 2,
9538
9543
  panel,
@@ -9278,6 +9278,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9278
9278
  setup(__props, { emit: emit2 }) {
9279
9279
  const props = __props;
9280
9280
  const searchBoxStore = useSearchBoxStore();
9281
+ const mounted = ref(false);
9281
9282
  const { docResults } = storeToRefs(searchBoxStore);
9282
9283
  const searchResult = ref(null);
9283
9284
  const options = computed(() => props.options);
@@ -9292,15 +9293,15 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
9292
9293
  const uniqueFieldValues = Array.from(new Set(allFieldValues));
9293
9294
  return uniqueFieldValues;
9294
9295
  });
9295
- const inputValueProp = computed(() => props.inputValue);
9296
+ const relatedSourceIdsString = computed(() => relatedSourceIds.value.join(","));
9296
9297
  onMounted(() => {
9297
9298
  getItemsDebounced();
9299
+ mounted.value = true;
9298
9300
  });
9299
- watch(relatedSourceIds, () => {
9300
- getItemsDebounced();
9301
- });
9302
- watch(inputValueProp, () => {
9303
- getItemsDebounced();
9301
+ watch(relatedSourceIdsString, () => {
9302
+ if (mounted) {
9303
+ getItemsDebounced();
9304
+ }
9304
9305
  });
9305
9306
  const fetchRelatedItems = () => __async(this, null, function* () {
9306
9307
  var _a, _b;
@@ -9496,6 +9497,10 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
9496
9497
  const panel = panelItemCounts.value.find((v) => v.queryKey === queryKey);
9497
9498
  return (panel == null ? void 0 : panel.count) > 0 && (panel == null ? void 0 : panel.input.length) < 1;
9498
9499
  };
9500
+ const showPanelTitle = (queryKey) => {
9501
+ const panel = panelItemCounts.value.find((v) => v.queryKey === queryKey);
9502
+ return (panel == null ? void 0 : panel.count) > 0;
9503
+ };
9499
9504
  const canShowPanel = (panel) => {
9500
9505
  var _a, _b, _c;
9501
9506
  if (!((_a = panel.visibility) == null ? void 0 : _a.showWhenKeyHasNoResults)) {
@@ -9530,7 +9535,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
9530
9535
  "data-cy": "lupa-panel-" + panel.type + "-index"
9531
9536
  }, [
9532
9537
  ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$v, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
9533
- ((_c = panel.labels) == null ? void 0 : _c.title) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
9538
+ ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
9534
9539
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
9535
9540
  key: 2,
9536
9541
  panel,
@@ -9282,6 +9282,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9282
9282
  setup(__props, { emit: emit2 }) {
9283
9283
  const props = __props;
9284
9284
  const searchBoxStore = useSearchBoxStore();
9285
+ const mounted = ref(false);
9285
9286
  const { docResults } = storeToRefs(searchBoxStore);
9286
9287
  const searchResult = ref(null);
9287
9288
  const options = computed(() => props.options);
@@ -9296,15 +9297,15 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9296
9297
  const uniqueFieldValues = Array.from(new Set(allFieldValues));
9297
9298
  return uniqueFieldValues;
9298
9299
  });
9299
- const inputValueProp = computed(() => props.inputValue);
9300
+ const relatedSourceIdsString = computed(() => relatedSourceIds.value.join(","));
9300
9301
  onMounted(() => {
9301
9302
  getItemsDebounced();
9303
+ mounted.value = true;
9302
9304
  });
9303
- watch(relatedSourceIds, () => {
9304
- getItemsDebounced();
9305
- });
9306
- watch(inputValueProp, () => {
9307
- getItemsDebounced();
9305
+ watch(relatedSourceIdsString, () => {
9306
+ if (mounted) {
9307
+ getItemsDebounced();
9308
+ }
9308
9309
  });
9309
9310
  const fetchRelatedItems = () => __async(this, null, function* () {
9310
9311
  var _a, _b;
@@ -9500,6 +9501,10 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9500
9501
  const panel = panelItemCounts.value.find((v) => v.queryKey === queryKey);
9501
9502
  return (panel == null ? void 0 : panel.count) > 0 && (panel == null ? void 0 : panel.input.length) < 1;
9502
9503
  };
9504
+ const showPanelTitle = (queryKey) => {
9505
+ const panel = panelItemCounts.value.find((v) => v.queryKey === queryKey);
9506
+ return (panel == null ? void 0 : panel.count) > 0;
9507
+ };
9503
9508
  const canShowPanel = (panel) => {
9504
9509
  var _a, _b, _c;
9505
9510
  if (!((_a = panel.visibility) == null ? void 0 : _a.showWhenKeyHasNoResults)) {
@@ -9534,7 +9539,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
9534
9539
  "data-cy": "lupa-panel-" + panel.type + "-index"
9535
9540
  }, [
9536
9541
  ((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$v, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
9537
- ((_c = panel.labels) == null ? void 0 : _c.title) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
9542
+ ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
9538
9543
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
9539
9544
  key: 2,
9540
9545
  panel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/client",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
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.9.0",
23
+ "@getlupa/vue": "0.9.1",
24
24
  "@rushstack/eslint-patch": "^1.3.2",
25
25
  "@tsconfig/node18": "^2.0.1",
26
26
  "@types/jsdom": "^21.1.1",