@getlupa/vue 0.0.13 → 0.0.14

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.
@@ -9188,7 +9188,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
9188
9188
  const { searchString } = storeToRefs(paramStore);
9189
9189
  const { defaultSearchResultPageSize } = storeToRefs(optionStore);
9190
9190
  const searchResultsFilters = vue.ref(null);
9191
- const ssrSetupDone = vue.ref(false);
9191
+ const mounted = vue.ref(false);
9192
9192
  const ssrEnabled = vue.computed(() => Boolean(props.options.ssr));
9193
9193
  const didYouMeanLabels = vue.computed(() => {
9194
9194
  return pick(props.options.labels, ["noResultsSuggestion", "didYouMean"]);
@@ -9210,6 +9210,7 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
9210
9210
  handleMounted();
9211
9211
  optionStore.setInitialFilters({ initialFilters: initialFilters.value });
9212
9212
  (_b = (_a = props.options.callbacks) == null ? void 0 : _a.onMounted) == null ? void 0 : _b.call(_a);
9213
+ mounted.value = true;
9213
9214
  });
9214
9215
  vue.onBeforeUnmount(() => {
9215
9216
  window.removeEventListener("resize", handleResize);
@@ -9310,18 +9311,13 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
9310
9311
  };
9311
9312
  vue.watch(searchString, () => handleParamsChange());
9312
9313
  const handleParamsChange = () => {
9313
- var _a, _b, _c, _d;
9314
- const searchParams = getSearchParams(
9315
- (_a = props.options.ssr) == null ? void 0 : _a.url,
9316
- void 0,
9317
- (_b = props.options.ssr) == null ? void 0 : _b.baseUrl
9318
- );
9319
- if (searchParams.has(QUERY_PARAMS.QUERY) && props.initialData && !ssrSetupDone.value) {
9320
- ssrSetupDone.value = true;
9314
+ var _a, _b;
9315
+ console.log("search", searchString.value, mounted.value);
9316
+ if (props.initialData && !mounted.value) {
9321
9317
  return;
9322
9318
  }
9323
9319
  handleUrlChange();
9324
- (_d = (_c = props.options.callbacks) == null ? void 0 : _c.onUrlQueryChange) == null ? void 0 : _d.call(_c, {
9320
+ (_b = (_a = props.options.callbacks) == null ? void 0 : _a.onUrlQueryChange) == null ? void 0 : _b.call(_a, {
9325
9321
  queryKey: props.options.queryKey,
9326
9322
  urlQueryString: searchString.value
9327
9323
  });
@@ -9186,7 +9186,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9186
9186
  const { searchString } = storeToRefs(paramStore);
9187
9187
  const { defaultSearchResultPageSize } = storeToRefs(optionStore);
9188
9188
  const searchResultsFilters = ref(null);
9189
- const ssrSetupDone = ref(false);
9189
+ const mounted = ref(false);
9190
9190
  const ssrEnabled = computed(() => Boolean(props.options.ssr));
9191
9191
  const didYouMeanLabels = computed(() => {
9192
9192
  return pick(props.options.labels, ["noResultsSuggestion", "didYouMean"]);
@@ -9208,6 +9208,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9208
9208
  handleMounted();
9209
9209
  optionStore.setInitialFilters({ initialFilters: initialFilters.value });
9210
9210
  (_b = (_a = props.options.callbacks) == null ? void 0 : _a.onMounted) == null ? void 0 : _b.call(_a);
9211
+ mounted.value = true;
9211
9212
  });
9212
9213
  onBeforeUnmount(() => {
9213
9214
  window.removeEventListener("resize", handleResize);
@@ -9308,18 +9309,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
9308
9309
  };
9309
9310
  watch(searchString, () => handleParamsChange());
9310
9311
  const handleParamsChange = () => {
9311
- var _a, _b, _c, _d;
9312
- const searchParams = getSearchParams(
9313
- (_a = props.options.ssr) == null ? void 0 : _a.url,
9314
- void 0,
9315
- (_b = props.options.ssr) == null ? void 0 : _b.baseUrl
9316
- );
9317
- if (searchParams.has(QUERY_PARAMS.QUERY) && props.initialData && !ssrSetupDone.value) {
9318
- ssrSetupDone.value = true;
9312
+ var _a, _b;
9313
+ console.log("search", searchString.value, mounted.value);
9314
+ if (props.initialData && !mounted.value) {
9319
9315
  return;
9320
9316
  }
9321
9317
  handleUrlChange();
9322
- (_d = (_c = props.options.callbacks) == null ? void 0 : _c.onUrlQueryChange) == null ? void 0 : _d.call(_c, {
9318
+ (_b = (_a = props.options.callbacks) == null ? void 0 : _a.onUrlQueryChange) == null ? void 0 : _b.call(_a, {
9323
9319
  queryKey: props.options.queryKey,
9324
9320
  urlQueryString: searchString.value
9325
9321
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/vue",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "main": "dist/lupaSearch.js",
5
5
  "module": "dist/lupaSearch.mjs",
6
6
  "types": "dist/src/index.d.ts",