@getlupa/vue 0.9.0 → 0.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.
- package/dist/lupaSearch.js +12 -7
- package/dist/lupaSearch.mjs +12 -7
- package/package.json +1 -1
package/dist/lupaSearch.js
CHANGED
|
@@ -4636,6 +4636,7 @@ const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4636
4636
|
setup(__props, { emit }) {
|
|
4637
4637
|
const props = __props;
|
|
4638
4638
|
const searchBoxStore = useSearchBoxStore();
|
|
4639
|
+
const mounted = vue.ref(false);
|
|
4639
4640
|
const { docResults } = storeToRefs(searchBoxStore);
|
|
4640
4641
|
const searchResult = vue.ref(null);
|
|
4641
4642
|
const options = vue.computed(() => props.options);
|
|
@@ -4650,15 +4651,15 @@ const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4650
4651
|
const uniqueFieldValues = Array.from(new Set(allFieldValues));
|
|
4651
4652
|
return uniqueFieldValues;
|
|
4652
4653
|
});
|
|
4653
|
-
const
|
|
4654
|
+
const relatedSourceIdsString = vue.computed(() => relatedSourceIds.value.join(","));
|
|
4654
4655
|
vue.onMounted(() => {
|
|
4655
4656
|
getItemsDebounced();
|
|
4657
|
+
mounted.value = true;
|
|
4656
4658
|
});
|
|
4657
|
-
vue.watch(
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
getItemsDebounced();
|
|
4659
|
+
vue.watch(relatedSourceIdsString, () => {
|
|
4660
|
+
if (mounted) {
|
|
4661
|
+
getItemsDebounced();
|
|
4662
|
+
}
|
|
4662
4663
|
});
|
|
4663
4664
|
const fetchRelatedItems = () => __async(this, null, function* () {
|
|
4664
4665
|
var _a, _b;
|
|
@@ -4854,6 +4855,10 @@ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadVa
|
|
|
4854
4855
|
const panel = panelItemCounts.value.find((v) => v.queryKey === queryKey);
|
|
4855
4856
|
return (panel == null ? void 0 : panel.count) > 0 && (panel == null ? void 0 : panel.input.length) < 1;
|
|
4856
4857
|
};
|
|
4858
|
+
const showPanelTitle = (queryKey) => {
|
|
4859
|
+
const panel = panelItemCounts.value.find((v) => v.queryKey === queryKey);
|
|
4860
|
+
return (panel == null ? void 0 : panel.count) > 0;
|
|
4861
|
+
};
|
|
4857
4862
|
const canShowPanel = (panel) => {
|
|
4858
4863
|
var _a, _b, _c;
|
|
4859
4864
|
if (!((_a = panel.visibility) == null ? void 0 : _a.showWhenKeyHasNoResults)) {
|
|
@@ -4888,7 +4893,7 @@ const _sfc_main$$ = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadVa
|
|
|
4888
4893
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
4889
4894
|
}, [
|
|
4890
4895
|
((_a2 = panel.labels) == null ? void 0 : _a2.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$v, vue.toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : vue.createCommentVNode("", true),
|
|
4891
|
-
((_c = panel.labels) == null ? void 0 : _c.title) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$o, vue.toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : vue.createCommentVNode("", true),
|
|
4896
|
+
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel.queryKey) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$o, vue.toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : vue.createCommentVNode("", true),
|
|
4892
4897
|
panel.queryKey && canShowPanel(panel) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(getComponent(panel.type)), {
|
|
4893
4898
|
key: 2,
|
|
4894
4899
|
panel,
|
package/dist/lupaSearch.mjs
CHANGED
|
@@ -4634,6 +4634,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
4634
4634
|
setup(__props, { emit }) {
|
|
4635
4635
|
const props = __props;
|
|
4636
4636
|
const searchBoxStore = useSearchBoxStore();
|
|
4637
|
+
const mounted = ref(false);
|
|
4637
4638
|
const { docResults } = storeToRefs(searchBoxStore);
|
|
4638
4639
|
const searchResult = ref(null);
|
|
4639
4640
|
const options = computed(() => props.options);
|
|
@@ -4648,15 +4649,15 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
4648
4649
|
const uniqueFieldValues = Array.from(new Set(allFieldValues));
|
|
4649
4650
|
return uniqueFieldValues;
|
|
4650
4651
|
});
|
|
4651
|
-
const
|
|
4652
|
+
const relatedSourceIdsString = computed(() => relatedSourceIds.value.join(","));
|
|
4652
4653
|
onMounted(() => {
|
|
4653
4654
|
getItemsDebounced();
|
|
4655
|
+
mounted.value = true;
|
|
4654
4656
|
});
|
|
4655
|
-
watch(
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
getItemsDebounced();
|
|
4657
|
+
watch(relatedSourceIdsString, () => {
|
|
4658
|
+
if (mounted) {
|
|
4659
|
+
getItemsDebounced();
|
|
4660
|
+
}
|
|
4660
4661
|
});
|
|
4661
4662
|
const fetchRelatedItems = () => __async(this, null, function* () {
|
|
4662
4663
|
var _a, _b;
|
|
@@ -4852,6 +4853,10 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
4852
4853
|
const panel = panelItemCounts.value.find((v) => v.queryKey === queryKey);
|
|
4853
4854
|
return (panel == null ? void 0 : panel.count) > 0 && (panel == null ? void 0 : panel.input.length) < 1;
|
|
4854
4855
|
};
|
|
4856
|
+
const showPanelTitle = (queryKey) => {
|
|
4857
|
+
const panel = panelItemCounts.value.find((v) => v.queryKey === queryKey);
|
|
4858
|
+
return (panel == null ? void 0 : panel.count) > 0;
|
|
4859
|
+
};
|
|
4855
4860
|
const canShowPanel = (panel) => {
|
|
4856
4861
|
var _a, _b, _c;
|
|
4857
4862
|
if (!((_a = panel.visibility) == null ? void 0 : _a.showWhenKeyHasNoResults)) {
|
|
@@ -4886,7 +4891,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues
|
|
|
4886
4891
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
4887
4892
|
}, [
|
|
4888
4893
|
((_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),
|
|
4889
|
-
((_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),
|
|
4894
|
+
((_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),
|
|
4890
4895
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
4891
4896
|
key: 2,
|
|
4892
4897
|
panel,
|