@getlupa/client 1.17.5 → 1.17.7
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
CHANGED
|
@@ -25927,6 +25927,10 @@ and ensure you are accounting for this risk.
|
|
|
25927
25927
|
var _a2;
|
|
25928
25928
|
return (_a2 = props.options.searchTriggers) != null ? _a2 : [];
|
|
25929
25929
|
});
|
|
25930
|
+
const searchBoxCloseTriggers = computed(() => {
|
|
25931
|
+
var _a2, _b;
|
|
25932
|
+
return (_b = (_a2 = props.options.searchBoxCloseTriggers) == null ? void 0 : _a2.map((selector) => document.querySelector(selector))) != null ? _b : [];
|
|
25933
|
+
});
|
|
25930
25934
|
const goToResultsDebounced = debounce$1(paramsStore.goToResults, (_a = props.options.debounce) != null ? _a : 300);
|
|
25931
25935
|
onMounted(() => {
|
|
25932
25936
|
var _a2, _b, _c;
|
|
@@ -25950,7 +25954,7 @@ and ensure you are accounting for this risk.
|
|
|
25950
25954
|
unbindSearchTriggers(searchTriggers.value, handleCurrentValueSearch);
|
|
25951
25955
|
});
|
|
25952
25956
|
const handleMouseClick = (e2) => {
|
|
25953
|
-
var _a2, _b, _c, _d;
|
|
25957
|
+
var _a2, _b, _c, _d, _e;
|
|
25954
25958
|
const el = document.getElementById("lupa-search-box");
|
|
25955
25959
|
const elementClass = (_b = (_a2 = e2.target) == null ? void 0 : _a2.className) != null ? _b : "";
|
|
25956
25960
|
const hasLupaClass = typeof elementClass.includes == "function" && elementClass.includes("lupa-search-box");
|
|
@@ -25958,6 +25962,9 @@ and ensure you are accounting for this risk.
|
|
|
25958
25962
|
if (openedAt.value && Date.now() - (openedAt == null ? void 0 : openedAt.value) < 500) {
|
|
25959
25963
|
return;
|
|
25960
25964
|
}
|
|
25965
|
+
if ((_c = searchBoxCloseTriggers.value) == null ? void 0 : _c.includes(e2.target)) {
|
|
25966
|
+
close();
|
|
25967
|
+
}
|
|
25961
25968
|
if (isOutsideElement && props.options.keepOpen) {
|
|
25962
25969
|
focused.value = false;
|
|
25963
25970
|
}
|
|
@@ -25966,11 +25973,11 @@ and ensure you are accounting for this risk.
|
|
|
25966
25973
|
}
|
|
25967
25974
|
opened.value = false;
|
|
25968
25975
|
suggestedValue.value = defaultSuggestedValue;
|
|
25969
|
-
if ((
|
|
25970
|
-
(
|
|
25976
|
+
if ((_d = props.options.callbacks) == null ? void 0 : _d.onClosed) {
|
|
25977
|
+
(_e = props.options.callbacks) == null ? void 0 : _e.onClosed();
|
|
25971
25978
|
}
|
|
25972
25979
|
};
|
|
25973
|
-
const close = () => {
|
|
25980
|
+
const close = (e2) => {
|
|
25974
25981
|
var _a2, _b;
|
|
25975
25982
|
opened.value = false;
|
|
25976
25983
|
focused.value = false;
|
|
@@ -28987,10 +28994,10 @@ and ensure you are accounting for this risk.
|
|
|
28987
28994
|
const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
|
|
28988
28995
|
const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
|
|
28989
28996
|
const label = computed(() => {
|
|
28990
|
-
if (isSidebarVisible.value) {
|
|
28997
|
+
if (isSidebarVisible.value && openLabel.value) {
|
|
28991
28998
|
return openLabel.value;
|
|
28992
28999
|
}
|
|
28993
|
-
if (hasActiveFilters.value) {
|
|
29000
|
+
if (hasActiveFilters.value && activeLabel.value) {
|
|
28994
29001
|
return activeLabel.value;
|
|
28995
29002
|
}
|
|
28996
29003
|
return defaultLabel.value;
|
package/dist/lupaSearch.js
CHANGED
|
@@ -25927,6 +25927,10 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
25927
25927
|
var _a2;
|
|
25928
25928
|
return (_a2 = props.options.searchTriggers) != null ? _a2 : [];
|
|
25929
25929
|
});
|
|
25930
|
+
const searchBoxCloseTriggers = computed(() => {
|
|
25931
|
+
var _a2, _b;
|
|
25932
|
+
return (_b = (_a2 = props.options.searchBoxCloseTriggers) == null ? void 0 : _a2.map((selector) => document.querySelector(selector))) != null ? _b : [];
|
|
25933
|
+
});
|
|
25930
25934
|
const goToResultsDebounced = debounce$1(paramsStore.goToResults, (_a = props.options.debounce) != null ? _a : 300);
|
|
25931
25935
|
onMounted(() => {
|
|
25932
25936
|
var _a2, _b, _c;
|
|
@@ -25950,7 +25954,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
25950
25954
|
unbindSearchTriggers(searchTriggers.value, handleCurrentValueSearch);
|
|
25951
25955
|
});
|
|
25952
25956
|
const handleMouseClick = (e2) => {
|
|
25953
|
-
var _a2, _b, _c, _d;
|
|
25957
|
+
var _a2, _b, _c, _d, _e;
|
|
25954
25958
|
const el = document.getElementById("lupa-search-box");
|
|
25955
25959
|
const elementClass = (_b = (_a2 = e2.target) == null ? void 0 : _a2.className) != null ? _b : "";
|
|
25956
25960
|
const hasLupaClass = typeof elementClass.includes == "function" && elementClass.includes("lupa-search-box");
|
|
@@ -25958,6 +25962,9 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
25958
25962
|
if (openedAt.value && Date.now() - (openedAt == null ? void 0 : openedAt.value) < 500) {
|
|
25959
25963
|
return;
|
|
25960
25964
|
}
|
|
25965
|
+
if ((_c = searchBoxCloseTriggers.value) == null ? void 0 : _c.includes(e2.target)) {
|
|
25966
|
+
close();
|
|
25967
|
+
}
|
|
25961
25968
|
if (isOutsideElement && props.options.keepOpen) {
|
|
25962
25969
|
focused.value = false;
|
|
25963
25970
|
}
|
|
@@ -25966,11 +25973,11 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
25966
25973
|
}
|
|
25967
25974
|
opened.value = false;
|
|
25968
25975
|
suggestedValue.value = defaultSuggestedValue;
|
|
25969
|
-
if ((
|
|
25970
|
-
(
|
|
25976
|
+
if ((_d = props.options.callbacks) == null ? void 0 : _d.onClosed) {
|
|
25977
|
+
(_e = props.options.callbacks) == null ? void 0 : _e.onClosed();
|
|
25971
25978
|
}
|
|
25972
25979
|
};
|
|
25973
|
-
const close = () => {
|
|
25980
|
+
const close = (e2) => {
|
|
25974
25981
|
var _a2, _b;
|
|
25975
25982
|
opened.value = false;
|
|
25976
25983
|
focused.value = false;
|
|
@@ -28987,10 +28994,10 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
28987
28994
|
const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
|
|
28988
28995
|
const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
|
|
28989
28996
|
const label = computed(() => {
|
|
28990
|
-
if (isSidebarVisible.value) {
|
|
28997
|
+
if (isSidebarVisible.value && openLabel.value) {
|
|
28991
28998
|
return openLabel.value;
|
|
28992
28999
|
}
|
|
28993
|
-
if (hasActiveFilters.value) {
|
|
29000
|
+
if (hasActiveFilters.value && activeLabel.value) {
|
|
28994
29001
|
return activeLabel.value;
|
|
28995
29002
|
}
|
|
28996
29003
|
return defaultLabel.value;
|
package/dist/lupaSearch.mjs
CHANGED
|
@@ -25925,6 +25925,10 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
25925
25925
|
var _a2;
|
|
25926
25926
|
return (_a2 = props.options.searchTriggers) != null ? _a2 : [];
|
|
25927
25927
|
});
|
|
25928
|
+
const searchBoxCloseTriggers = computed(() => {
|
|
25929
|
+
var _a2, _b;
|
|
25930
|
+
return (_b = (_a2 = props.options.searchBoxCloseTriggers) == null ? void 0 : _a2.map((selector) => document.querySelector(selector))) != null ? _b : [];
|
|
25931
|
+
});
|
|
25928
25932
|
const goToResultsDebounced = debounce$1(paramsStore.goToResults, (_a = props.options.debounce) != null ? _a : 300);
|
|
25929
25933
|
onMounted(() => {
|
|
25930
25934
|
var _a2, _b, _c;
|
|
@@ -25948,7 +25952,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
25948
25952
|
unbindSearchTriggers(searchTriggers.value, handleCurrentValueSearch);
|
|
25949
25953
|
});
|
|
25950
25954
|
const handleMouseClick = (e2) => {
|
|
25951
|
-
var _a2, _b, _c, _d;
|
|
25955
|
+
var _a2, _b, _c, _d, _e;
|
|
25952
25956
|
const el = document.getElementById("lupa-search-box");
|
|
25953
25957
|
const elementClass = (_b = (_a2 = e2.target) == null ? void 0 : _a2.className) != null ? _b : "";
|
|
25954
25958
|
const hasLupaClass = typeof elementClass.includes == "function" && elementClass.includes("lupa-search-box");
|
|
@@ -25956,6 +25960,9 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
25956
25960
|
if (openedAt.value && Date.now() - (openedAt == null ? void 0 : openedAt.value) < 500) {
|
|
25957
25961
|
return;
|
|
25958
25962
|
}
|
|
25963
|
+
if ((_c = searchBoxCloseTriggers.value) == null ? void 0 : _c.includes(e2.target)) {
|
|
25964
|
+
close();
|
|
25965
|
+
}
|
|
25959
25966
|
if (isOutsideElement && props.options.keepOpen) {
|
|
25960
25967
|
focused.value = false;
|
|
25961
25968
|
}
|
|
@@ -25964,11 +25971,11 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
|
25964
25971
|
}
|
|
25965
25972
|
opened.value = false;
|
|
25966
25973
|
suggestedValue.value = defaultSuggestedValue;
|
|
25967
|
-
if ((
|
|
25968
|
-
(
|
|
25974
|
+
if ((_d = props.options.callbacks) == null ? void 0 : _d.onClosed) {
|
|
25975
|
+
(_e = props.options.callbacks) == null ? void 0 : _e.onClosed();
|
|
25969
25976
|
}
|
|
25970
25977
|
};
|
|
25971
|
-
const close = () => {
|
|
25978
|
+
const close = (e2) => {
|
|
25972
25979
|
var _a2, _b;
|
|
25973
25980
|
opened.value = false;
|
|
25974
25981
|
focused.value = false;
|
|
@@ -28985,10 +28992,10 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
28985
28992
|
const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
|
|
28986
28993
|
const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
|
|
28987
28994
|
const label = computed(() => {
|
|
28988
|
-
if (isSidebarVisible.value) {
|
|
28995
|
+
if (isSidebarVisible.value && openLabel.value) {
|
|
28989
28996
|
return openLabel.value;
|
|
28990
28997
|
}
|
|
28991
|
-
if (hasActiveFilters.value) {
|
|
28998
|
+
if (hasActiveFilters.value && activeLabel.value) {
|
|
28992
28999
|
return activeLabel.value;
|
|
28993
29000
|
}
|
|
28994
29001
|
return defaultLabel.value;
|
package/dist/lupaSearch.umd.js
CHANGED
|
@@ -25929,6 +25929,10 @@ and ensure you are accounting for this risk.
|
|
|
25929
25929
|
var _a2;
|
|
25930
25930
|
return (_a2 = props.options.searchTriggers) != null ? _a2 : [];
|
|
25931
25931
|
});
|
|
25932
|
+
const searchBoxCloseTriggers = computed(() => {
|
|
25933
|
+
var _a2, _b;
|
|
25934
|
+
return (_b = (_a2 = props.options.searchBoxCloseTriggers) == null ? void 0 : _a2.map((selector) => document.querySelector(selector))) != null ? _b : [];
|
|
25935
|
+
});
|
|
25932
25936
|
const goToResultsDebounced = debounce$1(paramsStore.goToResults, (_a = props.options.debounce) != null ? _a : 300);
|
|
25933
25937
|
onMounted(() => {
|
|
25934
25938
|
var _a2, _b, _c;
|
|
@@ -25952,7 +25956,7 @@ and ensure you are accounting for this risk.
|
|
|
25952
25956
|
unbindSearchTriggers(searchTriggers.value, handleCurrentValueSearch);
|
|
25953
25957
|
});
|
|
25954
25958
|
const handleMouseClick = (e2) => {
|
|
25955
|
-
var _a2, _b, _c, _d;
|
|
25959
|
+
var _a2, _b, _c, _d, _e;
|
|
25956
25960
|
const el = document.getElementById("lupa-search-box");
|
|
25957
25961
|
const elementClass = (_b = (_a2 = e2.target) == null ? void 0 : _a2.className) != null ? _b : "";
|
|
25958
25962
|
const hasLupaClass = typeof elementClass.includes == "function" && elementClass.includes("lupa-search-box");
|
|
@@ -25960,6 +25964,9 @@ and ensure you are accounting for this risk.
|
|
|
25960
25964
|
if (openedAt.value && Date.now() - (openedAt == null ? void 0 : openedAt.value) < 500) {
|
|
25961
25965
|
return;
|
|
25962
25966
|
}
|
|
25967
|
+
if ((_c = searchBoxCloseTriggers.value) == null ? void 0 : _c.includes(e2.target)) {
|
|
25968
|
+
close();
|
|
25969
|
+
}
|
|
25963
25970
|
if (isOutsideElement && props.options.keepOpen) {
|
|
25964
25971
|
focused.value = false;
|
|
25965
25972
|
}
|
|
@@ -25968,11 +25975,11 @@ and ensure you are accounting for this risk.
|
|
|
25968
25975
|
}
|
|
25969
25976
|
opened.value = false;
|
|
25970
25977
|
suggestedValue.value = defaultSuggestedValue;
|
|
25971
|
-
if ((
|
|
25972
|
-
(
|
|
25978
|
+
if ((_d = props.options.callbacks) == null ? void 0 : _d.onClosed) {
|
|
25979
|
+
(_e = props.options.callbacks) == null ? void 0 : _e.onClosed();
|
|
25973
25980
|
}
|
|
25974
25981
|
};
|
|
25975
|
-
const close = () => {
|
|
25982
|
+
const close = (e2) => {
|
|
25976
25983
|
var _a2, _b;
|
|
25977
25984
|
opened.value = false;
|
|
25978
25985
|
focused.value = false;
|
|
@@ -28989,10 +28996,10 @@ and ensure you are accounting for this risk.
|
|
|
28989
28996
|
const activeLabel = computed(() => props.labels.mobileFilterButtonActive);
|
|
28990
28997
|
const openLabel = computed(() => props.labels.mobileFilterButtonOpen);
|
|
28991
28998
|
const label = computed(() => {
|
|
28992
|
-
if (isSidebarVisible.value) {
|
|
28999
|
+
if (isSidebarVisible.value && openLabel.value) {
|
|
28993
29000
|
return openLabel.value;
|
|
28994
29001
|
}
|
|
28995
|
-
if (hasActiveFilters.value) {
|
|
29002
|
+
if (hasActiveFilters.value && activeLabel.value) {
|
|
28996
29003
|
return activeLabel.value;
|
|
28997
29004
|
}
|
|
28998
29005
|
return defaultLabel.value;
|
|
@@ -16,6 +16,7 @@ declare const _default: {
|
|
|
16
16
|
} & {
|
|
17
17
|
inputSelector: string;
|
|
18
18
|
searchTriggers?: string[];
|
|
19
|
+
searchBoxCloseTriggers?: string[];
|
|
19
20
|
routingBehavior?: import("@getlupa/vue").RoutingBehavior;
|
|
20
21
|
dynamicData?: import("@getlupa/vue").DynamicData;
|
|
21
22
|
callbacks?: import("@getlupa/vue").SearchBoxEventCallbacks;
|
|
@@ -46,6 +47,7 @@ declare const _default: {
|
|
|
46
47
|
initialFilters?: import("@getlupa/client-sdk/Types").FilterGroup | Record<string, import("@getlupa/vue/dist/src/types/DataExtraction").DataExtraction>;
|
|
47
48
|
inputSelector?: string;
|
|
48
49
|
searchTriggers?: string[];
|
|
50
|
+
searchBoxCloseTriggers?: string[];
|
|
49
51
|
routingBehavior?: import("@getlupa/vue").RoutingBehavior;
|
|
50
52
|
dynamicData?: import("@getlupa/vue").DynamicData;
|
|
51
53
|
callbacks?: import("@getlupa/vue").SearchBoxEventCallbacks;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getlupa/client",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.7",
|
|
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.17.
|
|
23
|
+
"@getlupa/vue": "0.17.7",
|
|
24
24
|
"@rushstack/eslint-patch": "^1.3.2",
|
|
25
25
|
"@tsconfig/node18": "^2.0.1",
|
|
26
26
|
"@types/jsdom": "^21.1.1",
|