@getlupa/client 1.5.0 → 1.5.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.
@@ -7349,6 +7349,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7349
7349
  var _a;
7350
7350
  return (_a = params.value.filters) != null ? _a : {};
7351
7351
  });
7352
+ const navigate = (url) => {
7353
+ var _a, _b, _c;
7354
+ window.history.pushState("", "Append params", url.pathname + url.search);
7355
+ const params2 = parseParams(url.searchParams);
7356
+ (_c = (_b = (_a = optionsStore == null ? void 0 : optionsStore.searchBoxOptions) == null ? void 0 : _a.callbacks) == null ? void 0 : _b.onSearchResultsNavigate) == null ? void 0 : _c.call(_b, {
7357
+ params: params2
7358
+ });
7359
+ };
7352
7360
  const add2 = (newParams, ssr) => {
7353
7361
  if (!newParams) {
7354
7362
  return { params: params.value };
@@ -7361,7 +7369,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7361
7369
  const url = getPageUrl();
7362
7370
  const paramsToRemove = Array.from(url.searchParams.keys()).filter(isFacetKey);
7363
7371
  removeParams(url, paramsToRemove);
7364
- window.history.pushState("", "Append params", url.pathname + url.search);
7372
+ navigate(url);
7365
7373
  params.value = parseParams(url.searchParams);
7366
7374
  searchString.value = url.search;
7367
7375
  };
@@ -7372,7 +7380,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7372
7380
  const url = getPageUrl();
7373
7381
  paramsToRemove = getRemovableParams(url, paramsToRemove);
7374
7382
  removeParams(url, paramsToRemove);
7375
- window.history.pushState("", "Append params", url.pathname + url.search);
7383
+ navigate(url);
7376
7384
  if (!save) {
7377
7385
  return;
7378
7386
  }
@@ -7434,7 +7442,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7434
7442
  paramsToRemove = getRemovableParams(url, paramsToRemove);
7435
7443
  removeParams(url, paramsToRemove);
7436
7444
  newParams.forEach((p2) => appendParam(url, p2, encode));
7437
- window.history.pushState("", "Append params", url.pathname + url.search);
7445
+ navigate(url);
7438
7446
  if (!save) {
7439
7447
  return;
7440
7448
  }
@@ -7349,6 +7349,14 @@ const useParamsStore = defineStore("params", () => {
7349
7349
  var _a;
7350
7350
  return (_a = params.value.filters) != null ? _a : {};
7351
7351
  });
7352
+ const navigate = (url) => {
7353
+ var _a, _b, _c;
7354
+ window.history.pushState("", "Append params", url.pathname + url.search);
7355
+ const params2 = parseParams(url.searchParams);
7356
+ (_c = (_b = (_a = optionsStore == null ? void 0 : optionsStore.searchBoxOptions) == null ? void 0 : _a.callbacks) == null ? void 0 : _b.onSearchResultsNavigate) == null ? void 0 : _c.call(_b, {
7357
+ params: params2
7358
+ });
7359
+ };
7352
7360
  const add2 = (newParams, ssr) => {
7353
7361
  if (!newParams) {
7354
7362
  return { params: params.value };
@@ -7361,7 +7369,7 @@ const useParamsStore = defineStore("params", () => {
7361
7369
  const url = getPageUrl();
7362
7370
  const paramsToRemove = Array.from(url.searchParams.keys()).filter(isFacetKey);
7363
7371
  removeParams(url, paramsToRemove);
7364
- window.history.pushState("", "Append params", url.pathname + url.search);
7372
+ navigate(url);
7365
7373
  params.value = parseParams(url.searchParams);
7366
7374
  searchString.value = url.search;
7367
7375
  };
@@ -7372,7 +7380,7 @@ const useParamsStore = defineStore("params", () => {
7372
7380
  const url = getPageUrl();
7373
7381
  paramsToRemove = getRemovableParams(url, paramsToRemove);
7374
7382
  removeParams(url, paramsToRemove);
7375
- window.history.pushState("", "Append params", url.pathname + url.search);
7383
+ navigate(url);
7376
7384
  if (!save) {
7377
7385
  return;
7378
7386
  }
@@ -7434,7 +7442,7 @@ const useParamsStore = defineStore("params", () => {
7434
7442
  paramsToRemove = getRemovableParams(url, paramsToRemove);
7435
7443
  removeParams(url, paramsToRemove);
7436
7444
  newParams.forEach((p2) => appendParam(url, p2, encode));
7437
- window.history.pushState("", "Append params", url.pathname + url.search);
7445
+ navigate(url);
7438
7446
  if (!save) {
7439
7447
  return;
7440
7448
  }
@@ -7347,6 +7347,14 @@ const useParamsStore = defineStore("params", () => {
7347
7347
  var _a;
7348
7348
  return (_a = params.value.filters) != null ? _a : {};
7349
7349
  });
7350
+ const navigate = (url) => {
7351
+ var _a, _b, _c;
7352
+ window.history.pushState("", "Append params", url.pathname + url.search);
7353
+ const params2 = parseParams(url.searchParams);
7354
+ (_c = (_b = (_a = optionsStore == null ? void 0 : optionsStore.searchBoxOptions) == null ? void 0 : _a.callbacks) == null ? void 0 : _b.onSearchResultsNavigate) == null ? void 0 : _c.call(_b, {
7355
+ params: params2
7356
+ });
7357
+ };
7350
7358
  const add2 = (newParams, ssr) => {
7351
7359
  if (!newParams) {
7352
7360
  return { params: params.value };
@@ -7359,7 +7367,7 @@ const useParamsStore = defineStore("params", () => {
7359
7367
  const url = getPageUrl();
7360
7368
  const paramsToRemove = Array.from(url.searchParams.keys()).filter(isFacetKey);
7361
7369
  removeParams(url, paramsToRemove);
7362
- window.history.pushState("", "Append params", url.pathname + url.search);
7370
+ navigate(url);
7363
7371
  params.value = parseParams(url.searchParams);
7364
7372
  searchString.value = url.search;
7365
7373
  };
@@ -7370,7 +7378,7 @@ const useParamsStore = defineStore("params", () => {
7370
7378
  const url = getPageUrl();
7371
7379
  paramsToRemove = getRemovableParams(url, paramsToRemove);
7372
7380
  removeParams(url, paramsToRemove);
7373
- window.history.pushState("", "Append params", url.pathname + url.search);
7381
+ navigate(url);
7374
7382
  if (!save) {
7375
7383
  return;
7376
7384
  }
@@ -7432,7 +7440,7 @@ const useParamsStore = defineStore("params", () => {
7432
7440
  paramsToRemove = getRemovableParams(url, paramsToRemove);
7433
7441
  removeParams(url, paramsToRemove);
7434
7442
  newParams.forEach((p2) => appendParam(url, p2, encode));
7435
- window.history.pushState("", "Append params", url.pathname + url.search);
7443
+ navigate(url);
7436
7444
  if (!save) {
7437
7445
  return;
7438
7446
  }
@@ -7351,6 +7351,14 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7351
7351
  var _a;
7352
7352
  return (_a = params.value.filters) != null ? _a : {};
7353
7353
  });
7354
+ const navigate = (url) => {
7355
+ var _a, _b, _c;
7356
+ window.history.pushState("", "Append params", url.pathname + url.search);
7357
+ const params2 = parseParams(url.searchParams);
7358
+ (_c = (_b = (_a = optionsStore == null ? void 0 : optionsStore.searchBoxOptions) == null ? void 0 : _a.callbacks) == null ? void 0 : _b.onSearchResultsNavigate) == null ? void 0 : _c.call(_b, {
7359
+ params: params2
7360
+ });
7361
+ };
7354
7362
  const add2 = (newParams, ssr) => {
7355
7363
  if (!newParams) {
7356
7364
  return { params: params.value };
@@ -7363,7 +7371,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7363
7371
  const url = getPageUrl();
7364
7372
  const paramsToRemove = Array.from(url.searchParams.keys()).filter(isFacetKey);
7365
7373
  removeParams(url, paramsToRemove);
7366
- window.history.pushState("", "Append params", url.pathname + url.search);
7374
+ navigate(url);
7367
7375
  params.value = parseParams(url.searchParams);
7368
7376
  searchString.value = url.search;
7369
7377
  };
@@ -7374,7 +7382,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7374
7382
  const url = getPageUrl();
7375
7383
  paramsToRemove = getRemovableParams(url, paramsToRemove);
7376
7384
  removeParams(url, paramsToRemove);
7377
- window.history.pushState("", "Append params", url.pathname + url.search);
7385
+ navigate(url);
7378
7386
  if (!save) {
7379
7387
  return;
7380
7388
  }
@@ -7436,7 +7444,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
7436
7444
  paramsToRemove = getRemovableParams(url, paramsToRemove);
7437
7445
  removeParams(url, paramsToRemove);
7438
7446
  newParams.forEach((p2) => appendParam(url, p2, encode));
7439
- window.history.pushState("", "Append params", url.pathname + url.search);
7447
+ navigate(url);
7440
7448
  if (!save) {
7441
7449
  return;
7442
7450
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/client",
3
- "version": "1.5.0",
3
+ "version": "1.5.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.6.0",
23
+ "@getlupa/vue": "0.6.1",
24
24
  "@rushstack/eslint-patch": "^1.3.2",
25
25
  "@tsconfig/node18": "^2.0.1",
26
26
  "@types/jsdom": "^21.1.1",