@getlupa/client 1.3.8 → 1.3.9
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 +5 -2
- package/dist/lupaSearch.js +5 -2
- package/dist/lupaSearch.mjs +5 -2
- package/dist/lupaSearch.umd.js +5 -2
- package/package.json +2 -2
package/dist/lupaSearch.iife.js
CHANGED
|
@@ -12265,6 +12265,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12265
12265
|
const paramStore = useParamsStore();
|
|
12266
12266
|
const { sort } = storeToRefs(paramStore);
|
|
12267
12267
|
const selectedKey = ref("");
|
|
12268
|
+
const previousKey = ref("");
|
|
12268
12269
|
const sortItems = computed(() => {
|
|
12269
12270
|
if (props.options.options && props.options.options.length) {
|
|
12270
12271
|
return props.options.options;
|
|
@@ -12280,6 +12281,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12280
12281
|
var _a, _b;
|
|
12281
12282
|
const optionToSelect = (_a = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a.key;
|
|
12282
12283
|
selectedKey.value = optionToSelect != null ? optionToSelect : (_b = defaultSortValue.value) == null ? void 0 : _b.key;
|
|
12284
|
+
previousKey.value = selectedKey.value;
|
|
12283
12285
|
};
|
|
12284
12286
|
watch(sort, () => setSortValue());
|
|
12285
12287
|
onMounted(() => {
|
|
@@ -12291,11 +12293,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12291
12293
|
if (!value) {
|
|
12292
12294
|
return;
|
|
12293
12295
|
}
|
|
12294
|
-
(_c = (_b = props.callbacks) == null ? void 0 : _b.onSortChange) == null ? void 0 : _c.call(_b, { selectedSortKey: value });
|
|
12296
|
+
(_c = (_b = props.callbacks) == null ? void 0 : _b.onSortChange) == null ? void 0 : _c.call(_b, { selectedSortKey: value, previousSortKey: previousKey.value });
|
|
12295
12297
|
paramStore.appendParams({
|
|
12296
12298
|
params: [{ name: QUERY_PARAMS$1.SORT, value }],
|
|
12297
12299
|
paramsToRemove: [QUERY_PARAMS$1.PAGE]
|
|
12298
12300
|
});
|
|
12301
|
+
previousKey.value = selectedKey.value;
|
|
12299
12302
|
};
|
|
12300
12303
|
return (_ctx, _cache) => {
|
|
12301
12304
|
return openBlock(), createElementBlock("div", _hoisted_1$y, [
|
|
@@ -13990,7 +13993,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13990
13993
|
const hasResults2 = Boolean(
|
|
13991
13994
|
results.total > 0 || ((_a = results.similarQueries) == null ? void 0 : _a.length) || ((_b = results.didYouMean) == null ? void 0 : _b.options)
|
|
13992
13995
|
);
|
|
13993
|
-
(_d = (_c = props.options.callbacks) == null ? void 0 : _c.onSearchResults) == null ? void 0 : _d.call(_c, { queryKey, hasResults: hasResults2 });
|
|
13996
|
+
(_d = (_c = props.options.callbacks) == null ? void 0 : _c.onSearchResults) == null ? void 0 : _d.call(_c, { queryKey, hasResults: hasResults2, params: paramStore.params });
|
|
13994
13997
|
if (!hasResults2) {
|
|
13995
13998
|
return;
|
|
13996
13999
|
}
|
package/dist/lupaSearch.js
CHANGED
|
@@ -12265,6 +12265,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
12265
12265
|
const paramStore = useParamsStore();
|
|
12266
12266
|
const { sort } = storeToRefs(paramStore);
|
|
12267
12267
|
const selectedKey = ref("");
|
|
12268
|
+
const previousKey = ref("");
|
|
12268
12269
|
const sortItems = computed(() => {
|
|
12269
12270
|
if (props.options.options && props.options.options.length) {
|
|
12270
12271
|
return props.options.options;
|
|
@@ -12280,6 +12281,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
12280
12281
|
var _a, _b;
|
|
12281
12282
|
const optionToSelect = (_a = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a.key;
|
|
12282
12283
|
selectedKey.value = optionToSelect != null ? optionToSelect : (_b = defaultSortValue.value) == null ? void 0 : _b.key;
|
|
12284
|
+
previousKey.value = selectedKey.value;
|
|
12283
12285
|
};
|
|
12284
12286
|
watch(sort, () => setSortValue());
|
|
12285
12287
|
onMounted(() => {
|
|
@@ -12291,11 +12293,12 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
12291
12293
|
if (!value) {
|
|
12292
12294
|
return;
|
|
12293
12295
|
}
|
|
12294
|
-
(_c = (_b = props.callbacks) == null ? void 0 : _b.onSortChange) == null ? void 0 : _c.call(_b, { selectedSortKey: value });
|
|
12296
|
+
(_c = (_b = props.callbacks) == null ? void 0 : _b.onSortChange) == null ? void 0 : _c.call(_b, { selectedSortKey: value, previousSortKey: previousKey.value });
|
|
12295
12297
|
paramStore.appendParams({
|
|
12296
12298
|
params: [{ name: QUERY_PARAMS$1.SORT, value }],
|
|
12297
12299
|
paramsToRemove: [QUERY_PARAMS$1.PAGE]
|
|
12298
12300
|
});
|
|
12301
|
+
previousKey.value = selectedKey.value;
|
|
12299
12302
|
};
|
|
12300
12303
|
return (_ctx, _cache) => {
|
|
12301
12304
|
return openBlock(), createElementBlock("div", _hoisted_1$y, [
|
|
@@ -13990,7 +13993,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
13990
13993
|
const hasResults2 = Boolean(
|
|
13991
13994
|
results.total > 0 || ((_a = results.similarQueries) == null ? void 0 : _a.length) || ((_b = results.didYouMean) == null ? void 0 : _b.options)
|
|
13992
13995
|
);
|
|
13993
|
-
(_d = (_c = props.options.callbacks) == null ? void 0 : _c.onSearchResults) == null ? void 0 : _d.call(_c, { queryKey, hasResults: hasResults2 });
|
|
13996
|
+
(_d = (_c = props.options.callbacks) == null ? void 0 : _c.onSearchResults) == null ? void 0 : _d.call(_c, { queryKey, hasResults: hasResults2, params: paramStore.params });
|
|
13994
13997
|
if (!hasResults2) {
|
|
13995
13998
|
return;
|
|
13996
13999
|
}
|
package/dist/lupaSearch.mjs
CHANGED
|
@@ -12263,6 +12263,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
12263
12263
|
const paramStore = useParamsStore();
|
|
12264
12264
|
const { sort } = storeToRefs(paramStore);
|
|
12265
12265
|
const selectedKey = ref("");
|
|
12266
|
+
const previousKey = ref("");
|
|
12266
12267
|
const sortItems = computed(() => {
|
|
12267
12268
|
if (props.options.options && props.options.options.length) {
|
|
12268
12269
|
return props.options.options;
|
|
@@ -12278,6 +12279,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
12278
12279
|
var _a, _b;
|
|
12279
12280
|
const optionToSelect = (_a = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a.key;
|
|
12280
12281
|
selectedKey.value = optionToSelect != null ? optionToSelect : (_b = defaultSortValue.value) == null ? void 0 : _b.key;
|
|
12282
|
+
previousKey.value = selectedKey.value;
|
|
12281
12283
|
};
|
|
12282
12284
|
watch(sort, () => setSortValue());
|
|
12283
12285
|
onMounted(() => {
|
|
@@ -12289,11 +12291,12 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
12289
12291
|
if (!value) {
|
|
12290
12292
|
return;
|
|
12291
12293
|
}
|
|
12292
|
-
(_c = (_b = props.callbacks) == null ? void 0 : _b.onSortChange) == null ? void 0 : _c.call(_b, { selectedSortKey: value });
|
|
12294
|
+
(_c = (_b = props.callbacks) == null ? void 0 : _b.onSortChange) == null ? void 0 : _c.call(_b, { selectedSortKey: value, previousSortKey: previousKey.value });
|
|
12293
12295
|
paramStore.appendParams({
|
|
12294
12296
|
params: [{ name: QUERY_PARAMS$1.SORT, value }],
|
|
12295
12297
|
paramsToRemove: [QUERY_PARAMS$1.PAGE]
|
|
12296
12298
|
});
|
|
12299
|
+
previousKey.value = selectedKey.value;
|
|
12297
12300
|
};
|
|
12298
12301
|
return (_ctx, _cache) => {
|
|
12299
12302
|
return openBlock(), createElementBlock("div", _hoisted_1$y, [
|
|
@@ -13988,7 +13991,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
13988
13991
|
const hasResults2 = Boolean(
|
|
13989
13992
|
results.total > 0 || ((_a = results.similarQueries) == null ? void 0 : _a.length) || ((_b = results.didYouMean) == null ? void 0 : _b.options)
|
|
13990
13993
|
);
|
|
13991
|
-
(_d = (_c = props.options.callbacks) == null ? void 0 : _c.onSearchResults) == null ? void 0 : _d.call(_c, { queryKey, hasResults: hasResults2 });
|
|
13994
|
+
(_d = (_c = props.options.callbacks) == null ? void 0 : _c.onSearchResults) == null ? void 0 : _d.call(_c, { queryKey, hasResults: hasResults2, params: paramStore.params });
|
|
13992
13995
|
if (!hasResults2) {
|
|
13993
13996
|
return;
|
|
13994
13997
|
}
|
package/dist/lupaSearch.umd.js
CHANGED
|
@@ -12267,6 +12267,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12267
12267
|
const paramStore = useParamsStore();
|
|
12268
12268
|
const { sort } = storeToRefs(paramStore);
|
|
12269
12269
|
const selectedKey = ref("");
|
|
12270
|
+
const previousKey = ref("");
|
|
12270
12271
|
const sortItems = computed(() => {
|
|
12271
12272
|
if (props.options.options && props.options.options.length) {
|
|
12272
12273
|
return props.options.options;
|
|
@@ -12282,6 +12283,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12282
12283
|
var _a, _b;
|
|
12283
12284
|
const optionToSelect = (_a = sortItems.value.find((x) => x.key === sort.value)) == null ? void 0 : _a.key;
|
|
12284
12285
|
selectedKey.value = optionToSelect != null ? optionToSelect : (_b = defaultSortValue.value) == null ? void 0 : _b.key;
|
|
12286
|
+
previousKey.value = selectedKey.value;
|
|
12285
12287
|
};
|
|
12286
12288
|
watch(sort, () => setSortValue());
|
|
12287
12289
|
onMounted(() => {
|
|
@@ -12293,11 +12295,12 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
12293
12295
|
if (!value) {
|
|
12294
12296
|
return;
|
|
12295
12297
|
}
|
|
12296
|
-
(_c = (_b = props.callbacks) == null ? void 0 : _b.onSortChange) == null ? void 0 : _c.call(_b, { selectedSortKey: value });
|
|
12298
|
+
(_c = (_b = props.callbacks) == null ? void 0 : _b.onSortChange) == null ? void 0 : _c.call(_b, { selectedSortKey: value, previousSortKey: previousKey.value });
|
|
12297
12299
|
paramStore.appendParams({
|
|
12298
12300
|
params: [{ name: QUERY_PARAMS$1.SORT, value }],
|
|
12299
12301
|
paramsToRemove: [QUERY_PARAMS$1.PAGE]
|
|
12300
12302
|
});
|
|
12303
|
+
previousKey.value = selectedKey.value;
|
|
12301
12304
|
};
|
|
12302
12305
|
return (_ctx, _cache) => {
|
|
12303
12306
|
return openBlock(), createElementBlock("div", _hoisted_1$y, [
|
|
@@ -13992,7 +13995,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
13992
13995
|
const hasResults2 = Boolean(
|
|
13993
13996
|
results.total > 0 || ((_a = results.similarQueries) == null ? void 0 : _a.length) || ((_b = results.didYouMean) == null ? void 0 : _b.options)
|
|
13994
13997
|
);
|
|
13995
|
-
(_d = (_c = props.options.callbacks) == null ? void 0 : _c.onSearchResults) == null ? void 0 : _d.call(_c, { queryKey, hasResults: hasResults2 });
|
|
13998
|
+
(_d = (_c = props.options.callbacks) == null ? void 0 : _c.onSearchResults) == null ? void 0 : _d.call(_c, { queryKey, hasResults: hasResults2, params: paramStore.params });
|
|
13996
13999
|
if (!hasResults2) {
|
|
13997
14000
|
return;
|
|
13998
14001
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getlupa/client",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
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.3.
|
|
23
|
+
"@getlupa/vue": "0.3.7",
|
|
24
24
|
"@rushstack/eslint-patch": "^1.3.2",
|
|
25
25
|
"@tsconfig/node18": "^2.0.1",
|
|
26
26
|
"@types/jsdom": "^21.1.1",
|