@pristy/pristy-libvue 0.20.1 → 0.20.3
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/pristy-libvue.mjs +16 -20
- package/dist/pristy-libvue.umd.js +1 -1
- package/package.json +1 -1
package/dist/pristy-libvue.mjs
CHANGED
|
@@ -6936,7 +6936,9 @@ const Lu = new su(), Yu = Ie({
|
|
|
6936
6936
|
},
|
|
6937
6937
|
defineUserQuery(t) {
|
|
6938
6938
|
let I = me().SEARCH_USER_QUERY.replaceAll("%s", t);
|
|
6939
|
-
this.language = "afts", this.userQuery = t
|
|
6939
|
+
this.language = "afts", this.userQuery = t;
|
|
6940
|
+
let M = this.fields.map((g) => `(${g.filterQuery})`);
|
|
6941
|
+
console.log("iFields", M), this.fullQuery = [I, ...M].join(" AND ");
|
|
6940
6942
|
},
|
|
6941
6943
|
queryStore(t, e) {
|
|
6942
6944
|
if (!t)
|
|
@@ -6950,7 +6952,7 @@ const Lu = new su(), Yu = Ie({
|
|
|
6950
6952
|
},
|
|
6951
6953
|
include: this.include,
|
|
6952
6954
|
paging: this.paging,
|
|
6953
|
-
filterQueries: this.filterQueries,
|
|
6955
|
+
filterQueries: this.filterQueries.map((M) => ({ query: M.query })),
|
|
6954
6956
|
facetQueries: this.facetQueries,
|
|
6955
6957
|
facetFields: { facets: this.facets },
|
|
6956
6958
|
sort: [{ type: "FIELD", field: "score", ascending: !1 }],
|
|
@@ -6961,30 +6963,24 @@ const Lu = new su(), Yu = Ie({
|
|
|
6961
6963
|
});
|
|
6962
6964
|
},
|
|
6963
6965
|
addFilterQuery(t) {
|
|
6964
|
-
return this.filterQueries.find((e) => e.query === t) ? !1 : (this.filterQueries.push({
|
|
6965
|
-
query: t
|
|
6966
|
-
|
|
6966
|
+
return t.filterQuery ? this.filterQueries.find((e) => e.query === t.filterQuery) ? !1 : (this.filterQueries.push({
|
|
6967
|
+
query: t.filterQuery,
|
|
6968
|
+
label: t.label
|
|
6969
|
+
}), !0) : (console.warn("filterQuery is undifined"), !1);
|
|
6967
6970
|
},
|
|
6968
6971
|
removeFilterQuery(t) {
|
|
6969
|
-
this.filterQueries = this.filterQueries.filter((e) => e.query !== t);
|
|
6972
|
+
this.filterQueries = this.filterQueries.filter((e) => e.query !== t.query);
|
|
6970
6973
|
},
|
|
6971
6974
|
addField(t) {
|
|
6972
|
-
return this.fields.find((e) => e ===
|
|
6975
|
+
return this.fields.find((e) => e.value === t.filterQuery) ? !1 : (this.fields.push({
|
|
6976
|
+
filterQuery: t.filterQuery,
|
|
6977
|
+
label: t.label
|
|
6978
|
+
}), !0);
|
|
6973
6979
|
},
|
|
6974
6980
|
removeField(t) {
|
|
6975
|
-
this.fields = this.fields.filter(
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
this.filterQueries.push({ query: "TYPE:'cm:folder'" });
|
|
6979
|
-
},
|
|
6980
|
-
filterCreator(t) {
|
|
6981
|
-
this.filterQueries.push({ query: `cm:creator${t}` });
|
|
6982
|
-
},
|
|
6983
|
-
facetCreated(t) {
|
|
6984
|
-
this.facetQueries.push({
|
|
6985
|
-
query: `created:${t}`,
|
|
6986
|
-
label: "CreatedYear"
|
|
6987
|
-
});
|
|
6981
|
+
this.fields = this.fields.filter(
|
|
6982
|
+
(e) => e.filterQuery !== t.filterQuery
|
|
6983
|
+
);
|
|
6988
6984
|
}
|
|
6989
6985
|
}
|
|
6990
6986
|
}), wu = Ie({
|