@pristy/pristy-libvue 0.20.2 → 0.20.4

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.
@@ -6932,7 +6932,7 @@ const Lu = new su(), Yu = Ie({
6932
6932
  actions: {
6933
6933
  reset() {
6934
6934
  const t = me();
6935
- this.language = "afts", this.userQuery = "", this.fullQuery = "", this.filterQueries = [...t.SEARCH_BASE_FILTER_QUERIES], this.facetQueries = [...t.SEARCH_FACET_QUERIES], this.facets = t.SEARCH_FACET, this.fields = [], this.context = null, this.entries = [], this.pagination = {};
6935
+ this.language = "afts", this.userQuery = "", this.fullQuery = "", this.filterQueries = [...t.SEARCH_BASE_FILTER_QUERIES], this.facetQueries = [...t.SEARCH_FACET_QUERIES], this.facets = [...t.SEARCH_FACET], this.fields = [], this.context = null, this.entries = [], this.pagination = {};
6936
6936
  },
6937
6937
  defineUserQuery(t) {
6938
6938
  let I = me().SEARCH_USER_QUERY.replaceAll("%s", t);
@@ -6952,9 +6952,15 @@ const Lu = new su(), Yu = Ie({
6952
6952
  },
6953
6953
  include: this.include,
6954
6954
  paging: this.paging,
6955
- filterQueries: this.filterQueries,
6955
+ filterQueries: this.filterQueries.map((M) => ({ query: M.query })),
6956
6956
  facetQueries: this.facetQueries,
6957
- facetFields: { facets: this.facets },
6957
+ facetFields: {
6958
+ facets: this.facets.map((M) => ({
6959
+ field: M.field,
6960
+ mincount: M.mincount,
6961
+ label: M.label
6962
+ }))
6963
+ },
6958
6964
  sort: [{ type: "FIELD", field: "score", ascending: !1 }],
6959
6965
  facetFormat: "V2"
6960
6966
  };
@@ -6963,13 +6969,13 @@ const Lu = new su(), Yu = Ie({
6963
6969
  });
6964
6970
  },
6965
6971
  addFilterQuery(t) {
6966
- return this.filterQueries.find((e) => e.query === t.filterQuery) ? !1 : (this.filterQueries.push({
6972
+ return t.filterQuery ? this.filterQueries.find((e) => e.query === t.filterQuery) ? !1 : (this.filterQueries.push({
6967
6973
  query: t.filterQuery,
6968
6974
  label: t.label
6969
- }), !0);
6975
+ }), !0) : (console.warn("filterQuery is undifined"), !1);
6970
6976
  },
6971
6977
  removeFilterQuery(t) {
6972
- this.filterQueries = this.filterQueries.filter((e) => e.query !== t.filterQuery);
6978
+ this.filterQueries = this.filterQueries.filter((e) => e.query !== t.query);
6973
6979
  },
6974
6980
  addField(t) {
6975
6981
  return this.fields.find((e) => e.value === t.filterQuery) ? !1 : (this.fields.push({