@seniorsistemas/platform-components 5.3.3 → 5.4.0

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.
@@ -1000,6 +1000,7 @@ var FormFilterComponent = /** @class */ (function () {
1000
1000
  var _this = this;
1001
1001
  if (forceSave === void 0) { forceSave = false; }
1002
1002
  var filters = this.parseToUserFilters(this.formFilters);
1003
+ console.log(filters);
1003
1004
  var savedFilterSuccess = function () {
1004
1005
  if (!forceSave) {
1005
1006
  var message = {
@@ -1053,7 +1054,9 @@ var FormFilterComponent = /** @class */ (function () {
1053
1054
  return totalFiltersActive;
1054
1055
  };
1055
1056
  FormFilterComponent.prototype.parseToUserFilters = function (filters) {
1057
+ console.log(filters);
1056
1058
  var ids = Object.keys(filters);
1059
+ console.log(ids.toString());
1057
1060
  return ids.reduce(function (all, filterId) {
1058
1061
  var _a = filters[filterId], type = _a.type, services = _a.services, name = _a.name, value = _a.value, domain = _a.domain, contexts = _a.contexts;
1059
1062
  var filterValue = toUserFormat(value, type);
@@ -1777,6 +1780,13 @@ var Environment = /** @class */ (function () {
1777
1780
  }());
1778
1781
 
1779
1782
  var promise;
1783
+ /**
1784
+ * Zera o cache de módulo de permissões (`promise`). Usado principalmente em testes para
1785
+ * isolar casos, já que `promise` é um estado compartilhado por todo o processo.
1786
+ */
1787
+ function resetPermissionsCache() {
1788
+ promise = undefined;
1789
+ }
1780
1790
  var PermissionsService = /** @class */ (function () {
1781
1791
  function PermissionsService(resources, environment, http, router, messageService, translate) {
1782
1792
  this.resources = resources;
@@ -1841,8 +1851,11 @@ var PermissionsService = /** @class */ (function () {
1841
1851
  return permissions[resourceKey];
1842
1852
  }
1843
1853
  return permissions;
1844
- }), catchError(function (err) {
1854
+ }), catchError(function (error) {
1845
1855
  promise = undefined;
1856
+ if (_this.environment.propagatePermissionErrors) {
1857
+ return throwError(error);
1858
+ }
1846
1859
  _this.messageService.add({
1847
1860
  severity: 'error',
1848
1861
  summary: _this.translate.instant('permission_error_summary'),
@@ -2502,5 +2515,5 @@ var SpotlightModule = /** @class */ (function () {
2502
2515
  * Generated bundle index. Do not edit.
2503
2516
  */
2504
2517
 
2505
- export { AdvancedFilterComponent, AdvancedFilterModule, AdvancedFilterService, AppRoutingModule, CyclicJsonInterceptorModule, FeatureToggleModule, FeatureToggleService, Filter, FilterType, FormFilter, HttpInterceptorModule, LENGTH_DEFAULT, PermissionsModule, PermissionsService, RestUrl, Scope, SpotlightComponent, SpotlightModule, TranslationsConfig, TranslationsModule, USER_INFO, XServicesUrl, factory, promise, fallback as ɵa, CalendarOptionsService as ɵb, FormFilterComponent as ɵc, MapValuesPipe as ɵd, TranslatePipe as ɵe, CyclicJsonInterceptor as ɵf, HttpInterceptor as ɵg, RESOURCES as ɵh, ENVIRONMENT as ɵi, Environment as ɵk, fallback$1 as ɵl, SpotlightService as ɵm, TranslatePipe$1 as ɵn };
2518
+ export { AdvancedFilterComponent, AdvancedFilterModule, AdvancedFilterService, AppRoutingModule, CyclicJsonInterceptorModule, FeatureToggleModule, FeatureToggleService, Filter, FilterType, FormFilter, HttpInterceptorModule, LENGTH_DEFAULT, PermissionsModule, PermissionsService, RestUrl, Scope, SpotlightComponent, SpotlightModule, TranslationsConfig, TranslationsModule, USER_INFO, XServicesUrl, factory, promise, resetPermissionsCache, fallback as ɵa, CalendarOptionsService as ɵb, FormFilterComponent as ɵc, MapValuesPipe as ɵd, TranslatePipe as ɵe, CyclicJsonInterceptor as ɵf, HttpInterceptor as ɵg, RESOURCES as ɵh, ENVIRONMENT as ɵi, Environment as ɵk, fallback$1 as ɵl, SpotlightService as ɵm, TranslatePipe$1 as ɵn };
2506
2519
  //# sourceMappingURL=seniorsistemas-platform-components.js.map