@eo-sdk/client 10.4.0-rc.3 → 10.4.0-rc.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.
Files changed (22) hide show
  1. package/app/eo-client/dashboard/widgets/hitlist-widget/IHitlist.d.ts +2 -2
  2. package/app/eo-client/dashboard/widgets/hitlist-widget/IHitlist.d.ts.map +1 -1
  3. package/app/eo-client/dashboard/widgets/hitlist-widget/hitlist-setup/hitlist-setup.component.d.ts +3 -1
  4. package/app/eo-client/dashboard/widgets/hitlist-widget/hitlist-setup/hitlist-setup.component.d.ts.map +1 -1
  5. package/app/eo-client/dashboard/widgets/hitlist-widget/hitlist-widget.component.d.ts +4 -3
  6. package/app/eo-client/dashboard/widgets/hitlist-widget/hitlist-widget.component.d.ts.map +1 -1
  7. package/esm2020/app/eo-client/about-state/about-state.component.mjs +3 -3
  8. package/esm2020/app/eo-client/dashboard/widgets/hitlist-widget/IHitlist.mjs +1 -1
  9. package/esm2020/app/eo-client/dashboard/widgets/hitlist-widget/hitlist-setup/hitlist-setup.component.mjs +40 -20
  10. package/esm2020/app/eo-client/dashboard/widgets/hitlist-widget/hitlist-widget.component.mjs +22 -16
  11. package/esm2020/projects/eo-sdk/core/lib/service/stored-queries/stored-queries.service.mjs +38 -7
  12. package/fesm2015/eo-sdk-client-projects-eo-sdk-core.mjs +37 -6
  13. package/fesm2015/eo-sdk-client-projects-eo-sdk-core.mjs.map +1 -1
  14. package/fesm2015/eo-sdk-client.mjs +64 -41
  15. package/fesm2015/eo-sdk-client.mjs.map +1 -1
  16. package/fesm2020/eo-sdk-client-projects-eo-sdk-core.mjs +37 -6
  17. package/fesm2020/eo-sdk-client-projects-eo-sdk-core.mjs.map +1 -1
  18. package/fesm2020/eo-sdk-client.mjs +60 -36
  19. package/fesm2020/eo-sdk-client.mjs.map +1 -1
  20. package/package.json +2 -2
  21. package/projects/eo-sdk/core/lib/service/stored-queries/stored-queries.service.d.ts +6 -1
  22. package/projects/eo-sdk/core/lib/service/stored-queries/stored-queries.service.d.ts.map +1 -1
@@ -5935,7 +5935,7 @@ class StoredQueriesService {
5935
5935
  */
5936
5936
  getStoredQueries$() {
5937
5937
  if (!this.storedQueries.queries.length) {
5938
- this.fetchStoredQueries();
5938
+ this.refreshStoredQueries();
5939
5939
  }
5940
5940
  return this.storedQueries$;
5941
5941
  }
@@ -5944,14 +5944,30 @@ class StoredQueriesService {
5944
5944
  * new value to your subscription.
5945
5945
  */
5946
5946
  refreshStoredQueries() {
5947
- this.fetchStoredQueries();
5947
+ this.backend
5948
+ .getJson('/storedqueries?size=9999', this.backend.getSearchBase())
5949
+ .pipe(map(sQueries => {
5950
+ return (sQueries || [])
5951
+ .map(s => {
5952
+ let sq = new StoredQuery(s);
5953
+ /**
5954
+ * set up search query properties for the stored query
5955
+ */
5956
+ sq.setQuery(this.searchService.buildQuery(s.query));
5957
+ return sq;
5958
+ });
5959
+ }))
5960
+ .subscribe(res => {
5961
+ this.storedQueries = { queries: res };
5962
+ this.storedQueriesSource.next(this.storedQueries);
5963
+ });
5948
5964
  }
5949
5965
  /**
5950
5966
  * Fetches the stored queries from the backend and propagates a new
5951
5967
  * value to the main subject.
5952
5968
  */
5953
5969
  fetchStoredQueries() {
5954
- this.backend
5970
+ return this.backend
5955
5971
  .getJson('/storedqueries?size=9999', this.backend.getSearchBase())
5956
5972
  .pipe(map(sQueries => {
5957
5973
  return (sQueries || [])
@@ -5963,11 +5979,10 @@ class StoredQueriesService {
5963
5979
  sq.setQuery(this.searchService.buildQuery(s.query));
5964
5980
  return sq;
5965
5981
  });
5966
- }))
5967
- .subscribe(res => {
5982
+ }), tap(res => {
5968
5983
  this.storedQueries = { queries: res };
5969
5984
  this.storedQueriesSource.next(this.storedQueries);
5970
- });
5985
+ }));
5971
5986
  }
5972
5987
  /**
5973
5988
  * Save new Stored Query
@@ -6033,6 +6048,22 @@ class StoredQueriesService {
6033
6048
  this.storedQueriesSource.next(this.storedQueries);
6034
6049
  }));
6035
6050
  }
6051
+ /**
6052
+ * Get StoredQuery with the provided Id
6053
+ * @param id ID of the stored query to be fetched
6054
+ */
6055
+ getStoredQuery(id) {
6056
+ return this.backend
6057
+ .get(`/storedqueries/${id}`, this.backend.getSearchBase())
6058
+ .pipe(map(s => {
6059
+ let sq = new StoredQuery(s);
6060
+ /**
6061
+ * set up search query properties for the stored query
6062
+ */
6063
+ sq.setQuery(this.searchService.buildQuery(s.query));
6064
+ return sq;
6065
+ }));
6066
+ }
6036
6067
  /**
6037
6068
  * Creates a pseudo form element for a stored queries fulltext input field
6038
6069
  * to be used inside of a stored query form.