@getlupa/client 1.9.0 → 1.9.2
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.iife.js +19 -7
- package/dist/lupaSearch.js +19 -7
- package/dist/lupaSearch.mjs +19 -7
- package/dist/lupaSearch.umd.js +19 -7
- package/package.json +2 -2
package/dist/lupaSearch.iife.js
CHANGED
|
@@ -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
|
|
9298
|
+
const relatedSourceIdsString = computed(() => relatedSourceIds.value.join(","));
|
|
9298
9299
|
onMounted(() => {
|
|
9299
9300
|
getItemsDebounced();
|
|
9301
|
+
mounted.value = true;
|
|
9300
9302
|
});
|
|
9301
|
-
watch(
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
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,17 @@ 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 = (panel) => {
|
|
9503
|
+
if (panel.type === SearchBoxPanelType.RELATED_SOURCE) {
|
|
9504
|
+
const panelCounts2 = panelItemCounts.value.find((v) => {
|
|
9505
|
+
var _a;
|
|
9506
|
+
return v.queryKey === ((_a = panel.sourceIds) == null ? void 0 : _a.queryKey);
|
|
9507
|
+
});
|
|
9508
|
+
return (panelCounts2 == null ? void 0 : panelCounts2.count) > 0 && canShowPanel(panel);
|
|
9509
|
+
}
|
|
9510
|
+
const panelCounts = panelItemCounts.value.find((v) => v.queryKey === panel.queryKey);
|
|
9511
|
+
return (panelCounts == null ? void 0 : panelCounts.count) > 0;
|
|
9512
|
+
};
|
|
9501
9513
|
const canShowPanel = (panel) => {
|
|
9502
9514
|
var _a, _b, _c;
|
|
9503
9515
|
if (!((_a = panel.visibility) == null ? void 0 : _a.showWhenKeyHasNoResults)) {
|
|
@@ -9532,7 +9544,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9532
9544
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
9533
9545
|
}, [
|
|
9534
9546
|
((_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),
|
|
9547
|
+
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
|
|
9536
9548
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
9537
9549
|
key: 2,
|
|
9538
9550
|
panel,
|
package/dist/lupaSearch.js
CHANGED
|
@@ -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
|
|
9298
|
+
const relatedSourceIdsString = computed(() => relatedSourceIds.value.join(","));
|
|
9298
9299
|
onMounted(() => {
|
|
9299
9300
|
getItemsDebounced();
|
|
9301
|
+
mounted.value = true;
|
|
9300
9302
|
});
|
|
9301
|
-
watch(
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
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,17 @@ 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 = (panel) => {
|
|
9503
|
+
if (panel.type === SearchBoxPanelType.RELATED_SOURCE) {
|
|
9504
|
+
const panelCounts2 = panelItemCounts.value.find((v) => {
|
|
9505
|
+
var _a;
|
|
9506
|
+
return v.queryKey === ((_a = panel.sourceIds) == null ? void 0 : _a.queryKey);
|
|
9507
|
+
});
|
|
9508
|
+
return (panelCounts2 == null ? void 0 : panelCounts2.count) > 0 && canShowPanel(panel);
|
|
9509
|
+
}
|
|
9510
|
+
const panelCounts = panelItemCounts.value.find((v) => v.queryKey === panel.queryKey);
|
|
9511
|
+
return (panelCounts == null ? void 0 : panelCounts.count) > 0;
|
|
9512
|
+
};
|
|
9501
9513
|
const canShowPanel = (panel) => {
|
|
9502
9514
|
var _a, _b, _c;
|
|
9503
9515
|
if (!((_a = panel.visibility) == null ? void 0 : _a.showWhenKeyHasNoResults)) {
|
|
@@ -9532,7 +9544,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9532
9544
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
9533
9545
|
}, [
|
|
9534
9546
|
((_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),
|
|
9547
|
+
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
|
|
9536
9548
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
9537
9549
|
key: 2,
|
|
9538
9550
|
panel,
|
package/dist/lupaSearch.mjs
CHANGED
|
@@ -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
|
|
9296
|
+
const relatedSourceIdsString = computed(() => relatedSourceIds.value.join(","));
|
|
9296
9297
|
onMounted(() => {
|
|
9297
9298
|
getItemsDebounced();
|
|
9299
|
+
mounted.value = true;
|
|
9298
9300
|
});
|
|
9299
|
-
watch(
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
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,17 @@ 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 = (panel) => {
|
|
9501
|
+
if (panel.type === SearchBoxPanelType.RELATED_SOURCE) {
|
|
9502
|
+
const panelCounts2 = panelItemCounts.value.find((v) => {
|
|
9503
|
+
var _a;
|
|
9504
|
+
return v.queryKey === ((_a = panel.sourceIds) == null ? void 0 : _a.queryKey);
|
|
9505
|
+
});
|
|
9506
|
+
return (panelCounts2 == null ? void 0 : panelCounts2.count) > 0 && canShowPanel(panel);
|
|
9507
|
+
}
|
|
9508
|
+
const panelCounts = panelItemCounts.value.find((v) => v.queryKey === panel.queryKey);
|
|
9509
|
+
return (panelCounts == null ? void 0 : panelCounts.count) > 0;
|
|
9510
|
+
};
|
|
9499
9511
|
const canShowPanel = (panel) => {
|
|
9500
9512
|
var _a, _b, _c;
|
|
9501
9513
|
if (!((_a = panel.visibility) == null ? void 0 : _a.showWhenKeyHasNoResults)) {
|
|
@@ -9530,7 +9542,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValue
|
|
|
9530
9542
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
9531
9543
|
}, [
|
|
9532
9544
|
((_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),
|
|
9545
|
+
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
|
|
9534
9546
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
9535
9547
|
key: 2,
|
|
9536
9548
|
panel,
|
package/dist/lupaSearch.umd.js
CHANGED
|
@@ -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
|
|
9300
|
+
const relatedSourceIdsString = computed(() => relatedSourceIds.value.join(","));
|
|
9300
9301
|
onMounted(() => {
|
|
9301
9302
|
getItemsDebounced();
|
|
9303
|
+
mounted.value = true;
|
|
9302
9304
|
});
|
|
9303
|
-
watch(
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
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,17 @@ 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 = (panel) => {
|
|
9505
|
+
if (panel.type === SearchBoxPanelType.RELATED_SOURCE) {
|
|
9506
|
+
const panelCounts2 = panelItemCounts.value.find((v) => {
|
|
9507
|
+
var _a;
|
|
9508
|
+
return v.queryKey === ((_a = panel.sourceIds) == null ? void 0 : _a.queryKey);
|
|
9509
|
+
});
|
|
9510
|
+
return (panelCounts2 == null ? void 0 : panelCounts2.count) > 0 && canShowPanel(panel);
|
|
9511
|
+
}
|
|
9512
|
+
const panelCounts = panelItemCounts.value.find((v) => v.queryKey === panel.queryKey);
|
|
9513
|
+
return (panelCounts == null ? void 0 : panelCounts.count) > 0;
|
|
9514
|
+
};
|
|
9503
9515
|
const canShowPanel = (panel) => {
|
|
9504
9516
|
var _a, _b, _c;
|
|
9505
9517
|
if (!((_a = panel.visibility) == null ? void 0 : _a.showWhenKeyHasNoResults)) {
|
|
@@ -9534,7 +9546,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
9534
9546
|
"data-cy": "lupa-panel-" + panel.type + "-index"
|
|
9535
9547
|
}, [
|
|
9536
9548
|
((_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),
|
|
9549
|
+
((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
|
|
9538
9550
|
panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
|
|
9539
9551
|
key: 2,
|
|
9540
9552
|
panel,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getlupa/client",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
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.
|
|
23
|
+
"@getlupa/vue": "0.9.2",
|
|
24
24
|
"@rushstack/eslint-patch": "^1.3.2",
|
|
25
25
|
"@tsconfig/node18": "^2.0.1",
|
|
26
26
|
"@types/jsdom": "^21.1.1",
|