@colijnit/catalog 262.1.10 → 262.1.11
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.
|
@@ -57,8 +57,8 @@ import { ExternalCatalogTypes } from '@colijnit/transactionapi/build/enum/extern
|
|
|
57
57
|
class Version {
|
|
58
58
|
name = "@colijnit/catalog";
|
|
59
59
|
description = "iOne Catalog module based on Angular 20";
|
|
60
|
-
symVer = "262.1.
|
|
61
|
-
publishDate = "
|
|
60
|
+
symVer = "262.1.11";
|
|
61
|
+
publishDate = "5-10-2026, 16:13:00";
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
class ArticlesSearchResult {
|
|
@@ -2132,7 +2132,7 @@ class CatalogSearchService {
|
|
|
2132
2132
|
});
|
|
2133
2133
|
}
|
|
2134
2134
|
set general(value) {
|
|
2135
|
-
if (value) {
|
|
2135
|
+
if (value && !this._presetApplied) {
|
|
2136
2136
|
this._resetRequest();
|
|
2137
2137
|
}
|
|
2138
2138
|
this.searchRequest.general = value;
|
|
@@ -2171,6 +2171,7 @@ class CatalogSearchService {
|
|
|
2171
2171
|
_category;
|
|
2172
2172
|
_turnoverGroup;
|
|
2173
2173
|
_subs = [];
|
|
2174
|
+
_presetApplied = false;
|
|
2174
2175
|
constructor(_filterService, _catalogConnectorService, _catalogConnectorAdapterService, _settingsService, _optionService, _promptService) {
|
|
2175
2176
|
this._filterService = _filterService;
|
|
2176
2177
|
this._catalogConnectorService = _catalogConnectorService;
|
|
@@ -2223,7 +2224,18 @@ class CatalogSearchService {
|
|
|
2223
2224
|
}
|
|
2224
2225
|
});
|
|
2225
2226
|
}
|
|
2227
|
+
/**
|
|
2228
|
+
* Applies the given (preset) searchRequest and searches for articles based on that request.
|
|
2229
|
+
* While a preset is applied, entering a search term keeps the request intact.
|
|
2230
|
+
*/
|
|
2231
|
+
applySearchRequest(searchRequest) {
|
|
2232
|
+
this.resetFilters(false);
|
|
2233
|
+
this._presetApplied = !!searchRequest;
|
|
2234
|
+
this.searchRequest = Object.assign(this.searchRequest, searchRequest);
|
|
2235
|
+
this.searchArticles();
|
|
2236
|
+
}
|
|
2226
2237
|
resetFilters(search = true) {
|
|
2238
|
+
this._presetApplied = false;
|
|
2227
2239
|
this._resetRequest();
|
|
2228
2240
|
this.articles.length = 0;
|
|
2229
2241
|
if (search) {
|
|
@@ -2244,6 +2256,7 @@ class CatalogSearchService {
|
|
|
2244
2256
|
}, 10);
|
|
2245
2257
|
}
|
|
2246
2258
|
_clearCache() {
|
|
2259
|
+
this._presetApplied = false;
|
|
2247
2260
|
this._resetRequest();
|
|
2248
2261
|
this._settingsService.settings.catalogParameters = new ArticleExtendedRequest();
|
|
2249
2262
|
this.articles.length = 0;
|
|
@@ -7794,9 +7807,7 @@ class CatalogSearchComponent {
|
|
|
7794
7807
|
* Applies the given searchRequest and searches for articles based on that request
|
|
7795
7808
|
*/
|
|
7796
7809
|
applySearchRequest(searchRequest) {
|
|
7797
|
-
this._catalogSearchService.
|
|
7798
|
-
this._catalogSearchService.searchRequest = Object.assign(this._catalogSearchService.searchRequest, searchRequest);
|
|
7799
|
-
this._catalogSearchService.searchArticles();
|
|
7810
|
+
this._catalogSearchService.applySearchRequest(searchRequest);
|
|
7800
7811
|
}
|
|
7801
7812
|
search() {
|
|
7802
7813
|
this._catalogSearchService.searchArticles();
|